Started tooling about with Java2D BufferedImages. Retrieve tileset

config information from miso.properties for now.  Don't pass around
ImageObservers since we're hoping to be able to address that
differently.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@49 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Walter Korman
2001-07-14 00:21:24 +00:00
parent 007ce996f7
commit edc687fcb4
5 changed files with 74 additions and 67 deletions
+14 -4
View File
@@ -1,18 +1,19 @@
//
// $Id: Tile.java,v 1.1 2001/07/12 22:38:03 shaper Exp $
// $Id: Tile.java,v 1.2 2001/07/14 00:21:24 shaper Exp $
package com.threerings.cocktail.miso.tile;
import java.awt.Image;
import java.awt.image.BufferedImage;
/**
* A tile represents a single square in a single layer in a scene.
*/
public class Tile
{
public Image img; // the tile image
public short tsid; // the tile set identifier
public short tid; // the tile identifier within the set
public BufferedImage img; // the tile image
public short tsid; // the tile set identifier
public short tid; // the tile identifier within the set
// height and width of a tile image in pixels
public static final int HEIGHT = 16;
@@ -46,4 +47,13 @@ public class Tile
this.tsid = (short) tsid;
this.tid = (short) tid;
}
public String toString ()
{
StringBuffer buf = new StringBuffer();
buf.append("[tsid=").append(tsid);
buf.append(", tid=").append(tid);
buf.append(", img=").append(img);
return buf.append("]").toString();
}
}