summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-06-24 17:39:54 +0000
committersmatz <smatz@openttd.org>2009-06-24 17:39:54 +0000
commit8343340acb5bdb40555e04f40aac567d6e583bb8 (patch)
tree29b17ad863977abd3d3417dd8bbf84e01cfc261d /src/saveload
parentb18bf87c9081c3d202897e9c3ed282729db415a4 (diff)
downloadopenttd-8343340acb5bdb40555e04f40aac567d6e583bb8.tar.xz
(svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile()
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/afterload.cpp6
-rw-r--r--src/saveload/oldloader_sl.cpp1
-rw-r--r--src/saveload/vehicle_sl.cpp1
3 files changed, 5 insertions, 3 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index 6ea186f0c..8ddc8b5ee 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -602,7 +602,7 @@ bool AfterLoadGame()
for (TileIndex t = 0; t < map_size; t++) {
switch (GetTileType(t)) {
case MP_STATION: {
- Station *st = GetStationByTile(t);
+ Station *st = Station::GetByTile(t);
/* Set up station spread; buoys do not have one */
if (!IsBuoy(t)) st->rect.BeforeAddTile(t, StationRect::ADD_FORCE);
@@ -635,7 +635,7 @@ bool AfterLoadGame()
* It was 3 (till 2.2) and later 5 (till 5.1).
* Setting it unconditionally does not hurt.
*/
- GetStationByTile(t)->airport_type = AT_OILRIG;
+ Station::GetByTile(t)->airport_type = AT_OILRIG;
} else {
DeleteOilRig(t);
}
@@ -1575,7 +1575,7 @@ bool AfterLoadGame()
if (IsBuoyTile(t)) {
/* reset buoy owner to OWNER_NONE in the station struct
* (even if it is owned by active company) */
- GetStationByTile(t)->owner = OWNER_NONE;
+ Station::GetByTile(t)->owner = OWNER_NONE;
}
} else if (IsTileType(t, MP_ROAD)) {
/* works for all RoadTileType */
diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp
index c89e9ab5c..6c50eb05f 100644
--- a/src/saveload/oldloader_sl.cpp
+++ b/src/saveload/oldloader_sl.cpp
@@ -11,6 +11,7 @@
#include "../ship.h"
#include "../train.h"
#include "../signs_base.h"
+#include "../station_base.h"
#include "../subsidy_type.h"
#include "../debug.h"
#include "../depot_base.h"
diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp
index 415ba76b9..cc1cb4326 100644
--- a/src/saveload/vehicle_sl.cpp
+++ b/src/saveload/vehicle_sl.cpp
@@ -8,6 +8,7 @@
#include "../roadveh.h"
#include "../ship.h"
#include "../aircraft.h"
+#include "../station_base.h"
#include "../effectvehicle_base.h"
#include "saveload.h"