summaryrefslogtreecommitdiff
path: root/station_cmd.c
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2004-11-14 14:10:03 +0000
committerdarkvater <darkvater@openttd.org>2004-11-14 14:10:03 +0000
commitccc496ba2ce07be7bd8faf0a084e983dbed5e80b (patch)
treec98b22919e336453a225758147c78c898731875e /station_cmd.c
parent5663926aaf2ccbc520cd2df08738e4a6b95229d3 (diff)
downloadopenttd-ccc496ba2ce07be7bd8faf0a084e983dbed5e80b.tar.xz
(svn r591) -newgrf: Store whole struct StationSpec in SetCustomStation(), not just the rendering data. This will be needed for variational stationspecs (pasky).
Diffstat (limited to 'station_cmd.c')
-rw-r--r--station_cmd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/station_cmd.c b/station_cmd.c
index 8e0b99ae6..05b235833 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -964,22 +964,22 @@ uint GetStationPlatforms(Station *st, uint tile)
* file used non-contignuous station ids. --pasky */
static int _waypoint_highest_id = -1;
-static DrawTileSprites _waypoint_data[256][8];
+static struct StationSpec _waypoint_data[256];
-void SetCustomStation(uint32 classid, byte stid, DrawTileSprites *data, byte tiles)
+void SetCustomStation(byte stid, struct StationSpec *spec)
{
- assert(classid == 'WAYP');
+ assert(spec->classid == 'WAYP');
if (stid > _waypoint_highest_id)
_waypoint_highest_id = stid;
- memcpy(_waypoint_data[stid], data, sizeof(DrawTileSprites) * tiles);
+ memcpy(&_waypoint_data[stid], spec, sizeof(*spec));
}
-DrawTileSprites *GetCustomStation(uint32 classid, byte stid)
+DrawTileSprites *GetCustomStationRenderdata(uint32 classid, byte stid)
{
assert(classid == 'WAYP');
- if (stid > _waypoint_highest_id || !_waypoint_data || !_waypoint_data[stid])
+ if (stid > _waypoint_highest_id)
return NULL;
- return _waypoint_data[stid];
+ return _waypoint_data[stid].renderdata;
}
int GetCustomStationsCount(uint32 classid)