128 typedef bool ClickTileProc(
TileIndex tile);
129 typedef void AnimateTileProc(
TileIndex tile);
130 typedef void TileLoopProc(
TileIndex tile);
161 ClearTileProc *clear_tile_proc;
166 AnimateTileProc *animate_tile_proc;
167 TileLoopProc *tile_loop_proc;
168 ChangeTileOwnerProc *change_tile_owner_proc;
171 GetFoundationProc *get_foundation_proc;
182 inline void AddAcceptedCargo(
TileIndex tile,
CargoArray &acceptance, CargoTypes *always_accepted)
185 if (proc ==
nullptr)
return;
186 CargoTypes dummy = 0;
187 proc(tile, acceptance, always_accepted ==
nullptr ? dummy : *always_accepted);
193 if (proc ==
nullptr)
return;
194 proc(tile, produced);
200 assert(proc !=
nullptr);
207 if (proc ==
nullptr)
return false;
Types related to cargoes...
Common return value for all commands.
Types related to commands.
DoCommandFlag
List of flags for a command.
DECLARE_ENUM_AS_BIT_SET(GenderEthnicity) enum CompanyManagerFaceVariable
Bitgroups of the CompanyManagerFace variable.
Owner
Enum for all companies/owners.
DiagDirection
Enumeration for diagonal directions.
@ INVALID_DIAGDIR
Flag for an invalid DiagDirection.
Slope
Enumeration for the slope-type.
Foundation
Enumeration for Foundations.
uint32_t StringID
Numeric value that represents a string, independent of the selected language.
Class for storing amounts of cargo.
Tile description for the 'land area information' tool.
uint16_t rail_speed
Speed limit of rail (bridges and track)
StringID station_name
Type of station within the class.
StringID str
Description of the tile.
TimerGameCalendar::Date build_date
Date of construction of tile contents.
uint64_t dparam
Parameter of the str string.
StringID airport_class
Name of the airport class.
StringID airport_name
Name of the airport.
uint16_t tram_speed
Speed limit of tram (bridges and track)
StringID roadtype
Type of road on the tile.
StringID tramtype
Type of tram on the tile.
StringID railtype
Type of rail on the tile.
uint16_t road_speed
Speed limit of road (bridges and track)
const char * grf
newGRF used for the tile contents
StringID airport_tile_name
Name of the airport tile.
Owner owner[4]
Name of the owner(s)
StringID owner_type[4]
Type of each owner.
StringID station_class
Class of station.
Tile information, used while rendering the tile.
int x
X position of the tile in unit coordinates.
Slope tileh
Slope of the tile.
TileIndex tile
Tile index.
int y
Y position of the tile in unit coordinates.
Set of callback functions for performing tile operations of a given tile type.
VehicleEnterTileProc * vehicle_enter_tile_proc
Called when a vehicle enters a tile.
DrawTileProc * draw_tile_proc
Called to render the tile and its contents to the screen.
AddAcceptedCargoProc * add_accepted_cargo_proc
Adds accepted cargo of the tile to cargo array supplied as parameter.
GetTileDescProc * get_tile_desc_proc
Get a description of a tile (for the 'land area information' tool)
TerraformTileProc * terraform_tile_proc
Called when a terraforming operation is about to take place.
GetTileTrackStatusProc * get_tile_track_status_proc
Get available tracks and status of a tile.
AddProducedCargoProc * add_produced_cargo_proc
Adds produced cargo of the tile to cargo array supplied as parameter.
ClickTileProc * click_tile_proc
Called when tile is clicked.
CommandCost TerraformTileProc(TileIndex tile, DoCommandFlag flags, int z_new, Slope tileh_new)
Tile callback function signature of the terraforming callback.
VehicleEnterTileStatus
The returned bits of VehicleEnterTile.
@ VETS_CANNOT_ENTER
The vehicle cannot enter the tile.
@ VETS_ENTERED_WORMHOLE
The vehicle either entered a bridge, tunnel or depot tile (this includes the last tile of the bridge/...
@ VETS_ENTERED_STATION
The vehicle entered a station.
@ VETSB_ENTERED_WORMHOLE
The vehicle either entered a bridge, tunnel or depot tile (this includes the last tile of the bridge/...
@ VETSB_CANNOT_ENTER
The vehicle cannot enter the tile.
@ VETS_STATION_ID_OFFSET
Shift the VehicleEnterTileStatus this many bits to the right to get the station ID when VETS_ENTERED_...
@ VETSB_ENTERED_STATION
The vehicle entered a station.
@ VETSB_CONTINUE
Bit sets of the above specified bits.
void AddProducedCargoProc(TileIndex tile, CargoArray &produced)
Tile callback function signature for obtaining the produced cargo of a tile.
void DrawTileProc(TileInfo *ti)
Tile callback function signature for drawing a tile and its contents to the screen.
void GetTileDescProc(TileIndex tile, TileDesc *td)
Tile callback function signature for obtaining a tile description.
void ChangeTileOwner(TileIndex tile, Owner old_owner, Owner new_owner)
Change the owner of a tile.
void AddAcceptedCargoProc(TileIndex tile, CargoArray &acceptance, CargoTypes &always_accepted)
Tile callback function signature for obtaining cargo acceptance of a tile.
VehicleEnterTileStatus VehicleEnterTileProc(Vehicle *v, TileIndex tile, int x, int y)
VehicleEnterTileStatus VehicleEnterTile(Vehicle *v, TileIndex tile, int x, int y)
Call the tile callback function for a vehicle entering a tile.
int GetSlopeZProc(TileIndex tile, uint x, uint y, bool ground_vehicle)
Tile callback function signature for obtaining the world Z coordinate of a given point of a tile.
TrackStatus GetTileTrackStatusProc(TileIndex tile, TransportType mode, uint sub_mode, DiagDirection side)
Tile callback function signature for getting the possible tracks that can be taken on a given tile by...
const TileTypeProcs *const _tile_type_procs[16]
Tile callback functions for each type of tile.
TrackStatus GetTileTrackStatus(TileIndex tile, TransportType mode, uint sub_mode, DiagDirection side=INVALID_DIAGDIR)
Returns information about trackdirs and signal states.
Map writing/reading functions for tiles.
static debug_inline TileType GetTileType(Tile tile)
Get the tiletype of a given tile.
Definition of the game-calendar-timer.
All types related to tracks.
TransportType
Available types of transport.
Types related to vehicles.