12 #ifndef INDUSTRY_MAP_H 13 #define INDUSTRY_MAP_H 25 GFX_COAL_MINE_TOWER_NOT_ANIMATED = 0,
26 GFX_COAL_MINE_TOWER_ANIMATED = 1,
27 GFX_POWERPLANT_CHIMNEY = 8,
28 GFX_POWERPLANT_SPARKS = 10,
34 GFX_OILWELL_NOT_ANIMATED = 29,
35 GFX_OILWELL_ANIMATED_1 = 30,
36 GFX_OILWELL_ANIMATED_2 = 31,
37 GFX_OILWELL_ANIMATED_3 = 32,
38 GFX_COPPER_MINE_TOWER_NOT_ANIMATED = 47,
39 GFX_COPPER_MINE_TOWER_ANIMATED = 48,
40 GFX_COPPER_MINE_CHIMNEY = 49,
41 GFX_GOLD_MINE_TOWER_NOT_ANIMATED = 79,
42 GFX_GOLD_MINE_TOWER_ANIMATED = 88,
43 GFX_TOY_FACTORY = 143,
44 GFX_PLASTIC_FOUNTAIN_ANIMATED_1 = 148,
45 GFX_PLASTIC_FOUNTAIN_ANIMATED_2 = 149,
46 GFX_PLASTIC_FOUNTAIN_ANIMATED_3 = 150,
47 GFX_PLASTIC_FOUNTAIN_ANIMATED_4 = 151,
48 GFX_PLASTIC_FOUNTAIN_ANIMATED_5 = 152,
49 GFX_PLASTIC_FOUNTAIN_ANIMATED_6 = 153,
50 GFX_PLASTIC_FOUNTAIN_ANIMATED_7 = 154,
51 GFX_PLASTIC_FOUNTAIN_ANIMATED_8 = 155,
52 GFX_BUBBLE_GENERATOR = 161,
53 GFX_BUBBLE_CATCHER = 162,
54 GFX_TOFFEE_QUARY = 165,
55 GFX_SUGAR_MINE_SIEVE = 174,
93 SB(
_m[tile].m1, 7, 1, 1);
117 SB(
_m[tile].m1, 0, 2, value);
130 return _m[t].
m5 | (
GB(
_me[t].m6, 2, 1) << 8);
155 SB(
_me[t].m6, 2, 1,
GB(gfx, 8, 1));
167 return GB(
_m[tile].m1, 2, 2);
179 SB(
_m[tile].m1, 2, 2, value);
192 SB(
_m[tile].m1, 0, 4, 0);
193 SB(
_m[tile].m1, 7, 1, 0);
255 return GB(
_me[tile].m6, 3, 3);
269 SB(
_me[tile].m6, 3, 3, triggers);
static void SetIndustryGfx(TileIndex t, IndustryGfx gfx)
Set the industry graphics ID for the given industry tile.
static IndustryGfx GetCleanIndustryGfx(TileIndex t)
Get the industry graphics ID for the given industry tile as stored in the without translation...
byte m7
Primarily used for newgrf support.
uint16 m2
Primarily used for indices to towns, industries and stations.
static IndustryGfx GetIndustryGfx(TileIndex t)
Get the industry graphics ID for the given industry tile.
Tile * _m
Tiles of the map.
static byte GetIndustryAnimationLoop(TileIndex tile)
Get the animation loop number.
static void ResetIndustryConstructionStage(TileIndex tile)
Reset the construction stage counter of the industry, as well as the completion bit.
static const int INDUSTRY_COMPLETED
final stage of industry construction.
static void SetWaterClass(TileIndex t, WaterClass wc)
Set the water class at a tile.
static void SetIndustryRandomBits(TileIndex tile, byte bits)
Set the random bits for this tile.
static T SB(T &x, const uint8 s, const uint8 n, const U d)
Set n bits in x starting at bit s to d.
byte m1
Primarily used for ownership information.
not really a tile, but rather a very special check
static bool IsIndustryCompleted(TileIndex t)
Is this industry tile fully built?
IndustryGraphics
The following enums are indices used to know what to draw for this industry tile. ...
static IndustryGfx GetTranslatedIndustryTileID(IndustryGfx gfx)
Do industry gfx ID translation for NewGRFs.
static bool IsTileType(TileIndex tile, TileType type)
Checks if a tile is a give tiletype.
WaterClass
classes of water (for WATER_TILE_CLEAR water tile type).
static byte GetIndustryConstructionStage(TileIndex tile)
Returns the industry construction stage of the specified tile.
static void SetIndustryConstructionCounter(TileIndex tile, byte value)
Sets this industry tile's construction counter value.
Map accessors for water tiles.
static void SetIndustryAnimationLoop(TileIndex tile, byte count)
Set the animation loop number.
TileExtended * _me
Extended Tiles of the map.
uint32 TileIndex
The index/ID of a Tile.
static IndustryID GetIndustryIndex(TileIndex t)
Get the industry ID of the given tile.
static void SetIndustryCompleted(TileIndex tile)
Set if the industry that owns the tile as under construction or not.
static uint GB(const T x, const uint8 s, const uint8 n)
Fetch n bits from x, started at bit s.
static void SetTileType(TileIndex tile, TileType type)
Set the type of a tile.
static byte GetIndustryRandomBits(TileIndex tile)
Get the random bits for this tile.
static void SetIndustryTriggers(TileIndex tile, byte triggers)
Set the activated triggers bits for this industry tile Used for grf callbacks.
static bool HasBit(const T x, const uint8 y)
Checks if a bit in a value is set.
static byte GetIndustryTriggers(TileIndex tile)
Get 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.
static void SetIndustryConstructionStage(TileIndex tile, byte value)
Sets the industry construction stage of the specified tile.
IndustryType GetIndustryType(TileIndex tile)
Retrieve the type for this industry.
static byte GetIndustryConstructionCounter(TileIndex tile)
Returns this industry tile's construction counter value.