OpenTTD Source
12.0-beta2
|
Go to the documentation of this file.
50 return _m[t].
m4 | (
GB(
_m[t].m3, 6, 1) << 8);
73 _m[t].
m4 =
GB(house_id, 0, 8);
74 SB(
_m[t].m3, 6, 1,
GB(house_id, 8, 1));
96 SB(
_me[t].m7, 1, 3, dest);
106 return GB(
_me[t].m7, 1, 3);
117 SB(
_me[t].m7, 0, 4, 0);
127 return GB(
_me[t].m6, 2, 6);
137 SB(
_me[t].m6, 2, 6, pos);
159 SB(
_m[t].m3, 7, 1, !!status);
211 AB(
_m[t].m5, 0, 5, 1);
291 SB(
_m[t].m3, 0, 5, triggers);
304 return GB(
_m[t].m3, 0, 5);
316 return GB(
_me[t].m6, 2, 6);
328 SB(
_me[t].m6, 2, 6, time);
357 _m[t].
m1 = random_bits;
@ MP_CLEAR
A tile without any structures, i.e. grass, rocks, farm fields etc.
@ MP_HOUSE
A house by a town.
uint32 TileIndex
The index/ID of a Tile.
static Year GetHouseAge(TileIndex t)
Get the age of the house.
static uint GB(const T x, const uint8 s, const uint8 n)
Fetch n bits from x, started at bit s.
static void SetTileType(TileIndex tile, TileType type)
Set the type of a tile.
static bool IsHouseCompleted(TileIndex t)
Get the completion of this house.
static byte GetHouseProcessingTime(TileIndex t)
Get the amount of time remaining before the tile loop processes this tile.
static bool HasBit(const T x, const uint8 y)
Checks if a bit in a value is set.
TileExtended * _me
Extended Tiles of the map.
uint16 m2
Primarily used for indices to towns, industries and stations.
int32 Year
Type for the year, note: 0 based, i.e. starts at the year 0.
static void ResetHouseAge(TileIndex t)
Sets the age of the house to zero.
static T AB(T &x, const uint8 s, const uint8 n, const U i)
Add i to n bits of x starting at bit s.
byte m1
Primarily used for ownership information.
@ MP_ROAD
A tile with road (or tram tracks)
static TownID GetTownIndex(TileIndex t)
Get the index of which town this house/street is attached to.
static void IncHouseConstructionTick(TileIndex t)
Sets the increment stage of a house It is working with the whole counter + stage 5 bits,...
static HouseID GetHouseType(TileIndex t)
Get the type of this house, which is an index into the house spec array.
static byte GetLiftPosition(TileIndex t)
Get the position of the lift on this animated house.
static T SB(T &x, const uint8 s, const uint8 n, const U d)
Set n bits in x starting at bit s to d.
static byte GetLiftDestination(TileIndex t)
Get the current destination for this lift.
static void HaltLift(TileIndex t)
Stop the lift of this animated house from moving.
static void SetLiftPosition(TileIndex t, byte pos)
Set the position of the lift on this animated house.
static bool IsRoadDepot(TileIndex t)
Return whether a tile is a road depot.
static byte GetHouseConstructionTick(TileIndex t)
Gets the construction stage of a house.
static bool IsTileType(TileIndex tile, TileType type)
Checks if a tile is a given tiletype.
static void SetLiftDestination(TileIndex t, byte dest)
Set the new destination of the lift for this animated house, and activate the LiftHasDestination bit.
uint16 HouseID
OpenTTD ID of house types.
static bool LiftHasDestination(TileIndex t)
Check if the lift of this animated house has a destination.
static void SetHouseTriggers(TileIndex t, byte triggers)
Set the activated triggers bits for this house.
static byte GetHouseBuildingStage(TileIndex t)
House Construction Scheme.
static void SetHouseCompleted(TileIndex t, bool status)
Mark this house as been completed.
static void SetTownIndex(TileIndex t, TownID index)
Set the town index for a road or house tile.
static HouseID GetTranslatedHouseID(HouseID hid)
Do HouseID translation for NewGRFs.
static T SetBit(T &x, const uint8 y)
Set a bit in a variable.
static void SetHouseRandomBits(TileIndex t, byte random)
Set the random bits for this house.
static HouseID GetCleanHouseType(TileIndex t)
Get the type of this house, which is an index into the house spec array without doing any NewGRF rela...
static void DecHouseProcessingTime(TileIndex t)
Decrease the amount of time remaining before the tile loop processes this tile.
static void SetHouseProcessingTime(TileIndex t, byte time)
Set the amount of time remaining before the tile loop processes this tile.
static byte GetHouseTriggers(TileIndex t)
Get the already activated triggers bits for this house.
static void SetAnimationFrame(TileIndex t, byte frame)
Set a new animation frame.
static const byte TOWN_HOUSE_COMPLETED
Simple value that indicates the house has reached the final stage of construction.
static void SetHouseType(TileIndex t, HouseID house_id)
Set the house type.
static void IncrementHouseAge(TileIndex t)
Increments the age of the house.
Tile * _m
Tiles of the map.
static void MakeHouseTile(TileIndex t, TownID tid, byte counter, byte stage, HouseID type, byte random_bits)
Make the tile a house.
static byte GetHouseRandomBits(TileIndex t)
Get the random bits for this house.