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