From c69e46be21619fddede7de7078dcde14d07be89e Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Fri, 28 Sep 2001 01:24:27 +0000 Subject: [PATCH] Added getTileId() which returns the fully qualified tile id. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@352 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/media/tile/Tile.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/media/tile/Tile.java b/src/java/com/threerings/media/tile/Tile.java index 13ec45495..15891cde0 100644 --- a/src/java/com/threerings/media/tile/Tile.java +++ b/src/java/com/threerings/media/tile/Tile.java @@ -1,5 +1,5 @@ // -// $Id: Tile.java,v 1.11 2001/08/16 23:14:20 mdb Exp $ +// $Id: Tile.java,v 1.12 2001/09/28 01:24:27 mdb Exp $ package com.threerings.media.tile; @@ -41,6 +41,16 @@ public class Tile this.tid = (short) tid; } + /** + * Returns the fully qualified tile id for this tile. The fully + * qualified id contains both the tile set identifier and the tile + * identifier. + */ + public int getTileId () + { + return ((int)tsid << 16) | tid; + } + /** * Return a string representation of the tile information. */