3 |
* |
* |
4 |
* @see IsoTileWalker |
* @see IsoTileWalker |
5 |
* |
* |
6 |
|
* Revision History: |
7 |
|
* v1.1 (June 6) - Optimized the class for square maps. |
8 |
|
* Removed the different function pointers. |
9 |
|
* Removed the map type accessor and modifier. |
10 |
|
* Removed the walker function pointer definition. |
11 |
|
* |
12 |
* @author <A href="mailto:vovansim@hotmail.com">Vovansim (aka Scorpion)</A> |
* @author <A href="mailto:vovansim@hotmail.com">Vovansim (aka Scorpion)</A> |
13 |
* @version 1.0 |
* @version 1.1 |
14 |
* @date May 20, 2003 |
* @date June 6, 2003 |
15 |
*/ |
*/ |
16 |
|
|
17 |
#ifndef ISO_TILE_WALKER_H |
#ifndef ISO_TILE_WALKER_H |
19 |
|
|
20 |
#include "IsoDefinitions.h" |
#include "IsoDefinitions.h" |
21 |
|
|
|
/** typedef for a function pointer to a tilewalker function */ |
|
|
typedef POINT (*ISOTILEWALKERFN)(POINT start, ISODIRECTION direction); |
|
|
|
|
22 |
/** |
/** |
23 |
* Class IsoTileWalker: This class wraps up the map walking nicely for |
* Class IsoTileWalker: This class wraps up the map walking nicely for |
24 |
* any kind of map. Basically, once it is initialized, no matter what |
* any kind of map. Basically, once it is initialized, no matter what |
26 |
* of a point, and specifying the direction of movement will spit out |
* of a point, and specifying the direction of movement will spit out |
27 |
* the correct coordinates. |
* the correct coordinates. |
28 |
* |
* |
29 |
|
* Revision History: |
30 |
|
* v1.1 (June 6) - Optimized the class for square maps. |
31 |
|
* Removed the map type accessor and modifier. |
32 |
|
* Removed the map type and walker function member variables. |
33 |
|
* |
34 |
* @author <A href="mailto:vovansim@hotmail.com">Vovansim (aka Scorpion)</A> |
* @author <A href="mailto:vovansim@hotmail.com">Vovansim (aka Scorpion)</A> |
35 |
* @version 1.0 |
* @version 1.1 |
36 |
* @date May 20, 2003 |
* @date June 6, 2003 |
37 |
*/ |
*/ |
38 |
class IsoTileWalker { |
class IsoTileWalker { |
39 |
public: |
public: |
53 |
*/ |
*/ |
54 |
POINT walkTile(POINT start, ISODIRECTION direction); |
POINT walkTile(POINT start, ISODIRECTION direction); |
55 |
|
|
|
|
|
|
|
|
|
////////////////////////// Accessors / Modifiers ////////////////////////// |
|
|
|
|
|
/** Map type accessor */ |
|
|
ISOMAPTYPE getMapType(); |
|
|
/** Map type modifier */ |
|
|
void setMapType(ISOMAPTYPE newMapType); |
|
|
|
|
|
//////////////////////// End Accessors / Modifiers //////////////////////// |
|
|
|
|
56 |
private: |
private: |
57 |
/** The map type to walk */ |
//No variables to keep track of... |
|
ISOMAPTYPE isoMapType; |
|
|
|
|
|
/** The tile walker function. */ |
|
|
ISOTILEWALKERFN walkerFunction; |
|
58 |
}; |
}; |
59 |
|
|
60 |
#endif//ISO_TILE_WALKER_H |
#endif//ISO_TILE_WALKER_H |