From ccc496ba2ce07be7bd8faf0a084e983dbed5e80b Mon Sep 17 00:00:00 2001 From: darkvater Date: Sun, 14 Nov 2004 14:10:03 +0000 Subject: (svn r591) -newgrf: Store whole struct StationSpec in SetCustomStation(), not just the rendering data. This will be needed for variational stationspecs (pasky). --- station_cmd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'station_cmd.c') 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) -- cgit v1.2.3-54-g00ecf