--- a/src/industry.h Wed Jun 13 11:17:30 2007 +0000
+++ b/src/industry.h Wed Jun 13 11:45:14 2007 +0000
@@ -67,10 +67,8 @@
byte width;
byte height;
const Town* town; ///< Nearest town
- CargoID produced_cargo[2]; ///< 2 production cargo slots
uint16 cargo_waiting[2]; ///< amount of cargo produced per cargo
byte production_rate[2]; ///< production rate for each cargo
- CargoID accepts_cargo[3]; ///< 3 input cargo slots
byte prod_level; ///< general production level
uint16 last_mo_production[2]; ///< stats of last month production per cargo
uint16 last_mo_transported[2]; ///< stats of last month transport per cargo
@@ -79,7 +77,7 @@
uint16 total_transported[2]; ///< total units transported per cargo
uint16 counter; ///< used for animation and/or production (if available cargo)
- byte type; ///< type of industry. see IT_COAL_MINE and others
+ IndustryType type; ///< type of industry. see IT_COAL_MINE and others
OwnerByte owner; ///< owner of the industry. Which SHOULD always be (imho) OWNER_NONE
byte random_color; ///< randomized colour of the industry, for display purpose
Year last_prod_year; ///< last year of production
@@ -107,6 +105,7 @@
byte minimal_cargo; ///< minimum amount of cargo transported to the stations
///< If the waiting cargo is less than this number, no cargo is moved to it
CargoID accepts_cargo[3]; ///< 3 accepted cargos
+ uint16 input_cargo_multiplier[3][2]; ///< Input cargo multipliers (multiply amount of incoming cargo for the produced cargos)
IndustryLifeType life_type; ///< This is also known as Industry production flag, in newgrf specs
byte climate_availability; ///< Bitmask, giving landscape enums as bit position
IndustyBehaviour behaviour; ///< How this industry will behave, and how others entities can use it
@@ -118,6 +117,8 @@
StringID production_down_text; ///< Message appearing when the industry's production is decreasing
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.
/* Newgrf stuff coming in */
uint16 callback_flags; ///< Flags telling which grf callback is set
byte subst_id;
@@ -134,11 +135,17 @@
byte anim_production; ///< Animation frame to start when goods are produced
byte anim_next; ///< Next frame in an animation
bool anim_state; ///< When true, the tile has to be drawn using the animation
- ///< state instead of the construction state
+ ///< state instead of the construction state
};
+/* industry_cmd.cpp*/
const IndustrySpec *GetIndustrySpec(IndustryType thistype); ///< Array of industries default data
const IndustryTileSpec *GetIndustryTileSpec(IndustryGfx gfx); ///< Array of industry tiles default data
+void ResetIndustries();
+void PlantRandomFarmField(const Industry *i);
+
+/* smallmap_gui.cpp */
+void BuildIndustriesLegend();
DECLARE_OLD_POOL(Industry, Industry, 3, 8000)
@@ -217,10 +224,6 @@
VARDEF const Industry** _industry_sort;
VARDEF bool _industry_sort_dirty;
-
-void DeleteIndustry(Industry *is);
-void PlantRandomFarmField(const Industry *i);
-
enum {
IT_COAL_MINE = 0,
IT_POWER_STATION = 1,