OpenTTD Source
20241121-master-g67a0fccfad
|
NewGRF handling of industry tiles. More...
Go to the source code of this file.
Data Structures | |
struct | IndustryTileScopeResolver |
Resolver for the industry tiles scope. More... | |
struct | IndustryTileResolverObject |
Resolver for industry tiles. More... | |
Enumerations | |
enum | IndustryTileTrigger { INDTILE_TRIGGER_TILE_LOOP = 0x01 , INDUSTRY_TRIGGER_INDUSTRY_TICK = 0x02 , INDUSTRY_TRIGGER_RECEIVED_CARGO = 0x04 } |
Available industry tile triggers. More... | |
Functions | |
bool | DrawNewIndustryTile (TileInfo *ti, Industry *i, IndustryGfx gfx, const IndustryTileSpec *inds) |
uint16_t | GetIndustryTileCallback (CallbackID callback, uint32_t param1, uint32_t param2, IndustryGfx gfx_id, Industry *industry, TileIndex tile) |
CommandCost | PerformIndustryTileSlopeCheck (TileIndex ind_base_tile, TileIndex ind_tile, const IndustryTileSpec *its, IndustryType type, IndustryGfx gfx, size_t layout_index, uint16_t initial_random_bits, Owner founder, IndustryAvailabilityCallType creation_type) |
Check the slope of a tile of a new industry. More... | |
void | AnimateNewIndustryTile (TileIndex tile) |
bool | StartStopIndustryTileAnimation (TileIndex tile, IndustryAnimationTrigger iat, uint32_t random=Random()) |
bool | StartStopIndustryTileAnimation (const Industry *ind, IndustryAnimationTrigger iat) |
void | TriggerIndustryTile (TileIndex t, IndustryTileTrigger trigger) |
Trigger a random trigger for a single industry tile. More... | |
void | TriggerIndustry (Industry *ind, IndustryTileTrigger trigger) |
Trigger a random trigger for all industry tiles. More... | |
NewGRF handling of industry tiles.
Definition in file newgrf_industrytiles.h.
enum IndustryTileTrigger |
Available industry tile triggers.
Definition at line 70 of file newgrf_industrytiles.h.
CommandCost PerformIndustryTileSlopeCheck | ( | TileIndex | ind_base_tile, |
TileIndex | ind_tile, | ||
const IndustryTileSpec * | its, | ||
IndustryType | type, | ||
IndustryGfx | gfx, | ||
size_t | layout_index, | ||
uint16_t | initial_random_bits, | ||
Owner | founder, | ||
IndustryAvailabilityCallType | creation_type | ||
) |
Check the slope of a tile of a new industry.
ind_base_tile | Base tile of the industry. |
ind_tile | Tile to check. |
its | Tile specification. |
type | Industry type. |
gfx | Gfx of the tile. |
layout_index | Layout. |
initial_random_bits | Random bits of industry after construction |
founder | Industry founder |
creation_type | The circumstances the industry is created under. |
Definition at line 230 of file newgrf_industrytiles.cpp.
void TriggerIndustry | ( | Industry * | ind, |
IndustryTileTrigger | trigger | ||
) |
Trigger a random trigger for all industry tiles.
ind | Industry to trigger. |
trigger | Trigger to trigger. |
Definition at line 372 of file newgrf_industrytiles.cpp.
References DoReseedIndustry(), DoTriggerIndustryTile(), Industry::location, and Industry::TileBelongsToIndustry().
void TriggerIndustryTile | ( | TileIndex | tile, |
IndustryTileTrigger | trigger | ||
) |
Trigger a random trigger for a single industry tile.
tile | Industry tile to trigger. |
trigger | Trigger to trigger. |
Definition at line 359 of file newgrf_industrytiles.cpp.
References DoReseedIndustry(), DoTriggerIndustryTile(), and Industry::GetByTile().