75 typedef int GetSlopeZProc(
TileIndex tile, uint x, uint y);
114 typedef bool ClickTileProc(
TileIndex tile);
115 typedef void AnimateTileProc(
TileIndex tile);
116 typedef void TileLoopProc(
TileIndex tile);
146 GetSlopeZProc *get_slope_z_proc;
147 ClearTileProc *clear_tile_proc;
151 ClickTileProc *click_tile_proc;
152 AnimateTileProc *animate_tile_proc;
153 TileLoopProc *tile_loop_proc;
154 ChangeTileOwnerProc *change_tile_owner_proc;
157 GetFoundationProc *get_foundation_proc;
168 static inline void AddAcceptedCargo(
TileIndex tile,
CargoArray &acceptance, uint32 *always_accepted)
171 if (proc == NULL)
return;
173 proc(tile, acceptance, always_accepted == NULL ? &dummy : always_accepted);
179 if (proc == NULL)
return;
180 proc(tile, produced);
183 static inline void AnimateTile(
TileIndex tile)
185 AnimateTileProc *proc = _tile_type_procs[
GetTileType(tile)]->animate_tile_proc;
186 assert(proc != NULL);
190 static inline bool ClickTile(
TileIndex tile)
193 if (proc == NULL)
return false;
All types related to tracks.
static TileType GetTileType(TileIndex tile)
Get the tiletype of a given tile.
DECLARE_ENUM_AS_BIT_SET(GenderEthnicity) enum CompanyManagerFaceVariable
Bitgroups of the CompanyManagerFace variable.
Tile information, used while rendering the tile.
const TileTypeProcs *const _tile_type_procs[16]
Tile callback functions for each type of tile.
Flag for an invalid DiagDirection.
const char * grf
newGRF used for the tile contents
Slope tileh
Slope of the tile.
Tile description for the 'land area information' tool.
Common return value for all commands.
Types related to cargoes...
The vehicle entered a station.
uint16 rail_speed
Speed limit of rail (bridges and track)
Owner owner[4]
Name of the owner(s)
Types related to commands.
AddAcceptedCargoProc * add_accepted_cargo_proc
Adds accepted cargo of the tile to cargo array supplied as parameter.
GetTileTrackStatusProc * get_tile_track_status_proc
Get available tracks and status of a tile.
VehicleEnterTileProc * vehicle_enter_tile_proc
Called when a vehicle enters a tile.
uint x
X position of the tile in unit coordinates.
Foundation
Enumeration for Foundations.
void ChangeTileOwner(TileIndex tile, Owner old_owner, Owner new_owner)
Change the owner of a tile.
TileIndex tile
Tile index.
StringID owner_type[4]
Type of each owner.
ClickTileProc * click_tile_proc
Called when tile is clicked.
DoCommandFlag
List of flags for a command.
The vehicle either entered a bridge, tunnel or depot tile (this includes the last tile of the bridge/...
The vehicle either entered a bridge, tunnel or depot tile (this includes the last tile of the bridge/...
AddProducedCargoProc * add_produced_cargo_proc
Adds produced cargo of the tile to cargo array supplied as parameter.
Shift the VehicleEnterTileStatus this many bits to the right to get the station ID when VETS_ENTERED_...
The vehicle cannot enter the tile.
uint y
Y position of the tile in unit coordinates.
void DrawTileProc(TileInfo *ti)
Tile callback function signature for drawing a tile and its contents to the screen.
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...
VehicleEnterTileStatus VehicleEnterTile(Vehicle *v, TileIndex tile, int x, int y)
Call the tile callback function for a vehicle entering a tile.
DiagDirection
Enumeration for diagonal directions.
TerraformTileProc * terraform_tile_proc
Called when a terraforming operation is about to take place.
StringID railtype
Type of rail on the tile.
StringID airport_tile_name
Name of the airport tile.
void AddProducedCargoProc(TileIndex tile, CargoArray &produced)
Tile callback function signature for obtaining the produced cargo of a tile.
uint32 StringID
Numeric value that represents a string, independent of the selected language.
StringID station_name
Type of station within the class.
uint64 dparam[2]
Parameters of the str string.
Class for storing amounts of cargo.
uint16 road_speed
Speed limit of road (bridges)
VehicleEnterTileStatus VehicleEnterTileProc(Vehicle *v, TileIndex tile, int x, int y)
Set of callback functions for performing tile operations of a given tile type.
uint32 TileIndex
The index/ID of a Tile.
The vehicle entered a station.
Bit sets of the above specified bits.
Types related to vehicles.
TransportType
Available types of transport.
StringID airport_name
Name of the airport.
Slope
Enumeration for the slope-type.
Date build_date
Date of construction of tile contents.
TrackStatus GetTileTrackStatus(TileIndex tile, TransportType mode, uint sub_mode, DiagDirection side=INVALID_DIAGDIR)
Returns information about trackdirs and signal states.
int32 Date
The type to store our dates in.
DrawTileProc * draw_tile_proc
Called to render the tile and its contents to the screen.
StringID str
Description of the tile.
StringID station_class
Class of station.
CommandCost TerraformTileProc(TileIndex tile, DoCommandFlag flags, int z_new, Slope tileh_new)
Tile callback function signature of the terraforming callback.
The vehicle cannot enter the tile.
Map writing/reading functions for tiles.
Owner
Enum for all companies/owners.
void AddAcceptedCargoProc(TileIndex tile, CargoArray &acceptance, uint32 *always_accepted)
Tile callback function signature for obtaining cargo acceptance of a tile.
VehicleEnterTileStatus
The returned bits of VehicleEnterTile.
void GetTileDescProc(TileIndex tile, TileDesc *td)
Tile callback function signature for obtaining a tile description.
StringID airport_class
Name of the airport class.
GetTileDescProc * get_tile_desc_proc
Get a description of a tile (for the 'land area information' tool)