diff --git a/src/java/com/threerings/cast/Log.java b/src/java/com/threerings/cast/Log.java index 406165e1..19de3a06 100644 --- a/src/java/com/threerings/cast/Log.java +++ b/src/java/com/threerings/cast/Log.java @@ -28,29 +28,29 @@ package com.threerings.cast; public class Log { public static com.samskivert.util.Log log = - new com.samskivert.util.Log("cast"); + new com.samskivert.util.Log("cast"); /** Convenience function. */ public static void debug (String message) { - log.debug(message); + log.debug(message); } /** Convenience function. */ public static void info (String message) { - log.info(message); + log.info(message); } /** Convenience function. */ public static void warning (String message) { - log.warning(message); + log.warning(message); } /** Convenience function. */ public static void logStackTrace (Throwable t) { - log.logStackTrace(com.samskivert.util.Log.WARNING, t); + log.logStackTrace(com.samskivert.util.Log.WARNING, t); } } diff --git a/src/java/com/threerings/cast/builder/BuilderModel.java b/src/java/com/threerings/cast/builder/BuilderModel.java index 6c57caad..a021a932 100644 --- a/src/java/com/threerings/cast/builder/BuilderModel.java +++ b/src/java/com/threerings/cast/builder/BuilderModel.java @@ -63,10 +63,10 @@ public class BuilderModel */ protected void notifyListeners (int event) { - int size = _listeners.size(); - for (int ii = 0; ii < size; ii++) { - ((BuilderModelListener)_listeners.get(ii)).modelChanged(event); - } + int size = _listeners.size(); + for (int ii = 0; ii < size; ii++) { + ((BuilderModelListener)_listeners.get(ii)).modelChanged(event); + } } /** diff --git a/src/java/com/threerings/cast/builder/BuilderPanel.java b/src/java/com/threerings/cast/builder/BuilderPanel.java index eba5b4a1..a8741165 100644 --- a/src/java/com/threerings/cast/builder/BuilderPanel.java +++ b/src/java/com/threerings/cast/builder/BuilderPanel.java @@ -43,8 +43,8 @@ public class BuilderPanel extends JPanel { setLayout(new VGroupLayout()); - // give ourselves a wee bit of a border - setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); + // give ourselves a wee bit of a border + setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); HGroupLayout gl = new HGroupLayout(HGroupLayout.STRETCH); gl.setOffAxisPolicy(HGroupLayout.STRETCH); diff --git a/src/java/com/threerings/cast/builder/ComponentPanel.java b/src/java/com/threerings/cast/builder/ComponentPanel.java index c13618ed..fda4314e 100644 --- a/src/java/com/threerings/cast/builder/ComponentPanel.java +++ b/src/java/com/threerings/cast/builder/ComponentPanel.java @@ -42,9 +42,9 @@ public class ComponentPanel extends JPanel */ public ComponentPanel (BuilderModel model, String cprefix) { - setLayout(new VGroupLayout(VGroupLayout.STRETCH)); - // set up a border - setBorder(BorderFactory.createEtchedBorder()); + setLayout(new VGroupLayout(VGroupLayout.STRETCH)); + // set up a border + setBorder(BorderFactory.createEtchedBorder()); // add the component editors to the panel addClassEditors(model, cprefix); } diff --git a/src/java/com/threerings/geom/GeomUtil.java b/src/java/com/threerings/geom/GeomUtil.java index aa9fdee0..54be62f3 100644 --- a/src/java/com/threerings/geom/GeomUtil.java +++ b/src/java/com/threerings/geom/GeomUtil.java @@ -244,7 +244,7 @@ public class GeomUtil int row = tileIndex / tilesPerRow; int col = tileIndex % tilesPerRow; - // crop the tile-sized image chunk from the full image + // crop the tile-sized image chunk from the full image return new Rectangle( tileWidth*col, tileHeight*row, tileWidth, tileHeight); } diff --git a/src/java/com/threerings/geom/Log.java b/src/java/com/threerings/geom/Log.java index b95d0b1a..4e8b93a9 100644 --- a/src/java/com/threerings/geom/Log.java +++ b/src/java/com/threerings/geom/Log.java @@ -35,25 +35,25 @@ public class Log /** Convenience function. */ public static void debug (String message) { - log.debug(message); + log.debug(message); } /** Convenience function. */ public static void info (String message) { - log.info(message); + log.info(message); } /** Convenience function. */ public static void warning (String message) { - log.warning(message); + log.warning(message); } /** Convenience function. */ public static void logStackTrace (Throwable t) { - log.logStackTrace(com.samskivert.util.Log.WARNING, t); + log.logStackTrace(com.samskivert.util.Log.WARNING, t); } public static int getLevel () diff --git a/src/java/com/threerings/jme/Log.java b/src/java/com/threerings/jme/Log.java index 99f19879..3bef4861 100644 --- a/src/java/com/threerings/jme/Log.java +++ b/src/java/com/threerings/jme/Log.java @@ -35,24 +35,24 @@ public class Log /** Convenience function. */ public static void debug (String message) { - log.fine(message); + log.fine(message); } /** Convenience function. */ public static void info (String message) { - log.info(message); + log.info(message); } /** Convenience function. */ public static void warning (String message) { - log.warning(message); + log.warning(message); } /** Convenience function. */ public static void logStackTrace (Throwable t) { - log.log(Level.WARNING, t.getMessage(), t); + log.log(Level.WARNING, t.getMessage(), t); } } diff --git a/src/java/com/threerings/media/FrameManager.java b/src/java/com/threerings/media/FrameManager.java index 76e271b3..26cf6a6e 100644 --- a/src/java/com/threerings/media/FrameManager.java +++ b/src/java/com/threerings/media/FrameManager.java @@ -311,16 +311,16 @@ public abstract class FrameManager */ public static Component getRoot (Component comp, Rectangle rect) { - for (Component c = comp; c != null; c = c.getParent()) { - if (!c.isVisible() || !c.isDisplayable()) { - return null; - } + for (Component c = comp; c != null; c = c.getParent()) { + if (!c.isVisible() || !c.isDisplayable()) { + return null; + } if (c instanceof Window || c instanceof Applet) { - return c; - } + return c; + } rect.x += c.getX(); rect.y += c.getY(); - } + } return null; } diff --git a/src/java/com/threerings/media/Log.java b/src/java/com/threerings/media/Log.java index 8e008ccc..f1cee849 100644 --- a/src/java/com/threerings/media/Log.java +++ b/src/java/com/threerings/media/Log.java @@ -36,24 +36,24 @@ public class Log /** Convenience function. */ public static void debug (String message) { - log.fine(message); + log.fine(message); } /** Convenience function. */ public static void info (String message) { - log.info(message); + log.info(message); } /** Convenience function. */ public static void warning (String message) { - log.warning(message); + log.warning(message); } /** Convenience function. */ public static void logStackTrace (Throwable t) { - log.log(Level.WARNING, t.getMessage(), t); + log.log(Level.WARNING, t.getMessage(), t); } } diff --git a/src/java/com/threerings/media/image/ImageManager.java b/src/java/com/threerings/media/image/ImageManager.java index e6a22688..f6e3718c 100644 --- a/src/java/com/threerings/media/image/ImageManager.java +++ b/src/java/com/threerings/media/image/ImageManager.java @@ -113,7 +113,7 @@ public class ImageManager */ public ImageManager (ResourceManager rmgr, OptimalImageCreator icreator) { - _rmgr = rmgr; + _rmgr = rmgr; _icreator = icreator; // create our image cache diff --git a/src/java/com/threerings/media/sound/OggPlayer.java b/src/java/com/threerings/media/sound/OggPlayer.java index d5925edd..dd116307 100644 --- a/src/java/com/threerings/media/sound/OggPlayer.java +++ b/src/java/com/threerings/media/sound/OggPlayer.java @@ -124,33 +124,33 @@ public class OggPlayer extends MusicPlayer // System.out.println(ee); //} AudioFormat audioFormat = - new AudioFormat((float)rate, - 16, - channels, - true, // PCM_Signed - false // littleEndian - ); + new AudioFormat((float)rate, + 16, + channels, + true, // PCM_Signed + false // littleEndian + ); DataLine.Info info = - new DataLine.Info(SourceDataLine.class, - audioFormat, - AudioSystem.NOT_SPECIFIED); + new DataLine.Info(SourceDataLine.class, + audioFormat, + AudioSystem.NOT_SPECIFIED); if (!AudioSystem.isLineSupported(info)) { - //System.out.println("Line " + info + " not supported."); - return; + //System.out.println("Line " + info + " not supported."); + return; } try{ - outputLine = (SourceDataLine) AudioSystem.getLine(info); - //outputLine.addLineListener(this); - outputLine.open(audioFormat); + outputLine = (SourceDataLine) AudioSystem.getLine(info); + //outputLine.addLineListener(this); + outputLine.open(audioFormat); } catch (LineUnavailableException ex) { - System.out.println("Unable to open the sourceDataLine: " + ex); + System.out.println("Unable to open the sourceDataLine: " + ex); return; } catch (IllegalArgumentException ex) { - System.out.println("Illegal Argument: " + ex); - return; + System.out.println("Illegal Argument: " + ex); + return; } frameSizeInBytes = audioFormat.getFrameSize(); @@ -294,7 +294,7 @@ public class OggPlayer extends MusicPlayer break; // need more data } if (result == -1) { // missing or corrupt data at this page position - // System.err.println("Corrupt or missing data in bitstream; continuing..."); + // System.err.println("Corrupt or missing data in bitstream; continuing..."); } else { os.pagein(og); diff --git a/src/java/com/threerings/media/sprite/SpriteManager.java b/src/java/com/threerings/media/sprite/SpriteManager.java index e8ac9788..a7c3a5f6 100644 --- a/src/java/com/threerings/media/sprite/SpriteManager.java +++ b/src/java/com/threerings/media/sprite/SpriteManager.java @@ -172,7 +172,7 @@ public class SpriteManager extends AbstractMediaManager { for (int ii=0, nn=_sprites.size(); ii < nn; ii++) { Sprite sprite = _sprites.get(ii); - sprite.paintPath(gfx); + sprite.paintPath(gfx); } } @@ -185,12 +185,12 @@ public class SpriteManager extends AbstractMediaManager // */ // protected void handleCollisions () // { -// // gather a list of all sprite collisions -// int size = _sprites.size(); -// for (int ii = 0; ii < size; ii++) { +// // gather a list of all sprite collisions +// int size = _sprites.size(); +// for (int ii = 0; ii < size; ii++) { // Sprite sprite = _sprites.get(ii); -// checkCollisions(ii, size, sprite); -// } +// checkCollisions(ii, size, sprite); +// } // } // // /** @@ -205,35 +205,35 @@ public class SpriteManager extends AbstractMediaManager // */ // protected void checkCollisions (int idx, int size, Sprite sprite) // { -// // TODO: make this handle quickly moving objects that may pass -// // through each other. +// // TODO: make this handle quickly moving objects that may pass +// // through each other. // -// // if we're the last sprite we know we've already handled any -// // collisions -// if (idx == (size - 1)) { -// return; -// } +// // if we're the last sprite we know we've already handled any +// // collisions +// if (idx == (size - 1)) { +// return; +// } // -// // calculate the x-position of the right edge of the sprite we're -// // checking for collisions -// Rectangle bounds = sprite.getBounds(); -// int edgeX = bounds.x + bounds.width; +// // calculate the x-position of the right edge of the sprite we're +// // checking for collisions +// Rectangle bounds = sprite.getBounds(); +// int edgeX = bounds.x + bounds.width; // -// for (int ii = (idx + 1); ii < size; ii++) { -// Sprite other = _sprites.get(ii); -// Rectangle obounds = other.getBounds(); -// if (obounds.x > edgeX) { -// // since sprites are stored in the list sorted by -// // ascending x-position, we know this sprite and any -// // other sprites farther on in the list can't possibly -// // intersect with the sprite we're checking, so we're -// // done. +// for (int ii = (idx + 1); ii < size; ii++) { +// Sprite other = _sprites.get(ii); +// Rectangle obounds = other.getBounds(); +// if (obounds.x > edgeX) { +// // since sprites are stored in the list sorted by +// // ascending x-position, we know this sprite and any +// // other sprites farther on in the list can't possibly +// // intersect with the sprite we're checking, so we're +// // done. // return; // -// } else if (obounds.intersects(bounds)) { -// sprite.notifyObservers(new CollisionEvent(sprite, other)); -// } -// } +// } else if (obounds.intersects(bounds)) { +// sprite.notifyObservers(new CollisionEvent(sprite, other)); +// } +// } // } // /** The comparator used to sort sprites by horizontal position. */ // protected static final Comparator SPRITE_COMP = new SpriteComparator(); @@ -241,10 +241,10 @@ public class SpriteManager extends AbstractMediaManager // /** Used to sort sprites. */ // protected static class SpriteComparator implements Comparator // { -// public int compare (Sprite s1, Sprite s2) -// { -// return (s2.getX() - s1.getX()); -// } +// public int compare (Sprite s1, Sprite s2) +// { +// return (s2.getX() - s1.getX()); +// } // } @Override // from AbstractMediaManager diff --git a/src/java/com/threerings/media/tile/NoSuchTileSetException.java b/src/java/com/threerings/media/tile/NoSuchTileSetException.java index 7f2d2c2c..f17ef98c 100644 --- a/src/java/com/threerings/media/tile/NoSuchTileSetException.java +++ b/src/java/com/threerings/media/tile/NoSuchTileSetException.java @@ -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 + "'"); } } diff --git a/src/java/com/threerings/media/tile/ObjectTileSet.java b/src/java/com/threerings/media/tile/ObjectTileSet.java index cc3a8d3d..287dd3e0 100644 --- a/src/java/com/threerings/media/tile/ObjectTileSet.java +++ b/src/java/com/threerings/media/tile/ObjectTileSet.java @@ -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 diff --git a/src/java/com/threerings/media/tile/SwissArmyTileSet.java b/src/java/com/threerings/media/tile/SwissArmyTileSet.java index cd4b74ba..076a224a 100644 --- a/src/java/com/threerings/media/tile/SwissArmyTileSet.java +++ b/src/java/com/threerings/media/tile/SwissArmyTileSet.java @@ -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]); } diff --git a/src/java/com/threerings/media/tile/Tile.java b/src/java/com/threerings/media/tile/Tile.java index 1b4ad3d5..725703f9 100644 --- a/src/java/com/threerings/media/tile/Tile.java +++ b/src/java/com/threerings/media/tile/Tile.java @@ -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(); } /** diff --git a/src/java/com/threerings/media/tile/TileManager.java b/src/java/com/threerings/media/tile/TileManager.java index 050a8957..2e3b66f3 100644 --- a/src/java/com/threerings/media/tile/TileManager.java +++ b/src/java/com/threerings/media/tile/TileManager.java @@ -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); diff --git a/src/java/com/threerings/media/tile/TileSet.java b/src/java/com/threerings/media/tile/TileSet.java index 54de3c93..b123bb03 100644 --- a/src/java/com/threerings/media/tile/TileSet.java +++ b/src/java/com/threerings/media/tile/TileSet.java @@ -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. */ diff --git a/src/java/com/threerings/media/tile/TrimmedObjectTileSet.java b/src/java/com/threerings/media/tile/TrimmedObjectTileSet.java index 8dae9ee4..efa97f1a 100644 --- a/src/java/com/threerings/media/tile/TrimmedObjectTileSet.java +++ b/src/java/com/threerings/media/tile/TrimmedObjectTileSet.java @@ -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)); } /** diff --git a/src/java/com/threerings/media/tile/TrimmedTile.java b/src/java/com/threerings/media/tile/TrimmedTile.java index b42a983e..c3b72728 100644 --- a/src/java/com/threerings/media/tile/TrimmedTile.java +++ b/src/java/com/threerings/media/tile/TrimmedTile.java @@ -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. */ diff --git a/src/java/com/threerings/media/tile/UniformTileSet.java b/src/java/com/threerings/media/tile/UniformTileSet.java index 0cd38fd2..6be44655 100644 --- a/src/java/com/threerings/media/tile/UniformTileSet.java +++ b/src/java/com/threerings/media/tile/UniformTileSet.java @@ -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. */ diff --git a/src/java/com/threerings/media/util/AStarPathUtil.java b/src/java/com/threerings/media/util/AStarPathUtil.java index 351fe221..0c503414 100644 --- a/src/java/com/threerings/media/util/AStarPathUtil.java +++ b/src/java/com/threerings/media/util/AStarPathUtil.java @@ -86,14 +86,14 @@ public class AStarPathUtil */ public void considerSteps (int x, int y) { - considerStep(x - 1, y - 1, DIAGONAL_COST); - considerStep(x, y - 1, ADJACENT_COST); - considerStep(x + 1, y - 1, DIAGONAL_COST); - considerStep(x - 1, y, ADJACENT_COST); - considerStep(x + 1, y, ADJACENT_COST); - considerStep(x - 1, y + 1, DIAGONAL_COST); - considerStep(x, y + 1, ADJACENT_COST); - considerStep(x + 1, y + 1, DIAGONAL_COST); + considerStep(x - 1, y - 1, DIAGONAL_COST); + considerStep(x, y - 1, ADJACENT_COST); + considerStep(x + 1, y - 1, DIAGONAL_COST); + considerStep(x - 1, y, ADJACENT_COST); + considerStep(x + 1, y, ADJACENT_COST); + considerStep(x - 1, y + 1, DIAGONAL_COST); + considerStep(x, y + 1, ADJACENT_COST); + considerStep(x + 1, y + 1, DIAGONAL_COST); } protected void considerStep (int x, int y, int cost) @@ -186,8 +186,8 @@ public class AStarPathUtil return getNodePath(bestpath); } - // no path found - return null; + // no path found + return null; } /** diff --git a/src/java/com/threerings/media/util/ArcPath.java b/src/java/com/threerings/media/util/ArcPath.java index 5f01792d..91331139 100644 --- a/src/java/com/threerings/media/util/ArcPath.java +++ b/src/java/com/threerings/media/util/ArcPath.java @@ -197,10 +197,10 @@ public class ArcPath extends TimedPath gfx.setColor(Color.blue); gfx.drawRect(x, y, width-1, height-1); - gfx.setColor(Color.yellow); + gfx.setColor(Color.yellow); gfx.drawArc(x, y, width-1, height-1, 0, 360); - gfx.setColor(Color.red); + gfx.setColor(Color.red); gfx.drawArc(x, y, width-1, height-1, 360-sangle, -delta); } diff --git a/src/java/com/threerings/media/util/LinePath.java b/src/java/com/threerings/media/util/LinePath.java index 7a9f20ef..0cbe4831 100644 --- a/src/java/com/threerings/media/util/LinePath.java +++ b/src/java/com/threerings/media/util/LinePath.java @@ -115,7 +115,7 @@ public class LinePath extends TimedPath // documentation inherited public void paint (Graphics2D gfx) { - gfx.setColor(Color.red); + gfx.setColor(Color.red); gfx.drawLine(_source.x, _source.y, _dest.x, _dest.y); } diff --git a/src/java/com/threerings/media/util/LineSegmentPath.java b/src/java/com/threerings/media/util/LineSegmentPath.java index 65af4647..0b3c671d 100644 --- a/src/java/com/threerings/media/util/LineSegmentPath.java +++ b/src/java/com/threerings/media/util/LineSegmentPath.java @@ -309,16 +309,16 @@ public class LineSegmentPath // documentation inherited public void paint (Graphics2D gfx) { - gfx.setColor(Color.red); - Point prev = null; - int size = size(); - for (int ii = 0; ii < size; ii++) { - PathNode n = (PathNode)getNode(ii); - if (prev != null) { + gfx.setColor(Color.red); + Point prev = null; + int size = size(); + for (int ii = 0; ii < size; ii++) { + PathNode n = (PathNode)getNode(ii); + if (prev != null) { gfx.drawLine(prev.x, prev.y, n.loc.x, n.loc.y); } - prev = n.loc; - } + prev = n.loc; + } } // documentation inherited diff --git a/src/java/com/threerings/media/util/MathUtil.java b/src/java/com/threerings/media/util/MathUtil.java index 40fd7c79..fb3c96e8 100644 --- a/src/java/com/threerings/media/util/MathUtil.java +++ b/src/java/com/threerings/media/util/MathUtil.java @@ -45,7 +45,7 @@ public class MathUtil */ public static int distanceSq (int x0, int y0, int x1, int y1) { - return ((x1 - x0) * (x1 - x0)) + ((y1 - y0) * (y1 - y0)); + return ((x1 - x0) * (x1 - x0)) + ((y1 - y0) * (y1 - y0)); } /** @@ -53,8 +53,8 @@ public class MathUtil */ public static float distance (int x0, int y0, int x1, int y1) { - return (float)Math.sqrt(((x1 - x0) * (x1 - x0)) + - ((y1 - y0) * (y1 - y0))); + return (float)Math.sqrt(((x1 - x0) * (x1 - x0)) + + ((y1 - y0) * (y1 - y0))); } /** @@ -70,7 +70,7 @@ public class MathUtil */ public static String lineToString (int x0, int y0, int x1, int y1) { - return "(" + x0 + ", " + y0 + ") -> (" + x1 + ", " + y1 + ")"; + return "(" + x0 + ", " + y0 + ") -> (" + x1 + ", " + y1 + ")"; } /** @@ -78,7 +78,7 @@ public class MathUtil */ public static String lineToString (Point p1, Point p2) { - return lineToString(p1.x, p1.y, p2.x, p2.y); + return lineToString(p1.x, p1.y, p2.x, p2.y); } /** diff --git a/src/java/com/threerings/miso/Log.java b/src/java/com/threerings/miso/Log.java index 4c6fdf4d..1011d140 100644 --- a/src/java/com/threerings/miso/Log.java +++ b/src/java/com/threerings/miso/Log.java @@ -28,29 +28,29 @@ package com.threerings.miso; public class Log { public static com.samskivert.util.Log log = - new com.samskivert.util.Log("miso"); + new com.samskivert.util.Log("miso"); /** Convenience function. */ public static void debug (String message) { - log.debug(message); + log.debug(message); } /** Convenience function. */ public static void info (String message) { - log.info(message); + log.info(message); } /** Convenience function. */ public static void warning (String message) { - log.warning(message); + log.warning(message); } /** Convenience function. */ public static void logStackTrace (Throwable t) { - log.logStackTrace(com.samskivert.util.Log.WARNING, t); + log.logStackTrace(com.samskivert.util.Log.WARNING, t); } } diff --git a/src/java/com/threerings/miso/client/TilePath.java b/src/java/com/threerings/miso/client/TilePath.java index 82ca81a4..596c0af2 100644 --- a/src/java/com/threerings/miso/client/TilePath.java +++ b/src/java/com/threerings/miso/client/TilePath.java @@ -57,17 +57,17 @@ public class TilePath extends LineSegmentPath public TilePath (MisoSceneMetrics metrics, Sprite sprite, List tiles, int destx, int desty) { - // constrain destination pixels to fine coordinates - Point fpos = new Point(); - MisoUtil.screenToFull(metrics, destx, desty, fpos); + // constrain destination pixels to fine coordinates + Point fpos = new Point(); + MisoUtil.screenToFull(metrics, destx, desty, fpos); // add the starting path node int sx = sprite.getX(), sy = sprite.getY(); Point ipos = MisoUtil.screenToTile(metrics, sx, sy, new Point()); addNode(sx, sy, NORTH); - // TODO: make more visually appealing path segments from start to - // second tile, and penultimate to ultimate tile + // TODO: make more visually appealing path segments from start to + // second tile, and penultimate to ultimate tile // add all remaining path nodes excepting the last one Point prev = new Point(ipos.x, ipos.y); @@ -111,8 +111,8 @@ public class TilePath extends LineSegmentPath dir = MisoUtil.getIsoDirection(prev.x, prev.y, tdestx, tdesty); } - // add the final destination path node - addNode(spos.x, spos.y, dir); + // add the final destination path node + addNode(spos.x, spos.y, dir); } /** diff --git a/src/java/com/threerings/miso/tile/BaseTileSet.java b/src/java/com/threerings/miso/tile/BaseTileSet.java index cbafa437..7041f10a 100644 --- a/src/java/com/threerings/miso/tile/BaseTileSet.java +++ b/src/java/com/threerings/miso/tile/BaseTileSet.java @@ -69,7 +69,7 @@ public class BaseTileSet extends SwissArmyTileSet protected void toString (StringBuilder buf) { super.toString(buf); - buf.append(", passable=").append(StringUtil.toString(_passable)); + buf.append(", passable=").append(StringUtil.toString(_passable)); } /** Whether each tile is passable. */ diff --git a/src/java/com/threerings/miso/util/MisoSceneMetrics.java b/src/java/com/threerings/miso/util/MisoSceneMetrics.java index 206d9cb2..5cfc9be7 100644 --- a/src/java/com/threerings/miso/util/MisoSceneMetrics.java +++ b/src/java/com/threerings/miso/util/MisoSceneMetrics.java @@ -86,16 +86,16 @@ public class MisoSceneMetrics slopeX = (float)tilehei / (float)tilewid; slopeY = -slopeX; - // calculate the edge length separating each fine coordinate - finelen = tilelen / (float)finegran; + // calculate the edge length separating each fine coordinate + finelen = tilelen / (float)finegran; - // calculate the fine-coordinate x-axis line - fineSlopeX = (float)tilehei / (float)tilewid; - fineBX = -(fineSlopeX * (float)tilehwid); - fineSlopeY = -fineSlopeX; + // calculate the fine-coordinate x-axis line + fineSlopeX = (float)tilehei / (float)tilewid; + fineBX = -(fineSlopeX * (float)tilehwid); + fineSlopeY = -fineSlopeX; - // calculate the fine coordinate dimensions - finehwid = (int)((float)tilehwid / (float)finegran); - finehhei = (int)((float)tilehhei / (float)finegran); + // calculate the fine coordinate dimensions + finehwid = (int)((float)tilehwid / (float)finegran); + finehhei = (int)((float)tilehhei / (float)finegran); } } diff --git a/src/java/com/threerings/openal/Log.java b/src/java/com/threerings/openal/Log.java index 7e369199..925c01e9 100644 --- a/src/java/com/threerings/openal/Log.java +++ b/src/java/com/threerings/openal/Log.java @@ -28,29 +28,29 @@ package com.threerings.openal; public class Log { public static com.samskivert.util.Log log = - new com.samskivert.util.Log("narya.openal"); + new com.samskivert.util.Log("narya.openal"); /** Convenience function. */ public static void debug (String message) { - log.debug(message); + log.debug(message); } /** Convenience function. */ public static void info (String message) { - log.info(message); + log.info(message); } /** Convenience function. */ public static void warning (String message) { - log.warning(message); + log.warning(message); } /** Convenience function. */ public static void logStackTrace (Throwable t) { - log.logStackTrace(com.samskivert.util.Log.WARNING, t); + log.logStackTrace(com.samskivert.util.Log.WARNING, t); } } diff --git a/src/java/com/threerings/resource/Log.java b/src/java/com/threerings/resource/Log.java index 4fdcfe05..aa406041 100644 --- a/src/java/com/threerings/resource/Log.java +++ b/src/java/com/threerings/resource/Log.java @@ -28,29 +28,29 @@ package com.threerings.resource; public class Log { public static com.samskivert.util.Log log = - new com.samskivert.util.Log("resource"); + new com.samskivert.util.Log("resource"); /** Convenience function. */ public static void debug (String message) { - log.debug(message); + log.debug(message); } /** Convenience function. */ public static void info (String message) { - log.info(message); + log.info(message); } /** Convenience function. */ public static void warning (String message) { - log.warning(message); + log.warning(message); } /** Convenience function. */ public static void logStackTrace (Throwable t) { - log.logStackTrace(com.samskivert.util.Log.WARNING, t); + log.logStackTrace(com.samskivert.util.Log.WARNING, t); } }