|
OpenTTD Source
14.0-beta1
|
Go to the documentation of this file.
51 return t.
m4() | (
GB(t.
m3(), 6, 1) << 8);
74 t.
m4() =
GB(house_id, 0, 8);
75 SB(t.
m3(), 6, 1,
GB(house_id, 8, 1));
97 SB(t.
m7(), 1, 3, dest);
107 return GB(t.
m7(), 1, 3);
128 return GB(t.
m6(), 2, 6);
138 SB(t.
m6(), 2, 6, pos);
160 SB(t.
m3(), 7, 1, !!status);
292 SB(t.
m3(), 0, 5, triggers);
305 return GB(t.
m3(), 0, 5);
317 return GB(t.
m6(), 2, 6);
329 SB(t.
m6(), 2, 6, time);
358 t.
m1() = random_bits;
byte GetHouseRandomBits(Tile t)
Get the random bits for this house.
@ MP_CLEAR
A tile without any structures, i.e. grass, rocks, farm fields etc.
@ MP_HOUSE
A house by a town.
void ResetHouseAge(Tile t)
Sets the age of the house to zero.
constexpr T SetBit(T &x, const uint8_t y)
Set a bit in a variable.
HouseID GetCleanHouseType(Tile t)
Get the type of this house, which is an index into the house spec array without doing any NewGRF rela...
void SetHouseTriggers(Tile t, byte triggers)
Set the activated triggers bits for this house.
constexpr static debug_inline uint GB(const T x, const uint8_t s, const uint8_t n)
Fetch n bits from x, started at bit s.
void IncHouseConstructionTick(Tile t)
Sets the increment stage of a house It is working with the whole counter + stage 5 bits,...
debug_inline byte & m6()
General purpose.
Wrapper class to abstract away the way the tiles are stored.
void SetHouseRandomBits(Tile t, byte random)
Set the random bits for this house.
Templated helper to make a type-safe 'typedef' representing a single POD value.
byte GetHouseTriggers(Tile t)
Get the already activated triggers bits for this house.
debug_inline byte & m5()
General purpose.
debug_inline byte & m1()
Primarily used for ownership information.
debug_inline byte & m4()
General purpose.
void SetHouseType(Tile t, HouseID house_id)
Set the house type.
@ MP_ROAD
A tile with road (or tram tracks)
bool LiftHasDestination(Tile t)
Check if the lift of this animated house has a destination.
byte GetHouseConstructionTick(Tile t)
Gets the construction stage of a house.
TimerGameCalendar::Year GetHouseAge(Tile t)
Get the age of the house.
debug_inline byte & m7()
Primarily used for newgrf support.
debug_inline uint16_t & m2()
Primarily used for indices to towns, industries and stations.
void SetLiftPosition(Tile t, byte pos)
Set the position of the lift on this animated house.
void SetLiftDestination(Tile t, byte dest)
Set the new destination of the lift for this animated house, and activate the LiftHasDestination bit.
constexpr T AB(T &x, const uint8_t s, const uint8_t n, const U i)
Add i to n bits of x starting at bit s.
void HaltLift(Tile t)
Stop the lift of this animated house from moving.
HouseID GetHouseType(Tile t)
Get the type of this house, which is an index into the house spec array.
void SetAnimationFrame(Tile t, byte frame)
Set a new animation frame.
void SetHouseProcessingTime(Tile t, byte time)
Set the amount of time remaining before the tile loop processes this tile.
void MakeHouseTile(Tile t, TownID tid, byte counter, byte stage, HouseID type, byte random_bits)
Make the tile a house.
void IncrementHouseAge(Tile t)
Increments the age of the house.
byte GetHouseBuildingStage(Tile t)
House Construction Scheme.
void SetHouseCompleted(Tile t, bool status)
Mark this house as been completed.
byte GetHouseProcessingTime(Tile t)
Get the amount of time remaining before the tile loop processes this tile.
void SetTileType(Tile tile, TileType type)
Set the type of a tile.
bool IsHouseCompleted(Tile t)
Get the completion of this house.
byte GetLiftDestination(Tile t)
Get the current destination for this lift.
uint16_t HouseID
OpenTTD ID of house types.
void SetTownIndex(Tile t, TownID index)
Set the town index for a road or house tile.
byte GetLiftPosition(Tile t)
Get the position of the lift on this animated house.
constexpr T SB(T &x, const uint8_t s, const uint8_t n, const U d)
Set n bits in x starting at bit s to d.
static debug_inline bool IsTileType(Tile tile, TileType type)
Checks if a tile is a given tiletype.
void DecHouseProcessingTime(Tile t)
Decrease the amount of time remaining before the tile loop processes this tile.
static const byte TOWN_HOUSE_COMPLETED
Simple value that indicates the house has reached the final stage of construction.
debug_inline byte & m3()
General purpose.
static debug_inline bool IsRoadDepot(Tile t)
Return whether a tile is a road depot.
HouseID GetTranslatedHouseID(HouseID hid)
Do HouseID translation for NewGRFs.
TownID GetTownIndex(Tile t)
Get the index of which town this house/street is attached to.
constexpr debug_inline bool HasBit(const T x, const uint8_t y)
Checks if a bit in a value is set.