summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-05-04 19:21:16 +0000
committerpeter1138 <peter1138@openttd.org>2006-05-04 19:21:16 +0000
commit4963eb80b783c22479e48a721cd2d8742eb7c793 (patch)
tree6f6939f9088bd971f5e55296895fa697780b6bc3
parenta55ac6efac979b9276faae4c71e965dd6a1b35c3 (diff)
downloadopenttd-4963eb80b783c22479e48a721cd2d8742eb7c793.tar.xz
(svn r4739) - Newstations: remove cargo type parameter of GetCustomStationRelocation() as we can determine it internally
-rw-r--r--newgrf_station.c4
-rw-r--r--newgrf_station.h6
-rw-r--r--rail_cmd.c2
-rw-r--r--station_cmd.c2
-rw-r--r--waypoint.c2
5 files changed, 8 insertions, 8 deletions
diff --git a/newgrf_station.c b/newgrf_station.c
index ab6d2fc59..a0a82df0b 100644
--- a/newgrf_station.c
+++ b/newgrf_station.c
@@ -323,11 +323,11 @@ static void NewStationResolver(ResolverObject *res, const StationSpec *statspec,
}
-SpriteID GetCustomStationRelocation(const StationSpec *statspec, const Station *st, TileIndex tile, CargoID ctype)
+SpriteID GetCustomStationRelocation(const StationSpec *statspec, const Station *st, TileIndex tile)
{
const SpriteGroup *group;
ResolverObject object;
- ctype = (st == NULL) ? GC_PURCHASE : GC_DEFAULT_NA;
+ CargoID ctype = (st == NULL) ? GC_PURCHASE : GC_DEFAULT_NA;
NewStationResolver(&object, statspec, st, tile);
diff --git a/newgrf_station.h b/newgrf_station.h
index 6680334ac..d14d215d8 100644
--- a/newgrf_station.h
+++ b/newgrf_station.h
@@ -96,9 +96,9 @@ void SetCustomStationSpec(StationSpec *statspec);
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. */
-SpriteID GetCustomStationRelocation(const StationSpec *statspec, const Station *st, TileIndex tile, CargoID ctype);
+ * NULL - that means we are in a build dialog). The station structure is used
+ * for variational sprite groups. */
+SpriteID GetCustomStationRelocation(const StationSpec *statspec, const Station *st, TileIndex tile);
/* 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 34ba58309..fdadfddfe 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), ti->tile, 0);
+ uint32 relocation = GetCustomStationRelocation(statspec, ComposeWaypointStation(ti->tile), ti->tile);
/* 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 8fd4d62d5..b488fa212 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -1990,7 +1990,7 @@ static void DrawTile_Station(TileInfo *ti)
if (statspec != NULL) {
uint tile = GetStationGfx(ti->tile);
- relocation = GetCustomStationRelocation(statspec, st, ti->tile, 0);
+ relocation = GetCustomStationRelocation(statspec, st, ti->tile);
/* 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 8e363ea5f..e4fef4ab7 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, INVALID_TILE, 1);
+ relocation = GetCustomStationRelocation(statspec, NULL, INVALID_TILE);
// emulate station tile - open with building
// add 1 to get the other direction
cust = &statspec->renderdata[2];