Merge branch 'master' into jgrpp

Remove 'byte' typedef
This commit is contained in:
Jonathan G Rennison
2024-05-07 17:21:50 +01:00
376 changed files with 2220 additions and 2152 deletions

View File

@@ -112,30 +112,30 @@ struct IndustrySpec {
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
uint8_t check_proc; ///< Index to a procedure to check for conflicting circumstances
std::array<CargoID, INDUSTRY_NUM_OUTPUTS> produced_cargo{};
std::array<std::variant<CargoLabel, MixedCargoType>, INDUSTRY_NUM_OUTPUTS> produced_cargo_label{};
std::array<byte, INDUSTRY_NUM_OUTPUTS> production_rate{};
std::array<uint8_t, INDUSTRY_NUM_OUTPUTS> production_rate{};
/**
* minimum amount of cargo transported to the stations.
* If the waiting cargo is less than this number, no cargo is moved to it.
*/
byte minimal_cargo;
uint8_t minimal_cargo;
std::array<CargoID, INDUSTRY_NUM_INPUTS> accepts_cargo{}; ///< 16 accepted cargoes.
std::array<std::variant<CargoLabel, MixedCargoType>, INDUSTRY_NUM_INPUTS> accepts_cargo_label{};
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
uint8_t climate_availability; ///< Bitmask, giving landscape enums as bit position
IndustryBehaviour behaviour; ///< How this industry will behave, and how others entities can use it
byte map_colour; ///< colour used for the small map
uint8_t map_colour; ///< colour used for the small map
StringID name; ///< Displayed name of the industry
StringID new_industry_text; ///< Message appearing when the industry is built
StringID closure_text; ///< Message appearing when the industry closes
StringID production_up_text; ///< Message appearing when the industry's production is increasing
StringID production_down_text; ///< Message appearing when the industry's production is decreasing
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_t appear_ingame[NUM_LANDSCAPE]; ///< Probability of appearance in game
uint8_t appear_creation[NUM_LANDSCAPE]; ///< Probability of appearance during map creation
uint8_t number_of_sounds; ///< Number of sounds available in the sounds array
const uint8_t *random_sounds; ///< array of random sounds.
/* Newgrf data */
@@ -162,8 +162,8 @@ struct IndustryTileSpec {
std::array<std::variant<CargoLabel, MixedCargoType>, INDUSTRY_NUM_INPUTS> accepts_cargo_label;
std::array<int8_t, INDUSTRY_NUM_INPUTS> acceptance; ///< 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
uint8_t anim_production; ///< Animation frame to start when goods are produced
uint8_t anim_next; ///< Next frame in an animation
/**
* When true, the tile has to be drawn using the animation
* state instead of the construction state