| OpenTTD
    | 
Accessors for industries. More...
Go to the source code of this file.
| Enumerations | |
| enum | IndustryGraphics { GFX_COAL_MINE_TOWER_NOT_ANIMATED = 0, GFX_COAL_MINE_TOWER_ANIMATED = 1, GFX_POWERPLANT_CHIMNEY = 8, GFX_POWERPLANT_SPARKS = 10, GFX_OILRIG_1 = 24, GFX_OILRIG_2 = 25, GFX_OILRIG_3 = 26, GFX_OILRIG_4 = 27, GFX_OILRIG_5 = 28, GFX_OILWELL_NOT_ANIMATED = 29, GFX_OILWELL_ANIMATED_1 = 30, GFX_OILWELL_ANIMATED_2 = 31, GFX_OILWELL_ANIMATED_3 = 32, GFX_COPPER_MINE_TOWER_NOT_ANIMATED = 47, GFX_COPPER_MINE_TOWER_ANIMATED = 48, GFX_COPPER_MINE_CHIMNEY = 49, GFX_GOLD_MINE_TOWER_NOT_ANIMATED = 79, GFX_GOLD_MINE_TOWER_ANIMATED = 88, GFX_TOY_FACTORY = 143, GFX_PLASTIC_FOUNTAIN_ANIMATED_1 = 148, GFX_PLASTIC_FOUNTAIN_ANIMATED_2 = 149, GFX_PLASTIC_FOUNTAIN_ANIMATED_3 = 150, GFX_PLASTIC_FOUNTAIN_ANIMATED_4 = 151, GFX_PLASTIC_FOUNTAIN_ANIMATED_5 = 152, GFX_PLASTIC_FOUNTAIN_ANIMATED_6 = 153, GFX_PLASTIC_FOUNTAIN_ANIMATED_7 = 154, GFX_PLASTIC_FOUNTAIN_ANIMATED_8 = 155, GFX_BUBBLE_GENERATOR = 161, GFX_BUBBLE_CATCHER = 162, GFX_TOFFEE_QUARY = 165, GFX_SUGAR_MINE_SIEVE = 174, GFX_WATERTILE_SPECIALCHECK = 255 } | 
| The following enums are indices used to know what to draw for this industry tile.  More... | |
| Functions | |
| static IndustryID | GetIndustryIndex (TileIndex t) | 
| Get the industry ID of the given tile. | |
| static bool | IsIndustryCompleted (TileIndex t) | 
| Is this industry tile fully built? | |
| IndustryType | GetIndustryType (TileIndex tile) | 
| Retrieve the type for this industry. | |
| static void | SetIndustryCompleted (TileIndex tile) | 
| Set if the industry that owns the tile as under construction or not. | |
| static byte | GetIndustryConstructionStage (TileIndex tile) | 
| Returns the industry construction stage of the specified tile. | |
| static void | SetIndustryConstructionStage (TileIndex tile, byte value) | 
| Sets the industry construction stage of the specified tile. | |
| static IndustryGfx | GetCleanIndustryGfx (TileIndex t) | 
| Get the industry graphics ID for the given industry tile as stored in the without translation. | |
| static IndustryGfx | GetIndustryGfx (TileIndex t) | 
| Get the industry graphics ID for the given industry tile. | |
| static void | SetIndustryGfx (TileIndex t, IndustryGfx gfx) | 
| Set the industry graphics ID for the given industry tile. | |
| static byte | GetIndustryConstructionCounter (TileIndex tile) | 
| Returns this industry tile's construction counter value. | |
| static void | SetIndustryConstructionCounter (TileIndex tile, byte value) | 
| Sets this industry tile's construction counter value. | |
| static void | ResetIndustryConstructionStage (TileIndex tile) | 
| Reset the construction stage counter of the industry, as well as the completion bit. | |
| static byte | GetIndustryAnimationLoop (TileIndex tile) | 
| Get the animation loop number. | |
| static void | SetIndustryAnimationLoop (TileIndex tile, byte count) | 
| Set the animation loop number. | |
| static byte | GetIndustryRandomBits (TileIndex tile) | 
| Get the random bits for this tile. | |
| static void | SetIndustryRandomBits (TileIndex tile, byte bits) | 
| Set the random bits for this tile. | |
| static byte | GetIndustryTriggers (TileIndex tile) | 
| Get the activated triggers bits for this industry tile Used for grf callbacks. | |
| static void | SetIndustryTriggers (TileIndex tile, byte triggers) | 
| Set the activated triggers bits for this industry tile Used for grf callbacks. | |
| static void | MakeIndustry (TileIndex t, IndustryID index, IndustryGfx gfx, uint8 random, WaterClass wc) | 
| Make the given tile an industry tile. | |
Accessors for industries.
Definition in file industry_map.h.
| enum IndustryGraphics | 
The following enums 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 24 of file industry_map.h.
| 
 | inlinestatic | 
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 127 of file industry_map.h.
References _m, _me, GB(), IsTileType(), Tile::m5, and MP_INDUSTRY.
Referenced by GetIndustryGfx(), and GetIndustryIDAtOffset().
| 
 | inlinestatic | 
Get the animation loop number.
| tile | the tile to get the animation loop number of | 
Definition at line 201 of file industry_map.h.
References _m, IsTileType(), Tile::m4, and MP_INDUSTRY.
| 
 | inlinestatic | 
Returns this industry tile's construction counter value.
| tile | the tile to query | 
Definition at line 164 of file industry_map.h.
References _m, GB(), IsTileType(), and MP_INDUSTRY.
| 
 | inlinestatic | 
Returns the industry construction stage of the specified tile.
| tile | the tile to query | 
Definition at line 102 of file industry_map.h.
References _m, GB(), INDUSTRY_COMPLETED, IsIndustryCompleted(), IsTileType(), and MP_INDUSTRY.
Referenced by IndustryTileScopeResolver::GetVariable().
| 
 | inlinestatic | 
Get the industry graphics ID for the given industry tile.
| t | the tile to get the gfx for | 
Definition at line 139 of file industry_map.h.
References GetCleanIndustryGfx(), GetTranslatedIndustryTileID(), IsTileType(), and MP_INDUSTRY.
Referenced by AfterLoadGame(), and DoTriggerIndustryTile().
| 
 | inlinestatic | 
Get the industry ID of the given tile.
| t | the tile to get the industry ID from | 
Definition at line 65 of file industry_map.h.
References _m, IsTileType(), Tile::m2, and MP_INDUSTRY.
Referenced by DisasterTick_Aircraft(), Industry::GetByTile(), GetNearbyIndustryTileInformation(), IsWateredTile(), and Industry::TileBelongsToIndustry().
| 
 | inlinestatic | 
Get the random bits for this tile.
Used for grf callbacks
| tile | TileIndex of the tile to query | 
Definition at line 226 of file industry_map.h.
References _m, IsTileType(), Tile::m3, and MP_INDUSTRY.
Referenced by DoTriggerIndustryTile(), IndustryTileScopeResolver::GetRandomBits(), and IndustriesScopeResolver::GetVariable().
| 
 | inlinestatic | 
Get the activated triggers bits for this industry tile Used for grf callbacks.
| tile | TileIndex of the tile to query | 
Definition at line 252 of file industry_map.h.
References _me, GB(), IsTileType(), and MP_INDUSTRY.
Referenced by IndustryTileScopeResolver::GetTriggers().
| IndustryType GetIndustryType | ( | TileIndex | 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 99 of file industry_cmd.cpp.
References Industry::GetByTile(), IsTileType(), MP_INDUSTRY, and Industry::type.
Referenced by AfterLoadGame(), and FindNearIndustryName().
| 
 | inlinestatic | 
Is this industry tile fully built?
| t | the tile to analyze | 
Definition at line 77 of file industry_map.h.
References _m, HasBit(), IsTileType(), and MP_INDUSTRY.
Referenced by ChopLumberMillTrees(), and GetIndustryConstructionStage().
| 
 | inlinestatic | 
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 280 of file industry_map.h.
References _m, _me, Tile::m1, Tile::m2, Tile::m4, TileExtended::m7, MP_INDUSTRY, SetIndustryGfx(), SetIndustryRandomBits(), SetIndustryTriggers(), SetTileType(), and SetWaterClass().
Referenced by DoCreateNewIndustry().
| 
 | inlinestatic | 
Reset the construction stage counter of the industry, as well as the completion bit.
In fact, it is the same as restarting construction frmo ground up
| tile | the tile to query | 
Definition at line 189 of file industry_map.h.
References _m, IsTileType(), MP_INDUSTRY, and SB().
| 
 | inlinestatic | 
Set the animation loop number.
| tile | the tile to set the animation loop number of | 
| count | the new animation frame number | 
Definition at line 213 of file industry_map.h.
References _m, IsTileType(), Tile::m4, and MP_INDUSTRY.
| 
 | inlinestatic | 
Set if the industry that owns the tile as under construction or not.
| tile | the tile to query | 
Definition at line 90 of file industry_map.h.
References _m, IsTileType(), MP_INDUSTRY, and SB().
| 
 | inlinestatic | 
Sets this industry tile's construction counter value.
| tile | the tile to query | 
| value | the new value for the construction counter | 
Definition at line 176 of file industry_map.h.
References _m, IsTileType(), MP_INDUSTRY, and SB().
Referenced by DoCreateNewIndustry().
| 
 | inlinestatic | 
Sets the industry construction stage of the specified tile.
| tile | the tile to query | 
| value | the new construction stage | 
Definition at line 114 of file industry_map.h.
References _m, IsTileType(), MP_INDUSTRY, and SB().
Referenced by DoCreateNewIndustry().
| 
 | inlinestatic | 
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 151 of file industry_map.h.
References _m, _me, GB(), IsTileType(), Tile::m5, MP_INDUSTRY, and SB().
Referenced by MakeIndustry().
| 
 | inlinestatic | 
Set the random bits for this tile.
Used for grf callbacks
| tile | TileIndex of the tile to query | 
| bits | the random bits | 
Definition at line 239 of file industry_map.h.
References _m, IsTileType(), Tile::m3, and MP_INDUSTRY.
Referenced by DoTriggerIndustryTile(), and MakeIndustry().
| 
 | inlinestatic | 
Set the activated triggers bits for this industry tile Used for grf callbacks.
| tile | TileIndex of the tile to query | 
| triggers | the triggers to set | 
Definition at line 266 of file industry_map.h.
References _me, IsTileType(), MP_INDUSTRY, and SB().
Referenced by MakeIndustry(), and IndustryTileScopeResolver::SetTriggers().
 1.8.1.2
 1.8.1.2