mhframework.tilemap
Class MHDiamondMap

java.lang.Object
  extended by mhframework.tilemap.MHTileMap
      extended by mhframework.tilemap.MHIsometricMap
          extended by mhframework.tilemap.MHDiamondMap
All Implemented Interfaces:
MHRenderable

public class MHDiamondMap
extends MHIsometricMap

Handles the presentation of a diamond (angled) isometric map.


Field Summary
 
Fields inherited from class mhframework.tilemap.MHIsometricMap
cursorFlasher, cursorOn, mouseMap
 
Fields inherited from class mhframework.tilemap.MHTileMap
anchorSpace, cursorAddress, cursorAnchor, cursorPoint, DIR_EAST, DIR_NORTH, DIR_NORTHEAST, DIR_NORTHWEST, DIR_SOUTH, DIR_SOUTHEAST, DIR_SOUTHWEST, DIR_WEST, MAX_DIRECTIONS, screenAnchor, screenSpace, worldSpace
 
Constructor Summary
MHDiamondMap(java.lang.String filename, MHObjectFactory vendor)
           
 
Method Summary
protected  void calculateWorldSpace()
          Calculate the world space for this tile map.
 java.awt.Point plotTile(int row, int column)
          Calculates the pixel position at which the input actor will be rendered.
protected  MHMapCellAddress tileWalk(int row, int column, int direction)
          Calculates the next map position to which an actor would walk if it were in position (row, column) and travelled in the direction specified by direction.
 
Methods inherited from class mhframework.tilemap.MHIsometricMap
advance, drawCursor, getTileHeight, isCursorOn, mapMouse, render, render, render, setCursorOn, tileWalk
 
Methods inherited from class mhframework.tilemap.MHTileMap
calculateAnchorSpace, clipCursorAddress, clipScreenAnchor, getCursorAddress, getCursorPoint, getMapData, getScreenAnchor, getScreenSpace, getTileWidth, isAnchorCoordinate, isScreenCoordinate, isWorldCoordinate, mouseMoved, screenToWorld, scrollMap, setCursorPoint, setScreenAnchor, setScreenAnchor, setScreenSpace, setTileWidth, worldToScreen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MHDiamondMap

public MHDiamondMap(java.lang.String filename,
                    MHObjectFactory vendor)
Method Detail

tileWalk

protected MHMapCellAddress tileWalk(int row,
                                    int column,
                                    int direction)
Description copied from class: MHIsometricMap
Calculates the next map position to which an actor would walk if it were in position (row, column) and travelled in the direction specified by direction.

Specified by:
tileWalk in class MHIsometricMap
Parameters:
row - The actor's current row position.
column - The actor's current column position.
direction - The direction in which to walk.
Returns:
A point indicating the actor's new column and row position after walking from its original position.

plotTile

public java.awt.Point plotTile(int row,
                               int column)
Description copied from class: MHIsometricMap
Calculates the pixel position at which the input actor will be rendered.

Specified by:
plotTile in class MHIsometricMap
Parameters:
row - The row of the map containing the actor (tile) to be plotted.
column - The column of the map containing the actor (tile) to be plotted.
Returns:
The pixel position at which the actor will be rendered.

calculateWorldSpace

protected void calculateWorldSpace()
Calculate the world space for this tile map.

Overrides:
calculateWorldSpace in class MHTileMap