edu.gatech.cs2335.lemmings.graphics
Class ImprovedTileSet

java.lang.Object
  extended byedu.gatech.cs2335.lemmings.graphics.TileSet
      extended byedu.gatech.cs2335.lemmings.graphics.ImprovedTileSet

public class ImprovedTileSet
extends TileSet

Class ImprovedTileSet: This tileset is essentially an improved version of the regular tileset.

 Revision History:
     v1.0 (Mar. 01, 2004) - Created the ImprovedTileSet class
 

Version:
Version 1.0, Mar. 01, 2004
Author:
Vladimir Urazov

Nested Class Summary
 
Nested classes inherited from class edu.gatech.cs2335.lemmings.graphics.TileSet
TileSet.FrameInformation
 
Field Summary
 
Fields inherited from class edu.gatech.cs2335.lemmings.graphics.TileSet
DEBUG
 
Constructor Summary
ImprovedTileSet()
          Creates a new ImprovedTileSet instance.
 
Method Summary
 void drawTile(java.awt.Graphics destination, java.awt.Point coordinates, int tileNum)
          Puts the tile with the specified number onto the graphics context passed in at the specified coordinates.
 java.awt.Dimension getDimension(int tileNum)
          Returns the dimensions of the tile with the specified id.
 java.awt.Dimension getLargestDimension()
          Returns the dimensions of the largest tile in the tileset.
 int getTileCount()
          Returns the number of tiles in the tileset.
protected  boolean specialLoad()
          Describe specialLoad method here.
 boolean unloadTileset()
          Performs all the necessary clean-up operations.
 
Methods inherited from class edu.gatech.cs2335.lemmings.graphics.TileSet
findFirstOccurrence, findLastOccurrence, getExtent, getFileName, getFrameList, getFramesetImage, getImage, loadTileset, reloadTileset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImprovedTileSet

public ImprovedTileSet()
Creates a new ImprovedTileSet instance.

Method Detail

specialLoad

protected boolean specialLoad()
Describe specialLoad method here.

Overrides:
specialLoad in class TileSet
Returns:
a boolean value

unloadTileset

public boolean unloadTileset()
Performs all the necessary clean-up operations.

Overrides:
unloadTileset in class TileSet
Returns:
a boolean value

getTileCount

public int getTileCount()
Returns the number of tiles in the tileset.

Overrides:
getTileCount in class TileSet
Returns:
an int value

getLargestDimension

public java.awt.Dimension getLargestDimension()
Returns the dimensions of the largest tile in the tileset.

Overrides:
getLargestDimension in class TileSet
Returns:
a Dimension value

getDimension

public java.awt.Dimension getDimension(int tileNum)
Returns the dimensions of the tile with the specified id.

Overrides:
getDimension in class TileSet
Parameters:
tileNum - an int value
Returns:
a Dimension value

drawTile

public void drawTile(java.awt.Graphics destination,
                     java.awt.Point coordinates,
                     int tileNum)
Puts the tile with the specified number onto the graphics context passed in at the specified coordinates. Note that the position of the tile will depend on its anchor point, which will be put exactly at the coordinates passed in.

Overrides:
drawTile in class TileSet
Parameters:
destination - the context to which we want to draw the tile.
coordinates - the coordinates at which we want to draw the tile.
tileNum - the number of the tile we want to draw. The tiles will be numbered automatically, from left to right, from top to bottom, when the image file is parsed.