diff src/newgrf_station.cpp @ 12228:240adc64d01a draft

(svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile()
author smatz <smatz@openttd.org>
date Wed, 24 Jun 2009 17:39:54 +0000 (2009-06-24)
parents 4f649aa97318
children 75aa2b403c34
line wrap: on
line diff
--- a/src/newgrf_station.cpp
+++ b/src/newgrf_station.cpp
@@ -6,7 +6,7 @@
 #include "variables.h"
 #include "landscape.h"
 #include "debug.h"
-#include "station_map.h"
+#include "station_base.h"
 #include "roadstop_base.h"
 #include "newgrf_commons.h"
 #include "newgrf_station.h"
@@ -469,7 +469,7 @@
 			uint32 res = GB(GetStationGfx(nearby_tile), 1, 2) << 12 | !!perpendicular << 11 | !!same_station << 10;
 
 			if (IsCustomStationSpecIndex(nearby_tile)) {
-				const StationSpecList ssl = GetStationByTile(nearby_tile)->speclist[GetCustomStationSpecIndex(nearby_tile)];
+				const StationSpecList ssl = Station::GetByTile(nearby_tile)->speclist[GetCustomStationSpecIndex(nearby_tile)];
 				res |= 1 << (ssl.grfid != grfid ? 9 : 8) | ssl.localidx;
 			}
 			return res;
@@ -858,7 +858,7 @@
 
 	if (!IsCustomStationSpecIndex(t)) return NULL;
 
-	st = GetStationByTile(t);
+	st = Station::GetByTile(t);
 	specindex = GetCustomStationSpecIndex(t);
 	return specindex < st->num_specs ? st->speclist[specindex].spec : NULL;
 }
@@ -890,7 +890,7 @@
 	const StationSpec *ss = GetStationSpec(tile);
 	if (ss == NULL) return;
 
-	const Station *st = GetStationByTile(tile);
+	const Station *st = Station::GetByTile(tile);
 
 	uint8 animation_speed = ss->anim_speed;
 
@@ -1023,7 +1023,7 @@
 	};
 
 	/* Get Station if it wasn't supplied */
-	if (st == NULL) st = GetStationByTile(tile);
+	if (st == NULL) st = Station::GetByTile(tile);
 
 	/* Check the cached animation trigger bitmask to see if we need
 	 * to bother with any further processing. */