63 const char *
grf =
nullptr;
129typedef bool ClickTileProc(
TileIndex tile);
130typedef void AnimateTileProc(
TileIndex tile);
131typedef void TileLoopProc(
TileIndex tile);
162 ClearTileProc *clear_tile_proc;
167 AnimateTileProc *animate_tile_proc;
168 TileLoopProc *tile_loop_proc;
169 ChangeTileOwnerProc *change_tile_owner_proc;
172 GetFoundationProc *get_foundation_proc;
183inline void AddAcceptedCargo(
TileIndex tile,
CargoArray &acceptance, CargoTypes *always_accepted)
186 if (proc ==
nullptr)
return;
187 CargoTypes dummy = 0;
188 proc(tile, acceptance, always_accepted ==
nullptr ? dummy : *always_accepted);
194 if (proc ==
nullptr)
return;
195 proc(tile, produced);
211 assert(proc !=
nullptr);
218 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.
DiagDirection
Enumeration for diagonal directions.
@ INVALID_DIAGDIR
Flag for an invalid DiagDirection.
#define DECLARE_ENUM_AS_BIT_SET(enum_type)
Operators to allow to work with enum as with type safe bit set in C++.
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.
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)
const char * grf
newGRF used for the tile contents
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.
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.
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 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.
CommandCost TerraformTileProc(TileIndex tile, DoCommandFlags 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 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.