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:
@@ -104,9 +104,9 @@ using IndustryTileLayout = std::vector<IndustryTileLayoutTile>;
|
||||
*/
|
||||
struct IndustrySpec {
|
||||
std::vector<IndustryTileLayout> layouts; ///< List of possible tile layouts for the industry
|
||||
uint8 cost_multiplier; ///< Base construction cost multiplier.
|
||||
uint32 removal_cost_multiplier; ///< Base removal cost multiplier.
|
||||
uint32 prospecting_chance; ///< Chance prospecting succeeds
|
||||
uint8_t cost_multiplier; ///< Base construction cost multiplier.
|
||||
uint32_t removal_cost_multiplier; ///< Base removal cost multiplier.
|
||||
uint32_t prospecting_chance; ///< Chance prospecting succeeds
|
||||
IndustryType conflicting[3]; ///< Industries this industry cannot be close to
|
||||
byte check_proc; ///< Index to a procedure to check for conflicting circumstances
|
||||
CargoID produced_cargo[INDUSTRY_NUM_OUTPUTS];
|
||||
@@ -117,7 +117,7 @@ struct IndustrySpec {
|
||||
*/
|
||||
byte minimal_cargo;
|
||||
CargoID accepts_cargo[INDUSTRY_NUM_INPUTS]; ///< 16 accepted cargoes.
|
||||
uint16 input_cargo_multiplier[INDUSTRY_NUM_INPUTS][INDUSTRY_NUM_OUTPUTS]; ///< Input cargo multipliers (multiply amount of incoming cargo for the produced cargoes)
|
||||
uint16_t input_cargo_multiplier[INDUSTRY_NUM_INPUTS][INDUSTRY_NUM_OUTPUTS]; ///< Input cargo multipliers (multiply amount of incoming cargo for the produced cargoes)
|
||||
IndustryLifeType life_type; ///< This is also known as Industry production flag, in newgrf specs
|
||||
byte climate_availability; ///< Bitmask, giving landscape enums as bit position
|
||||
IndustryBehaviour behaviour; ///< How this industry will behave, and how others entities can use it
|
||||
@@ -130,11 +130,11 @@ struct IndustrySpec {
|
||||
StringID station_name; ///< Default name for nearby station
|
||||
byte appear_ingame[NUM_LANDSCAPE]; ///< Probability of appearance in game
|
||||
byte appear_creation[NUM_LANDSCAPE]; ///< Probability of appearance during map creation
|
||||
uint8 number_of_sounds; ///< Number of sounds available in the sounds array
|
||||
const uint8 *random_sounds; ///< array of random sounds.
|
||||
uint8_t number_of_sounds; ///< Number of sounds available in the sounds array
|
||||
const uint8_t *random_sounds; ///< array of random sounds.
|
||||
/* Newgrf data */
|
||||
uint16 callback_mask; ///< Bitmask of industry callbacks that have to be called
|
||||
uint8 cleanup_flag; ///< flags indicating which data should be freed upon cleaning up
|
||||
uint16_t callback_mask; ///< Bitmask of industry callbacks that have to be called
|
||||
uint8_t cleanup_flag; ///< flags indicating which data should be freed upon cleaning up
|
||||
bool enabled; ///< entity still available (by default true).newgrf can disable it, though
|
||||
GRFFileProps grf_prop; ///< properties related to the grf file
|
||||
|
||||
@@ -153,7 +153,7 @@ struct IndustrySpec {
|
||||
*/
|
||||
struct IndustryTileSpec {
|
||||
CargoID accepts_cargo[INDUSTRY_NUM_INPUTS]; ///< Cargo accepted by this tile
|
||||
int8 acceptance[INDUSTRY_NUM_INPUTS]; ///< Level of acceptance per cargo type (signed, may be negative!)
|
||||
int8_t acceptance[INDUSTRY_NUM_INPUTS]; ///< Level of acceptance per cargo type (signed, may be negative!)
|
||||
Slope slopes_refused; ///< slope pattern on which this tile cannot be built
|
||||
byte anim_production; ///< Animation frame to start when goods are produced
|
||||
byte anim_next; ///< Next frame in an animation
|
||||
@@ -163,7 +163,7 @@ struct IndustryTileSpec {
|
||||
*/
|
||||
bool anim_state;
|
||||
/* Newgrf data */
|
||||
uint8 callback_mask; ///< Bitmask of industry tile callbacks that have to be called
|
||||
uint8_t callback_mask; ///< Bitmask of industry tile callbacks that have to be called
|
||||
AnimationInfo animation; ///< Information about the animation (is it looping, how many loops etc)
|
||||
IndustryTileSpecialFlags special_flags; ///< Bitmask of extra flags used by the tile
|
||||
bool enabled; ///< entity still available (by default true).newgrf can disable it, though
|
||||
@@ -205,6 +205,6 @@ static inline IndustryGfx GetTranslatedIndustryTileID(IndustryGfx gfx)
|
||||
}
|
||||
}
|
||||
|
||||
static const uint8 IT_INVALID = 255;
|
||||
static const uint8_t IT_INVALID = 255;
|
||||
|
||||
#endif /* INDUSTRYTYPE_H */
|
||||
|
Reference in New Issue
Block a user