mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-30 09:59:10 +00:00
(svn r4754) - Newstations: expose default station display data via a function so we can use it (rarely) in other places.
This commit is contained in:
@@ -1336,7 +1336,12 @@ static void DrawTile_Track(TileInfo *ti)
|
|||||||
if (callback != CALLBACK_FAILED) tile = callback;
|
if (callback != CALLBACK_FAILED) tile = callback;
|
||||||
}
|
}
|
||||||
|
|
||||||
cust = &statspec->renderdata[(tile < statspec->tiles ? tile : 0) + GetWaypointAxis(ti->tile)];
|
if (statspec->renderdata == NULL) {
|
||||||
|
cust = GetStationTileLayout(tile);
|
||||||
|
relocation -= 0x42D;
|
||||||
|
} else {
|
||||||
|
cust = &statspec->renderdata[(tile < statspec->tiles ? tile : 0) + GetWaypointAxis(ti->tile)];
|
||||||
|
}
|
||||||
|
|
||||||
/* If there is no sprite layout, we fall back to the default waypoint graphics. */
|
/* If there is no sprite layout, we fall back to the default waypoint graphics. */
|
||||||
if (cust != NULL && cust->seq != NULL) {
|
if (cust != NULL && cust->seq != NULL) {
|
||||||
|
@@ -199,6 +199,7 @@ void GetAcceptanceAroundTiles(AcceptedCargo accepts, TileIndex tile, int w, int
|
|||||||
uint GetStationPlatforms(const Station *st, TileIndex tile);
|
uint GetStationPlatforms(const Station *st, TileIndex tile);
|
||||||
|
|
||||||
|
|
||||||
|
const DrawTileSprites *GetStationTileLayout(byte gfx);
|
||||||
void StationPickerDrawSprite(int x, int y, RailType railtype, int image);
|
void StationPickerDrawSprite(int x, int y, RailType railtype, int image);
|
||||||
|
|
||||||
RoadStop * GetRoadStopByTile(TileIndex tile, RoadStopType type);
|
RoadStop * GetRoadStopByTile(TileIndex tile, RoadStopType type);
|
||||||
|
@@ -1977,6 +1977,10 @@ static int32 RemoveDock(Station *st, uint32 flags)
|
|||||||
|
|
||||||
#include "table/station_land.h"
|
#include "table/station_land.h"
|
||||||
|
|
||||||
|
const DrawTileSprites *GetStationTileLayout(byte gfx)
|
||||||
|
{
|
||||||
|
return &_station_display_datas[gfx];
|
||||||
|
}
|
||||||
|
|
||||||
extern uint16 _custom_sprites_base;
|
extern uint16 _custom_sprites_base;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user