--- a/src/industry.h Sat Mar 10 11:07:13 2007 +0000
+++ b/src/industry.h Sun Mar 11 16:31:18 2007 +0000
@@ -14,11 +14,11 @@
INVALID_INDUSTRY = 0xFFFF,
};
-typedef enum IndustryLifeTypes {
+enum IndustryLifeType {
INDUSTRYLIFE_NOT_CLOSABLE, ///< Industry can never close
INDUSTRYLIFE_PRODUCTION, ///< Industry can close and change of production
INDUSTRYLIFE_CLOSABLE, ///< Industry can only close (no production change)
-} IndustryLifeType;
+};
/**
* Defines the internal data of a functionnal industry
@@ -49,15 +49,15 @@
IndustryID index; ///< index of the industry in the pool of industries
};
-typedef struct IndustryTileTable {
+struct IndustryTileTable {
TileIndexDiffC ti;
IndustryGfx gfx;
-} IndustryTileTable;
+};
/**
* Defines the data structure for constructing industry.
*/
-typedef struct IndustrySpec {
+struct IndustrySpec {
const IndustryTileTable *const *table;///< List of the tiles composing the industry
byte num_table; ///< Number of elements in the table
byte cost_multiplier; ///< Base cost multiplier*/
@@ -71,18 +71,19 @@
IndustryLifeType life_type; ///< This is also known as Industry production flag, in newgrf specs
byte climate_availability; ///< Bitmask, giving landscape enums as bit position
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
-} IndustrySpec;
+};
/**
* Defines the data structure of each indivudual tile of an industry.
*/
-typedef struct IndustryTileSpec {
+struct IndustryTileSpec {
CargoID accepts_cargo[3]; ///< Cargo accepted by this tile
Slope slopes_refused; ///< slope pattern on which this tile cannot be built
-} IndustryTileSpec;
+};
const IndustrySpec *GetIndustrySpec(IndustryType thistype); ///< Array of industries default data
const IndustryTileSpec *GetIndustryTileSpec(IndustryGfx gfx); ///< Array of industry tiles default data
@@ -111,7 +112,7 @@
VARDEF int _total_industries; //general counter
-static inline IndustryID GetMaxIndustryIndex(void)
+static inline IndustryID GetMaxIndustryIndex()
{
/* TODO - This isn't the real content of the function, but
* with the new pool-system this will be replaced with one that
@@ -121,7 +122,7 @@
return GetIndustryPoolSize() - 1;
}
-static inline uint GetNumIndustries(void)
+static inline uint GetNumIndustries()
{
return _total_industries;
}
@@ -129,7 +130,7 @@
/**
* Return a random valid industry.
*/
-static inline Industry *GetRandomIndustry(void)
+static inline Industry *GetRandomIndustry()
{
int num = RandomRange(GetNumIndustries());
IndustryID index = INVALID_INDUSTRY;