File diff r7290:e1859c96b616 → r7291:131e3ddd5976
src/industry.h
Show inline comments
 
/* $Id$ */
 

	
 
/** @file industry.h */
 

	
 
#ifndef INDUSTRY_H
 
#define INDUSTRY_H
 

	
 
#include "oldpool.h"
 
#include "helpers.hpp"
 

	
 
typedef byte IndustryGfx;
 
typedef uint8 IndustryType;
 

	
 
enum {
 
	INVALID_INDUSTRY       = 0xFFFF,
 
	NEW_INDUSTRYOFFSET     = 37,                         ///< original number of industries
 
	NUM_INDUSTRYTYPES      = 37,                         ///< total number of industries, new and old
 
	INDUSTRYTILE_NOANIM    = 0xFF,                       ///< flag to mark industry tiles as having no animation
 
	NEW_INDUSTRYTILEOFFSET = 175,                        ///< original number of tiles
 
	INVALID_INDUSTRYTYPE   = NUM_INDUSTRYTYPES,          ///< one above amount is considered invalid
 
	NUM_INDUSTRYTILES      = NEW_INDUSTRYTILEOFFSET,     ///< total number of industry tiles, new and old
 
	INVALID_INDUSTRYTILE   = NUM_INDUSTRYTILES,          ///< one above amount is considered invalid
 
	INDUSTRY_COMPLETED     = 3,                          ///< final stage of industry construction.
 
};
 

	
 
enum {
 
	CLEAN_RANDOMSOUNDS,    ///< Free the dynamically allocated sounds table
 
	CLEAN_TILELSAYOUT,     ///< Free the dynamically allocated tile layout structure
 
};
 

	
 
enum IndustryLifeType {
 
	INDUSTRYLIFE_BLACK_HOLE =      0, ///< Like power plants and banks
 
	INDUSTRYLIFE_EXTRACTIVE = 1 << 0, ///< Like mines
 
	INDUSTRYLIFE_ORGANIC    = 1 << 1, ///< Like forests
 
	INDUSTRYLIFE_PROCESSING = 1 << 2, ///< Like factories
 
};
 

	
 
/* Procedures that can be run to check whether an industry may
 
 * build at location the given to the procedure */
 
enum CheckProc {
 
	CHECK_NOTHING,
 
	CHECK_FOREST,
 
	CHECK_REFINERY,
 
	CHECK_FARM,
 
	CHECK_PLANTATION,
 
	CHECK_WATER,
 
	CHECK_LUMBERMILL,
 
	CHECK_BUBBLEGEN,
 
	CHECK_OIL_RIG,
 
	CHECK_END,
 
};
 

	
 
/** How was the industry created */
 
enum IndustryConstructionType {
 
	ICT_UNKNOWN,          ///< in previous game version or without newindustries activated
 
	ICT_NORMAL_GAMEPLAY,  ///< either by user or random creation proccess
 
	ICT_MAP_GENERATION,   ///< during random map creation
 
	ICT_SCENARIO_EDITOR   ///< while scenarion edition
 
};
 

	
 
/** From where is callback CBID_INDUSTRY_AVAILABLE been called */
 
enum IndustryAvailabilityCallType {
 
	IACT_MAPGENERATION,   ///< during random map generation
 
	IACT_RANDOMCREATION,  ///< during creation of random ingame industry
 
	IACT_USERCREATION,    ///< from the Fund/build window
 
};
 

	
 
enum IndustyBehaviour {
 
	INDUSTRYBEH_NONE                  =      0,
 
	INDUSTRYBEH_PLANT_FIELDS          = 1 << 0,  ///< periodically plants fileds around itself (temp and artic farms)
 
	INDUSTRYBEH_CUT_TREES             = 1 << 1,  ///< cuts trees and produce first output cargo from them (lumber mill)