OpenTTD Source
12.0-beta2
|
Go to the documentation of this file.
10 #ifndef NEWGRF_INDUSTRYTILES_H
11 #define NEWGRF_INDUSTRYTILES_H
34 uint32
GetVariable(
byte variable, uint32 parameter,
bool *available)
const override;
61 uint16 GetIndustryTileCallback(
CallbackID callback, uint32 param1, uint32 param2, IndustryGfx gfx_id,
Industry *industry,
TileIndex tile);
64 void AnimateNewIndustryTile(
TileIndex tile);
Industry * industry
Industry owning the tiles.
uint32 TileIndex
The index/ID of a Tile.
uint32 callback_param1
First parameter (var 10) of the callback.
ScopeResolver * GetScope(VarSpriteGroupScope scope=VSG_SCOPE_SELF, byte relative=0) override
Get a resolver for the scope.
IndustryTileScopeResolver indtile_scope
Scope resolver for the industry tile.
Tile information, used while rendering the tile.
Interface for SpriteGroup-s to access the gamestate.
uint32 GetRandomBits() const override
Get a few random bits.
CommandCost PerformIndustryTileSlopeCheck(TileIndex ind_base_tile, TileIndex ind_tile, const IndustryTileSpec *its, IndustryType type, IndustryGfx gfx, size_t layout_index, uint16 initial_random_bits, Owner founder, IndustryAvailabilityCallType creation_type)
Check the slope of a tile of a new industry.
IndustryAnimationTrigger
Animation triggers of the industries.
CallbackID
List of implemented NewGRF callbacks.
@ VSG_SCOPE_PARENT
Related object of the resolved one.
Defines the internal data of a functional industry.
@ INDUSTRY_TRIGGER_INDUSTRY_TICK
The industry has been triggered via its tick.
Owner
Enum for all companies/owners.
Interface to query and set values specific to a single VarSpriteGroupScope (action 2 scope).
@ VSG_SCOPE_SELF
Resolved object itself.
Resolver for the industry tiles scope.
uint32 callback_param2
Second parameter (var 18) of the callback.
@ 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 GetVariable(byte variable, uint32 parameter, bool *available) const override
Get a variable value.
Resolver for industry scopes.
IndustryTileResolverObject(IndustryGfx gfx, TileIndex tile, Industry *indus, CallbackID callback=CBID_NO_CALLBACK, uint32 callback_param1=0, uint32 callback_param2=0)
Constructor of the industry tiles scope resolver.
GrfSpecFeature GetFeature() const override
Get the feature number being resolved for.
virtual ScopeResolver * GetScope(VarSpriteGroupScope scope=VSG_SCOPE_SELF, byte relative=0)
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.
void TriggerIndustryTile(TileIndex t, IndustryTileTrigger trigger)
Trigger a random trigger for a single industry tile.
CallbackID callback
Callback being resolved.
uint32 GetTriggers() const override
Get the triggers.
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.
uint32 GetDebugID() const override
Get an identifier for the item being resolved.