/** \file IsoTileWalker.h * Declares the IsoTileWalker class. * * @see IsoTileWalker * * @author Vovansim (aka Scorpion) * @version 1.0 * @date May 20, 2003 */ #ifndef ISO_TILE_WALKER_H #define ISO_TILE_WALKER_H #include "IsoDefinitions.h" /** typedef for a function pointer to a tilewalker function */ typedef POINT (*ISOTILEWALKERFN)(POINT start, ISODIRECTION direction); /** * Class IsoTileWalker: This class wraps up the map walking nicely for * any kind of map. Basically, once it is initialized, no matter what * the type of map being used is, passing in the starting coordinates * of a point, and specifying the direction of movement will spit out * the correct coordinates. * * @author Vovansim (aka Scorpion) * @version 1.0 * @date May 20, 2003 */ class IsoTileWalker { public: //////////////////////// Construction / Destruction /////////////////////// IsoTileWalker(); ~IsoTileWalker(); ////////////////////// End Construction / Destruction ///////////////////// /** * Returns the point at which an object would be located after walking from * the position specified by the start parameter one tile in the direction * specified by the direction parameter. */ POINT walkTile(POINT start, ISODIRECTION direction); ////////////////////////// Accessors / Modifiers ////////////////////////// /** Map type accessor */ ISOMAPTYPE getMapType(); /** Map type modifier */ void setMapType(ISOMAPTYPE newMapType); //////////////////////// End Accessors / Modifiers //////////////////////// private: /** The map type to walk */ ISOMAPTYPE isoMapType; /** The tile walker function. */ ISOTILEWALKERFN walkerFunction; }; #endif//ISO_TILE_WALKER_H