Initial work on support for objects whose images span multiple tiles.

Made TileSet an interface.  Throw exceptions for unknown tile or tile
set requests.  General clean-up and documentation.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@427 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Walter Korman
2001-10-11 00:41:27 +00:00
parent 5c79f8f082
commit ad7b64d4a1
30 changed files with 811 additions and 521 deletions
@@ -0,0 +1,40 @@
//
// $Id: ObjectTile.java,v 1.1 2001/10/11 00:41:26 shaper Exp $
package com.threerings.media.tile;
import java.awt.Graphics2D;
import java.awt.Shape;
/**
* 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.
*/
public class ObjectTile extends Tile
{
/** The object footprint dimensions in unit tile units. */
public int baseWidth, baseHeight;
/**
* Constructs a new object tile.
*/
public ObjectTile (int tsid, int tid, int baseWidth, int baseHeight)
{
super(tsid, tid);
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
}
}