From 6b7f189fc6eb2d47553b1a5a7c23698b03c677ee Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Wed, 5 Feb 2003 00:22:05 +0000 Subject: [PATCH] Provide access to object tileset info. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2241 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../media/tile/TrimmedObjectTileSet.java | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/media/tile/TrimmedObjectTileSet.java b/src/java/com/threerings/media/tile/TrimmedObjectTileSet.java index adb7c6357..d69a4ec2c 100644 --- a/src/java/com/threerings/media/tile/TrimmedObjectTileSet.java +++ b/src/java/com/threerings/media/tile/TrimmedObjectTileSet.java @@ -1,5 +1,5 @@ // -// $Id: TrimmedObjectTileSet.java,v 1.5 2003/02/04 02:59:47 mdb Exp $ +// $Id: TrimmedObjectTileSet.java,v 1.6 2003/02/05 00:22:05 mdb Exp $ package com.threerings.media.tile; @@ -30,6 +30,33 @@ public class TrimmedObjectTileSet extends TileSet return _bounds.length; } + /** + * Returns the x coordinate of the spot associated with the specified + * tile index. + */ + public int getXSpot (int tileIdx) + { + return (_bits == null) ? 0 : _bits[tileIdx].xspot; + } + + /** + * Returns the y coordinate of the spot associated with the specified + * tile index. + */ + public int getYSpot (int tileIdx) + { + return (_bits == null) ? 0 : _bits[tileIdx].yspot; + } + + /** + * Returns the orientation of the spot associated with the specified + * tile index. + */ + public int getSpotOrient (int tileIdx) + { + return (_bits == null) ? 0 : _bits[tileIdx].sorient; + } + // documentation inherited protected Rectangle computeTileBounds (int tileIndex) {