Rather than getting the tile count from the raw image each time (as TileSet.getTileCount does for certain tilesets), keep a copy of the number of tiles we're counting.

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@74 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Mike Thomas
2006-11-08 19:11:16 +00:00
parent 46616164f4
commit 20922a1cf1
@@ -39,6 +39,7 @@ public class TileMultiFrameImage implements MultiFrameImage
public TileMultiFrameImage (TileSet source)
{
_source = source;
_tileCount = _source.getTileCount();
}
/**
@@ -53,7 +54,7 @@ public class TileMultiFrameImage implements MultiFrameImage
// documentation inherited from interface
public int getFrameCount ()
{
return _source.getTileCount();
return _tileCount;
}
// documentation inherited from interface
@@ -81,4 +82,7 @@ public class TileMultiFrameImage implements MultiFrameImage
}
protected TileSet _source;
/** The number of tiles in the source image. */
protected int _tileCount;
}