@ -248,7 +248,7 @@ Templates are a very powerful C++ tool, but they can easily confuse beginners. T
* Templates are to be documented in a very clear and verbose manner. Never assume anything in the documentation.
* the template keyword and the template layout get a separate line. typenames are either "T" or preceded by a "T", integers get a single capital letter or a descriptive name preceded by "T".
std::vector<RoadStopSpecList>roadstop_speclist;///< List of road stop specs of this station
uint16_trandom_bits;///< Random bits assigned to this station
bytewaiting_triggers;///< Waiting triggers (NewGRF) for this station
bytedelete_ctr;///< Delete counter. If greater than 0 then it is decremented until it reaches 0; the waypoint is then is deleted.
uint8_twaiting_triggers;///< Waiting triggers (NewGRF) for this station
uint8_tdelete_ctr;///< Delete counter. If greater than 0 then it is decremented until it reaches 0; the waypoint is then is deleted.
uint8_tcached_anim_triggers;///< NOSAVE: Combined animation trigger bitmask, used to determine if trigger processing should happen.
uint8_tcached_roadstop_anim_triggers;///< NOSAVE: Combined animation trigger bitmask for road stops, used to determine if trigger processing should happen.
byte_engine_sort_last_criteria[]={0,0,0,0};///< Last set sort criteria, for each vehicle type.
uint8_t_engine_sort_last_criteria[]={0,0,0,0};///< Last set sort criteria, for each vehicle type.
bool_engine_sort_last_order[]={false,false,false,false};///< Last set direction of the sort order, for each vehicle type.
bool_engine_sort_show_hidden_engines[]={false,false,false,false};///< Last set 'show hidden engines' setting for each vehicle type.
bool_engine_sort_show_hidden_locos=false;///< Last set 'show hidden locos' setting.
bool_engine_sort_show_hidden_wagons=false;///< Last set 'show hidden wagons' setting.
staticCargoID_engine_sort_last_cargo_criteria[]={CargoFilterCriteria::CF_ANY,CargoFilterCriteria::CF_ANY,CargoFilterCriteria::CF_ANY,CargoFilterCriteria::CF_ANY};///< Last set filter criteria, for each vehicle type.
typedefboolEngList_SortTypeFunction(constGUIEngineListItem&,constGUIEngineListItem&);///< argument type for #EngList_Sort.
typedefboolEngList_SortTypeFunction(constGUIEngineListItem&,constGUIEngineListItem&, constGUIEngineListSortCache&);///< argument type for #EngList_Sort.
staticconstHouseIDNUM_HOUSES_PER_GRF=255;///< Number of supported houses per NewGRF; limited to 255 to allow extending Action3 with an extended byte later on.
@ -106,12 +106,12 @@ struct HouseSpec {
/* Standard properties */
CalTime::Yearmin_year;///< introduction year of the house
CalTime::Yearmax_year;///< last year it can be built
bytepopulation;///< population (Zero on other tiles in multi tile house.)
byteremoval_cost;///< cost multiplier for removing it
uint8_tpopulation;///< population (Zero on other tiles in multi tile house.)
uint8_tremoval_cost;///< cost multiplier for removing it
StringIDbuilding_name;///< building name
uint16_tremove_rating_decrease;///< rating decrease if removed
bytemail_generation;///< mail generation multiplier (tile based, as the acceptances below)
bytecargo_acceptance[HOUSE_NUM_ACCEPTS];///< acceptance level for the cargo slots
uint8_tmail_generation;///< mail generation multiplier (tile based, as the acceptances below)
uint8_tcargo_acceptance[HOUSE_NUM_ACCEPTS];///< acceptance level for the cargo slots
/** When industry production change is evaluated, rolls to decrease are ignored. */
@ -71,10 +71,10 @@ struct Industry : IndustryPool::PoolItem<&_industry_pool> {
std::array<CargoID,INDUSTRY_NUM_OUTPUTS>produced_cargo{};///< 16 production cargo slots
std::array<uint16_t,INDUSTRY_NUM_OUTPUTS>produced_cargo_waiting{};///< amount of cargo produced per cargo
std::array<uint16_t,INDUSTRY_NUM_OUTPUTS>incoming_cargo_waiting{};///< incoming cargo waiting to be processed
std::array<byte,INDUSTRY_NUM_OUTPUTS>production_rate{};///< production rate for each cargo
std::array<uint8_t,INDUSTRY_NUM_OUTPUTS>production_rate{};///< production rate for each cargo
std::array<uint32_t,INDUSTRY_NUM_OUTPUTS>this_month_production{};///< stats of this month's production per cargo
std::array<uint32_t,INDUSTRY_NUM_OUTPUTS>this_month_transported{};///< stats of this month's transport per cargo
std::array<byte,INDUSTRY_NUM_OUTPUTS>last_month_pct_transported{};///< percentage transported per cargo in the last full month
std::array<uint8_t,INDUSTRY_NUM_OUTPUTS>last_month_pct_transported{};///< percentage transported per cargo in the last full month
std::array<uint32_t,INDUSTRY_NUM_OUTPUTS>last_month_production{};///< total units produced per cargo in the last full month
std::array<uint32_t,INDUSTRY_NUM_OUTPUTS>last_month_transported{};///< total units transported per cargo in the last full month
@ -82,17 +82,17 @@ struct Industry : IndustryPool::PoolItem<&_industry_pool> {
mutablestd::stringcached_name;///< NOSAVE: Cache of the resolved name of the industry
uint16_tcounter;///< used for animation and/or production (if available cargo)
byteprod_level;///< general production level
uint8_tprod_level;///< general production level
Coloursrandom_colour;///< randomized colour of the industry, for display purpose
EconTime::Yearlast_prod_year;///< last year of production
bytewas_cargo_delivered;///< flag that indicate this has been the closest industry chosen for cargo delivery by a station. see DeliverGoodsToIndustry
uint8_twas_cargo_delivered;///< flag that indicate this has been the closest industry chosen for cargo delivery by a station. see DeliverGoodsToIndustry
IndustryControlFlagsctlflags;///< flags overriding standard behaviours
PartOfSubsidypart_of_subsidy;///< NOSAVE: is this industry a source/destination of a subsidy?
Ownerfounder;///< Founder of the industry
uint8_tconstruction_type;///< Way the industry was constructed (@see IndustryConstructionType)
byteselected_layout;///< Which tile layout was used when creating the industry
uint8_tselected_layout;///< Which tile layout was used when creating the industry
Ownerexclusive_supplier;///< Which company has exclusive rights to deliver cargo (INVALID_OWNER = anyone)
Ownerexclusive_consumer;///< Which company has exclusive rights to take cargo (INVALID_OWNER = anyone)
EconTime::Datelast_cargo_accepted_at[INDUSTRY_NUM_INPUTS];///< Last day each cargo type was accepted by this industry
uint16_tinput_cargo_multiplier[INDUSTRY_NUM_INPUTS][INDUSTRY_NUM_OUTPUTS];///< Input cargo multipliers (multiply amount of incoming cargo for the produced cargoes)
IndustryLifeTypelife_type;///< This is also known as Industry production flag, in newgrf specs
byteclimate_availability;///< Bitmask, giving landscape enums as bit position
uint8_tclimate_availability;///< Bitmask, giving landscape enums as bit position
IndustryBehaviourbehaviour;///< How this industry will behave, and how others entities can use it
bytemap_colour;///< colour used for the small map
uint8_tmap_colour;///< colour used for the small map
StringIDname;///< Displayed name of the industry
StringIDnew_industry_text;///< Message appearing when the industry is built
StringIDclosure_text;///< Message appearing when the industry closes
StringIDproduction_up_text;///< Message appearing when the industry's production is increasing
StringIDproduction_down_text;///< Message appearing when the industry's production is decreasing
StringIDstation_name;///< Default name for nearby station
byteappear_ingame[NUM_LANDSCAPE];///< Probability of appearance in game
byteappear_creation[NUM_LANDSCAPE];///< Probability of appearance during map creation
uint8_tappear_ingame[NUM_LANDSCAPE];///< Probability of appearance in game
uint8_tappear_creation[NUM_LANDSCAPE];///< Probability of appearance during map creation
uint8_tnumber_of_sounds;///< Number of sounds available in the sounds array
constuint8_t*random_sounds;///< array of random sounds.