diff --git a/src/java/com/threerings/miso/client/DisplayMisoSceneImpl.java b/src/java/com/threerings/miso/client/DisplayMisoSceneImpl.java
index 73fc9c11f..f9bfdfbf3 100644
--- a/src/java/com/threerings/miso/client/DisplayMisoSceneImpl.java
+++ b/src/java/com/threerings/miso/client/DisplayMisoSceneImpl.java
@@ -1,5 +1,5 @@
//
-// $Id: DisplayMisoSceneImpl.java,v 1.14 2001/07/25 01:38:08 shaper Exp $
+// $Id: DisplayMisoSceneImpl.java,v 1.15 2001/08/02 01:19:47 shaper Exp $
package com.threerings.miso.scene;
@@ -40,27 +40,30 @@ public class Scene
public static final String[] XLATE_LAYERS = { "Base", "Object" };
/** Scene id to denote an unset or otherwise invalid scene id. */
- public static final int SID_INVALID = -1;
+ public static final short SID_INVALID = -1;
/** The tiles comprising the scene. */
public Tile tiles[][][];
/**
- * Construct a new Scene object initialized to a default state,
- * specifying the tile manager from which the scene obtains tiles.
+ * Construct a new Scene object. The base layer tiles are
+ * initialized to contain tiles of the specified default tileset
+ * and tile id.
*
* @param tilemgr the tile manager.
+ * @param deftsid the default tileset id.
+ * @param deftid the default tile id.
*/
- public Scene (TileManager tilemgr, int sid)
+ public Scene (TileManager tilemgr, int deftsid, int deftid)
{
_tilemgr = tilemgr;
- _sid = (short)sid;
+ _sid = SID_INVALID;
_name = DEF_SCENE_NAME;
_hotspots = new Point[0];
_exits = new ExitPoint[0];
tiles = new Tile[TILE_WIDTH][TILE_HEIGHT][NUM_LAYERS];
- Tile tile = _tilemgr.getTile(DEF_TSID, DEF_TID);
+ Tile tile = _tilemgr.getTile(deftsid, deftid);
for (int xx = 0; xx < TILE_WIDTH; xx++) {
for (int yy = 0; yy < TILE_HEIGHT; yy++) {
for (int ii = 0; ii < NUM_LAYERS; ii++) {
@@ -77,18 +80,17 @@ public class Scene
* the tile manager from which the scene obtains tiles.
*
* @param tilemgr the tile manager.
- * @param sid the scene id.
* @param name the scene name.
* @param hotspots the hotspot points.
* @param exits the exit points.
* @param tiles the tiles comprising the scene.
*/
- public Scene (TileManager tilemgr, int sid, String name,
+ public Scene (TileManager tilemgr, String name,
Point hotspots[], ExitPoint exits[],
Tile tiles[][][])
{
_tilemgr = tilemgr;
- _sid = (short)sid;
+ _sid = SID_INVALID;
_name = name;
_hotspots = hotspots;
_exits = exits;
@@ -162,12 +164,6 @@ public class Scene
/** The default scene name. */
protected static final String DEF_SCENE_NAME = "Untitled Scene";
- /** The default tileset id. */
- protected static final short DEF_TSID = 1000;
-
- /** The default tile id. */
- protected static final short DEF_TID = 1;
-
/** The scene name. */
protected String _name;
diff --git a/src/java/com/threerings/miso/tools/xml/XMLSceneParser.java b/src/java/com/threerings/miso/tools/xml/XMLSceneParser.java
index 10099ecf3..28f66f274 100644
--- a/src/java/com/threerings/miso/tools/xml/XMLSceneParser.java
+++ b/src/java/com/threerings/miso/tools/xml/XMLSceneParser.java
@@ -1,5 +1,5 @@
//
-// $Id: XMLSceneParser.java,v 1.4 2001/07/27 17:52:07 shaper Exp $
+// $Id: XMLSceneParser.java,v 1.5 2001/08/02 01:19:47 shaper Exp $
package com.threerings.miso.scene.xml;
@@ -83,8 +83,9 @@ public class XMLSceneParser extends DefaultHandler
} else if (qName.equals("scene")) {
// construct the scene object on tag close
- _scene = new Scene(_tilemgr, Scene.SID_INVALID, _scName,
- _scHotspots, _scExits, _scTiles);
+ _scene = new Scene(
+ _tilemgr, _scName, _scHotspots, _scExits, _scTiles);
+
Log.info("Constructed parsed scene [scene=" + _scene + "].");
}
diff --git a/tests/rsrc/config/miso/tilesets.xml b/tests/rsrc/config/miso/tilesets.xml
index e5c29b695..8201d47a5 100644
--- a/tests/rsrc/config/miso/tilesets.xml
+++ b/tests/rsrc/config/miso/tilesets.xml
@@ -1,6 +1,6 @@
-
+
@@ -44,4 +44,22 @@
39, 18
+
+ Daniel
+ 1004
+ media/miso/tiles-daniel.png
+ 49, 98
+ 63, 63
+ 5, 1
+
+
+
+ Daniel-2
+ 1005
+ media/miso/tiles-daniel2.png
+ 49
+ 63
+ 14
+
+
diff --git a/tests/rsrc/media/miso/tiles-daniel.png b/tests/rsrc/media/miso/tiles-daniel.png
new file mode 100644
index 000000000..a92739875
Binary files /dev/null and b/tests/rsrc/media/miso/tiles-daniel.png differ
diff --git a/tests/rsrc/media/miso/tiles-daniel2.png b/tests/rsrc/media/miso/tiles-daniel2.png
new file mode 100644
index 000000000..4ac1c8cc8
Binary files /dev/null and b/tests/rsrc/media/miso/tiles-daniel2.png differ