Formatting changes:
- removed tabs - explicitly specify imports - I made each comment a complete and punctuated sentance. - other minor convention changes git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1155 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,17 +1,19 @@
|
|||||||
//
|
//
|
||||||
// $Id: ColorUtil.java,v 1.1 2002/03/26 20:09:43 ray Exp $
|
// $Id: ColorUtil.java,v 1.2 2002/03/26 23:35:01 ray Exp $
|
||||||
|
|
||||||
package com.threerings.media.util;
|
package com.threerings.media.util;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utilities to manipulate colors
|
* Utilities to manipulate colors.
|
||||||
*/
|
*/
|
||||||
public class ColorUtil
|
public class ColorUtil
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @return a color halfway between the two colors
|
* Blends the two supplied colors.
|
||||||
|
*
|
||||||
|
* @return a color halfway between the two colors.
|
||||||
*/
|
*/
|
||||||
public static final Color blend (Color c1, Color c2)
|
public static final Color blend (Color c1, Color c2)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: ObjectTileLayer.java,v 1.2 2002/03/26 20:17:51 ray Exp $
|
// $Id: ObjectTileLayer.java,v 1.3 2002/03/26 23:35:01 ray Exp $
|
||||||
|
|
||||||
package com.threerings.media.tile;
|
package com.threerings.media.tile;
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ public final class ObjectTileLayer
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes the tile at the specified row and column
|
* Removes the tile at the specified row and column.
|
||||||
*/
|
*/
|
||||||
public void clearTile (int column, int row)
|
public void clearTile (int column, int row)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: DisplayMisoSceneImpl.java,v 1.52 2002/03/26 20:17:51 ray Exp $
|
// $Id: DisplayMisoSceneImpl.java,v 1.53 2002/03/26 23:35:01 ray Exp $
|
||||||
|
|
||||||
package com.threerings.miso.scene;
|
package com.threerings.miso.scene;
|
||||||
|
|
||||||
@@ -227,10 +227,14 @@ public class DisplayMisoSceneImpl
|
|||||||
int endy = Math.max(0, (y - otile.getBaseHeight() + 1));
|
int endy = Math.max(0, (y - otile.getBaseHeight() + 1));
|
||||||
|
|
||||||
for (int xx = x; xx >= endx; xx--) {
|
for (int xx = x; xx >= endx; xx--) {
|
||||||
if ((xx < 0) || (xx >= _model.width)) continue;
|
if ((xx < 0) || (xx >= _model.width)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
for (int yy = y; yy >= endy; yy--) {
|
for (int yy = y; yy >= endy; yy--) {
|
||||||
if ((yy < 0) || (yy >= _model.height)) continue;
|
if ((yy < 0) || (yy >= _model.height)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
BaseTile tile = _base.getTile(xx, yy);
|
BaseTile tile = _base.getTile(xx, yy);
|
||||||
if (tile != null) {
|
if (tile != null) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: IsoSceneView.java,v 1.103 2002/03/26 20:17:51 ray Exp $
|
// $Id: IsoSceneView.java,v 1.104 2002/03/26 23:35:01 ray Exp $
|
||||||
|
|
||||||
package com.threerings.miso.scene;
|
package com.threerings.miso.scene;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: IsoUtil.java,v 1.23 2002/03/26 20:17:51 ray Exp $
|
// $Id: IsoUtil.java,v 1.24 2002/03/26 23:35:02 ray Exp $
|
||||||
|
|
||||||
package com.threerings.miso.scene.util;
|
package com.threerings.miso.scene.util;
|
||||||
|
|
||||||
@@ -447,7 +447,9 @@ public class IsoUtil
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the hash key, give x and y
|
* Turns x and y scene coordinates into an integer key.
|
||||||
|
*
|
||||||
|
* @return the hash key, given x and y.
|
||||||
*/
|
*/
|
||||||
public static final int coordsToKey (int x, int y)
|
public static final int coordsToKey (int x, int y)
|
||||||
{
|
{
|
||||||
@@ -455,7 +457,9 @@ public class IsoUtil
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the x coordinate from the hash key
|
* Gets the x coordinate from an integer hash key.
|
||||||
|
*
|
||||||
|
* @return the x coordinate.
|
||||||
*/
|
*/
|
||||||
public static final int xCoordFromKey (int key)
|
public static final int xCoordFromKey (int key)
|
||||||
{
|
{
|
||||||
@@ -463,7 +467,9 @@ public class IsoUtil
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the y coordinate from the hash key
|
* Gets the y coordinate from an integer hash key.
|
||||||
|
*
|
||||||
|
* @return the y coordinate from the hash key.
|
||||||
*/
|
*/
|
||||||
public static final int yCoordFromKey (int key)
|
public static final int yCoordFromKey (int key)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
//
|
//
|
||||||
// $Id: EditableMisoSceneImpl.java,v 1.10 2002/03/26 20:17:51 ray Exp $
|
// $Id: EditableMisoSceneImpl.java,v 1.11 2002/03/26 23:35:02 ray Exp $
|
||||||
|
|
||||||
package com.threerings.miso.scene.tools;
|
package com.threerings.miso.scene.tools;
|
||||||
|
|
||||||
|
import java.util.Iterator;
|
||||||
|
|
||||||
import com.samskivert.util.HashIntMap;
|
import com.samskivert.util.HashIntMap;
|
||||||
|
|
||||||
import com.threerings.media.tile.NoSuchTileException;
|
import com.threerings.media.tile.NoSuchTileException;
|
||||||
@@ -17,8 +19,6 @@ import com.threerings.miso.scene.DisplayMisoSceneImpl;
|
|||||||
import com.threerings.miso.scene.MisoSceneModel;
|
import com.threerings.miso.scene.MisoSceneModel;
|
||||||
import com.threerings.miso.scene.util.IsoUtil;
|
import com.threerings.miso.scene.util.IsoUtil;
|
||||||
|
|
||||||
import java.util.Iterator;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default implementation of the {@link EditableMisoScene} interface.
|
* The default implementation of the {@link EditableMisoScene} interface.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user