(svn r9627) [NoAI] -Fix: let the squirrel export script export all needed (and a few more) types of references to structs and classes.
/* $Id$ */
/** @file ai_map.cpp handles the query-related of the AIMap class */
#include "ai_map.hpp"
#include "../../command.h"
bool AIMap::IsValidTile(TileIndex t)
{
return t < this->GetMapSize();
}
TileIndex AIMap::GetMapSize()
{
return ::MapSize();
}
uint32 AIMap::GetMapSizeX()
{
return ::MapSizeX();
}
uint32 AIMap::GetMapSizeY()
{
return ::MapSizeY();
}
uint32 AIMap::GetTileX(TileIndex t)
{
return ::TileX(t);
}
uint32 AIMap::GetTileY(TileIndex t)
{
return ::TileY(t);
}
TileIndex AIMap::GetTileIndex(uint32 x, uint32 y)
{
return ::TileXY(x, y);
}
uint32 AIMap::DistanceManhattan(TileIndex t1, TileIndex t2)
{
return ::DistanceManhattan(t1, t2);
}
uint32 AIMap::DistanceMax(TileIndex t1, TileIndex t2)
{
return ::DistanceMax(t1, t2);
}
uint32 AIMap::DistanceSquare(TileIndex t1, TileIndex t2)
{
return ::DistanceSquare(t1, t2);
}
uint32 AIMap::DistanceFromEdge(TileIndex t)
{
return ::DistanceFromEdge(t);
}
bool AIMap::DemolishTile(TileIndex t)
{
return this->DoCommand(t, 0, 0, CMD_LANDSCAPE_CLEAR);
}