Moved TileSetManager-specific methods from TileManager to TSM since
the editor is a special-purpose app and as such can reference the TSM directly and save us from unnecessary TM -> TSM machinations. Reference miso.properties in its new miso-specific location. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@83 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: TileManager.java,v 1.7 2001/07/18 22:45:35 shaper Exp $
|
||||
// $Id: TileManager.java,v 1.8 2001/07/20 02:23:34 shaper Exp $
|
||||
|
||||
package com.threerings.miso.tile;
|
||||
|
||||
@@ -27,24 +27,6 @@ public class TileManager
|
||||
_tsmgr = tsmgr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the total number of tiles in the specified tileset.
|
||||
*/
|
||||
public int getNumTilesInSet (int tsid)
|
||||
{
|
||||
TileSet tset = _tsmgr.getTileSet(tsid);
|
||||
if (tset == null) return -1;
|
||||
return tset.getNumTiles();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a list of all tilesets available for use.
|
||||
*/
|
||||
public ArrayList getTileSets ()
|
||||
{
|
||||
return _tsmgr.getTileSets();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Tile object for the specified tileset and tile id.
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: TileSetManager.java,v 1.5 2001/07/18 22:45:35 shaper Exp $
|
||||
// $Id: TileSetManager.java,v 1.6 2001/07/20 02:23:34 shaper Exp $
|
||||
|
||||
package com.threerings.miso.tile;
|
||||
|
||||
@@ -10,6 +10,16 @@ import java.util.ArrayList;
|
||||
|
||||
public interface TileSetManager
|
||||
{
|
||||
/**
|
||||
* Return the total number of tiles in the specified tileset.
|
||||
*/
|
||||
public int getNumTilesInSet (int tsid);
|
||||
|
||||
/**
|
||||
* Return a list of all tilesets available for use.
|
||||
*/
|
||||
public ArrayList getAllTileSets ();
|
||||
|
||||
/**
|
||||
* Return the tileset object corresponding to the specified tileset id.
|
||||
*/
|
||||
@@ -20,11 +30,6 @@ public interface TileSetManager
|
||||
*/
|
||||
public Image getTileImage (int tsid, int tid);
|
||||
|
||||
/**
|
||||
* Return a list of all tilesets available for use.
|
||||
*/
|
||||
public ArrayList getTileSets ();
|
||||
|
||||
/**
|
||||
* Return the total number of tilesets.
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: TileSetManagerImpl.java,v 1.4 2001/07/18 22:45:35 shaper Exp $
|
||||
// $Id: TileSetManagerImpl.java,v 1.5 2001/07/20 02:23:34 shaper Exp $
|
||||
|
||||
package com.threerings.miso.tile;
|
||||
|
||||
@@ -18,6 +18,12 @@ public abstract class TileSetManagerImpl implements TileSetManager
|
||||
_imgr = imgr;
|
||||
}
|
||||
|
||||
public int getNumTilesInSet (int tsid)
|
||||
{
|
||||
TileSet tset = getTileSet(tsid);
|
||||
return (tset != null) ? tset.getNumTiles() : -1;
|
||||
}
|
||||
|
||||
public TileSet getTileSet (int tsid)
|
||||
{
|
||||
return (TileSet)_tilesets.get(tsid);
|
||||
@@ -29,7 +35,7 @@ public abstract class TileSetManagerImpl implements TileSetManager
|
||||
return (tset != null) ? tset.getTileImage(_imgr, tid) : null;
|
||||
}
|
||||
|
||||
public ArrayList getTileSets ()
|
||||
public ArrayList getAllTileSets ()
|
||||
{
|
||||
int size = _tilesets.size();
|
||||
if (size == 0) return null;
|
||||
|
||||
Reference in New Issue
Block a user