# ai_map.hpp

Go to the documentation of this file.

    00001 /* $Id: ai_map.hpp 17080 2009-08-05 23:57:41Z 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   static const int TILE_INVALID = INVALID_TILE;
    00017 #endif /* DEFINE_SCRIPT_FILES */
    00018 #ifdef DOXYGEN_SKIP
    00019   const static TileIndex TILE_INVALID;
    00020 #endif /* DOXYGEN_SKIP */
    00021
    00022   static const char *GetClassName() { return "AIMap"; }
    00023
    00029   static bool IsValidTile(TileIndex tile);
    00030
    00036   static TileIndex GetMapSize();
    00037
    00043   static uint32 GetMapSizeX();
    00044
    00050   static uint32 GetMapSizeY();
    00051
    00059   static int32 GetTileX(TileIndex tile);
    00060
    00068   static int32 GetTileY(TileIndex tile);
    00069
    00078   static TileIndex GetTileIndex(uint32 x, uint32 y);
    00079
    00089   static int32 DistanceManhattan(TileIndex tile_from, TileIndex tile_to);
    00090
    00101   static int32 DistanceMax(TileIndex tile_from, TileIndex tile_to);
    00102
    00113   static int32 DistanceSquare(TileIndex tile_from, TileIndex tile_to);
    00114
    00121   static int32 DistanceFromEdge(TileIndex tile);
    00122 };
    00123
    00124 #endif /* AI_MAP_HPP */