summaryrefslogtreecommitdiff
path: root/station_cmd.c
diff options
context:
space:
mode:
authormiham <miham@openttd.org>2004-11-17 00:52:54 +0000
committermiham <miham@openttd.org>2004-11-17 00:52:54 +0000
commit86d19cb577a8b6d73840563d36983e7caf4d1eb6 (patch)
treef9cadca3e19886b1b11b1dd94abd5ed3be4e94b8 /station_cmd.c
parentcd6cb848892c7714d90845a85be24181f44bc7ee (diff)
downloadopenttd-86d19cb577a8b6d73840563d36983e7caf4d1eb6.tar.xz
(svn r647) Cleanup custom station classes handling. (pasky)
Diffstat (limited to 'station_cmd.c')
-rw-r--r--station_cmd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/station_cmd.c b/station_cmd.c
index d6d707e17..a55563259 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -967,7 +967,7 @@ void SetCustomStation(byte local_stid, struct StationSpec *spec)
{
int stid = -1;
- assert(spec->classid == 'WAYP');
+ assert(spec->sclass == STAT_CLASS_WAYP);
if (spec->localidx != 0) {
/* Already allocated, try to resolve to global stid */
@@ -998,9 +998,9 @@ void SetCustomStation(byte local_stid, struct StationSpec *spec)
memcpy(&_waypoint_data[stid], spec, sizeof(*spec));
}
-struct StationSpec *GetCustomStation(uint32 classid, byte stid)
+struct StationSpec *GetCustomStation(enum StationClass sclass, byte stid)
{
- assert(classid == 'WAYP');
+ assert(sclass == STAT_CLASS_WAYP);
if (stid > _waypoint_highest_id)
return NULL;
return &_waypoint_data[stid];
@@ -1092,7 +1092,7 @@ uint32 GetCustomStationRelocation(struct StationSpec *spec, struct Station *stat
{
struct RealSpriteGroup *rsg;
- assert(spec->classid == 'WAYP');
+ assert(spec->sclass == STAT_CLASS_WAYP);
rsg = ResolveStationSpriteGroup(&spec->spritegroup[ctype], stat);
@@ -1112,9 +1112,9 @@ uint32 GetCustomStationRelocation(struct StationSpec *spec, struct Station *stat
return 0x42D;
}
-int GetCustomStationsCount(uint32 classid)
+int GetCustomStationsCount(enum StationClass sclass)
{
- assert(classid == 'WAYP');
+ assert(sclass == STAT_CLASS_WAYP);
return _waypoint_highest_id + 1;
}