# ai_map.hpp

Go to the documentation of this file.

    00001 /* $Id: ai_map.hpp 16248 2009-05-06 23:21:43Z rubidium $ */
    00002
    00005 #ifndef AI_MAP_HPP
    00006 #define AI_MAP_HPP
    00007
    00008 #include "ai_object.hpp"
    00009
    00013 class AIMap : public AIObject {
    00014 public:
    00015 #ifdef DEFINE_SCRIPT_FILES
    00016   enum MapType {
    00017     TILE_INVALID = INVALID_TILE,
    00018   };
    00019 #endif /* DEFINE_SCRIPT_FILES */
    00020 #ifdef DOXYGEN_SKIP
    00021   const static TileIndex TILE_INVALID;
    00022 #endif /* DOXYGEN_SKIP */
    00023
    00024   static const char *GetClassName() { return "AIMap"; }
    00025
    00031   static bool IsValidTile(TileIndex tile);
    00032
    00038   static TileIndex GetMapSize();
    00039
    00045   static uint32 GetMapSizeX();
    00046
    00052   static uint32 GetMapSizeY();
    00053
    00061   static int32 GetTileX(TileIndex tile);
    00062
    00070   static int32 GetTileY(TileIndex tile);
    00071
    00080   static TileIndex GetTileIndex(uint32 x, uint32 y);
    00081
    00091   static int32 DistanceManhattan(TileIndex tile_from, TileIndex tile_to);
    00092
    00103   static int32 DistanceMax(TileIndex tile_from, TileIndex tile_to);
    00104
    00115   static int32 DistanceSquare(TileIndex tile_from, TileIndex tile_to);
    00116
    00123   static int32 DistanceFromEdge(TileIndex tile);
    00124 };
    00125
    00126 #endif /* AI_MAP_HPP */