Map accessors for object tiles. More...
#include "water_map.h"
#include "object_type.h"
Go to the source code of this file.
Functions | |
static ObjectType | GetObjectType (TileIndex t) |
Gets the ObjectType of the given object tile. | |
static ObjectID | GetObjectIndex (TileIndex t) |
Get the index of which object this tile is attached to. | |
static bool | IsTransmitterTile (TileIndex t) |
Does the given tile have a transmitter? | |
static bool | IsOwnedLand (TileIndex t) |
Is this object tile an 'owned land' tile? | |
static bool | IsOwnedLandTile (TileIndex t) |
Is the given tile (pre-)owned by someone (the little flags)? | |
static bool | IsCompanyHQ (TileIndex t) |
Is this object tile a HQ tile? | |
static bool | IsStatue (TileIndex t) |
Is this object tile a statue? | |
static bool | IsStatueTile (TileIndex t) |
Is the given tile a statue? | |
static byte | GetObjectRandomBits (TileIndex t) |
Get the random bits of this tile. | |
static void | MakeObject (TileIndex t, ObjectType u, Owner o, ObjectID index, WaterClass wc, byte random) |
Make an Object tile. |
Map accessors for object tiles.
Definition in file object_map.h.
Get the index of which object this tile is attached to.
t | the tile |
Definition at line 36 of file object_map.h.
References _m, IsTileType(), Tile::m2, and MP_OBJECT.
Referenced by Object::GetByTile(), and GetNearbyObjectTileInformation().
static byte GetObjectRandomBits | ( | TileIndex | t | ) | [inline, static] |
Get the random bits of this tile.
t | The tile to get the bits for. |
Definition at line 114 of file object_map.h.
References _m, IsTileType(), Tile::m3, and MP_OBJECT.
Referenced by ObjectScopeResolver::GetRandomBits(), and ObjectScopeResolver::GetVariable().
static ObjectType GetObjectType | ( | TileIndex | t | ) | [inline, static] |
Gets the ObjectType of the given object tile.
t | the tile to get the type from. |
Definition at line 24 of file object_map.h.
References _m, IsTileType(), Tile::m5, and MP_OBJECT.
Referenced by AfterLoadGame(), CmdDeleteTown(), ObjectSpec::GetByTile(), GetClosestObject(), IsOwnedLand(), IsStatue(), IsTransmitterTile(), and ReallyClearObjectTile().
static bool IsCompanyHQ | ( | TileIndex | t | ) | [inline, static] |
Is this object tile a HQ tile?
t | the tile to inspect. |
Definition at line 80 of file object_map.h.
References _m, IsTileType(), Tile::m5, MP_OBJECT, and OBJECT_HQ.
static bool IsOwnedLand | ( | TileIndex | t | ) | [inline, static] |
Is this object tile an 'owned land' tile?
t | the tile to inspect. |
Definition at line 58 of file object_map.h.
References GetObjectType(), IsTileType(), MP_OBJECT, and OBJECT_OWNED_LAND.
Referenced by CmdBuildObject(), and IsOwnedLandTile().
static bool IsOwnedLandTile | ( | TileIndex | t | ) | [inline, static] |
Is the given tile (pre-)owned by someone (the little flags)?
t | the tile to inspect. |
Definition at line 69 of file object_map.h.
References IsOwnedLand(), IsTileType(), and MP_OBJECT.
static bool IsStatue | ( | TileIndex | t | ) | [inline, static] |
Is this object tile a statue?
t | the tile to inspect. |
Definition at line 92 of file object_map.h.
References GetObjectType(), IsTileType(), MP_OBJECT, and OBJECT_STATUE.
Referenced by IsStatueTile().
static bool IsStatueTile | ( | TileIndex | t | ) | [inline, static] |
Is the given tile a statue?
t | the tile to inspect. |
Definition at line 103 of file object_map.h.
References IsStatue(), IsTileType(), and MP_OBJECT.
Referenced by AfterLoadGame().
static bool IsTransmitterTile | ( | TileIndex | t | ) | [inline, static] |
Does the given tile have a transmitter?
t | the tile to inspect. |
Definition at line 47 of file object_map.h.
References GetObjectType(), IsTileType(), MP_OBJECT, and OBJECT_TRANSMITTER.
Referenced by HasTransmitter().
static void MakeObject | ( | TileIndex | t, | |
ObjectType | u, | |||
Owner | o, | |||
ObjectID | index, | |||
WaterClass | wc, | |||
byte | random | |||
) | [inline, static] |
Make an Object tile.
t | The tile to make and object tile. | |
u | The object type of the tile. | |
o | The new owner of the tile. | |
index | Index to the object. | |
wc | Water class for this object. | |
random | Random data to store on the tile |
Definition at line 131 of file object_map.h.
References _m, _me, Tile::m2, Tile::m3, Tile::m4, Tile::m5, TileExtended::m7, MP_OBJECT, SB(), SetTileOwner(), SetTileType(), and SetWaterClass().
Referenced by BuildObject().