|
OpenTTD Source 20260820-master-g39da062c0c
|
Types related to the industry. More...
#include "core/pool_type.hpp"Go to the source code of this file.
Typedefs | |
| using | IndustryID = PoolID<uint16_t, struct IndustryIDTag, 64000, 0xFFFF> |
| typedef uint16_t | IndustryGfx |
| typedef uint8_t | IndustryType |
| using | IndustryRandomTriggers = EnumBitSet<IndustryRandomTrigger, uint8_t> |
Bitset of IndustryRandomTrigger elements. | |
| using | IndustryAnimationTriggers = EnumBitSet<IndustryAnimationTrigger, uint8_t> |
Bitset of IndustryAnimationTrigger elements. | |
Enumerations | |
| enum class | IndustryRandomTrigger : uint8_t { TileLoop , IndustryTick , CargoReceived } |
| Available industry random triggers. More... | |
| enum class | IndustryAnimationTrigger : uint8_t { ConstructionStageChanged , TileLoop , IndustryTick , CargoReceived , CargoDistributed } |
| Animation triggers of the industries. More... | |
Functions | |
| void | CheckIndustries () |
| Verify whether the generated industries are complete, and warn the user if not. | |
Variables | |
| static const IndustryType | NUM_INDUSTRYTYPES_PER_GRF = 128 |
| maximum number of industry types per NewGRF; limited to 128 because bit 7 has a special meaning in some variables/callbacks (see MapNewGRFIndustryType). | |
| static const IndustryType | NEW_INDUSTRYOFFSET = 37 |
| original number of industry types | |
| static const IndustryType | NUM_INDUSTRYTYPES = 240 |
| total number of industry types, new and old; limited to 240 because we need some special ids like IT_INVALID, IT_AI_UNKNOWN, IT_AI_TOWN, ... | |
| static const IndustryType | IT_INVALID = 0xFF |
| static const IndustryGfx | INDUSTRYTILE_NOANIM = UINT16_MAX |
| Sentinel value to mark industry tiles as having no animation. | |
| static const IndustryGfx | NEW_INDUSTRYTILEOFFSET = 175 |
| original number of tiles | |
| static const IndustryGfx | NUM_INDUSTRYTILES = 512 |
| total number of industry tiles, new and old | |
| static const IndustryGfx | INVALID_INDUSTRYTILE = NUM_INDUSTRYTILES |
| one above amount is considered invalid | |
| static const IndustryGfx | NUM_INDUSTRYTILES_PER_GRF = NUM_INDUSTRYTILES |
| Maximum number of industry tiles per NewGRF. | |
| static constexpr IndustryGfx | GFX_WATERTILE_SPECIALCHECK = UINT16_MAX |
| Sentinel marker in industry layout to perform a water tile check. | |
| static const int | INDUSTRY_COMPLETED = 3 |
| final stage of industry construction. | |
| static const int | INDUSTRY_NUM_INPUTS = 16 |
| Number of cargo types an industry can accept. | |
| static const int | INDUSTRY_NUM_OUTPUTS = 16 |
| Number of cargo types an industry can produce. | |
| static const int | INDUSTRY_ORIGINAL_NUM_INPUTS = 3 |
| Original number of accepted cargo types. | |
| static const int | INDUSTRY_ORIGINAL_NUM_OUTPUTS = 2 |
| Original number of produced cargo types. | |
| static constexpr IndustryGfx | GFX_COAL_MINE_TOWER_NOT_ANIMATED = 0 |
| static constexpr IndustryGfx | GFX_COAL_MINE_TOWER_ANIMATED = 1 |
| static constexpr IndustryGfx | GFX_POWERPLANT_CHIMNEY = 8 |
| static constexpr IndustryGfx | GFX_POWERPLANT_SPARKS = 10 |
| static constexpr IndustryGfx | GFX_OILRIG_1 = 24 |
| static constexpr IndustryGfx | GFX_OILRIG_2 = 25 |
| static constexpr IndustryGfx | GFX_OILRIG_3 = 26 |
| static constexpr IndustryGfx | GFX_OILRIG_4 = 27 |
| static constexpr IndustryGfx | GFX_OILRIG_5 = 28 |
| static constexpr IndustryGfx | GFX_OILWELL_NOT_ANIMATED = 29 |
| static constexpr IndustryGfx | GFX_OILWELL_ANIMATED_1 = 30 |
| static constexpr IndustryGfx | GFX_OILWELL_ANIMATED_2 = 31 |
| static constexpr IndustryGfx | GFX_OILWELL_ANIMATED_3 = 32 |
| static constexpr IndustryGfx | GFX_COPPER_MINE_TOWER_NOT_ANIMATED = 47 |
| static constexpr IndustryGfx | GFX_COPPER_MINE_TOWER_ANIMATED = 48 |
| static constexpr IndustryGfx | GFX_COPPER_MINE_CHIMNEY = 49 |
| static constexpr IndustryGfx | GFX_GOLD_MINE_TOWER_NOT_ANIMATED = 79 |
| static constexpr IndustryGfx | GFX_GOLD_MINE_TOWER_ANIMATED = 88 |
| static constexpr IndustryGfx | GFX_TOY_FACTORY = 143 |
| static constexpr IndustryGfx | GFX_PLASTIC_FOUNTAIN_ANIMATED_1 = 148 |
| static constexpr IndustryGfx | GFX_PLASTIC_FOUNTAIN_ANIMATED_2 = 149 |
| static constexpr IndustryGfx | GFX_PLASTIC_FOUNTAIN_ANIMATED_3 = 150 |
| static constexpr IndustryGfx | GFX_PLASTIC_FOUNTAIN_ANIMATED_4 = 151 |
| static constexpr IndustryGfx | GFX_PLASTIC_FOUNTAIN_ANIMATED_5 = 152 |
| static constexpr IndustryGfx | GFX_PLASTIC_FOUNTAIN_ANIMATED_6 = 153 |
| static constexpr IndustryGfx | GFX_PLASTIC_FOUNTAIN_ANIMATED_7 = 154 |
| static constexpr IndustryGfx | GFX_PLASTIC_FOUNTAIN_ANIMATED_8 = 155 |
| static constexpr IndustryGfx | GFX_BUBBLE_GENERATOR = 161 |
| static constexpr IndustryGfx | GFX_BUBBLE_CATCHER = 162 |
| static constexpr IndustryGfx | GFX_TOFFEE_QUARRY = 165 |
| static constexpr IndustryGfx | GFX_SUGAR_MINE_SIEVE = 174 |
Types related to the industry.
Definition in file industry_type.h.
| using IndustryAnimationTriggers = EnumBitSet<IndustryAnimationTrigger, uint8_t> |
Bitset of IndustryAnimationTrigger elements.
Definition at line 44 of file industry_type.h.
| typedef uint16_t IndustryGfx |
Definition at line 17 of file industry_type.h.
| using IndustryID = PoolID<uint16_t, struct IndustryIDTag, 64000, 0xFFFF> |
Definition at line 15 of file industry_type.h.
| using IndustryRandomTriggers = EnumBitSet<IndustryRandomTrigger, uint8_t> |
Bitset of IndustryRandomTrigger elements.
Definition at line 32 of file industry_type.h.
| typedef uint8_t IndustryType |
Definition at line 18 of file industry_type.h.
|
strong |
Animation triggers of the industries.
Definition at line 35 of file industry_type.h.
|
strong |
Available industry random triggers.
| Enumerator | |
|---|---|
| TileLoop | The tile of the industry has been triggered during the tileloop. |
| IndustryTick | The industry has been triggered via its tick. |
| CargoReceived | Cargo has been delivered. |
Definition at line 25 of file industry_type.h.
| void CheckIndustries | ( | ) |
Verify whether the generated industries are complete, and warn the user if not.
Definition at line 3153 of file industry_cmd.cpp.
References GetEncodedString(), GetIndustrySpec(), Industry::GetIndustryTypeCount(), GetScaledIndustryGenerationProbability(), IndustrySpec::name, NUM_INDUSTRYTYPES, ShowErrorMessage(), and Warning.
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 92 of file industry_type.h.
Referenced by AnimateTile_Industry(), and BubbleTick().
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 91 of file industry_type.h.
Referenced by TileLoop_Industry().
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 65 of file industry_type.h.
Referenced by AfterLoadGame(), AnimateTile_Industry(), and TileLoop_Industry().
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 64 of file industry_type.h.
Referenced by TileLoop_Industry().
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 79 of file industry_type.h.
Referenced by TileLoop_Industry().
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 78 of file industry_type.h.
Referenced by AfterLoadGame(), AnimateTile_Industry(), and TileLoop_Industry().
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 77 of file industry_type.h.
Referenced by TileLoop_Industry().
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 81 of file industry_type.h.
Referenced by AfterLoadGame(), AnimateTile_Industry(), and TileLoop_Industry().
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 80 of file industry_type.h.
Referenced by TileLoop_Industry().
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 68 of file industry_type.h.
Referenced by AfterLoadGame().
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 69 of file industry_type.h.
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 70 of file industry_type.h.
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 71 of file industry_type.h.
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 72 of file industry_type.h.
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 74 of file industry_type.h.
Referenced by AfterLoadGame(), AnimateTile_Industry(), and TileLoop_Industry().
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 75 of file industry_type.h.
Referenced by AfterLoadGame(), and AnimateTile_Industry().
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 76 of file industry_type.h.
Referenced by AfterLoadGame(), and AnimateTile_Industry().
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 73 of file industry_type.h.
Referenced by TileLoop_Industry().
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 83 of file industry_type.h.
Referenced by AnimateTile_Industry().
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 84 of file industry_type.h.
Referenced by AnimateTile_Industry().
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 85 of file industry_type.h.
Referenced by AnimateTile_Industry().
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 86 of file industry_type.h.
Referenced by AnimateTile_Industry().
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 87 of file industry_type.h.
Referenced by AnimateTile_Industry().
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 88 of file industry_type.h.
Referenced by AnimateTile_Industry().
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 89 of file industry_type.h.
Referenced by AnimateTile_Industry().
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 90 of file industry_type.h.
Referenced by AnimateTile_Industry().
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 66 of file industry_type.h.
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 67 of file industry_type.h.
Referenced by AfterLoadGame(), AnimateTile_Industry(), and TileLoop_Industry().
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 94 of file industry_type.h.
Referenced by AnimateTile_Industry(), and TileLoop_Industry().
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 93 of file industry_type.h.
Referenced by AnimateTile_Industry(), and TileLoop_Industry().
|
staticconstexpr |
The following constants are indices used to know what to draw for this industry tile. They all are pointing toward array _industry_draw_tile_data, in table/industry_land.h How to calculate the correct position ? GFXid << 2 | IndustryStage (0 to 3)
Definition at line 82 of file industry_type.h.
Referenced by AnimateTile_Industry(), and TileLoop_Industry().
|
staticconstexpr |
Sentinel marker in industry layout to perform a water tile check.
Definition at line 96 of file industry_type.h.
Referenced by CheckIfCanLevelIndustryPlatform(), CheckIfIndustryTilesAreFree(), CheckIfIndustryTileSlopes(), DoCreateNewIndustry(), GetTranslatedIndustryTileID(), IndustriesChangeInfo(), and ValidateIndustryLayout().
|
static |
final stage of industry construction.
Definition at line 98 of file industry_type.h.
Referenced by DrawTile_Industry(), and GetIndustryConstructionStage().
|
static |
Number of cargo types an industry can accept.
Definition at line 100 of file industry_type.h.
Referenced by DoCreateNewIndustry(), and INDYChunkHandler::Load().
|
static |
Number of cargo types an industry can produce.
Definition at line 101 of file industry_type.h.
Referenced by DoCreateNewIndustry(), and INDYChunkHandler::Load().
|
static |
Original number of accepted cargo types.
Definition at line 102 of file industry_type.h.
Referenced by AddAcceptedCargo_Industry(), GetCargoSuffix(), IgnoreIndustryProperty(), IndustriesChangeInfo(), INDYChunkHandler::Load(), and ReadIndustryProductionSpriteGroup().
|
static |
Original number of produced cargo types.
Definition at line 103 of file industry_type.h.
Referenced by GetCargoSuffix(), IndustriesChangeInfo(), INDYChunkHandler::Load(), and ReadIndustryProductionSpriteGroup().
|
static |
Sentinel value to mark industry tiles as having no animation.
Definition at line 52 of file industry_type.h.
Referenced by IndustrytilesChangeInfo(), and TileLoop_Industry().
|
static |
one above amount is considered invalid
Definition at line 55 of file industry_type.h.
Referenced by DrawTile_Industry(), GetIndustryIDAtOffset(), GetTranslatedIndustryTileID(), and IndustriesChangeInfo().
|
static |
Definition at line 50 of file industry_type.h.
|
static |
original number of industry types
Definition at line 48 of file industry_type.h.
Referenced by IndustriesChangeInfo().
|
static |
original number of tiles
Definition at line 53 of file industry_type.h.
Referenced by DrawTile_Industry(), GetFoundation_Industry(), GetIndustryIDAtOffset(), and IndustrytilesChangeInfo().
|
static |
total number of industry tiles, new and old
Definition at line 54 of file industry_type.h.
Referenced by GetIndustryTileSpec(), and GetTranslatedIndustryTileID().
|
static |
Maximum number of industry tiles per NewGRF.
Definition at line 57 of file industry_type.h.
Referenced by IndustrytilesChangeInfo().
|
static |
total number of industry types, new and old; limited to 240 because we need some special ids like IT_INVALID, IT_AI_UNKNOWN, IT_AI_TOWN, ...
Definition at line 49 of file industry_type.h.
Referenced by SmallMapWindow::BreakIndustryChainLink(), IndustryCargoesWindow::CalculatePositionInWidget(), CheckIndustries(), CmdBuildIndustry(), IndustryCargoesWindow::ComputeCargoDisplay(), IndustryCargoesWindow::ComputeIndustryDisplay(), CargoesRow::ConnectIndustryAccepted(), CargoesRow::ConnectIndustryProduced(), IndustryCargoesWindow::CountMatchingAcceptingIndustries(), IndustryCargoesWindow::CountMatchingProducingIndustries(), CargoesField::Draw(), IndustryCargoesWindow::DrawWidget(), GenerateIndustries(), GenerateStationName(), GetCountAndDistanceOfClosestInstance(), GetIndustrySpec(), Industry::GetIndustryTypeCount(), GetScaledProbabilities(), IndustriesScopeResolver::GetVariable(), IndustryCargoesWindow::GetWidgetString(), IndustryDirectoryWindow::IndustryTypeSorter(), ITBLChunkHandler::Load(), IndustryCargoesWindow::OnClick(), IndustryCargoesWindow::OnInit(), IndustryCargoesWindow::OnInvalidateData(), IndustryCargoesWindow::OnTooltip(), IndustryBuildData::Reset(), ITBLChunkHandler::Save(), IndustryBuildData::SetupTargetCount(), ShowIndustryCargoesWindow(), ShowIndustryCargoesWindow(), SortIndustryTypes(), and IndustryBuildData::TryBuildNewIndustry().
|
static |
maximum number of industry types per NewGRF; limited to 128 because bit 7 has a special meaning in some variables/callbacks (see MapNewGRFIndustryType).
Definition at line 46 of file industry_type.h.
Referenced by IndustriesChangeInfo().