summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-05-03 21:19:21 +0000
committerpeter1138 <peter1138@openttd.org>2006-05-03 21:19:21 +0000
commitbe5744ae508c1ad7baf6158d95a7a27d52656ac2 (patch)
tree4ff7fda6fa9e385a983ea98879ced8b6f2c6fb9c
parentb4a254cd43915502d9c3a843aacb0c4d61ddf631 (diff)
downloadopenttd-be5744ae508c1ad7baf6158d95a7a27d52656ac2.tar.xz
(svn r4723) - Newstations: add TileIndex parameter to station resolver.
-rw-r--r--newgrf_station.c2
-rw-r--r--newgrf_station.h2
-rw-r--r--rail_cmd.c2
-rw-r--r--station_cmd.c2
-rw-r--r--waypoint.c2
5 files changed, 5 insertions, 5 deletions
diff --git a/newgrf_station.c b/newgrf_station.c
index 4bc410dd8..a141f275d 100644
--- a/newgrf_station.c
+++ b/newgrf_station.c
@@ -225,7 +225,7 @@ static const RealSpriteGroup *ResolveStationSpriteGroup(const SpriteGroup *spg,
}
}
-uint32 GetCustomStationRelocation(const StationSpec *statspec, const Station *st, byte ctype)
+SpriteID GetCustomStationRelocation(const StationSpec *statspec, const Station *st, TileIndex tile, byte ctype)
{
const RealSpriteGroup *rsg = ResolveStationSpriteGroup(statspec->spritegroup[ctype], st);
if (rsg == NULL) return 0;
diff --git a/newgrf_station.h b/newgrf_station.h
index 073cfe35d..22dcdd2fb 100644
--- a/newgrf_station.h
+++ b/newgrf_station.h
@@ -98,7 +98,7 @@ const StationSpec *GetCustomStationSpec(StationClassID sclass, uint station);
/* Get sprite offset for a given custom station and station structure (may be
* NULL if ctype is set - that means we are in a build dialog). The station
* structure is used for variational sprite groups. */
-uint32 GetCustomStationRelocation(const StationSpec *statspec, const Station *st, byte ctype);
+SpriteID GetCustomStationRelocation(const StationSpec *statspec, const Station *st, TileIndex tile, byte ctype);
/* Allocate a StationSpec to a Station. This is called once per build operation. */
int AllocateSpecToStation(const StationSpec *statspec, Station *st, bool exec);
diff --git a/rail_cmd.c b/rail_cmd.c
index 16cad05ab..34ba58309 100644
--- a/rail_cmd.c
+++ b/rail_cmd.c
@@ -1324,7 +1324,7 @@ static void DrawTile_Track(TileInfo *ti)
DrawTileSeqStruct const *seq;
// emulate station tile - open with building
const DrawTileSprites *cust = &statspec->renderdata[2 + GetWaypointAxis(ti->tile)];
- uint32 relocation = GetCustomStationRelocation(statspec, ComposeWaypointStation(ti->tile), 0);
+ uint32 relocation = GetCustomStationRelocation(statspec, ComposeWaypointStation(ti->tile), ti->tile, 0);
/* We don't touch the 0x8000 bit. In all this
* waypoint code, it is used to indicate that
diff --git a/station_cmd.c b/station_cmd.c
index 2d205cddc..4774a30f5 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -1989,7 +1989,7 @@ static void DrawTile_Station(TileInfo *ti)
if (statspec != NULL) {
uint tile = GetStationGfx(ti->tile);
- relocation = GetCustomStationRelocation(statspec, st, 0);
+ relocation = GetCustomStationRelocation(statspec, st, ti->tile, 0);
/* Ensure the chosen tile layout is valid for this custom station */
t = &statspec->renderdata[tile < statspec->tiles ? tile : GetRailStationAxis(ti->tile)];
diff --git a/waypoint.c b/waypoint.c
index a3dbbb443..8e363ea5f 100644
--- a/waypoint.c
+++ b/waypoint.c
@@ -405,7 +405,7 @@ void DrawWaypointSprite(int x, int y, int stat_id, RailType railtype)
return;
}
- relocation = GetCustomStationRelocation(statspec, NULL, 1);
+ relocation = GetCustomStationRelocation(statspec, NULL, INVALID_TILE, 1);
// emulate station tile - open with building
// add 1 to get the other direction
cust = &statspec->renderdata[2];