OpenTTD
|
Map accessors for object tiles. More...
Go to the source code of this file.
Functions | |
ObjectType | GetObjectType (TileIndex t) |
Gets the ObjectType of the given object tile. | |
static bool | IsObjectType (TileIndex t, ObjectType type) |
Check whether the object on a tile is of a specific type. | |
static bool | IsObjectTypeTile (TileIndex t, ObjectType type) |
Check whether a tile is a object tile of a specific type. | |
static ObjectID | GetObjectIndex (TileIndex t) |
Get the index of which object this tile is attached to. | |
static byte | GetObjectRandomBits (TileIndex t) |
Get the random bits of this tile. | |
static void | MakeObject (TileIndex t, 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 49 of file object_map.h.
References _m, IsTileType(), Tile::m2, Tile::m5, and MP_OBJECT.
Referenced by Object::GetByTile(), and GetNearbyObjectTileInformation().
|
inlinestatic |
Get the random bits of this tile.
t | The tile to get the bits for. |
Definition at line 61 of file object_map.h.
References _m, IsTileType(), Tile::m3, and MP_OBJECT.
Referenced by ObjectScopeResolver::GetRandomBits(), and ObjectScopeResolver::GetVariable().
ObjectType GetObjectType | ( | TileIndex | t | ) |
Gets the ObjectType of the given object tile.
t | the tile to get the type from. |
Definition at line 63 of file object_cmd.cpp.
References Object::GetByTile(), IsTileType(), MP_OBJECT, and Object::type.
Referenced by ObjectSpec::GetByTile(), IsObjectType(), and IsObjectTypeTile().
|
inlinestatic |
Check whether the object on a tile is of a specific type.
t | Tile to test. |
type | Type to test. |
Definition at line 27 of file object_map.h.
References GetObjectType().
Referenced by CmdBuildObject().
|
inlinestatic |
Check whether a tile is a object tile of a specific type.
t | Tile to test. |
type | Type to test. |
Definition at line 38 of file object_map.h.
References GetObjectType(), IsTileType(), and MP_OBJECT.
Referenced by HasTransmitter().
|
inlinestatic |
Make an Object tile.
t | The tile to make and object 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 76 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().