|
OpenTTD
|
Functions related to NewGRF houses. More...
#include "newgrf_callbacks.h"#include "tile_cmd.h"#include "house_type.h"#include "newgrf_spritegroup.h"#include "newgrf_town.h"Go to the source code of this file.
Data Structures | |
| struct | HouseScopeResolver |
| Scope resolver for houses. More... | |
| struct | HouseResolverObject |
| Resolver object to be used for houses (feature 07 spritegroups). More... | |
| 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 | |
| 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 | AnimateNewHouseConstruction (TileIndex tile) |
| uint16 | GetHouseCallback (CallbackID callback, uint32 param1, uint32 param2, HouseID house_id, Town *town, TileIndex tile, bool not_yet_constructed=false, uint8 initial_random_bits=0, uint32 watched_cargo_triggers=0) |
| void | WatchedCargoCallback (TileIndex tile, uint32 trigger_cargoes) |
| Run watched cargo accepted callback for a house. | |
| bool | CanDeleteHouse (TileIndex tile) |
| bool | NewHouseTileLoop (TileIndex tile) |
| void | TriggerHouse (TileIndex t, HouseTrigger trigger) |
Functions related to NewGRF houses.
Definition in file newgrf_house.h.
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 143 of file newgrf_house.cpp.
References _loaded_newgrf_features, TownCache::building_counts, Town::cache, HouseSpec::class_id, and GRFLoadedFeatures::has_newhouses.
Referenced by DoClearTownHouseHelper().
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 122 of file newgrf_house.cpp.
References _loaded_newgrf_features, TownCache::building_counts, Town::cache, HouseSpec::class_id, and GRFLoadedFeatures::has_newhouses.
Referenced by ClearMakeHouseTile(), and RebuildTownCaches().
| void WatchedCargoCallback | ( | TileIndex | tile, |
| uint32 | trigger_cargoes | ||
| ) |
Run watched cargo accepted callback for a house.
| tile | House tile. |
| trigger_cargoes | Triggering cargo types. |
Definition at line 671 of file newgrf_house.cpp.
References HouseSpec::building_flags, DoWatchedCargoCallback(), GetHouseNorthPart(), GetHouseType(), IsTileType(), MP_HOUSE, TILE_ADDXY, and HouseSpec::watched_cargoes.
Referenced by TriggerWatchedCargoCallbacks().
1.8.1.2