Changeset - r6637:08ab9ae07700
[Not reviewed]
master
0 1 0
belugas - 17 years ago 2007-05-18 14:34:15
belugas@openttd.org
(svn r9868) -Codechange: bring external declaration of functions togueter and adjust a comment
1 file changed with 4 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/industry.h
Show inline comments
 
@@ -124,29 +124,32 @@ struct IndustrySpec {
 
	byte override;
 
};
 

	
 
/**
 
 * Defines the data structure of each indivudual tile of an industry.
 
 */
 
struct IndustryTileSpec {
 
	CargoID accepts_cargo[3];             ///< Cargo accepted by this tile
 
	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
 
	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)
 

	
 
/**
 
 * Check if an Industry really exists.
 
 * @param industry to check
 
 * @return true if position is a valid one
 
 */
 
static inline bool IsValidIndustry(const Industry *industry)
 
@@ -210,28 +213,24 @@ void DestroyIndustry(Industry *i);
 
static inline void DeleteIndustry(Industry *i)
 
{
 
	DestroyIndustry(i);
 
	i->xy = 0;
 
}
 

	
 
#define FOR_ALL_INDUSTRIES_FROM(i, start) for (i = GetIndustry(start); i != NULL; i = (i->index + 1U < GetIndustryPoolSize()) ? GetIndustry(i->index + 1U) : NULL) if (IsValidIndustry(i))
 
#define FOR_ALL_INDUSTRIES(i) FOR_ALL_INDUSTRIES_FROM(i, 0)
 

	
 
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,
 
	IT_SAWMILL             =   2,
 
	IT_FOREST              =   3,
 
	IT_OIL_REFINERY        =   4,
 
	IT_OIL_RIG             =   5,
 
	IT_FACTORY             =   6,
 
	IT_PRINTING_WORKS      =   7,
 
	IT_STEEL_MILL          =   8,
 
	IT_FARM                =   9,
 
	IT_COPPER_MINE         =  10,
0 comments (0 inline, 0 general)