OpenTTD Source 20260311-master-g511d3794ce
TileTypeProcs Struct Reference

Set of callback functions for performing tile operations of a given tile type. More...

#include <tile_cmd.h>

Data Fields

DrawTileProcdraw_tile_proc
 Called to render the tile and its contents to the screen.
GetSlopePixelZProcget_slope_pixel_z_proc
 Called to get the world Z coordinate for a given location within the tile.
ClearTileProcclear_tile_proc
AddAcceptedCargoProcadd_accepted_cargo_proc = nullptr
 Adds accepted cargo of the tile to cargo array supplied as parameter.
GetTileDescProcget_tile_desc_proc
 Get a description of a tile (for the 'land area information' tool).
GetTileTrackStatusProcget_tile_track_status_proc = [](TileIndex, TransportType, uint, DiagDirection) -> TrackStatus { return {}; }
 Get available tracks and status of a tile.
ClickTileProcclick_tile_proc = nullptr
 Called when tile is clicked.
AnimateTileProcanimate_tile_proc = nullptr
 Called to animate a tile.
TileLoopProctile_loop_proc
 Called to periodically update the tile.
ChangeTileOwnerProcchange_tile_owner_proc = [](TileIndex, CompanyID, CompanyID) {}
 Called to change the ownership of elements on a tile.
AddProducedCargoProcadd_produced_cargo_proc = nullptr
 Adds produced cargo of the tile to cargo array supplied as parameter.
VehicleEnterTileProcvehicle_enter_tile_proc = nullptr
 Called when a vehicle enters a tile.
GetFoundationProcget_foundation_proc = [](TileIndex, Slope) { return FOUNDATION_NONE; }
 Called to get the foundation.
TerraformTileProcterraform_tile_proc
 Called when a terraforming operation is about to take place.
CheckBuildAboveProccheck_build_above_proc = nullptr
 Called to check whether a bridge can be build above.

Detailed Description

Set of callback functions for performing tile operations of a given tile type.

See also
TileType

Definition at line 212 of file tile_cmd.h.

Field Documentation

◆ add_accepted_cargo_proc

AddAcceptedCargoProc* TileTypeProcs::add_accepted_cargo_proc = nullptr

Adds accepted cargo of the tile to cargo array supplied as parameter.

Definition at line 216 of file tile_cmd.h.

◆ add_produced_cargo_proc

AddProducedCargoProc* TileTypeProcs::add_produced_cargo_proc = nullptr

Adds produced cargo of the tile to cargo array supplied as parameter.

Definition at line 223 of file tile_cmd.h.

◆ animate_tile_proc

AnimateTileProc* TileTypeProcs::animate_tile_proc = nullptr

Called to animate a tile.

Definition at line 220 of file tile_cmd.h.

◆ change_tile_owner_proc

ChangeTileOwnerProc* TileTypeProcs::change_tile_owner_proc = [](TileIndex, CompanyID, CompanyID) {}

Called to change the ownership of elements on a tile.

Definition at line 222 of file tile_cmd.h.

◆ check_build_above_proc

CheckBuildAboveProc* TileTypeProcs::check_build_above_proc = nullptr

Called to check whether a bridge can be build above.

Definition at line 227 of file tile_cmd.h.

◆ clear_tile_proc

ClearTileProc* TileTypeProcs::clear_tile_proc

Definition at line 215 of file tile_cmd.h.

◆ click_tile_proc

ClickTileProc* TileTypeProcs::click_tile_proc = nullptr

Called when tile is clicked.

Definition at line 219 of file tile_cmd.h.

◆ draw_tile_proc

DrawTileProc* TileTypeProcs::draw_tile_proc

Called to render the tile and its contents to the screen.

Definition at line 213 of file tile_cmd.h.

◆ get_foundation_proc

GetFoundationProc* TileTypeProcs::get_foundation_proc = [](TileIndex, Slope) { return FOUNDATION_NONE; }

Called to get the foundation.

Definition at line 225 of file tile_cmd.h.

◆ get_slope_pixel_z_proc

GetSlopePixelZProc* TileTypeProcs::get_slope_pixel_z_proc

Called to get the world Z coordinate for a given location within the tile.

Definition at line 214 of file tile_cmd.h.

◆ get_tile_desc_proc

GetTileDescProc* TileTypeProcs::get_tile_desc_proc

Get a description of a tile (for the 'land area information' tool).

Definition at line 217 of file tile_cmd.h.

◆ get_tile_track_status_proc

GetTileTrackStatusProc* TileTypeProcs::get_tile_track_status_proc = [](TileIndex, TransportType, uint, DiagDirection) -> TrackStatus { return {}; }

Get available tracks and status of a tile.

Definition at line 218 of file tile_cmd.h.

◆ terraform_tile_proc

TerraformTileProc* TileTypeProcs::terraform_tile_proc

Called when a terraforming operation is about to take place.

Definition at line 226 of file tile_cmd.h.

◆ tile_loop_proc

TileLoopProc* TileTypeProcs::tile_loop_proc

Called to periodically update the tile.

Definition at line 221 of file tile_cmd.h.

◆ vehicle_enter_tile_proc

VehicleEnterTileProc* TileTypeProcs::vehicle_enter_tile_proc = nullptr

Called when a vehicle enters a tile.

Definition at line 224 of file tile_cmd.h.


The documentation for this struct was generated from the following file: