52 return _m[t].
m4 | (
GB(
_m[t].m3, 6, 1) << 8);
75 _m[t].
m4 =
GB(house_id, 0, 8);
76 SB(
_m[t].m3, 6, 1,
GB(house_id, 8, 1));
98 SB(
_me[t].m7, 1, 3, dest);
108 return GB(
_me[t].m7, 1, 3);
119 SB(
_me[t].m7, 0, 4, 0);
129 return GB(
_me[t].m6, 2, 6);
139 SB(
_me[t].m6, 2, 6, pos);
161 SB(
_m[t].m3, 7, 1, !!status);
213 AB(
_m[t].m5, 0, 5, 1);
293 SB(
_m[t].m3, 0, 5, triggers);
306 return GB(
_m[t].m3, 0, 5);
318 return GB(
_me[t].m6, 2, 6);
330 SB(
_me[t].m6, 2, 6, time);
359 _m[t].
m1 = random_bits;
static Year GetHouseAge(TileIndex t)
Get the age of the 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 T AB(T &x, const uint8 s, const uint8 n, const U i)
Add i to n bits of x starting at bit s.
uint16 m2
Primarily used for indices to towns, industries and stations.
static T SetBit(T &x, const uint8 y)
Set a bit in a variable.
A tile with road (or tram tracks)
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.
static HouseID GetTranslatedHouseID(HouseID hid)
Do HouseID translation for NewGRFs.
static bool LiftHasDestination(TileIndex t)
Check if the lift of this animated house has a destination.
int32 Year
Type for the year, note: 0 based, i.e. starts at the year 0.
uint16 HouseID
OpenTTD ID of house types.
static byte GetLiftDestination(TileIndex t)
Get the current destination for this lift.
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.
byte m1
Primarily used for ownership information.
static void SetHouseType(TileIndex t, HouseID house_id)
Set the house type.
static byte GetHouseBuildingStage(TileIndex t)
House Construction Scheme.
static bool IsHouseCompleted(TileIndex t)
Get the completion of this house.
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 give tiletype.
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...
definition of HouseSpec and accessors
static TownID GetTownIndex(TileIndex t)
Get the index of which town this house/street is attached to.
static void DecHouseProcessingTime(TileIndex t)
Decrease the amount of time remaining before the tile loop processes this tile.
static void SetHouseRandomBits(TileIndex t, byte random)
Set the random bits for this house.
TileExtended * _me
Extended Tiles of the map.
static byte GetLiftPosition(TileIndex t)
Get the position of the lift on this animated house.
static byte GetHouseProcessingTime(TileIndex t)
Get 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 void IncHouseConstructionTick(TileIndex t)
Sets the increment stage of a house It is working with the whole counter + stage 5 bits...
static void SetHouseCompleted(TileIndex t, bool status)
Mark this house as been completed.
static void SetLiftDestination(TileIndex t, byte dest)
Set the new destination of the lift for this animated house, and activate the LiftHasDestination bit...
static void HaltLift(TileIndex t)
Stop the lift of this animated house from moving.
static byte GetHouseTriggers(TileIndex t)
Get the already activated triggers bits for this house.
static void SetLiftPosition(TileIndex t, byte pos)
Set the position of the lift on this animated house.
uint32 TileIndex
The index/ID of a Tile.
static HouseID GetHouseType(TileIndex t)
Get the type of this house, which is an index into the house spec array.
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 void ResetHouseAge(TileIndex t)
Sets the age of the house to zero.
static bool HasBit(const T x, const uint8 y)
Checks if a bit in a value is set.
A tile without any structures, i.e. grass, rocks, farm fields etc.
static void SetHouseTriggers(TileIndex t, byte triggers)
Set the activated triggers bits for this house.
static void SetTownIndex(TileIndex t, TownID index)
Set the town index for a road or house tile.
static bool IsRoadDepot(TileIndex t)
Return whether a tile is a road depot.
static void IncrementHouseAge(TileIndex t)
Increments the age of the house.