#include "core/bitmath_func.hpp"
#include "tile_map.h"
Go to the source code of this file.
Enumerations | |
enum | UnmovableType { UNMOVABLE_TRANSMITTER = 0, UNMOVABLE_LIGHTHOUSE = 1, UNMOVABLE_STATUE = 2, UNMOVABLE_OWNED_LAND = 3, UNMOVABLE_HQ = 4, UNMOVABLE_MAX } |
Types of unmovable structure. More... | |
Functions | |
static UnmovableType | GetUnmovableType (TileIndex t) |
Gets the UnmovableType of the given unmovable tile. | |
static bool | IsTransmitterTile (TileIndex t) |
Does the given tile have a transmitter? | |
static bool | IsOwnedLand (TileIndex t) |
Is this unmovable 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 unmovable tile a HQ tile? | |
static bool | IsStatue (TileIndex t) |
Is this unmovable tile a statue? | |
static bool | IsStatueTile (TileIndex t) |
Is the given tile a statue? | |
static TownID | GetStatueTownID (TileIndex t) |
Get the town of the given statue tile. | |
static byte | GetCompanyHQSize (TileIndex t) |
Get the 'stage' of the HQ. | |
static void | SetCompanyHQSize (TileIndex t, uint8 size) |
Set the 'stage' of the HQ. | |
static byte | GetCompanyHQSection (TileIndex t) |
Get the 'section' of the HQ. | |
static void | SetCompanyHQSection (TileIndex t, uint8 section) |
Set the 'section' of the HQ. | |
static void | EnlargeCompanyHQ (TileIndex t, byte size) |
Enlarge the given HQ to the given size. | |
static void | MakeUnmovable (TileIndex t, UnmovableType u, Owner o) |
Make an Unmovable tile. | |
static void | MakeTransmitter (TileIndex t) |
Make a transmitter tile. | |
static void | MakeLighthouse (TileIndex t) |
Make a lighthouse tile. | |
static void | MakeStatue (TileIndex t, Owner o, TownID town_id) |
Make a statue tile. | |
static void | MakeOwnedLand (TileIndex t, Owner o) |
Make an 'owned land' tile. | |
static void | MakeUnmovableHQHelper (TileIndex t, uint8 section, Owner o) |
Make a HeadQuarter tile after making it an Unmovable. | |
static void | MakeCompanyHQ (TileIndex t, Owner o) |
Make an HQ with the give tile as it's northern tile. |
Definition in file unmovable_map.h.
enum UnmovableType |
Types of unmovable structure.
UNMOVABLE_TRANSMITTER | The large antenna. |
UNMOVABLE_LIGHTHOUSE | The nice lighthouse. |
UNMOVABLE_STATUE | Statue in towns. |
UNMOVABLE_OWNED_LAND | Owned land 'flag'. |
UNMOVABLE_HQ | HeadQuarter of a player. |
Definition at line 12 of file unmovable_map.h.
static void EnlargeCompanyHQ | ( | TileIndex | t, | |
byte | size | |||
) | [inline, static] |
Enlarge the given HQ to the given size.
If the new size is larger than the current size, nothing happens.
t | the tile of the HQ. | |
size | the new size of the HQ. |
Definition at line 167 of file unmovable_map.h.
References GetCompanyHQSection(), GetCompanyHQSize(), SetCompanyHQSize(), and TileDiffXY().
static byte GetCompanyHQSection | ( | TileIndex | t | ) | [inline, static] |
Get the 'section' of the HQ.
The scetion is in fact which side of teh HQ the tile represent
t | a tile of the HQ. |
Definition at line 142 of file unmovable_map.h.
References _m, GB(), IsCompanyHQ(), IsTileType(), and MP_UNMOVABLE.
Referenced by EnlargeCompanyHQ().
static byte GetCompanyHQSize | ( | TileIndex | t | ) | [inline, static] |
Get the 'stage' of the HQ.
t | a tile of the HQ. |
Definition at line 117 of file unmovable_map.h.
References _m, GB(), IsCompanyHQ(), IsTileType(), and MP_UNMOVABLE.
Referenced by EnlargeCompanyHQ().
Get the town of the given statue tile.
t | the tile of the statue. |
Definition at line 105 of file unmovable_map.h.
References _m, IsStatueTile(), and Tile::m2.
static UnmovableType GetUnmovableType | ( | TileIndex | t | ) | [inline, static] |
Gets the UnmovableType of the given unmovable tile.
t | the tile to get the type from. |
Definition at line 27 of file unmovable_map.h.
References _m, IsTileType(), Tile::m5, and MP_UNMOVABLE.
Referenced by IsOwnedLand(), IsStatue(), and IsTransmitterTile().
static bool IsCompanyHQ | ( | TileIndex | t | ) | [inline, static] |
Is this unmovable tile a HQ tile?
t | the tile to inspect. |
Definition at line 71 of file unmovable_map.h.
References _m, IsTileType(), Tile::m5, MP_UNMOVABLE, and UNMOVABLE_HQ.
Referenced by GetCompanyHQSection(), GetCompanyHQSize(), SetCompanyHQSection(), and SetCompanyHQSize().
static bool IsOwnedLand | ( | TileIndex | t | ) | [inline, static] |
Is this unmovable tile an 'owned land' tile?
t | the tile to inspect. |
Definition at line 49 of file unmovable_map.h.
References GetUnmovableType(), IsTileType(), MP_UNMOVABLE, and UNMOVABLE_OWNED_LAND.
Referenced by CmdBuildBridge(), 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 60 of file unmovable_map.h.
References IsOwnedLand(), IsTileType(), and MP_UNMOVABLE.
Referenced by CmdPurchaseLandArea(), and CmdSellLandArea().
static bool IsStatue | ( | TileIndex | t | ) | [inline, static] |
Is this unmovable tile a statue?
t | the tile to inspect. |
Definition at line 83 of file unmovable_map.h.
References GetUnmovableType(), IsTileType(), MP_UNMOVABLE, and UNMOVABLE_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 94 of file unmovable_map.h.
References IsStatue(), IsTileType(), and MP_UNMOVABLE.
Referenced by GetStatueTownID().
static bool IsTransmitterTile | ( | TileIndex | t | ) | [inline, static] |
Does the given tile have a transmitter?
t | the tile to inspect. |
Definition at line 38 of file unmovable_map.h.
References GetUnmovableType(), IsTileType(), MP_UNMOVABLE, and UNMOVABLE_TRANSMITTER.
Make an HQ with the give tile as it's northern tile.
t | the tile to make the northern tile of a HQ. | |
o | the owner of the HQ. |
Definition at line 255 of file unmovable_map.h.
References MakeUnmovableHQHelper(), and TileDiffXY().
Referenced by CmdBuildCompanyHQ().
static void MakeLighthouse | ( | TileIndex | t | ) | [inline, static] |
Make a lighthouse tile.
t | the tile to make a transmitter. |
Definition at line 211 of file unmovable_map.h.
References MakeUnmovable(), OWNER_NONE, and UNMOVABLE_LIGHTHOUSE.
Make an 'owned land' tile.
t | the tile to make an 'owned land' tile. | |
o | the owner of the land. |
Definition at line 233 of file unmovable_map.h.
References MakeUnmovable(), and UNMOVABLE_OWNED_LAND.
Referenced by CmdPurchaseLandArea().
Make a statue tile.
t | the tile to make a statue. | |
o | the owner of the statue. | |
town_id | the town the statue was built in. |
Definition at line 222 of file unmovable_map.h.
References _m, Tile::m2, MakeUnmovable(), and UNMOVABLE_STATUE.
static void MakeTransmitter | ( | TileIndex | t | ) | [inline, static] |
Make a transmitter tile.
t | the tile to make a transmitter. |
Definition at line 202 of file unmovable_map.h.
References MakeUnmovable(), OWNER_NONE, and UNMOVABLE_TRANSMITTER.
static void MakeUnmovable | ( | TileIndex | t, | |
UnmovableType | u, | |||
Owner | o | |||
) | [inline, static] |
Make an Unmovable tile.
t | the tile to make unmovable. | |
u | the unmovable type of the tile. | |
o | the new owner of the tile. |
Definition at line 187 of file unmovable_map.h.
References _m, Tile::m2, Tile::m3, Tile::m4, Tile::m5, MP_UNMOVABLE, SetTileOwner(), and SetTileType().
Referenced by MakeLighthouse(), MakeOwnedLand(), MakeStatue(), MakeTransmitter(), and MakeUnmovableHQHelper().
Make a HeadQuarter tile after making it an Unmovable.
t | the tile to make an HQ. | |
section | the part of the HQ this one will be. | |
o | the new owner of the tile. |
Definition at line 244 of file unmovable_map.h.
References MakeUnmovable(), SetCompanyHQSection(), and UNMOVABLE_HQ.
Referenced by MakeCompanyHQ().
static void SetCompanyHQSection | ( | TileIndex | t, | |
uint8 | section | |||
) | [inline, static] |
Set the 'section' of the HQ.
t | a tile of the HQ. param section to be set. |
Definition at line 154 of file unmovable_map.h.
References _m, IsCompanyHQ(), IsTileType(), MP_UNMOVABLE, and SB().
Referenced by MakeUnmovableHQHelper().
static void SetCompanyHQSize | ( | TileIndex | t, | |
uint8 | size | |||
) | [inline, static] |
Set the 'stage' of the HQ.
t | a tile of the HQ. | |
size | the actual stage of the HQ |
Definition at line 129 of file unmovable_map.h.
References _m, IsCompanyHQ(), IsTileType(), MP_UNMOVABLE, and SB().
Referenced by EnlargeCompanyHQ().