diff options
author | alberth <alberth@openttd.org> | 2010-11-21 12:47:04 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2010-11-21 12:47:04 +0000 |
commit | 3e27739287dd52e80535c6fd583bb7db41859850 (patch) | |
tree | f87985fe2c203f381575ac8f78068643e18529c9 /src/saveload/waypoint_sl.cpp | |
parent | 5f8afaadb7e82b351a26fd5590c6b1e8d148b23b (diff) | |
download | openttd-3e27739287dd52e80535c6fd583bb7db41859850.tar.xz |
(svn r21284) -Codechange: Rename CheckSavegameVersion() to IsSavegameVersionBefore().
Diffstat (limited to 'src/saveload/waypoint_sl.cpp')
-rw-r--r-- | src/saveload/waypoint_sl.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/saveload/waypoint_sl.cpp b/src/saveload/waypoint_sl.cpp index 5dac5d8e4..3dce9e3d5 100644 --- a/src/saveload/waypoint_sl.cpp +++ b/src/saveload/waypoint_sl.cpp @@ -68,7 +68,7 @@ void MoveWaypointsToBaseStations() * waypoints to make way for storing the index in m2. The custom graphics * id which was stored in m4 is now saved as a grf/id reference in the * waypoint struct. */ - if (CheckSavegameVersion(17)) { + if (IsSavegameVersionBefore(17)) { for (OldWaypoint *wp = _old_waypoints.Begin(); wp != _old_waypoints.End(); wp++) { if (wp->delete_ctr != 0) continue; // The waypoint was deleted @@ -108,7 +108,7 @@ void MoveWaypointsToBaseStations() TileIndex t = wp->xy; if (IsTileType(t, MP_RAILWAY) && GetRailTileType(t) == 2 /* RAIL_TILE_WAYPOINT */ && _m[t].m2 == wp->index) { /* The tile might've been reserved! */ - bool reserved = !CheckSavegameVersion(100) && HasBit(_m[t].m5, 4); + bool reserved = !IsSavegameVersionBefore(100) && HasBit(_m[t].m5, 4); /* The tile really has our waypoint, so reassign the map array */ MakeRailWaypoint(t, GetTileOwner(t), new_wp->index, (Axis)GB(_m[t].m5, 0, 1), 0, GetRailType(t)); @@ -185,10 +185,10 @@ static void Ptrs_WAYP() for (OldWaypoint *wp = _old_waypoints.Begin(); wp != _old_waypoints.End(); wp++) { SlObject(wp, _old_waypoint_desc); - if (CheckSavegameVersion(12)) { + if (IsSavegameVersionBefore(12)) { wp->town_cn = (wp->string_id & 0xC000) == 0xC000 ? (wp->string_id >> 8) & 0x3F : 0; wp->town = ClosestTownFromTile(wp->xy, UINT_MAX); - } else if (CheckSavegameVersion(122)) { + } else if (IsSavegameVersionBefore(122)) { /* Only for versions 12 .. 122 */ if (!Town::IsValidID(wp->town_index)) { /* Upon a corrupted waypoint we'll likely get here. The next step will be to @@ -201,7 +201,7 @@ static void Ptrs_WAYP() } wp->town = Town::Get(wp->town_index); } - if (CheckSavegameVersion(84)) { + if (IsSavegameVersionBefore(84)) { wp->name = CopyFromOldName(wp->string_id); } } |