OpenTTD Source
20240919-master-gdf0233f4c2
|
Go to the documentation of this file.
10 #ifndef NEWGRF_INDUSTRYTILES_H
11 #define NEWGRF_INDUSTRYTILES_H
34 uint32_t
GetVariable(uint8_t variable, [[maybe_unused]] uint32_t parameter,
bool &available)
const override;
61 uint16_t GetIndustryTileCallback(
CallbackID callback, uint32_t param1, uint32_t param2, IndustryGfx gfx_id,
Industry *industry,
TileIndex tile);
64 void AnimateNewIndustryTile(
TileIndex tile);
Industry * industry
Industry owning the tiles.
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.
IndustryTileScopeResolver indtile_scope
Scope resolver for the industry tile.
Tile information, used while rendering the tile.
Owner
Enum for all companies/owners.
Interface for SpriteGroup-s to access the gamestate.
uint32_t GetDebugID() const override
Get an identifier for the item being resolved.
IndustryAnimationTrigger
Animation triggers of the industries.
CallbackID
List of implemented NewGRF callbacks.
Defines the internal data of a functional industry.
@ INDUSTRY_TRIGGER_INDUSTRY_TICK
The industry has been triggered via its tick.
Interface to query and set values specific to a single VarSpriteGroupScope (action 2 scope).
IndustryTileResolverObject(IndustryGfx gfx, TileIndex tile, Industry *indus, CallbackID callback=CBID_NO_CALLBACK, uint32_t callback_param1=0, uint32_t callback_param2=0)
Constructor of the industry tiles scope resolver.
uint32_t GetRandomBits() const override
Get a few random bits.
Resolver for the industry tiles scope.
@ VSG_SCOPE_SELF
Resolved object itself.
@ INDUSTRY_TRIGGER_RECEIVED_CARGO
Cargo has been delivered.
Common return value for all commands.
Resolver for industry tiles.
@ CBID_NO_CALLBACK
Set when using the callback resolve system, but not to resolve a callback.
IndustriesScopeResolver ind_scope
Scope resolver for the industry owning the tile.
IndustryTileScopeResolver(ResolverObject &ro, Industry *industry, TileIndex tile)
Constructor of the scope resolver for the industry tile.
void TriggerIndustry(Industry *ind, IndustryTileTrigger trigger)
Trigger a random trigger for all industry tiles.
uint32_t GetVariable(uint8_t variable, [[maybe_unused]] uint32_t parameter, bool &available) const override
Get a variable value.
Resolver for industry scopes.
GrfSpecFeature GetFeature() const override
Get the feature number being resolved for.
uint32_t GetTriggers() const override
Get the triggers.
ScopeResolver * GetScope(VarSpriteGroupScope scope=VSG_SCOPE_SELF, uint8_t relative=0) override
Get a resolver for the scope.
IndustryAvailabilityCallType
From where has callback CBID_INDUSTRY_PROBABILITY been called.
@ INDTILE_TRIGGER_TILE_LOOP
The tile of the industry has been triggered during the tileloop.
uint32_t callback_param2
Second parameter (var 18) of the callback.
@ VSG_SCOPE_PARENT
Related object of the resolved one.
void TriggerIndustryTile(TileIndex t, IndustryTileTrigger trigger)
Trigger a random trigger for a single industry tile.
CallbackID callback
Callback being resolved.
uint32_t callback_param1
First parameter (var 10) of the callback.
virtual ScopeResolver * GetScope(VarSpriteGroupScope scope=VSG_SCOPE_SELF, uint8_t relative=0)
Get a resolver for the scope.
TileIndex tile
Tile being resolved.
ResolverObject & ro
Surrounding resolver object.
Defines the data structure of each individual tile of an industry.
IndustryTileTrigger
Available industry tile triggers.