(svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile()

This commit is contained in:
smatz
2009-06-24 17:39:54 +00:00
parent b18bf87c90
commit 8343340acb
38 changed files with 70 additions and 55 deletions

View File

@@ -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 */