Added support for specifying a default tileset for scenes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2439 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: MisoSceneModel.java,v 1.16 2003/04/19 22:40:34 mdb Exp $
|
||||
// $Id: MisoSceneModel.java,v 1.17 2003/04/21 17:08:57 mdb Exp $
|
||||
|
||||
package com.threerings.miso.data;
|
||||
|
||||
@@ -52,6 +52,15 @@ public abstract class MisoSceneModel extends SimpleStreamableObject
|
||||
*/
|
||||
public abstract boolean setBaseTile (int fqTileId, int x, int y);
|
||||
|
||||
/**
|
||||
* Scene models can return a default tileset to be used when no base
|
||||
* tile data exists for a particular tile.
|
||||
*/
|
||||
public int getDefaultBaseTileSet ()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Populates the supplied object set with info on all objects whose
|
||||
* origin falls in the requested region.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: SparseMisoSceneModel.java,v 1.3 2003/04/20 00:05:14 mdb Exp $
|
||||
// $Id: SparseMisoSceneModel.java,v 1.4 2003/04/21 17:08:57 mdb Exp $
|
||||
|
||||
package com.threerings.miso.data;
|
||||
|
||||
@@ -173,6 +173,9 @@ public class SparseMisoSceneModel extends MisoSceneModel
|
||||
/** The dimensions of a section of our scene. */
|
||||
public short swidth, sheight;
|
||||
|
||||
/** The tileset to use when we have no tile data. */
|
||||
public int defTileSet = 8;
|
||||
|
||||
/**
|
||||
* Creates a scene model with the specified bounds.
|
||||
*
|
||||
@@ -238,6 +241,12 @@ public class SparseMisoSceneModel extends MisoSceneModel
|
||||
return true;
|
||||
}
|
||||
|
||||
// documentation inherited
|
||||
public int getDefaultBaseTileSet ()
|
||||
{
|
||||
return defTileSet;
|
||||
}
|
||||
|
||||
// documentation inherited
|
||||
public void getObjects (Rectangle region, ObjectSet set)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user