Update to 14.0-beta1

This commit is contained in:
dP
2024-02-04 02:18:17 +05:30
parent 79037e2c65
commit 33ef333b57
1325 changed files with 138461 additions and 70983 deletions
+13 -15
View File
@@ -10,8 +10,6 @@
#ifndef INDUSTRYTYPE_H
#define INDUSTRYTYPE_H
#include <array>
#include <vector>
#include "map_type.h"
#include "slope_type.h"
#include "industry_type.h"
@@ -106,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];
@@ -119,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
@@ -132,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
@@ -154,8 +152,8 @@ struct IndustrySpec {
* @note A tile can at most accept 3 types of cargo, even if an industry as a whole can accept more types.
*/
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!)
std::array<CargoID, INDUSTRY_NUM_INPUTS> accepts_cargo; ///< Cargo accepted by this tile
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
@@ -165,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
@@ -191,7 +189,7 @@ extern std::array<IndustryType, NUM_INDUSTRYTYPES> _sorted_industry_types;
* @param gfx the type to get the override for.
* @return the gfx to actually work with.
*/
static inline IndustryGfx GetTranslatedIndustryTileID(IndustryGfx gfx)
inline IndustryGfx GetTranslatedIndustryTileID(IndustryGfx gfx)
{
/* the 0xFF should be GFX_WATERTILE_SPECIALCHECK but for reasons of include mess,
* we'll simplify the writing.
@@ -207,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 */