Tabs -> spaces

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@268 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Dave Hoover
2007-06-26 00:07:47 +00:00
parent 0250be64ac
commit 717dc79c02
32 changed files with 191 additions and 191 deletions
@@ -29,11 +29,11 @@ public class NoSuchTileSetException extends Exception
{
public NoSuchTileSetException (String tileSetName)
{
super("No tile set named '" + tileSetName + "'");
super("No tile set named '" + tileSetName + "'");
}
public NoSuchTileSetException (int tileSetId)
{
super("No tile set with id '" + tileSetId + "'");
super("No tile set with id '" + tileSetId + "'");
}
}
@@ -204,16 +204,16 @@ public class ObjectTileSet extends SwissArmyTileSet
protected void toString (StringBuilder buf)
{
super.toString(buf);
buf.append(", owidths=").append(StringUtil.toString(_owidths));
buf.append(", oheights=").append(StringUtil.toString(_oheights));
buf.append(", xorigins=").append(StringUtil.toString(_xorigins));
buf.append(", yorigins=").append(StringUtil.toString(_yorigins));
buf.append(", prios=").append(StringUtil.toString(_priorities));
buf.append(", zations=").append(StringUtil.toString(_zations));
buf.append(", xspots=").append(StringUtil.toString(_xspots));
buf.append(", yspots=").append(StringUtil.toString(_yspots));
buf.append(", sorients=").append(StringUtil.toString(_sorients));
buf.append(", constraints=").append(StringUtil.toString(_constraints));
buf.append(", owidths=").append(StringUtil.toString(_owidths));
buf.append(", oheights=").append(StringUtil.toString(_oheights));
buf.append(", xorigins=").append(StringUtil.toString(_xorigins));
buf.append(", yorigins=").append(StringUtil.toString(_yorigins));
buf.append(", prios=").append(StringUtil.toString(_priorities));
buf.append(", zations=").append(StringUtil.toString(_zations));
buf.append(", xspots=").append(StringUtil.toString(_xspots));
buf.append(", yspots=").append(StringUtil.toString(_yspots));
buf.append(", sorients=").append(StringUtil.toString(_sorients));
buf.append(", constraints=").append(StringUtil.toString(_constraints));
}
// documentation inherited
@@ -42,7 +42,7 @@ public class SwissArmyTileSet extends TileSet
// documentation inherited
public int getTileCount ()
{
return _numTiles;
return _numTiles;
}
/**
@@ -135,40 +135,40 @@ public class SwissArmyTileSet extends TileSet
protected void toString (StringBuilder buf)
{
super.toString(buf);
buf.append(", widths=").append(StringUtil.toString(_widths));
buf.append(", heights=").append(StringUtil.toString(_heights));
buf.append(", tileCounts=").append(StringUtil.toString(_tileCounts));
buf.append(", offsetPos=").append(StringUtil.toString(_offsetPos));
buf.append(", gapSize=").append(StringUtil.toString(_gapSize));
buf.append(", widths=").append(StringUtil.toString(_widths));
buf.append(", heights=").append(StringUtil.toString(_heights));
buf.append(", tileCounts=").append(StringUtil.toString(_tileCounts));
buf.append(", offsetPos=").append(StringUtil.toString(_offsetPos));
buf.append(", gapSize=").append(StringUtil.toString(_gapSize));
}
// documentation inherited
protected Rectangle computeTileBounds (int tileIndex)
{
// find the row number containing the sought-after tile
int ridx, tcount, ty, tx;
ridx = tcount = 0;
// find the row number containing the sought-after tile
int ridx, tcount, ty, tx;
ridx = tcount = 0;
// start tile image position at image start offset
tx = _offsetPos.x;
ty = _offsetPos.y;
while ((tcount += _tileCounts[ridx]) < tileIndex + 1) {
while ((tcount += _tileCounts[ridx]) < tileIndex + 1) {
// increment tile image position by row height and gap distance
ty += (_heights[ridx++] + _gapSize.height);
}
ty += (_heights[ridx++] + _gapSize.height);
}
// determine the horizontal index of this tile in the row
int xidx = tileIndex - (tcount - _tileCounts[ridx]);
int xidx = tileIndex - (tcount - _tileCounts[ridx]);
// final image x-position is based on tile width and gap distance
tx += (xidx * (_widths[ridx] + _gapSize.width));
// Log.info("Computed tile bounds [tileIndex=" + tileIndex +
// Log.info("Computed tile bounds [tileIndex=" + tileIndex +
// ", ridx=" + ridx + ", xidx=" + xidx +
// ", tx=" + tx + ", ty=" + ty + "].");
// crop the tile-sized image chunk from the full image
// crop the tile-sized image chunk from the full image
return new Rectangle(tx, ty, _widths[ridx], _heights[ridx]);
}
+2 -2
View File
@@ -145,9 +145,9 @@ public class Tile // implements Cloneable
*/
public String toString ()
{
StringBuilder buf = new StringBuilder("[");
StringBuilder buf = new StringBuilder("[");
toString(buf);
return buf.append("]").toString();
return buf.append("]").toString();
}
/**
@@ -145,7 +145,7 @@ public class TileManager
*/
public TileSetRepository getTileSetRepository ()
{
return _setrep;
return _setrep;
}
/**
@@ -206,7 +206,7 @@ public class TileManager
* @see TileUtil#getFQTileId
*/
public Tile getTile (int fqTileId)
throws NoSuchTileSetException
throws NoSuchTileSetException
{
return getTile(TileUtil.getTileSetId(fqTileId),
TileUtil.getTileIndex(fqTileId), null);
@@ -219,7 +219,7 @@ public class TileManager
* @see TileUtil#getFQTileId
*/
public Tile getTile (int fqTileId, TileSet.Colorizer rizer)
throws NoSuchTileSetException
throws NoSuchTileSetException
{
return getTile(TileUtil.getTileSetId(fqTileId),
TileUtil.getTileIndex(fqTileId), rizer);
@@ -235,7 +235,7 @@ public class TileManager
* @return the tile object.
*/
public Tile getTile (int tileSetId, int tileIndex, TileSet.Colorizer rizer)
throws NoSuchTileSetException
throws NoSuchTileSetException
{
TileSet set = getTileSet(tileSetId);
return set.getTile(tileIndex, rizer);
@@ -86,7 +86,7 @@ public abstract class TileSet
*/
public String getName ()
{
return (_name == null) ? _imagePath : _name;
return (_name == null) ? _imagePath : _name;
}
/**
@@ -322,7 +322,7 @@ public abstract class TileSet
protected boolean checkTileIndex (int tileIndex)
{
int tcount = getTileCount();
if (tileIndex >= 0 && tileIndex < tcount) {
if (tileIndex >= 0 && tileIndex < tcount) {
return true;
} else {
Log.warning("Requested invalid tile [tset=" + this +
@@ -377,9 +377,9 @@ public abstract class TileSet
*/
public String toString ()
{
StringBuilder buf = new StringBuilder("[");
StringBuilder buf = new StringBuilder("[");
toString(buf);
return buf.append("]").toString();
return buf.append("]").toString();
}
/**
@@ -422,8 +422,8 @@ public abstract class TileSet
protected void toString (StringBuilder buf)
{
buf.append("name=").append(_name);
buf.append(", path=").append(_imagePath);
buf.append(", tileCount=").append(getTileCount());
buf.append(", path=").append(_imagePath);
buf.append(", tileCount=").append(getTileCount());
}
/** The path to the file containing the tile images. */
@@ -163,10 +163,10 @@ public class TrimmedObjectTileSet extends TileSet
protected void toString (StringBuilder buf)
{
super.toString(buf);
buf.append(", ometrics=").append(StringUtil.toString(_ometrics));
buf.append(", bounds=").append(StringUtil.toString(_bounds));
buf.append(", bits=").append(StringUtil.toString(_bits));
buf.append(", zations=").append(StringUtil.toString(_zations));
buf.append(", ometrics=").append(StringUtil.toString(_ometrics));
buf.append(", bounds=").append(StringUtil.toString(_bounds));
buf.append(", bits=").append(StringUtil.toString(_bits));
buf.append(", zations=").append(StringUtil.toString(_zations));
}
/**
@@ -83,7 +83,7 @@ public class TrimmedTile extends Tile
// documentation inherited
protected void toString (StringBuilder buf)
{
buf.append(", tbounds=").append(StringUtil.toString(_tbounds));
buf.append(", tbounds=").append(StringUtil.toString(_tbounds));
}
/** Our extra trimmed image dimension information. */
@@ -88,8 +88,8 @@ public class UniformTileSet extends TileSet
protected void toString (StringBuilder buf)
{
super.toString(buf);
buf.append(", width=").append(_width);
buf.append(", height=").append(_height);
buf.append(", width=").append(_width);
buf.append(", height=").append(_height);
}
/** The width (in pixels) of the tiles in this tileset. */