47 std::optional<std::string>
grf = std::nullopt;
113typedef bool ClickTileProc(
TileIndex tile);
114typedef void AnimateTileProc(
TileIndex tile);
115typedef void TileLoopProc(
TileIndex tile);
155 ClearTileProc *clear_tile_proc;
160 AnimateTileProc *animate_tile_proc;
161 TileLoopProc *tile_loop_proc;
162 ChangeTileOwnerProc *change_tile_owner_proc;
165 GetFoundationProc *get_foundation_proc;
177inline void AddAcceptedCargo(
TileIndex tile,
CargoArray &acceptance, CargoTypes *always_accepted)
180 if (proc ==
nullptr)
return;
181 CargoTypes dummy = 0;
182 proc(tile, acceptance, always_accepted ==
nullptr ? dummy : *always_accepted);
188 if (proc ==
nullptr)
return;
189 proc(tile, produced);
205 assert(proc !=
nullptr);
212 if (proc ==
nullptr)
return false;
Types related to cargoes...
Common return value for all commands.
static constexpr TimerGame< struct Calendar >::Date INVALID_DATE
Representation of an invalid date.
Types related to commands.
Axis
Allow incrementing of DiagDirDiff variables.
DiagDirection
Enumeration for diagonal directions.
@ INVALID_DIAGDIR
Flag for an invalid DiagDirection.
All geometry types in OpenTTD.
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.
A coordinate with three dimensions.
Tile description for the 'land area information' tool.
uint16_t rail_speed
Speed limit of rail (bridges and track)
std::optional< std::string > grf
newGRF used for the tile contents
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.
std::array< Owner, 4 > owner
Name of the owner(s)
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)
std::array< StringID, 4 > owner_type
Type of each owner.
std::optional< bool > town_can_upgrade
Whether the town can upgrade this house during town growth.
StringID airport_tile_name
Name of the airport tile.
StringID station_class
Class of station.
Tile information, used while rendering the tile.
Slope tileh
Slope of the tile.
TileIndex tile
Tile index.
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.
@ EnteredStation
The vehicle entered a station.
@ CannotEnter
The vehicle cannot enter the tile.
@ EnteredWormhole
The vehicle either entered a bridge, tunnel or depot tile (this includes the last tile of the bridge/...
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.
VehicleEnterTileStates VehicleEnterTile(Vehicle *v, TileIndex tile, int x, int y)
Call the tile callback function for a vehicle entering a tile.
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.
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.
CommandCost(TileIndex tile, DoCommandFlags flags, Axis axis, int height) CheckBuildAboveProc
Tile callback function signature to test if a bridge can be built above a tile.
CommandCost TerraformTileProc(TileIndex tile, DoCommandFlags flags, int z_new, Slope tileh_new)
Tile callback function signature of the terraforming callback.
void GetTileDescProc(TileIndex tile, TileDesc &td)
Tile callback function signature for obtaining a tile description.
bool MayAnimateTile(TileIndex tile)
Test if a tile may be animated.
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.