|
OpenTTD Source 20260820-master-g39da062c0c
|
Accessors to map for industries. More...
Go to the source code of this file.
Functions | |
| IndustryID | GetIndustryIndex (Tile t) |
| Get the industry ID of the given tile. | |
| bool | IsIndustryCompleted (Tile t) |
| Is this industry tile fully built? | |
| IndustryType | GetIndustryType (Tile tile) |
| Retrieve the type for this industry. | |
| void | SetIndustryCompleted (Tile tile) |
| Set if the industry that owns the tile as under construction or not. | |
| uint8_t | GetIndustryConstructionStage (Tile tile) |
| Returns the industry construction stage of the specified tile. | |
| void | SetIndustryConstructionStage (Tile tile, uint8_t value) |
| Sets the industry construction stage of the specified tile. | |
| IndustryGfx | GetCleanIndustryGfx (Tile t) |
| Get the industry graphics ID for the given industry tile as stored in the without translation. | |
| IndustryGfx | GetIndustryGfx (Tile t) |
| Get the industry graphics ID for the given industry tile. | |
| void | SetIndustryGfx (Tile t, IndustryGfx gfx) |
| Set the industry graphics ID for the given industry tile. | |
| uint8_t | GetIndustryConstructionCounter (Tile tile) |
| Returns this industry tile's construction counter value. | |
| void | SetIndustryConstructionCounter (Tile tile, uint8_t value) |
| Sets this industry tile's construction counter value. | |
| void | ResetIndustryConstructionStage (Tile tile) |
| Reset the construction stage counter of the industry, as well as the completion bit. | |
| uint8_t | GetIndustryAnimationLoop (Tile tile) |
| Get the animation loop number. | |
| void | SetIndustryAnimationLoop (Tile tile, uint8_t count) |
| Set the animation loop number. | |
| uint8_t | GetIndustryRandomBits (Tile tile) |
| Get the random bits for this tile. | |
| void | SetIndustryRandomBits (Tile tile, uint8_t bits) |
| Set the random bits for this tile. | |
| IndustryRandomTriggers | GetIndustryRandomTriggers (Tile tile) |
| Get the activated triggers bits for this industry tile Used for grf callbacks. | |
| void | SetIndustryRandomTriggers (Tile tile, IndustryRandomTriggers triggers) |
| Set the activated triggers bits for this industry tile Used for grf callbacks. | |
| void | MakeIndustry (Tile t, IndustryID index, IndustryGfx gfx, uint8_t random, WaterClass wc) |
| Make the given tile an industry tile. | |
Accessors to map for industries.
Definition in file industry_map.h.
|
inline |
Get the industry graphics ID for the given industry tile as stored in the without translation.
| t | the tile to get the gfx for |
Definition at line 85 of file industry_map.h.
References GB(), Industry, IsTileType(), Tile::m5(), and Tile::m6().
Referenced by GetIndustryGfx(), and GetIndustryIDAtOffset().
|
inline |
Get the animation loop number.
| tile | the tile to get the animation loop number of |
Definition at line 160 of file industry_map.h.
References Industry, IsTileType(), and Tile::m4().
|
inline |
Returns this industry tile's construction counter value.
| tile | the tile to query |
Definition at line 122 of file industry_map.h.
References GB(), Industry, IsTileType(), and Tile::m1().
|
inline |
Returns the industry construction stage of the specified tile.
| tile | the tile to query |
Definition at line 60 of file industry_map.h.
References GB(), Industry, INDUSTRY_COMPLETED, IsIndustryCompleted(), IsTileType(), and Tile::m1().
Referenced by DrawTile_Industry(), and IndustryTileScopeResolver::GetVariable().
|
inline |
Get the industry graphics ID for the given industry tile.
| t | the tile to get the gfx for |
Definition at line 97 of file industry_map.h.
References GetCleanIndustryGfx(), GetTranslatedIndustryTileID(), Industry, and IsTileType().
Referenced by AddAcceptedCargo_Industry(), AfterLoadGame(), AnimateTile_Industry(), BubbleTick(), ClearTile_Industry(), DoTriggerIndustryTileRandomisation(), DrawTile_Industry(), NIHIndustryTile::GetBadges(), GetFoundation_Industry(), NIHIndustryTile::GetGRFID(), NIHIndustryTile::GetSpec(), IndustryTileScopeResolver::GetVariable(), NIHIndustryTile::IsInspectable(), NIHIndustryTile::Resolve(), TerraformTile_Industry(), and TileLoop_Industry().
|
inline |
Get the industry ID of the given tile.
| t | the tile to get the industry ID from |
Definition at line 23 of file industry_map.h.
References Industry, IsTileType(), and Tile::m2().
Referenced by ClickTile_Industry(), DisasterTick_Aircraft(), Industry::GetByTile(), NIHIndustryTile::GetName(), GetNearbyIndustryTileInformation(), NIHIndustryTile::GetParent(), GetProductionAroundTiles(), IsWateredTile(), Station::RecomputeCatchment(), Station::RemoveFromAllNearbyLists(), Industry::TileBelongsToIndustry(), and Industry::~Industry().
|
inline |
Get the random bits for this tile.
Used for grf callbacks
| tile | the tile to query |
Definition at line 185 of file industry_map.h.
References Industry, IsTileType(), and Tile::m3().
Referenced by DoTriggerIndustryTileRandomisation(), IndustryTileScopeResolver::GetRandomBits(), and IndustriesScopeResolver::GetVariable().
|
inline |
Get the activated triggers bits for this industry tile Used for grf callbacks.
| tile | the tile to query |
Definition at line 211 of file industry_map.h.
References GB(), Industry, IsTileType(), and Tile::m6().
Referenced by DoTriggerIndustryTileRandomisation(), and IndustryTileScopeResolver::GetRandomTriggers().
| IndustryType GetIndustryType | ( | Tile | tile | ) |
Retrieve the type for this industry.
Although it is accessed by a tile, it will return the general type of industry, and not the sprite index as would do GetIndustryGfx.
| tile | that is queried |
Definition at line 110 of file industry_cmd.cpp.
References Industry::GetByTile(), Industry, IsTileType(), and Industry::type.
Referenced by AfterLoadGame(), and GenerateStationName().
|
inline |
Is this industry tile fully built?
| t | the tile to analyze |
Definition at line 35 of file industry_map.h.
References HasBit(), Industry, IsTileType(), and Tile::m1().
Referenced by ChopLumberMillTrees(), GetIndustryConstructionStage(), GetTileDesc_Industry(), and TileLoop_Industry().
|
inline |
Make the given tile an industry tile.
| t | the tile to make an industry tile |
| index | the industry this tile belongs to |
| gfx | the graphics to use for the tile |
| random | the random value |
| wc | the water class for this industry; only useful when build on water |
Definition at line 239 of file industry_map.h.
References Industry, Tile::m1(), Tile::m2(), Tile::m4(), Tile::m6(), Tile::m7(), Tile::m8(), SB(), SetIndustryGfx(), SetIndustryRandomBits(), SetIndustryRandomTriggers(), SetTileType(), and SetWaterClass().
Referenced by DoCreateNewIndustry().
|
inline |
Reset the construction stage counter of the industry, as well as the completion bit.
In fact, it is the same as restarting construction from the ground up.
| tile | the tile to query |
Definition at line 147 of file industry_map.h.
References Industry, IsTileType(), Tile::m1(), and SB().
Referenced by TileLoop_Industry().
|
inline |
Set the animation loop number.
| tile | the tile to set the animation loop number of |
| count | the new animation frame number |
Definition at line 172 of file industry_map.h.
References Industry, IsTileType(), and Tile::m4().
Referenced by TileLoop_Industry().
|
inline |
Set if the industry that owns the tile as under construction or not.
| tile | the tile to query |
Definition at line 48 of file industry_map.h.
References Industry, IsTileType(), Tile::m1(), and SetBit().
Referenced by TileLoop_Industry().
|
inline |
Sets this industry tile's construction counter value.
| tile | the tile to query |
| value | the new value for the construction counter |
Definition at line 134 of file industry_map.h.
References Industry, IsTileType(), Tile::m1(), and SB().
Referenced by DoCreateNewIndustry().
|
inline |
Sets the industry construction stage of the specified tile.
| tile | the tile to query |
| value | the new construction stage |
Definition at line 72 of file industry_map.h.
References Industry, IsTileType(), Tile::m1(), and SB().
Referenced by DoCreateNewIndustry(), and TileLoop_Industry().
|
inline |
Set the industry graphics ID for the given industry tile.
| t | the tile to set the gfx for |
| gfx | the graphics ID |
Definition at line 109 of file industry_map.h.
References GB(), Industry, IsTileType(), Tile::m5(), Tile::m6(), and SB().
Referenced by MakeIndustry(), and TileLoop_Industry().
|
inline |
Set the random bits for this tile.
Used for grf callbacks
| tile | the tile to query |
| bits | the random bits |
Definition at line 198 of file industry_map.h.
References Industry, IsTileType(), and Tile::m3().
Referenced by DoTriggerIndustryTileRandomisation(), and MakeIndustry().
|
inline |
Set the activated triggers bits for this industry tile Used for grf callbacks.
| tile | the tile to query |
| triggers | the triggers to set |
Definition at line 225 of file industry_map.h.
References BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::base(), Industry, IsTileType(), Tile::m6(), and SB().
Referenced by DoTriggerIndustryTileRandomisation(), and MakeIndustry().