@@ -26,10 +26,10 @@ struct CommonHouseScopeResolver : public ScopeResolver {
|
||||
|
||||
/** Scope resolver for houses. */
|
||||
struct HouseScopeResolver : public CommonHouseScopeResolver {
|
||||
TileIndex tile; ///< Tile of this house.
|
||||
Town *town; ///< Town of this house.
|
||||
bool not_yet_constructed; ///< True for construction check.
|
||||
uint16 initial_random_bits; ///< Random bits during construction checks.
|
||||
TileIndex tile; ///< Tile of this house.
|
||||
Town *town; ///< Town of this house.
|
||||
bool not_yet_constructed; ///< True for construction check.
|
||||
uint16_t initial_random_bits; ///< Random bits during construction checks.
|
||||
CargoTypes watched_cargo_triggers; ///< Cargo types that triggered the watched cargo callback.
|
||||
|
||||
/**
|
||||
@@ -43,15 +43,15 @@ struct HouseScopeResolver : public CommonHouseScopeResolver {
|
||||
* @param watched_cargo_triggers Cargo types that triggered the watched cargo callback.
|
||||
*/
|
||||
HouseScopeResolver(ResolverObject &ro, HouseID house_id, TileIndex tile, Town *town,
|
||||
bool not_yet_constructed, uint8 initial_random_bits, CargoTypes watched_cargo_triggers)
|
||||
bool not_yet_constructed, uint8_t initial_random_bits, CargoTypes watched_cargo_triggers)
|
||||
: CommonHouseScopeResolver(ro, house_id), tile(tile), town(town), not_yet_constructed(not_yet_constructed),
|
||||
initial_random_bits(initial_random_bits), watched_cargo_triggers(watched_cargo_triggers)
|
||||
{
|
||||
}
|
||||
|
||||
uint32 GetRandomBits() const override;
|
||||
uint32 GetVariable(uint16 variable, uint32 parameter, GetVariableExtra *extra) const override;
|
||||
uint32 GetTriggers() const override;
|
||||
uint32_t GetRandomBits() const override;
|
||||
uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const override;
|
||||
uint32_t GetTriggers() const override;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -70,7 +70,7 @@ struct FakeHouseScopeResolver : public CommonHouseScopeResolver {
|
||||
: CommonHouseScopeResolver(ro, house_id)
|
||||
{ }
|
||||
|
||||
/* virtual */ uint32 GetVariable(uint16 variable, uint32 parameter, GetVariableExtra *extra) const override;
|
||||
/* virtual */ uint32_t GetVariable(uint16_t variable, uint32_t parameter, GetVariableExtra *extra) const override;
|
||||
};
|
||||
|
||||
/** Resolver object to be used for houses (feature 07 spritegroups). */
|
||||
@@ -79,8 +79,8 @@ struct HouseResolverObject : public ResolverObject {
|
||||
TownScopeResolver town_scope;
|
||||
|
||||
HouseResolverObject(HouseID house_id, TileIndex tile, Town *town,
|
||||
CallbackID callback = CBID_NO_CALLBACK, uint32 param1 = 0, uint32 param2 = 0,
|
||||
bool not_yet_constructed = false, uint8 initial_random_bits = 0, CargoTypes watched_cargo_triggers = 0);
|
||||
CallbackID callback = CBID_NO_CALLBACK, uint32_t param1 = 0, uint32_t param2 = 0,
|
||||
bool not_yet_constructed = false, uint8_t initial_random_bits = 0, CargoTypes watched_cargo_triggers = 0);
|
||||
|
||||
ScopeResolver *GetScope(VarSpriteGroupScope scope = VSG_SCOPE_SELF, VarSpriteGroupScopeOffset relative = 0) override
|
||||
{
|
||||
@@ -92,7 +92,7 @@ struct HouseResolverObject : public ResolverObject {
|
||||
}
|
||||
|
||||
GrfSpecFeature GetFeature() const override;
|
||||
uint32 GetDebugID() const override;
|
||||
uint32_t GetDebugID() const override;
|
||||
};
|
||||
|
||||
/** Resolver object to be used for fake houses (feature 07 spritegroups). */
|
||||
@@ -101,7 +101,7 @@ struct FakeHouseResolverObject : public ResolverObject {
|
||||
FakeTownScopeResolver town_scope;
|
||||
|
||||
FakeHouseResolverObject(HouseID house_id,
|
||||
CallbackID callback = CBID_NO_CALLBACK, uint32 param1 = 0, uint32 param2 = 0);
|
||||
CallbackID callback = CBID_NO_CALLBACK, uint32_t param1 = 0, uint32_t param2 = 0);
|
||||
|
||||
ScopeResolver *GetScope(VarSpriteGroupScope scope = VSG_SCOPE_SELF, VarSpriteGroupScopeOffset relative = 0) override
|
||||
{
|
||||
@@ -113,7 +113,7 @@ struct FakeHouseResolverObject : public ResolverObject {
|
||||
}
|
||||
|
||||
GrfSpecFeature GetFeature() const override;
|
||||
uint32 GetDebugID() const override;
|
||||
uint32_t GetDebugID() const override;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -130,12 +130,12 @@ struct FakeHouseResolverObject : public ResolverObject {
|
||||
* need to be persistent; it just needs to keep class ids unique.
|
||||
*/
|
||||
struct HouseClassMapping {
|
||||
uint32 grfid; ///< The GRF ID of the file this class belongs to
|
||||
uint8 class_id; ///< The class id within the grf file
|
||||
uint32_t grfid; ///< The GRF ID of the file this class belongs to
|
||||
uint8_t class_id; ///< The class id within the grf file
|
||||
};
|
||||
|
||||
void ResetHouseClassIDs();
|
||||
HouseClassID AllocateHouseClassID(byte grf_class_id, uint32 grfid);
|
||||
HouseClassID AllocateHouseClassID(byte grf_class_id, uint32_t grfid);
|
||||
|
||||
void InitializeBuildingCounts();
|
||||
void IncreaseBuildingCount(Town *t, HouseID house_id);
|
||||
@@ -145,10 +145,10 @@ void DrawNewHouseTile(TileInfo *ti, HouseID house_id);
|
||||
void DrawNewHouseTileInGUI(int x, int y, HouseID house_id, bool ground);
|
||||
void AnimateNewHouseTile(TileIndex tile);
|
||||
void AnimateNewHouseConstruction(TileIndex tile);
|
||||
uint8 GetNewHouseTileAnimationSpeed(TileIndex tile);
|
||||
uint8_t GetNewHouseTileAnimationSpeed(TileIndex tile);
|
||||
|
||||
uint16 GetHouseCallback(CallbackID callback, uint32 param1, uint32 param2, HouseID house_id, Town *town = nullptr, TileIndex tile = INVALID_TILE,
|
||||
bool not_yet_constructed = false, uint8 initial_random_bits = 0, CargoTypes watched_cargo_triggers = 0);
|
||||
uint16_t GetHouseCallback(CallbackID callback, uint32_t param1, uint32_t param2, HouseID house_id, Town *town = nullptr, TileIndex tile = INVALID_TILE,
|
||||
bool not_yet_constructed = false, uint8_t initial_random_bits = 0, CargoTypes watched_cargo_triggers = 0);
|
||||
void WatchedCargoCallback(TileIndex tile, CargoTypes trigger_cargoes);
|
||||
|
||||
bool HouseAllowsConstruction(HouseID house_id, TileIndex tile, Town *t, byte random_bits);
|
||||
|
Reference in New Issue
Block a user