OpenTTD
industry_type.h
Go to the documentation of this file.
1 /* $Id: industry_type.h 27279 2015-05-09 10:21:55Z frosch $ */
2 
3 /*
4  * This file is part of OpenTTD.
5  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8  */
9 
12 #ifndef INDUSTRY_TYPE_H
13 #define INDUSTRY_TYPE_H
14 
15 typedef uint16 IndustryID;
16 typedef uint16 IndustryGfx;
17 typedef uint8 IndustryType;
18 struct Industry;
19 
20 struct IndustrySpec;
21 struct IndustryTileSpec;
22 
23 static const IndustryID INVALID_INDUSTRY = 0xFFFF;
24 
25 static const IndustryType NUM_INDUSTRYTYPES_PER_GRF = 128;
26 
27 static const IndustryType NEW_INDUSTRYOFFSET = 37;
28 static const IndustryType NUM_INDUSTRYTYPES = 240;
29 static const IndustryType INVALID_INDUSTRYTYPE = NUM_INDUSTRYTYPES;
30 
31 static const IndustryGfx NUM_INDUSTRYTILES_PER_GRF = 255;
32 
33 static const IndustryGfx INDUSTRYTILE_NOANIM = 0xFF;
34 static const IndustryGfx NEW_INDUSTRYTILEOFFSET = 175;
35 static const IndustryGfx NUM_INDUSTRYTILES = 512;
36 static const IndustryGfx INVALID_INDUSTRYTILE = NUM_INDUSTRYTILES;
37 
38 static const int INDUSTRY_COMPLETED = 3;
39 
40 void CheckIndustries();
41 
42 #endif /* INDUSTRY_TYPE_H */
static const IndustryGfx INVALID_INDUSTRYTILE
one above amount is considered invalid
Definition: industry_type.h:36
Defines the internal data of a functional industry.
Definition: industry.h:39
static const int INDUSTRY_COMPLETED
final stage of industry construction.
Definition: industry_type.h:38
static const IndustryGfx NEW_INDUSTRYTILEOFFSET
original number of tiles
Definition: industry_type.h:34
static const IndustryGfx NUM_INDUSTRYTILES
total number of industry tiles, new and old
Definition: industry_type.h:35
Defines the data structure for constructing industry.
Definition: industrytype.h:101
static const IndustryGfx NUM_INDUSTRYTILES_PER_GRF
Maximum number of industry tiles per NewGRF; limited to 255 to allow extending Action3 with an extend...
Definition: industry_type.h:31
static const IndustryType INVALID_INDUSTRYTYPE
one above amount is considered invalid
Definition: industry_type.h:29
static const IndustryType NUM_INDUSTRYTYPES
total number of industry types, new and old; limited to 240 because we need some special ids like INV...
Definition: industry_type.h:28
static const IndustryType NUM_INDUSTRYTYPES_PER_GRF
maximum number of industry types per NewGRF; limited to 128 because bit 7 has a special meaning in so...
Definition: industry_type.h:25
static const IndustryType NEW_INDUSTRYOFFSET
original number of industry types
Definition: industry_type.h:27
void CheckIndustries()
Verify whether the generated industries are complete, and warn the user if not.
Defines the data structure of each individual tile of an industry.
Definition: industrytype.h:148
static const IndustryGfx INDUSTRYTILE_NOANIM
flag to mark industry tiles as having no animation
Definition: industry_type.h:33