Tileset => TileSet; made getTileSetImage() public so that the trimming

code can get to the underlying tileset image.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1485 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2002-06-19 08:27:06 +00:00
parent 2c9be83574
commit 5214d15ac6
@@ -1,5 +1,5 @@
// //
// $Id: TileSet.java,v 1.28 2002/05/09 18:43:32 mdb Exp $ // $Id: TileSet.java,v 1.29 2002/06/19 08:27:06 mdb Exp $
package com.threerings.media.tile; package com.threerings.media.tile;
@@ -106,7 +106,7 @@ public abstract class TileSet
} }
// make sure the tileset was able to load its image // make sure the tileset was able to load its image
Image timg = tset.getTilesetImage(); Image timg = tset.getTileSetImage();
if (timg == null) { if (timg == null) {
Log.warning("Failed to load tileset image in preparation " + Log.warning("Failed to load tileset image in preparation " +
"for colorization [tset=" + tset + "]."); "for colorization [tset=" + tset + "].");
@@ -165,7 +165,7 @@ public abstract class TileSet
} }
// get our tileset image // get our tileset image
Image tsimg = getTilesetImage(); Image tsimg = getTileSetImage();
if (tsimg == null) { if (tsimg == null) {
// we already logged an error, so we can just freak out // we already logged an error, so we can just freak out
throw new NoSuchTileException(tileIndex); throw new NoSuchTileException(tileIndex);
@@ -221,12 +221,13 @@ public abstract class TileSet
/** /**
* Returns the tileset image (which is loaded if it has not yet been * Returns the tileset image (which is loaded if it has not yet been
* loaded). * loaded). Generally this is not called by external entities, rather
* {@link #getTileImage} or {@link #getTile} is used.
* *
* @return the tileset image or null if an error occurred loading the * @return the tileset image or null if an error occurred loading the
* image. * image.
*/ */
protected Image getTilesetImage () public Image getTileSetImage ()
{ {
// return it straight away if it's already loaded // return it straight away if it's already loaded
if (_tilesetImg != null) { if (_tilesetImg != null) {
@@ -264,7 +265,7 @@ public abstract class TileSet
} }
/** /**
* Tileset derived classes should override this, calling * Derived classes can override this, calling
* <code>super.toString(buf)</code> and then appending additional * <code>super.toString(buf)</code> and then appending additional
* information to the buffer. * information to the buffer.
*/ */
@@ -285,7 +286,7 @@ public abstract class TileSet
protected transient ImageProvider _improv; protected transient ImageProvider _improv;
/** The image containing all tile images for this set. This is private /** The image containing all tile images for this set. This is private
* because it should be accessed via {@link #getTilesetImage} even by * because it should be accessed via {@link #getTileSetImage} even by
* derived classes. */ * derived classes. */
private transient Image _tilesetImg; private transient Image _tilesetImg;