Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
This commit is contained in:
@@ -17,7 +17,7 @@ struct IndustriesScopeResolver : public ScopeResolver {
|
||||
TileIndex tile; ///< Tile owned by the industry.
|
||||
Industry *industry; ///< %Industry being resolved.
|
||||
IndustryType type; ///< Type of the industry.
|
||||
uint32 random_bits; ///< Random bits of the new industry.
|
||||
uint32_t random_bits; ///< Random bits of the new industry.
|
||||
|
||||
/**
|
||||
* Scope resolver for industries.
|
||||
@@ -27,15 +27,15 @@ struct IndustriesScopeResolver : public ScopeResolver {
|
||||
* @param type Type of the industry.
|
||||
* @param random_bits Random bits of the new industry.
|
||||
*/
|
||||
IndustriesScopeResolver(ResolverObject &ro, TileIndex tile, Industry *industry, IndustryType type, uint32 random_bits = 0)
|
||||
IndustriesScopeResolver(ResolverObject &ro, TileIndex tile, Industry *industry, IndustryType type, uint32_t random_bits = 0)
|
||||
: ScopeResolver(ro), tile(tile), industry(industry), type(type), random_bits(random_bits)
|
||||
{
|
||||
}
|
||||
|
||||
uint32 GetRandomBits() const override;
|
||||
uint32 GetVariable(byte variable, uint32 parameter, bool *available) const override;
|
||||
uint32 GetTriggers() const override;
|
||||
void StorePSA(uint pos, int32 value) override;
|
||||
uint32_t GetRandomBits() const override;
|
||||
uint32_t GetVariable(byte variable, uint32_t parameter, bool *available) const override;
|
||||
uint32_t GetTriggers() const override;
|
||||
void StorePSA(uint pos, int32_t value) override;
|
||||
};
|
||||
|
||||
/** Resolver for industries. */
|
||||
@@ -43,8 +43,8 @@ struct IndustriesResolverObject : public ResolverObject {
|
||||
IndustriesScopeResolver industries_scope; ///< Scope resolver for the industry.
|
||||
TownScopeResolver *town_scope; ///< Scope resolver for the associated town (if needed and available, else \c nullptr).
|
||||
|
||||
IndustriesResolverObject(TileIndex tile, Industry *indus, IndustryType type, uint32 random_bits = 0,
|
||||
CallbackID callback = CBID_NO_CALLBACK, uint32 callback_param1 = 0, uint32 callback_param2 = 0);
|
||||
IndustriesResolverObject(TileIndex tile, Industry *indus, IndustryType type, uint32_t random_bits = 0,
|
||||
CallbackID callback = CBID_NO_CALLBACK, uint32_t callback_param1 = 0, uint32_t callback_param2 = 0);
|
||||
~IndustriesResolverObject();
|
||||
|
||||
TownScopeResolver *GetTown();
|
||||
@@ -65,7 +65,7 @@ struct IndustriesResolverObject : public ResolverObject {
|
||||
}
|
||||
|
||||
GrfSpecFeature GetFeature() const override;
|
||||
uint32 GetDebugID() const override;
|
||||
uint32_t GetDebugID() const override;
|
||||
};
|
||||
|
||||
/** When should the industry(tile) be triggered for random bits? */
|
||||
@@ -87,16 +87,16 @@ enum IndustryAvailabilityCallType {
|
||||
};
|
||||
|
||||
/* in newgrf_industry.cpp */
|
||||
uint16 GetIndustryCallback(CallbackID callback, uint32 param1, uint32 param2, Industry *industry, IndustryType type, TileIndex tile);
|
||||
uint32 GetIndustryIDAtOffset(TileIndex new_tile, const Industry *i, uint32 cur_grfid);
|
||||
uint16_t GetIndustryCallback(CallbackID callback, uint32_t param1, uint32_t param2, Industry *industry, IndustryType type, TileIndex tile);
|
||||
uint32_t GetIndustryIDAtOffset(TileIndex new_tile, const Industry *i, uint32_t cur_grfid);
|
||||
void IndustryProductionCallback(Industry *ind, int reason);
|
||||
CommandCost CheckIfCallBackAllowsCreation(TileIndex tile, IndustryType type, size_t layout, uint32 seed, uint16 initial_random_bits, Owner founder, IndustryAvailabilityCallType creation_type);
|
||||
uint32 GetIndustryProbabilityCallback(IndustryType type, IndustryAvailabilityCallType creation_type, uint32 default_prob);
|
||||
CommandCost CheckIfCallBackAllowsCreation(TileIndex tile, IndustryType type, size_t layout, uint32_t seed, uint16_t initial_random_bits, Owner founder, IndustryAvailabilityCallType creation_type);
|
||||
uint32_t GetIndustryProbabilityCallback(IndustryType type, IndustryAvailabilityCallType creation_type, uint32_t default_prob);
|
||||
bool IndustryTemporarilyRefusesCargo(Industry *ind, CargoID cargo_type);
|
||||
|
||||
IndustryType MapNewGRFIndustryType(IndustryType grf_type, uint32 grf_id);
|
||||
IndustryType MapNewGRFIndustryType(IndustryType grf_type, uint32_t grf_id);
|
||||
|
||||
/* in newgrf_industrytiles.cpp*/
|
||||
uint32 GetNearbyIndustryTileInformation(byte parameter, TileIndex tile, IndustryID index, bool signed_offsets, bool grf_version8);
|
||||
uint32_t GetNearbyIndustryTileInformation(byte parameter, TileIndex tile, IndustryID index, bool signed_offsets, bool grf_version8);
|
||||
|
||||
#endif /* NEWGRF_INDUSTRIES_H */
|
||||
|
Reference in New Issue
Block a user