summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-08-07 22:07:07 +0000
committerrubidium <rubidium@openttd.org>2010-08-07 22:07:07 +0000
commitedbadde301d04264110b1b923ba80af367f6651c (patch)
treee9f8998e89b9811d9bc0febd58272339a63951c9 /src/saveload
parentcb4ab6a23158163e848ab2b5887d1eb449b86a4c (diff)
downloadopenttd-edbadde301d04264110b1b923ba80af367f6651c.tar.xz
(svn r20406) -Codechange: make StationClass use the new generic class
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/station_sl.cpp2
-rw-r--r--src/saveload/waypoint_sl.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/saveload/station_sl.cpp b/src/saveload/station_sl.cpp
index e2488e779..72d7c7ecf 100644
--- a/src/saveload/station_sl.cpp
+++ b/src/saveload/station_sl.cpp
@@ -95,7 +95,7 @@ void AfterLoadStations()
for (uint i = 0; i < st->num_specs; i++) {
if (st->speclist[i].grfid == 0) continue;
- st->speclist[i].spec = GetCustomStationSpecByGrf(st->speclist[i].grfid, st->speclist[i].localidx, NULL);
+ st->speclist[i].spec = StationClass::GetByGrf(st->speclist[i].grfid, st->speclist[i].localidx, NULL);
}
if (Station::IsExpected(st)) {
diff --git a/src/saveload/waypoint_sl.cpp b/src/saveload/waypoint_sl.cpp
index 3cdafd990..501aa86c5 100644
--- a/src/saveload/waypoint_sl.cpp
+++ b/src/saveload/waypoint_sl.cpp
@@ -76,15 +76,15 @@ void MoveWaypointsToBaseStations()
_m[wp->xy].m2 = (StationID)wp->index;
if (HasBit(_m[wp->xy].m3, 4)) {
- wp->spec = GetCustomStationSpec(STAT_CLASS_WAYP, _m[wp->xy].m4 + 1);
+ wp->spec = StationClass::Get(STAT_CLASS_WAYP, _m[wp->xy].m4 + 1);
}
}
} else {
/* As of version 17, we recalculate the custom graphic ID of waypoints
* from the GRF ID / station index. */
for (OldWaypoint *wp = _old_waypoints.Begin(); wp != _old_waypoints.End(); wp++) {
- for (uint i = 0; i < GetNumCustomStations(STAT_CLASS_WAYP); i++) {
- const StationSpec *statspec = GetCustomStationSpec(STAT_CLASS_WAYP, i);
+ for (uint i = 0; i < StationClass::GetCount(STAT_CLASS_WAYP); i++) {
+ const StationSpec *statspec = StationClass::Get(STAT_CLASS_WAYP, i);
if (statspec != NULL && statspec->grf_prop.grffile->grfid == wp->grfid && statspec->grf_prop.local_id == wp->localidx) {
wp->spec = statspec;
break;