#include <IsoMouseMap.h>
Collaboration diagram for IsoMouseMap:
Public Methods | |
IsoMouseMap () | |
~IsoMouseMap () | |
void | load (char *filename) |
Allows to load a mousemap template image for use with isometric and hexagonal maps. More... | |
void | create (int width, int height) |
Use with rectangular maps. More... | |
void | destroy () |
Clean up. More... | |
POINT | mapMouse (POINT coords) |
Returns the coordinates of the tile that was clicked if the coordinates of the mouse are passed in. More... | |
int | getWidth () |
Returns the width of the tile. More... | |
int | getHeight () |
Returns the height of the tile. More... | |
POINT * | getReferencePoint () |
Returns the reference point. More... | |
void | setReferencePoint (POINT *newReferencePoint) |
Sets the reference point to the value passed in. More... | |
void | calculateReferencePoint (IsoTilePlotter *tilePlotter, RECT *extent) |
Calculates the correct reference point value given the tile plotter used for the game, and the extent rectangle for a specific tile. More... | |
IsoScroller * | getScroller () |
Returns the scroller used for the mouse map. More... | |
void | setScroller (IsoScroller *scroller) |
Sets the scroller. More... | |
IsoTileWalker * | getTileWalker () |
Returns the tile walker used for the mouse map. More... | |
void | setTileWalker (IsoTileWalker *tileWalker) |
Sets the tile walker. More... |
Definition at line 39 of file IsoMouseMap.h.
|
Definition at line 17 of file IsoMouseMap.cpp. References create, setScroller, setTileWalker, POINT::x, and POINT::y. |
|
Definition at line 35 of file IsoMouseMap.cpp. References destroy. |
|
Calculates the correct reference point value given the tile plotter used for the game, and the extent rectangle for a specific tile.
Definition at line 226 of file IsoMouseMap.cpp. References RECT::left, IsoTilePlotter::plotTile, tilePlotter, RECT::top, POINT::x, and POINT::y. Referenced by initializeEngine. |
|
Use with rectangular maps. Takes the width and the height of the tile as a parameter. Definition at line 85 of file IsoMouseMap.cpp. References destroy, MM_CENTER, and MOUSEMAP_DIRECTION. Referenced by IsoMouseMap, and load. |
|
Clean up.
Definition at line 102 of file IsoMouseMap.cpp. Referenced by create, and ~IsoMouseMap. |
|
Returns the height of the tile.
Definition at line 214 of file IsoMouseMap.cpp. Referenced by initializeEngine, and mapMouse. |
|
Returns the reference point.
Definition at line 217 of file IsoMouseMap.cpp. |
|
Returns the scroller used for the mouse map.
Definition at line 241 of file IsoMouseMap.cpp. |
|
Returns the tile walker used for the mouse map.
Definition at line 246 of file IsoMouseMap.cpp. |
|
Returns the width of the tile.
Definition at line 211 of file IsoMouseMap.cpp. Referenced by initializeEngine, and mapMouse. |
|
Allows to load a mousemap template image for use with isometric and hexagonal maps.
Definition at line 47 of file IsoMouseMap.cpp. References create, ImageCanvas::getHeight, getPixel, ImageCanvas::getWidth, ImageCanvas::loadImage, MM_NE, MM_NW, MM_SE, and MM_SW. Referenced by initializeEngine. |
|
Returns the coordinates of the tile that was clicked if the coordinates of the mouse are passed in.
Definition at line 116 of file IsoMouseMap.cpp. References getHeight, getWidth, IDIR_EAST, IDIR_NORTH, IDIR_NORTHEAST, IDIR_NORTHWEST, IDIR_SOUTH, IDIR_SOUTHEAST, IDIR_SOUTHWEST, IDIR_WEST, MM_NE, MM_NW, MM_SE, MM_SW, IsoScroller::ScreenToWorld, IsoTileWalker::walkTile, POINT::x, and POINT::y. Referenced by renderMap. |
|
Sets the reference point to the value passed in.
Definition at line 220 of file IsoMouseMap.cpp. |
|
Sets the scroller.
Definition at line 243 of file IsoMouseMap.cpp. References scroller. Referenced by initializeEngine, and IsoMouseMap. |
|
Sets the tile walker.
Definition at line 248 of file IsoMouseMap.cpp. References tileWalker. Referenced by initializeEngine, and IsoMouseMap. |