OpenTTD Source 20250312-master-gcdcc6b491d
industry_type.h
Go to the documentation of this file.
1/*
2 * This file is part of OpenTTD.
3 * 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.
4 * 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.
5 * 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/>.
6 */
7
10#ifndef INDUSTRY_TYPE_H
11#define INDUSTRY_TYPE_H
12
14
15typedef uint16_t IndustryGfx;
16typedef uint8_t IndustryType;
17struct Industry;
18
19struct IndustrySpec;
20struct IndustryTileSpec;
21
22static const IndustryType NUM_INDUSTRYTYPES_PER_GRF = 128;
23
24static const IndustryType NEW_INDUSTRYOFFSET = 37;
25static const IndustryType NUM_INDUSTRYTYPES = 240;
26static const IndustryType IT_INVALID = 0xFF;
27
28static const IndustryGfx NUM_INDUSTRYTILES_PER_GRF = 255;
29
30static const IndustryGfx INDUSTRYTILE_NOANIM = 0xFF;
31static const IndustryGfx NEW_INDUSTRYTILEOFFSET = 175;
32static const IndustryGfx NUM_INDUSTRYTILES = 512;
33static const IndustryGfx INVALID_INDUSTRYTILE = NUM_INDUSTRYTILES;
34
35static const int INDUSTRY_COMPLETED = 3;
36
37static const int INDUSTRY_NUM_INPUTS = 16;
38static const int INDUSTRY_NUM_OUTPUTS = 16;
39static const int INDUSTRY_ORIGINAL_NUM_INPUTS = 3;
40static const int INDUSTRY_ORIGINAL_NUM_OUTPUTS = 2;
41
42
43void CheckIndustries();
44
45#endif /* INDUSTRY_TYPE_H */
static const IndustryGfx NEW_INDUSTRYTILEOFFSET
original number of tiles
static const IndustryGfx INDUSTRYTILE_NOANIM
flag to mark industry tiles as having no animation
static const IndustryType NEW_INDUSTRYOFFSET
original number of industry types
static const int INDUSTRY_ORIGINAL_NUM_INPUTS
Original number of accepted cargo types.
static const int INDUSTRY_NUM_OUTPUTS
Number of cargo types an industry can produce.
static const IndustryGfx NUM_INDUSTRYTILES_PER_GRF
Maximum number of industry tiles per NewGRF; limited to 255 to allow extending Action3 with an extend...
static const int INDUSTRY_NUM_INPUTS
Number of cargo types an industry can accept.
static const IndustryType NUM_INDUSTRYTYPES
total number of industry types, new and old; limited to 240 because we need some special ids like IT_...
static const IndustryGfx INVALID_INDUSTRYTILE
one above amount is considered invalid
void CheckIndustries()
Verify whether the generated industries are complete, and warn the user if not.
static const int INDUSTRY_ORIGINAL_NUM_OUTPUTS
Original number of produced cargo types.
static const IndustryGfx NUM_INDUSTRYTILES
total number of industry tiles, new and old
static const int INDUSTRY_COMPLETED
final stage of industry construction.
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...
Defines the data structure for constructing industry.
Defines the data structure of each individual tile of an industry.
Defines the internal data of a functional industry.
Definition industry.h:63
Templated helper to make a PoolID a single POD value.
Definition pool_type.hpp:43