src/ai/api/ai_map.cpp
author truelight
Sun, 18 Mar 2007 18:02:27 +0000
branchnoai
changeset 9452 4c5eedbc3ba9
parent 9430 9e0a193b2bec
child 9489 d7ee0a65ead9
permissions -rw-r--r--
(svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
DoCommand no longer returns the cost, it returns a bool.
Costs are available via this Accounting class.
9379
6e89b780c2c9 (svn r9168) [NoAI] -Add: AI wrapper functions for some map related queries.
rubidium
parents:
diff changeset
     1
/* $Id$ */
6e89b780c2c9 (svn r9168) [NoAI] -Add: AI wrapper functions for some map related queries.
rubidium
parents:
diff changeset
     2
9430
9e0a193b2bec (svn r9234) [NoAI] -Codechange: move away from the 'much' subdirectory approach for the API implementation.
rubidium
parents: 9427
diff changeset
     3
/** @file ai_map.cpp handles the query-related of the AIMap class */
9379
6e89b780c2c9 (svn r9168) [NoAI] -Add: AI wrapper functions for some map related queries.
rubidium
parents:
diff changeset
     4
9430
9e0a193b2bec (svn r9234) [NoAI] -Codechange: move away from the 'much' subdirectory approach for the API implementation.
rubidium
parents: 9427
diff changeset
     5
#include "ai_map.hpp"
9379
6e89b780c2c9 (svn r9168) [NoAI] -Add: AI wrapper functions for some map related queries.
rubidium
parents:
diff changeset
     6
6e89b780c2c9 (svn r9168) [NoAI] -Add: AI wrapper functions for some map related queries.
rubidium
parents:
diff changeset
     7
bool AIMap::IsValidTile(TileIndex t)
6e89b780c2c9 (svn r9168) [NoAI] -Add: AI wrapper functions for some map related queries.
rubidium
parents:
diff changeset
     8
{
6e89b780c2c9 (svn r9168) [NoAI] -Add: AI wrapper functions for some map related queries.
rubidium
parents:
diff changeset
     9
	return t < this->GetMapSize();
6e89b780c2c9 (svn r9168) [NoAI] -Add: AI wrapper functions for some map related queries.
rubidium
parents:
diff changeset
    10
}
6e89b780c2c9 (svn r9168) [NoAI] -Add: AI wrapper functions for some map related queries.
rubidium
parents:
diff changeset
    11
6e89b780c2c9 (svn r9168) [NoAI] -Add: AI wrapper functions for some map related queries.
rubidium
parents:
diff changeset
    12
TileIndex AIMap::GetMapSize()
6e89b780c2c9 (svn r9168) [NoAI] -Add: AI wrapper functions for some map related queries.
rubidium
parents:
diff changeset
    13
{
6e89b780c2c9 (svn r9168) [NoAI] -Add: AI wrapper functions for some map related queries.
rubidium
parents:
diff changeset
    14
	return ::MapSize();
6e89b780c2c9 (svn r9168) [NoAI] -Add: AI wrapper functions for some map related queries.
rubidium
parents:
diff changeset
    15
}
6e89b780c2c9 (svn r9168) [NoAI] -Add: AI wrapper functions for some map related queries.
rubidium
parents:
diff changeset
    16
6e89b780c2c9 (svn r9168) [NoAI] -Add: AI wrapper functions for some map related queries.
rubidium
parents:
diff changeset
    17
uint32 AIMap::GetMapSizeX()
6e89b780c2c9 (svn r9168) [NoAI] -Add: AI wrapper functions for some map related queries.
rubidium
parents:
diff changeset
    18
{
6e89b780c2c9 (svn r9168) [NoAI] -Add: AI wrapper functions for some map related queries.
rubidium
parents:
diff changeset
    19
	return ::MapSizeX();
6e89b780c2c9 (svn r9168) [NoAI] -Add: AI wrapper functions for some map related queries.
rubidium
parents:
diff changeset
    20
}
6e89b780c2c9 (svn r9168) [NoAI] -Add: AI wrapper functions for some map related queries.
rubidium
parents:
diff changeset
    21
6e89b780c2c9 (svn r9168) [NoAI] -Add: AI wrapper functions for some map related queries.
rubidium
parents:
diff changeset
    22
uint32 AIMap::GetMapSizeY()
6e89b780c2c9 (svn r9168) [NoAI] -Add: AI wrapper functions for some map related queries.
rubidium
parents:
diff changeset
    23
{
6e89b780c2c9 (svn r9168) [NoAI] -Add: AI wrapper functions for some map related queries.
rubidium
parents:
diff changeset
    24
	return ::MapSizeY();
6e89b780c2c9 (svn r9168) [NoAI] -Add: AI wrapper functions for some map related queries.
rubidium
parents:
diff changeset
    25
}
9430
9e0a193b2bec (svn r9234) [NoAI] -Codechange: move away from the 'much' subdirectory approach for the API implementation.
rubidium
parents: 9427
diff changeset
    26
9e0a193b2bec (svn r9234) [NoAI] -Codechange: move away from the 'much' subdirectory approach for the API implementation.
rubidium
parents: 9427
diff changeset
    27
uint32 AIMap::GetTileX(TileIndex t)
9e0a193b2bec (svn r9234) [NoAI] -Codechange: move away from the 'much' subdirectory approach for the API implementation.
rubidium
parents: 9427
diff changeset
    28
{
9e0a193b2bec (svn r9234) [NoAI] -Codechange: move away from the 'much' subdirectory approach for the API implementation.
rubidium
parents: 9427
diff changeset
    29
	return ::TileX(t);
9e0a193b2bec (svn r9234) [NoAI] -Codechange: move away from the 'much' subdirectory approach for the API implementation.
rubidium
parents: 9427
diff changeset
    30
}
9e0a193b2bec (svn r9234) [NoAI] -Codechange: move away from the 'much' subdirectory approach for the API implementation.
rubidium
parents: 9427
diff changeset
    31
9e0a193b2bec (svn r9234) [NoAI] -Codechange: move away from the 'much' subdirectory approach for the API implementation.
rubidium
parents: 9427
diff changeset
    32
uint32 AIMap::GetTileY(TileIndex t)
9e0a193b2bec (svn r9234) [NoAI] -Codechange: move away from the 'much' subdirectory approach for the API implementation.
rubidium
parents: 9427
diff changeset
    33
{
9e0a193b2bec (svn r9234) [NoAI] -Codechange: move away from the 'much' subdirectory approach for the API implementation.
rubidium
parents: 9427
diff changeset
    34
	return ::TileY(t);
9e0a193b2bec (svn r9234) [NoAI] -Codechange: move away from the 'much' subdirectory approach for the API implementation.
rubidium
parents: 9427
diff changeset
    35
}