diff --git a/src/java/com/threerings/media/tile/ObjectTile.java b/src/java/com/threerings/media/tile/ObjectTile.java
index 999c86e30..3853dd5f3 100644
--- a/src/java/com/threerings/media/tile/ObjectTile.java
+++ b/src/java/com/threerings/media/tile/ObjectTile.java
@@ -1,17 +1,16 @@
//
-// $Id: ObjectTile.java,v 1.1 2001/10/11 00:41:26 shaper Exp $
+// $Id: ObjectTile.java,v 1.2 2001/10/12 00:38:15 shaper Exp $
package com.threerings.media.tile;
-import java.awt.Graphics2D;
-import java.awt.Shape;
+import java.awt.*;
/**
* An object tile extends the base tile to provide support for objects
- * whose image spans more than one tile. The object has dimensions
- * that represent its footprint or "shadow", which the scene
- * containing the tile can reference to do things like make the
- * footprint tiles impassable.
+ * whose image spans more than one tile. An object tile has
+ * dimensions that represent its footprint or "shadow", which the
+ * scene containing the tile can then reference to do things like
+ * making the footprint tiles impassable.
*/
public class ObjectTile extends Tile
{
@@ -28,13 +27,4 @@ public class ObjectTile extends Tile
this.baseWidth = baseWidth;
this.baseHeight = baseHeight;
}
-
- // documentation inherited
- public void paint (Graphics2D gfx, Shape dest)
- {
- super.paint(gfx, dest);
-
- // TODO: draw the object image offset to account for its
- // actual dimensions
- }
}
diff --git a/src/java/com/threerings/media/tile/Tile.java b/src/java/com/threerings/media/tile/Tile.java
index c476ac76c..9486c3f9f 100644
--- a/src/java/com/threerings/media/tile/Tile.java
+++ b/src/java/com/threerings/media/tile/Tile.java
@@ -1,5 +1,5 @@
//
-// $Id: Tile.java,v 1.14 2001/10/11 00:41:26 shaper Exp $
+// $Id: Tile.java,v 1.15 2001/10/12 00:38:15 shaper Exp $
package com.threerings.media.tile;
@@ -49,8 +49,8 @@ public class Tile
}
/**
- * Render the tile into the given rectangle in the given graphics
- * context.
+ * Render the tile image at the top-left corner of the given shape
+ * in the given graphics context.
*/
public void paint (Graphics2D gfx, Shape dest)
{
diff --git a/src/java/com/threerings/media/tile/TileSetManager.java b/src/java/com/threerings/media/tile/TileSetManager.java
index 51a330b87..990809664 100644
--- a/src/java/com/threerings/media/tile/TileSetManager.java
+++ b/src/java/com/threerings/media/tile/TileSetManager.java
@@ -1,12 +1,12 @@
//
-// $Id: TileSetManager.java,v 1.13 2001/10/11 00:41:26 shaper Exp $
+// $Id: TileSetManager.java,v 1.14 2001/10/12 00:38:15 shaper Exp $
package com.threerings.media.tile;
import com.threerings.media.ImageManager;
import java.awt.Image;
-import java.util.ArrayList;
+import java.util.Iterator;
/**
* The TileSetManager provides tileset management
@@ -20,22 +20,12 @@ import java.util.ArrayList;
public interface TileSetManager
{
/**
- * Return the total number of tiles in the specified tileset or -1
- * if the tileset is not found.
+ * Return an Iterator over all TileSet
+ * objects available.
*
- * @param tsid the tileset identifier.
- * @return the number of tiles.
+ * @return the tileset iterator.
*/
- public int getNumTilesInSet (int tsid)
- throws NoSuchTileSetException;
-
- /**
- * Return an ArrayList containing all
- * TileSet objects available.
- *
- * @return the list of tilesets.
- */
- public ArrayList getAllTileSets ();
+ public Iterator getTileSets ();
/**
* Return the tileset object corresponding to the specified
@@ -58,11 +48,4 @@ public interface TileSetManager
*/
public Tile getTile (int tsid, int tid)
throws NoSuchTileSetException, NoSuchTileException;
-
- /**
- * Return the total number of tilesets available for use.
- *
- * @return the number of tilesets.
- */
- public int getNumTileSets ();
}
diff --git a/src/java/com/threerings/media/tile/TileSetManagerImpl.java b/src/java/com/threerings/media/tile/TileSetManagerImpl.java
index e8a8b0ff9..134d69275 100644
--- a/src/java/com/threerings/media/tile/TileSetManagerImpl.java
+++ b/src/java/com/threerings/media/tile/TileSetManagerImpl.java
@@ -1,12 +1,12 @@
//
-// $Id: TileSetManagerImpl.java,v 1.13 2001/10/11 00:41:26 shaper Exp $
+// $Id: TileSetManagerImpl.java,v 1.14 2001/10/12 00:38:15 shaper Exp $
package com.threerings.media.tile;
import java.awt.Image;
import java.io.*;
-import java.util.ArrayList;
-import java.util.Enumeration;
+import java.util.Collections;
+import java.util.Iterator;
import com.samskivert.util.*;
@@ -16,7 +16,7 @@ import com.threerings.media.Log;
public abstract class TileSetManagerImpl implements TileSetManager
{
/**
- * Initialize the TileSetManager.
+ * Initialize the tile set manager.
*
* @param config the config object.
* @param imgmgr the image manager.
@@ -27,12 +27,7 @@ public abstract class TileSetManagerImpl implements TileSetManager
_config = config;
}
- public int getNumTilesInSet (int tsid)
- throws NoSuchTileSetException
- {
- return getTileSet(tsid).getNumTiles();
- }
-
+ // documentation inherited
public TileSet getTileSet (int tsid)
throws NoSuchTileSetException
{
@@ -44,24 +39,19 @@ public abstract class TileSetManagerImpl implements TileSetManager
return tset;
}
+ // documentation inherited
+ public Iterator getTileSets ()
+ {
+ return Collections.unmodifiableMap(_tilesets).values().iterator();
+ }
+
+ // documentation inherited
public Tile getTile (int tsid, int tid)
throws NoSuchTileSetException, NoSuchTileException
{
return getTileSet(tsid).getTile(_imgmgr, tid);
}
- public ArrayList getAllTileSets ()
- {
- ArrayList list = new ArrayList();
- CollectionUtil.addAll(list, _tilesets.elements());
- return list;
- }
-
- public int getNumTileSets ()
- {
- return _tilesets.size();
- }
-
/** The config object. */
protected Config _config;