Update to 1.10.0-beta1

This commit is contained in:
dP
2019-10-31 22:24:28 +03:00
parent b84a475e14
commit 599ccf0c2b
1470 changed files with 354219 additions and 16795 deletions

View File

@@ -64,7 +64,10 @@ struct TileDesc {
uint64 dparam[2]; ///< Parameters of the \a str string
StringID railtype; ///< Type of rail on the tile.
uint16 rail_speed; ///< Speed limit of rail (bridges and track)
uint16 road_speed; ///< Speed limit of road (bridges)
StringID roadtype; ///< Type of road on the tile.
uint16 road_speed; ///< Speed limit of road (bridges and track)
StringID tramtype; ///< Type of tram on the tile.
uint16 tram_speed; ///< Speed limit of tram (bridges and track)
};
/**
@@ -168,29 +171,29 @@ void GetTileDesc(TileIndex tile, TileDesc *td);
static inline void AddAcceptedCargo(TileIndex tile, CargoArray &acceptance, CargoTypes *always_accepted)
{
AddAcceptedCargoProc *proc = _tile_type_procs[GetTileType(tile)]->add_accepted_cargo_proc;
if (proc == NULL) return;
CargoTypes dummy = 0; // use dummy bitmask so there don't need to be several 'always_accepted != NULL' checks
proc(tile, acceptance, always_accepted == NULL ? &dummy : always_accepted);
if (proc == nullptr) return;
CargoTypes dummy = 0; // use dummy bitmask so there don't need to be several 'always_accepted != nullptr' checks
proc(tile, acceptance, always_accepted == nullptr ? &dummy : always_accepted);
}
static inline void AddProducedCargo(TileIndex tile, CargoArray &produced)
{
AddProducedCargoProc *proc = _tile_type_procs[GetTileType(tile)]->add_produced_cargo_proc;
if (proc == NULL) return;
if (proc == nullptr) return;
proc(tile, produced);
}
static inline void AnimateTile(TileIndex tile)
{
AnimateTileProc *proc = _tile_type_procs[GetTileType(tile)]->animate_tile_proc;
assert(proc != NULL);
assert(proc != nullptr);
proc(tile);
}
static inline bool ClickTile(TileIndex tile)
{
ClickTileProc *proc = _tile_type_procs[GetTileType(tile)]->click_tile_proc;
if (proc == NULL) return false;
if (proc == nullptr) return false;
return proc(tile);
}