#include "town_type.h"
#include "newgrf_callbacks.h"
Go to the source code of this file.
Data Structures | |
struct | HouseClassMapping |
Makes class IDs unique to each GRF file. More... | |
Enumerations | |
enum | HouseTrigger { HOUSE_TRIGGER_TILE_LOOP = 0x01, HOUSE_TRIGGER_TILE_LOOP_TOP = 0x02 } |
Functions | |
void | UpdateHousesAndTowns () |
Check and update town and house values. | |
HouseClassID | AllocateHouseClassID (byte grf_class_id, uint32 grfid) |
void | InitializeBuildingCounts () |
void | IncreaseBuildingCount (Town *t, HouseID house_id) |
IncreaseBuildingCount() Increase the count of a building when it has been added by a town. | |
void | DecreaseBuildingCount (Town *t, HouseID house_id) |
DecreaseBuildingCount() Decrease the number of a building when it is deleted. | |
void | DrawNewHouseTile (TileInfo *ti, HouseID house_id) |
void | AnimateNewHouseTile (TileIndex tile) |
void | ChangeHouseAnimationFrame (TileIndex tile, uint16 callback_result) |
uint16 | GetHouseCallback (CallbackID callback, uint32 param1, uint32 param2, HouseID house_id, Town *town, TileIndex tile) |
bool | CanDeleteHouse (TileIndex tile) |
bool | NewHouseTileLoop (TileIndex tile) |
void | TriggerHouse (TileIndex t, HouseTrigger trigger) |
Definition in file newgrf_house.h.
void DecreaseBuildingCount | ( | Town * | t, | |
HouseID | house_id | |||
) |
DecreaseBuildingCount() Decrease the number of a building when it is deleted.
t | The town that the building was built in | |
house_id | The id of the house being removed |
Definition at line 138 of file newgrf_house.cpp.
void IncreaseBuildingCount | ( | Town * | t, | |
HouseID | house_id | |||
) |
IncreaseBuildingCount() Increase the count of a building when it has been added by a town.
t | The town that the building is being built in | |
house_id | The id of the house being added |
Definition at line 110 of file newgrf_house.cpp.
Referenced by ClearMakeHouseTile(), and UpdateHousesAndTowns().
void UpdateHousesAndTowns | ( | ) |
Check and update town and house values.
Checked are the HouseIDs. Updated are the town population the number of houses per town, the town radius and the max passengers of the town.
Definition at line 43 of file newgrf_house.cpp.
References GetHouseNorthPart(), GetHouseType(), GetTownByTile(), IncreaseBuildingCount(), IsHouseCompleted(), IsTileType(), MapSize(), MP_HOUSE, and SetHouseType().
Referenced by ReloadNewGRFData().