(svn r12489) -Codechange: split station.h into station_base.h and station_func.h.
authorrubidium
Mon, 31 Mar 2008 00:06:17 +0000
changeset 8785 871586967963
parent 8784 c2e9d649a9ce
child 8786 1823ff88a054
(svn r12489) -Codechange: split station.h into station_base.h and station_func.h.
src/ai/default/default.cpp
src/ai/trolly/build.cpp
src/ai/trolly/trolly.cpp
src/aircraft.h
src/aircraft_cmd.cpp
src/airport_gui.cpp
src/build_vehicle_gui.cpp
src/cargopacket.cpp
src/cargopacket.h
src/disaster_cmd.cpp
src/economy.cpp
src/industry_cmd.cpp
src/misc_gui.cpp
src/network/network_server.cpp
src/newgrf.cpp
src/newgrf.h
src/newgrf_engine.cpp
src/newgrf_station.cpp
src/newgrf_station.h
src/npf.cpp
src/npf.h
src/oldloader.cpp
src/openttd.cpp
src/order_cmd.cpp
src/order_gui.cpp
src/players.cpp
src/rail_cmd.cpp
src/rail_gui.cpp
src/road_gui.cpp
src/road_map.cpp
src/roadveh_cmd.cpp
src/saveload.cpp
src/settings_gui.cpp
src/ship_cmd.cpp
src/station.cpp
src/station.h
src/station_base.h
src/station_cmd.cpp
src/station_func.h
src/station_gui.cpp
src/station_map.h
src/station_type.h
src/strings.cpp
src/subsidy_gui.cpp
src/town_cmd.cpp
src/train_cmd.cpp
src/unmovable_cmd.cpp
src/vehicle.cpp
src/vehicle_gui.cpp
src/viewport.cpp
src/water_cmd.cpp
src/waypoint.cpp
src/yapf/yapf.h
src/yapf/yapf.hpp
--- a/src/ai/default/default.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/ai/default/default.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -15,7 +15,6 @@
 #include "../../command_func.h"
 #include "../../town.h"
 #include "../../industry.h"
-#include "../../station.h"
 #include "../../pathfind.h"
 #include "../../airport.h"
 #include "../../depot.h"
@@ -2690,10 +2689,10 @@
 		} else if (p->mode == 1) {
 			if (_want_road_truck_station) {
 				// Truck station
-				ret = DoCommand(c, p->attr, ROADTYPES_ROAD << 2 | RoadStop::TRUCK, flag | DC_AUTO | DC_NO_WATER | DC_AI_BUILDING, CMD_BUILD_ROAD_STOP);
+				ret = DoCommand(c, p->attr, ROADTYPES_ROAD << 2 | ROADSTOP_TRUCK, flag | DC_AUTO | DC_NO_WATER | DC_AI_BUILDING, CMD_BUILD_ROAD_STOP);
 			} else {
 				// Bus station
-				ret = DoCommand(c, p->attr, ROADTYPES_ROAD << 2 | RoadStop::BUS, flag | DC_AUTO | DC_NO_WATER | DC_AI_BUILDING, CMD_BUILD_ROAD_STOP);
+				ret = DoCommand(c, p->attr, ROADTYPES_ROAD << 2 | ROADSTOP_BUS, flag | DC_AUTO | DC_NO_WATER | DC_AI_BUILDING, CMD_BUILD_ROAD_STOP);
 			}
 clear_town_stuff:;
 
--- a/src/ai/trolly/build.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/ai/trolly/build.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -7,7 +7,6 @@
 #include "../../command_func.h"
 #include "trolly.h"
 #include "../../engine.h"
-#include "../../station.h"
 #include "../../variables.h"
 #include "../../bridge.h"
 #include "../../vehicle_func.h"
@@ -44,9 +43,9 @@
 		return AI_DoCommand(tile, direction + (numtracks << 8) + (length << 16), 0, flag | DC_AUTO | DC_NO_WATER, CMD_BUILD_RAILROAD_STATION);
 
 	if (type == AI_BUS)
-		return AI_DoCommand(tile, direction, ROADTYPES_ROAD << 2 | RoadStop::BUS, flag | DC_AUTO | DC_NO_WATER, CMD_BUILD_ROAD_STOP);
+		return AI_DoCommand(tile, direction, ROADTYPES_ROAD << 2 | ROADSTOP_BUS, flag | DC_AUTO | DC_NO_WATER, CMD_BUILD_ROAD_STOP);
 
-	return AI_DoCommand(tile, direction, ROADTYPES_ROAD << 2 | RoadStop::TRUCK, flag | DC_AUTO | DC_NO_WATER, CMD_BUILD_ROAD_STOP);
+	return AI_DoCommand(tile, direction, ROADTYPES_ROAD << 2 | ROADSTOP_TRUCK, flag | DC_AUTO | DC_NO_WATER, CMD_BUILD_ROAD_STOP);
 }
 
 
--- a/src/ai/trolly/trolly.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/ai/trolly/trolly.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -26,7 +26,7 @@
 #include "trolly.h"
 #include "../../town.h"
 #include "../../industry.h"
-#include "../../station.h"
+#include "../../station_base.h"
 #include "../../engine.h"
 #include "../../gui.h"
 #include "../../depot.h"
--- a/src/aircraft.h	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/aircraft.h	Mon Mar 31 00:06:17 2008 +0000
@@ -6,6 +6,7 @@
 #define AIRCRAFT_H
 
 #include "station_map.h"
+#include "station_base.h"
 #include "vehicle_base.h"
 #include "engine.h"
 
--- a/src/aircraft_cmd.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/aircraft_cmd.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -12,7 +12,6 @@
 #include "timetable.h"
 #include "depot.h"
 #include "engine.h"
-#include "station.h"
 #include "news_func.h"
 #include "aircraft.h"
 #include "airport.h"
--- a/src/airport_gui.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/airport_gui.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -9,7 +9,6 @@
 #include "station_gui.h"
 #include "terraform_gui.h"
 #include "command_func.h"
-#include "station.h"
 #include "airport.h"
 #include "depot.h"
 #include "sound_func.h"
--- a/src/build_vehicle_gui.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/build_vehicle_gui.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -12,7 +12,6 @@
 #include "gui.h"
 #include "articulated_vehicles.h"
 #include "textbuf_gui.h"
-#include "station.h"
 #include "command_func.h"
 #include "engine.h"
 #include "player_func.h"
--- a/src/cargopacket.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/cargopacket.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -4,7 +4,7 @@
 
 #include "stdafx.h"
 #include "openttd.h"
-#include "station.h"
+#include "station_base.h"
 #include "cargopacket.h"
 #include "saveload.h"
 
--- a/src/cargopacket.h	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/cargopacket.h	Mon Mar 31 00:06:17 2008 +0000
@@ -5,6 +5,7 @@
 #ifndef CARGOPACKET_H
 #define CARGOPACKET_H
 
+#include "oldpool.h"
 #include "economy_type.h"
 #include "tile_type.h"
 #include "station_type.h"
--- a/src/disaster_cmd.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/disaster_cmd.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -25,7 +25,7 @@
 #include "command_func.h"
 #include "tile_cmd.h"
 #include "news_func.h"
-#include "station.h"
+#include "station_base.h"
 #include "waypoint.h"
 #include "town.h"
 #include "industry.h"
--- a/src/economy.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/economy.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -8,7 +8,6 @@
 #include "landscape.h"
 #include "player_base.h"
 #include "player_func.h"
-#include "station.h"
 #include "command_func.h"
 #include "saveload.h"
 #include "industry.h"
--- a/src/industry_cmd.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/industry_cmd.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -36,6 +36,7 @@
 #include "date_func.h"
 #include "vehicle_func.h"
 #include "sound_func.h"
+#include "station_base.h"
 
 #include "table/strings.h"
 #include "table/sprites.h"
--- a/src/misc_gui.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/misc_gui.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -17,7 +17,7 @@
 #include "textbuf_gui.h"
 #include "viewport_func.h"
 #include "gfx_func.h"
-#include "station.h"
+#include "station_func.h"
 #include "command_func.h"
 #include "player_func.h"
 #include "player_base.h"
--- a/src/network/network_server.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/network/network_server.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -16,7 +16,7 @@
 #include "../console.h"
 #include "../command_func.h"
 #include "../saveload.h"
-#include "../station.h"
+#include "../station_base.h"
 #include "../variables.h"
 #include "../genworld.h"
 #include "../core/alloc_func.hpp"
--- a/src/newgrf.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/newgrf.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -11,7 +11,6 @@
 #include "fileio.h"
 #include "engine.h"
 #include "spritecache.h"
-#include "station.h"
 #include "sprite.h"
 #include "newgrf.h"
 #include "variables.h"
--- a/src/newgrf.h	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/newgrf.h	Mon Mar 31 00:06:17 2008 +0000
@@ -5,11 +5,11 @@
 #ifndef NEWGRF_H
 #define NEWGRF_H
 
-#include "station.h"
 #include "town_type.h"
 #include "newgrf_config.h"
 #include "cargotype.h"
 #include "industry_type.h"
+#include "newgrf_station.h"
 
 enum GrfLoadingStage {
 	GLS_FILESCAN,
--- a/src/newgrf_engine.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/newgrf_engine.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -10,7 +10,7 @@
 #include "train.h"
 #include "player_func.h"
 #include "player_base.h"
-#include "station.h"
+#include "station_base.h"
 #include "airport.h"
 #include "newgrf.h"
 #include "newgrf_callbacks.h"
--- a/src/newgrf_station.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/newgrf_station.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -9,7 +9,7 @@
 #include "landscape.h"
 #include "debug.h"
 #include "sprite.h"
-#include "station.h"
+#include "station_base.h"
 #include "station_map.h"
 #include "newgrf.h"
 #include "newgrf_callbacks.h"
--- a/src/newgrf_station.h	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/newgrf_station.h	Mon Mar 31 00:06:17 2008 +0000
@@ -9,7 +9,10 @@
 #include "newgrf_callbacks.h"
 #include "newgrf_cargo.h"
 #include "tile_type.h"
+#include "station_type.h"
 #include "strings_type.h"
+#include "sprite.h"
+#include "direction_type.h"
 
 enum StationClassID {
 	STAT_CLASS_BEGIN = 0,    ///< the lowest valid value
--- a/src/npf.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/npf.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -12,7 +12,7 @@
 #include "landscape.h"
 #include "aystar.h"
 #include "pathfind.h"
-#include "station.h"
+#include "station_base.h"
 #include "station_map.h"
 #include "depot.h"
 #include "tunnel_map.h"
--- a/src/npf.h	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/npf.h	Mon Mar 31 00:06:17 2008 +0000
@@ -6,7 +6,9 @@
 #define NPF_H
 
 #include "aystar.h"
-#include "station.h"
+#include "station_type.h"
+#include "rail_type.h"
+#include "player_type.h"
 #include "vehicle_type.h"
 #include "tile_type.h"
 #include "track_type.h"
--- a/src/oldloader.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/oldloader.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -7,7 +7,6 @@
 #include "station_map.h"
 #include "town.h"
 #include "industry.h"
-#include "station.h"
 #include "player_func.h"
 #include "player_base.h"
 #include "engine.h"
--- a/src/openttd.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/openttd.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -15,7 +15,6 @@
 #include "gfxinit.h"
 #include "gui.h"
 #include "landscape.h"
-#include "station.h"
 #include "station_map.h"
 #include "town_map.h"
 #include "tunnel_map.h"
--- a/src/order_cmd.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/order_cmd.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -10,7 +10,6 @@
 #include "depot.h"
 #include "waypoint.h"
 #include "command_func.h"
-#include "station.h"
 #include "player_func.h"
 #include "news_func.h"
 #include "saveload.h"
--- a/src/order_gui.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/order_gui.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -8,7 +8,7 @@
 #include "station_map.h"
 #include "gui.h"
 #include "window_gui.h"
-#include "station.h"
+#include "station_base.h"
 #include "town.h"
 #include "command_func.h"
 #include "viewport_func.h"
--- a/src/players.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/players.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -8,7 +8,6 @@
 #include "player_func.h"
 #include "player_gui.h"
 #include "town.h"
-#include "station.h"
 #include "news_func.h"
 #include "saveload.h"
 #include "command_func.h"
@@ -34,6 +33,7 @@
 #include "ai/trolly/trolly.h"
 #include "road_func.h"
 #include "rail.h"
+#include "sprite.h"
 
 #include "table/strings.h"
 #include "table/sprites.h"
--- a/src/rail_cmd.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/rail_cmd.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -19,7 +19,6 @@
 #include "pathfind.h"
 #include "engine.h"
 #include "town.h"
-#include "station.h"
 #include "sprite.h"
 #include "depot.h"
 #include "waypoint.h"
--- a/src/rail_gui.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/rail_gui.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -13,7 +13,7 @@
 #include "viewport_func.h"
 #include "gfx_func.h"
 #include "command_func.h"
-#include "station.h"
+#include "town_type.h"
 #include "waypoint.h"
 #include "debug.h"
 #include "variables.h"
--- a/src/road_gui.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/road_gui.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -16,7 +16,6 @@
 #include "road_cmd.h"
 #include "road_map.h"
 #include "station_map.h"
-#include "station.h"
 #include "functions.h"
 #include "window_func.h"
 #include "vehicle_func.h"
@@ -27,7 +26,7 @@
 #include "table/sprites.h"
 #include "table/strings.h"
 
-static void ShowRVStationPicker(RoadStop::Type rs);
+static void ShowRVStationPicker(RoadStopType rs);
 static void ShowRoadDepotPicker();
 
 static bool _remove_button_clicked;
@@ -215,18 +214,18 @@
 static void PlaceRoad_BusStation(TileIndex tile)
 {
 	if (_remove_button_clicked) {
-		DoCommandP(tile, 0, RoadStop::BUS, CcPlaySound1D, CMD_REMOVE_ROAD_STOP | CMD_MSG(_road_type_infos[_cur_roadtype].err_remove_station[RoadStop::BUS]));
+		DoCommandP(tile, 0, ROADSTOP_BUS, CcPlaySound1D, CMD_REMOVE_ROAD_STOP | CMD_MSG(_road_type_infos[_cur_roadtype].err_remove_station[ROADSTOP_BUS]));
 	} else {
-		PlaceRoadStop(tile, (_ctrl_pressed << 5) | RoadTypeToRoadTypes(_cur_roadtype) << 2 | RoadStop::BUS, CMD_BUILD_ROAD_STOP | CMD_NO_WATER | CMD_MSG(_road_type_infos[_cur_roadtype].err_build_station[RoadStop::BUS]));
+		PlaceRoadStop(tile, (_ctrl_pressed << 5) | RoadTypeToRoadTypes(_cur_roadtype) << 2 | ROADSTOP_BUS, CMD_BUILD_ROAD_STOP | CMD_NO_WATER | CMD_MSG(_road_type_infos[_cur_roadtype].err_build_station[ROADSTOP_BUS]));
 	}
 }
 
 static void PlaceRoad_TruckStation(TileIndex tile)
 {
 	if (_remove_button_clicked) {
-		DoCommandP(tile, 0, RoadStop::TRUCK, CcPlaySound1D, CMD_REMOVE_ROAD_STOP | CMD_MSG(_road_type_infos[_cur_roadtype].err_remove_station[RoadStop::TRUCK]));
+		DoCommandP(tile, 0, ROADSTOP_TRUCK, CcPlaySound1D, CMD_REMOVE_ROAD_STOP | CMD_MSG(_road_type_infos[_cur_roadtype].err_remove_station[ROADSTOP_TRUCK]));
 	} else {
-		PlaceRoadStop(tile, (_ctrl_pressed << 5) | RoadTypeToRoadTypes(_cur_roadtype) << 2 | RoadStop::TRUCK, CMD_BUILD_ROAD_STOP | CMD_NO_WATER | CMD_MSG(_road_type_infos[_cur_roadtype].err_build_station[RoadStop::TRUCK]));
+		PlaceRoadStop(tile, (_ctrl_pressed << 5) | RoadTypeToRoadTypes(_cur_roadtype) << 2 | ROADSTOP_TRUCK, CMD_BUILD_ROAD_STOP | CMD_NO_WATER | CMD_MSG(_road_type_infos[_cur_roadtype].err_build_station[ROADSTOP_TRUCK]));
 	}
 }
 
@@ -334,13 +333,13 @@
 static void BuildRoadClick_BusStation(Window *w)
 {
 	if (_game_mode == GM_EDITOR || !CanBuildVehicleInfrastructure(VEH_ROAD)) return;
-	if (HandlePlacePushButton(w, RTW_BUS_STATION, SPR_CURSOR_BUS_STATION, VHM_RECT, PlaceRoad_BusStation)) ShowRVStationPicker(RoadStop::BUS);
+	if (HandlePlacePushButton(w, RTW_BUS_STATION, SPR_CURSOR_BUS_STATION, VHM_RECT, PlaceRoad_BusStation)) ShowRVStationPicker(ROADSTOP_BUS);
 }
 
 static void BuildRoadClick_TruckStation(Window *w)
 {
 	if (_game_mode == GM_EDITOR || !CanBuildVehicleInfrastructure(VEH_ROAD)) return;
-	if (HandlePlacePushButton(w, RTW_TRUCK_STATION, SPR_CURSOR_TRUCK_STATION, VHM_RECT, PlaceRoad_TruckStation)) ShowRVStationPicker(RoadStop::TRUCK);
+	if (HandlePlacePushButton(w, RTW_TRUCK_STATION, SPR_CURSOR_TRUCK_STATION, VHM_RECT, PlaceRoad_TruckStation)) ShowRVStationPicker(ROADSTOP_TRUCK);
 }
 
 /**
@@ -942,12 +941,12 @@
 	RoadStationPickerWndProc
 };
 
-static void ShowRVStationPicker(RoadStop::Type rs)
+static void ShowRVStationPicker(RoadStopType rs)
 {
 	Window *w = AllocateWindowDesc(&_rv_station_picker_desc);
 	if (w == NULL) return;
 
-	w->window_class = (rs == RoadStop::BUS) ? WC_BUS_STATION : WC_TRUCK_STATION;
+	w->window_class = (rs == ROADSTOP_BUS) ? WC_BUS_STATION : WC_TRUCK_STATION;
 	w->widget[BRSW_CAPTION].data = _road_type_infos[_cur_roadtype].picker_title[rs];
 	for (uint i = BRSW_STATION_NE; i < BRSW_LT_OFF; i++) w->widget[i].tooltips = _road_type_infos[_cur_roadtype].picker_tooltip[rs];
 }
--- a/src/road_map.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/road_map.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -7,7 +7,6 @@
 #include "bridge_map.h"
 #include "tile_cmd.h"
 #include "road_map.h"
-#include "station.h"
 #include "tunnel_map.h"
 #include "station_map.h"
 #include "depot.h"
--- a/src/roadveh_cmd.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/roadveh_cmd.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -13,7 +13,7 @@
 #include "timetable.h"
 #include "engine.h"
 #include "command_func.h"
-#include "station.h"
+#include "station_base.h"
 #include "news_func.h"
 #include "pathfind.h"
 #include "npf.h"
@@ -1171,7 +1171,7 @@
 			trackdirs = TRACKDIR_BIT_NONE;
 		} else {
 			/* Our station */
-			RoadStop::Type rstype = IsCargoInClass(v->cargo_type, CC_PASSENGERS) ? RoadStop::BUS : RoadStop::TRUCK;
+			RoadStopType rstype = IsCargoInClass(v->cargo_type, CC_PASSENGERS) ? ROADSTOP_BUS : ROADSTOP_TRUCK;
 
 			if (GetRoadStopType(tile) != rstype) {
 				/* Wrong station type */
@@ -1807,7 +1807,7 @@
 			_road_veh_data_1[v->u.road.state - RVSB_IN_ROAD_STOP + (_opt.road_side << RVS_DRIVE_SIDE)] == v->u.road.frame) ||
 			(IsInsideMM(v->u.road.state, RVSB_IN_DT_ROAD_STOP, RVSB_IN_DT_ROAD_STOP_END) &&
 			v->current_order.dest == GetStationIndex(v->tile) &&
-			GetRoadStopType(v->tile) == (IsCargoInClass(v->cargo_type, CC_PASSENGERS) ? RoadStop::BUS : RoadStop::TRUCK) &&
+			GetRoadStopType(v->tile) == (IsCargoInClass(v->cargo_type, CC_PASSENGERS) ? ROADSTOP_BUS : ROADSTOP_TRUCK) &&
 			v->u.road.frame == RVC_DRIVE_THROUGH_STOP_FRAME))) {
 
 		RoadStop *rs = GetRoadStopByTile(v->tile, GetRoadStopType(v->tile));
@@ -1822,7 +1822,7 @@
 
 			if (IsDriveThroughStopTile(v->tile)) {
 				TileIndex next_tile = TILE_ADD(v->tile, TileOffsByDir(v->direction));
-				RoadStop::Type type = IsCargoInClass(v->cargo_type, CC_PASSENGERS) ? RoadStop::BUS : RoadStop::TRUCK;
+				RoadStopType type = IsCargoInClass(v->cargo_type, CC_PASSENGERS) ? ROADSTOP_BUS : ROADSTOP_TRUCK;
 
 				/* Check if next inline bay is free */
 				if (IsDriveThroughStopTile(next_tile) && (GetRoadStopType(next_tile) == type)) {
--- a/src/saveload.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/saveload.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -16,7 +16,7 @@
 #include "stdafx.h"
 #include "openttd.h"
 #include "debug.h"
-#include "station.h"
+#include "station_base.h"
 #include "thread.h"
 #include "town.h"
 #include "saveload.h"
--- a/src/settings_gui.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/settings_gui.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -27,6 +27,7 @@
 #include "waypoint.h"
 #include "widgets/dropdown_type.h"
 #include "widgets/dropdown_func.h"
+#include "station_func.h"
 
 #include "table/sprites.h"
 #include "table/strings.h"
--- a/src/ship_cmd.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/ship_cmd.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -11,7 +11,7 @@
 #include "command_func.h"
 #include "pathfind.h"
 #include "station_map.h"
-#include "station.h"
+#include "station_base.h"
 #include "news_func.h"
 #include "engine.h"
 #include "player_func.h"
--- a/src/station.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/station.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -7,7 +7,7 @@
 #include "bridge_map.h"
 #include "debug.h"
 #include "station_map.h"
-#include "station.h"
+#include "station_base.h"
 #include "town.h"
 #include "saveload.h"
 #include "player_func.h"
@@ -100,7 +100,7 @@
  */
 RoadStop *Station::GetPrimaryRoadStop(const Vehicle *v) const
 {
-	RoadStop *rs = this->GetPrimaryRoadStop(IsCargoInClass(v->cargo_type, CC_PASSENGERS) ? RoadStop::BUS : RoadStop::TRUCK);
+	RoadStop *rs = this->GetPrimaryRoadStop(IsCargoInClass(v->cargo_type, CC_PASSENGERS) ? ROADSTOP_BUS : ROADSTOP_TRUCK);
 
 	for (; rs != NULL; rs = rs->next) {
 		/* The vehicle cannot go to this roadstop (different roadtype) */
--- a/src/station.h	Sun Mar 30 23:24:18 2008 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,262 +0,0 @@
-/* $Id$ */
-
-/** @file station.h */
-
-#ifndef STATION_H
-#define STATION_H
-
-#include "station_type.h"
-#include "airport.h"
-#include "oldpool.h"
-#include "sprite.h"
-#include "road_type.h"
-#include "newgrf_station.h"
-#include "cargopacket.h"
-#include "cargo_type.h"
-#include "town_type.h"
-#include "core/geometry_type.hpp"
-#include <list>
-#include <set>
-
-DECLARE_OLD_POOL(Station, Station, 6, 1000)
-DECLARE_OLD_POOL(RoadStop, RoadStop, 5, 2000)
-
-static const byte INITIAL_STATION_RATING = 175;
-
-struct GoodsEntry {
-	enum AcceptancePickup {
-		ACCEPTANCE,
-		PICKUP
-	};
-
-	GoodsEntry() :
-		acceptance_pickup(0),
-		days_since_pickup(255),
-		rating(INITIAL_STATION_RATING),
-		last_speed(0),
-		last_age(255)
-	{}
-
-	byte acceptance_pickup;
-	byte days_since_pickup;
-	byte rating;
-	byte last_speed;
-	byte last_age;
-	CargoList cargo; ///< The cargo packets of cargo waiting in this station
-};
-
-/** A Stop for a Road Vehicle */
-struct RoadStop : PoolItem<RoadStop, RoadStopID, &_RoadStop_pool> {
-	/** Types of RoadStops */
-	enum Type {
-		BUS,                                ///< A standard stop for buses
-		TRUCK                               ///< A standard stop for trucks
-	};
-
-	static const int  cDebugCtorLevel =  5;  ///< Debug level on which Contructor / Destructor messages are printed
-	static const uint LIMIT           = 16;  ///< The maximum amount of roadstops that are allowed at a single station
-	static const uint MAX_BAY_COUNT   =  2;  ///< The maximum number of loading bays
-
-	TileIndex        xy;                    ///< Position on the map
-	byte             status;                ///< Current status of the Stop. Like which spot is taken. Access using *Bay and *Busy functions.
-	byte             num_vehicles;          ///< Number of vehicles currently slotted to this stop
-	struct RoadStop  *next;                 ///< Next stop of the given type at this station
-
-	RoadStop(TileIndex tile = 0);
-	virtual ~RoadStop();
-
-	/**
-	 * Determines whether a road stop exists
-	 * @return true if and only is the road stop exists
-	 */
-	inline bool IsValid() const { return this->xy != 0; }
-
-	/* For accessing status */
-	bool HasFreeBay() const;
-	bool IsFreeBay(uint nr) const;
-	uint AllocateBay();
-	void AllocateDriveThroughBay(uint nr);
-	void FreeBay(uint nr);
-	bool IsEntranceBusy() const;
-	void SetEntranceBusy(bool busy);
-
-	RoadStop *GetNextRoadStop(const Vehicle *v) const;
-};
-
-struct StationSpecList {
-	const StationSpec *spec;
-	uint32 grfid;      ///< GRF ID of this custom station
-	uint8  localidx;   ///< Station ID within GRF of station
-};
-
-/** StationRect - used to track station spread out rectangle - cheaper than scanning whole map */
-struct StationRect : public Rect {
-	enum StationRectMode
-	{
-		ADD_TEST = 0,
-		ADD_TRY,
-		ADD_FORCE
-	};
-
-	StationRect();
-	void MakeEmpty();
-	bool PtInExtendedRect(int x, int y, int distance = 0) const;
-	bool IsEmpty() const;
-	bool BeforeAddTile(TileIndex tile, StationRectMode mode);
-	bool BeforeAddRect(TileIndex tile, int w, int h, StationRectMode mode);
-	bool AfterRemoveTile(Station *st, TileIndex tile);
-	bool AfterRemoveRect(Station *st, TileIndex tile, int w, int h);
-
-	static bool ScanForStationTiles(StationID st_id, int left_a, int top_a, int right_a, int bottom_a);
-
-	StationRect& operator = (Rect src);
-};
-
-struct Station : PoolItem<Station, StationID, &_Station_pool> {
-public:
-	RoadStop *GetPrimaryRoadStop(RoadStop::Type type) const
-	{
-		return type == RoadStop::BUS ? bus_stops : truck_stops;
-	}
-
-	RoadStop *GetPrimaryRoadStop(const Vehicle *v) const;
-
-	const AirportFTAClass *Airport() const
-	{
-		if (airport_tile == 0) return GetAirport(AT_DUMMY);
-		return GetAirport(airport_type);
-	}
-
-	TileIndex xy;
-	RoadStop *bus_stops;
-	RoadStop *truck_stops;
-	TileIndex train_tile;
-	TileIndex airport_tile;
-	TileIndex dock_tile;
-	Town *town;
-	StringID string_id;     ///< Default name (town area) of station
-	char *name;             ///< Custom name
-
-	ViewportSign sign;
-
-	uint16 had_vehicle_of_type;
-
-	byte time_since_load;
-	byte time_since_unload;
-	byte delete_ctr;
-	PlayerByte owner;
-	byte facilities;
-	byte airport_type;
-
-	/* trainstation width/height */
-	byte trainst_w, trainst_h;
-
-	/** List of custom stations (StationSpecs) allocated to the station */
-	uint8 num_specs;
-	StationSpecList *speclist;
-
-	Date build_date;
-
-	uint64 airport_flags;   ///< stores which blocks on the airport are taken. was 16 bit earlier on, then 32
-
-	byte last_vehicle_type;
-	std::list<Vehicle *> loading_vehicles;
-	GoodsEntry goods[NUM_CARGO];
-
-	uint16 random_bits;
-	byte waiting_triggers;
-
-	StationRect rect; ///< Station spread out rectangle (not saved) maintained by StationRect_xxx() functions
-
-	static const int cDebugCtorLevel = 5;
-
-	Station(TileIndex tile = 0);
-	virtual ~Station();
-
-	void AddFacility(byte new_facility_bit, TileIndex facil_xy);
-
-	/**
-	 * Mark the sign of a station dirty for repaint.
-	 *
-	 * @ingroup dirty
-	 */
-	void MarkDirty() const;
-
-	/**
-	 * Marks the tiles of the station as dirty.
-	 *
-	 * @ingroup dirty
-	 */
-	void MarkTilesDirty(bool cargo_change) const;
-	bool TileBelongsToRailStation(TileIndex tile) const;
-	uint GetPlatformLength(TileIndex tile, DiagDirection dir) const;
-	uint GetPlatformLength(TileIndex tile) const;
-	bool IsBuoy() const;
-
-	/**
-	 * Determines whether a station exists
-	 * @return true if and only is the station exists
-	 */
-	inline bool IsValid() const { return this->xy != 0; }
-};
-
-void ModifyStationRatingAround(TileIndex tile, PlayerID owner, int amount, uint radius);
-
-/** A set of stations (\c const \c Station* ) */
-typedef std::set<Station*> StationSet;
-
-StationSet FindStationsAroundIndustryTile(TileIndex tile, int w, int h);
-
-void ShowStationViewWindow(StationID station);
-void UpdateAllStationVirtCoord();
-
-static inline StationID GetMaxStationIndex()
-{
-	/* TODO - This isn't the real content of the function, but
-	 *  with the new pool-system this will be replaced with one that
-	 *  _really_ returns the highest index. Now it just returns
-	 *  the next safe value we are sure about everything is below.
-	 */
-	return GetStationPoolSize() - 1;
-}
-
-static inline uint GetNumStations()
-{
-	return GetStationPoolSize();
-}
-
-static inline bool IsValidStationID(StationID index)
-{
-	return index < GetStationPoolSize() && GetStation(index)->IsValid();
-}
-
-#define FOR_ALL_STATIONS_FROM(st, start) for (st = GetStation(start); st != NULL; st = (st->index + 1U < GetStationPoolSize()) ? GetStation(st->index + 1U) : NULL) if (st->IsValid())
-#define FOR_ALL_STATIONS(st) FOR_ALL_STATIONS_FROM(st, 0)
-
-
-/* Stuff for ROADSTOPS */
-
-#define FOR_ALL_ROADSTOPS_FROM(rs, start) for (rs = GetRoadStop(start); rs != NULL; rs = (rs->index + 1U < GetRoadStopPoolSize()) ? GetRoadStop(rs->index + 1U) : NULL) if (rs->IsValid())
-#define FOR_ALL_ROADSTOPS(rs) FOR_ALL_ROADSTOPS_FROM(rs, 0)
-
-/* End of stuff for ROADSTOPS */
-
-
-void AfterLoadStations();
-void GetProductionAroundTiles(AcceptedCargo produced, TileIndex tile, int w, int h, int rad);
-void GetAcceptanceAroundTiles(AcceptedCargo accepts, TileIndex tile, int w, int h, int rad);
-
-
-const DrawTileSprites *GetStationTileLayout(StationType st, byte gfx);
-void StationPickerDrawSprite(int x, int y, StationType st, RailType railtype, RoadType roadtype, int image);
-
-RoadStop * GetRoadStopByTile(TileIndex tile, RoadStop::Type type);
-uint GetNumRoadStops(const Station* st, RoadStop::Type type);
-RoadStop * AllocateRoadStop();
-void ClearSlot(Vehicle *v);
-
-bool HasStationInUse(StationID station, PlayerID player);
-
-void DeleteOilRig(TileIndex t);
-
-#endif /* STATION_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/station_base.h	Mon Mar 31 00:06:17 2008 +0000
@@ -0,0 +1,224 @@
+/* $Id$ */
+
+/** @file station_base.h Base classes/functions for stations. */
+
+#ifndef STATION_BASE_H
+#define STATION_BASE_H
+
+#include "station_type.h"
+#include "airport.h"
+#include "oldpool.h"
+#include "cargopacket.h"
+#include "cargo_type.h"
+#include "town_type.h"
+#include "newgrf_station.h"
+#include <list>
+
+DECLARE_OLD_POOL(Station, Station, 6, 1000)
+DECLARE_OLD_POOL(RoadStop, RoadStop, 5, 2000)
+
+static const byte INITIAL_STATION_RATING = 175;
+
+struct GoodsEntry {
+	enum AcceptancePickup {
+		ACCEPTANCE,
+		PICKUP
+	};
+
+	GoodsEntry() :
+		acceptance_pickup(0),
+		days_since_pickup(255),
+		rating(INITIAL_STATION_RATING),
+		last_speed(0),
+		last_age(255)
+	{}
+
+	byte acceptance_pickup;
+	byte days_since_pickup;
+	byte rating;
+	byte last_speed;
+	byte last_age;
+	CargoList cargo; ///< The cargo packets of cargo waiting in this station
+};
+
+/** A Stop for a Road Vehicle */
+struct RoadStop : PoolItem<RoadStop, RoadStopID, &_RoadStop_pool> {
+	static const int  cDebugCtorLevel =  5;  ///< Debug level on which Contructor / Destructor messages are printed
+	static const uint LIMIT           = 16;  ///< The maximum amount of roadstops that are allowed at a single station
+	static const uint MAX_BAY_COUNT   =  2;  ///< The maximum number of loading bays
+
+	TileIndex        xy;                    ///< Position on the map
+	byte             status;                ///< Current status of the Stop. Like which spot is taken. Access using *Bay and *Busy functions.
+	byte             num_vehicles;          ///< Number of vehicles currently slotted to this stop
+	struct RoadStop  *next;                 ///< Next stop of the given type at this station
+
+	RoadStop(TileIndex tile = 0);
+	virtual ~RoadStop();
+
+	/**
+	 * Determines whether a road stop exists
+	 * @return true if and only is the road stop exists
+	 */
+	inline bool IsValid() const { return this->xy != 0; }
+
+	/* For accessing status */
+	bool HasFreeBay() const;
+	bool IsFreeBay(uint nr) const;
+	uint AllocateBay();
+	void AllocateDriveThroughBay(uint nr);
+	void FreeBay(uint nr);
+	bool IsEntranceBusy() const;
+	void SetEntranceBusy(bool busy);
+
+	RoadStop *GetNextRoadStop(const Vehicle *v) const;
+};
+
+struct StationSpecList {
+	const StationSpec *spec;
+	uint32 grfid;      ///< GRF ID of this custom station
+	uint8  localidx;   ///< Station ID within GRF of station
+};
+
+/** StationRect - used to track station spread out rectangle - cheaper than scanning whole map */
+struct StationRect : public Rect {
+	enum StationRectMode
+	{
+		ADD_TEST = 0,
+		ADD_TRY,
+		ADD_FORCE
+	};
+
+	StationRect();
+	void MakeEmpty();
+	bool PtInExtendedRect(int x, int y, int distance = 0) const;
+	bool IsEmpty() const;
+	bool BeforeAddTile(TileIndex tile, StationRectMode mode);
+	bool BeforeAddRect(TileIndex tile, int w, int h, StationRectMode mode);
+	bool AfterRemoveTile(Station *st, TileIndex tile);
+	bool AfterRemoveRect(Station *st, TileIndex tile, int w, int h);
+
+	static bool ScanForStationTiles(StationID st_id, int left_a, int top_a, int right_a, int bottom_a);
+
+	StationRect& operator = (Rect src);
+};
+
+struct Station : PoolItem<Station, StationID, &_Station_pool> {
+public:
+	RoadStop *GetPrimaryRoadStop(RoadStopType type) const
+	{
+		return type == ROADSTOP_BUS ? bus_stops : truck_stops;
+	}
+
+	RoadStop *GetPrimaryRoadStop(const Vehicle *v) const;
+
+	const AirportFTAClass *Airport() const
+	{
+		if (airport_tile == 0) return GetAirport(AT_DUMMY);
+		return GetAirport(airport_type);
+	}
+
+	TileIndex xy;
+	RoadStop *bus_stops;
+	RoadStop *truck_stops;
+	TileIndex train_tile;
+	TileIndex airport_tile;
+	TileIndex dock_tile;
+	Town *town;
+	StringID string_id;     ///< Default name (town area) of station
+	char *name;             ///< Custom name
+
+	ViewportSign sign;
+
+	uint16 had_vehicle_of_type;
+
+	byte time_since_load;
+	byte time_since_unload;
+	byte delete_ctr;
+	PlayerByte owner;
+	byte facilities;
+	byte airport_type;
+
+	/* trainstation width/height */
+	byte trainst_w, trainst_h;
+
+	/** List of custom stations (StationSpecs) allocated to the station */
+	uint8 num_specs;
+	StationSpecList *speclist;
+
+	Date build_date;
+
+	uint64 airport_flags;   ///< stores which blocks on the airport are taken. was 16 bit earlier on, then 32
+
+	byte last_vehicle_type;
+	std::list<Vehicle *> loading_vehicles;
+	GoodsEntry goods[NUM_CARGO];
+
+	uint16 random_bits;
+	byte waiting_triggers;
+
+	StationRect rect; ///< Station spread out rectangle (not saved) maintained by StationRect_xxx() functions
+
+	static const int cDebugCtorLevel = 5;
+
+	Station(TileIndex tile = 0);
+	virtual ~Station();
+
+	void AddFacility(byte new_facility_bit, TileIndex facil_xy);
+
+	/**
+	 * Mark the sign of a station dirty for repaint.
+	 *
+	 * @ingroup dirty
+	 */
+	void MarkDirty() const;
+
+	/**
+	 * Marks the tiles of the station as dirty.
+	 *
+	 * @ingroup dirty
+	 */
+	void MarkTilesDirty(bool cargo_change) const;
+	bool TileBelongsToRailStation(TileIndex tile) const;
+	uint GetPlatformLength(TileIndex tile, DiagDirection dir) const;
+	uint GetPlatformLength(TileIndex tile) const;
+	bool IsBuoy() const;
+
+	/**
+	 * Determines whether a station exists
+	 * @return true if and only is the station exists
+	 */
+	inline bool IsValid() const { return this->xy != 0; }
+};
+
+static inline StationID GetMaxStationIndex()
+{
+	/* TODO - This isn't the real content of the function, but
+	 *  with the new pool-system this will be replaced with one that
+	 *  _really_ returns the highest index. Now it just returns
+	 *  the next safe value we are sure about everything is below.
+	 */
+	return GetStationPoolSize() - 1;
+}
+
+static inline uint GetNumStations()
+{
+	return GetStationPoolSize();
+}
+
+static inline bool IsValidStationID(StationID index)
+{
+	return index < GetStationPoolSize() && GetStation(index)->IsValid();
+}
+
+#define FOR_ALL_STATIONS_FROM(st, start) for (st = GetStation(start); st != NULL; st = (st->index + 1U < GetStationPoolSize()) ? GetStation(st->index + 1U) : NULL) if (st->IsValid())
+#define FOR_ALL_STATIONS(st) FOR_ALL_STATIONS_FROM(st, 0)
+
+
+/* Stuff for ROADSTOPS */
+
+#define FOR_ALL_ROADSTOPS_FROM(rs, start) for (rs = GetRoadStop(start); rs != NULL; rs = (rs->index + 1U < GetRoadStopPoolSize()) ? GetRoadStop(rs->index + 1U) : NULL) if (rs->IsValid())
+#define FOR_ALL_ROADSTOPS(rs) FOR_ALL_ROADSTOPS_FROM(rs, 0)
+
+/* End of stuff for ROADSTOPS */
+
+#endif /* STATION_BASE_H */
--- a/src/station_cmd.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/station_cmd.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -11,7 +11,6 @@
 #include "tile_cmd.h"
 #include "landscape.h"
 #include "station_map.h"
-#include "station.h"
 #include "viewport_func.h"
 #include "command_func.h"
 #include "town.h"
@@ -71,7 +70,7 @@
 	return false;
 }
 
-RoadStop* GetRoadStopByTile(TileIndex tile, RoadStop::Type type)
+RoadStop* GetRoadStopByTile(TileIndex tile, RoadStopType type)
 {
 	const Station* st = GetStationByTile(tile);
 
@@ -82,7 +81,7 @@
 }
 
 
-static uint GetNumRoadStopsInStation(const Station* st, RoadStop::Type type)
+static uint GetNumRoadStopsInStation(const Station* st, RoadStopType type)
 {
 	uint num = 0;
 
@@ -1298,7 +1297,7 @@
 }
 
 /**
- * @param truck_station Determines whether a stop is RoadStop::BUS or RoadStop::TRUCK
+ * @param truck_station Determines whether a stop is ROADSTOP_BUS or ROADSTOP_TRUCK
  * @param st The Station to do the whole procedure for
  * @return a pointer to where to link a new RoadStop*
  */
@@ -1397,7 +1396,7 @@
 	AutoPtrT<RoadStop> rs_auto_delete(road_stop);
 
 	if (st != NULL &&
-			GetNumRoadStopsInStation(st, RoadStop::BUS) + GetNumRoadStopsInStation(st, RoadStop::TRUCK) >= RoadStop::LIMIT) {
+			GetNumRoadStopsInStation(st, ROADSTOP_BUS) + GetNumRoadStopsInStation(st, ROADSTOP_TRUCK) >= RoadStop::LIMIT) {
 		return_cmd_error(type ? STR_TOO_MANY_TRUCK_STOPS : STR_TOO_MANY_BUS_STOPS);
 	}
 
@@ -1442,7 +1441,7 @@
 
 		st->rect.BeforeAddTile(tile, StationRect::ADD_TRY);
 
-		RoadStop::Type rs_type = type ? RoadStop::TRUCK : RoadStop::BUS;
+		RoadStopType rs_type = type ? ROADSTOP_TRUCK : ROADSTOP_BUS;
 		if (is_drive_through) {
 			MakeDriveThroughRoadStop(tile, st->owner, st->index, rs_type, rts, (Axis)p1, town_owned_road);
 		} else {
@@ -1488,10 +1487,10 @@
 	RoadStop *cur_stop;
 	if (is_truck) { // truck stop
 		primary_stop = &st->truck_stops;
-		cur_stop = GetRoadStopByTile(tile, RoadStop::TRUCK);
+		cur_stop = GetRoadStopByTile(tile, ROADSTOP_TRUCK);
 	} else {
 		primary_stop = &st->bus_stops;
-		cur_stop = GetRoadStopByTile(tile, RoadStop::BUS);
+		cur_stop = GetRoadStopByTile(tile, ROADSTOP_BUS);
 	}
 
 	assert(cur_stop != NULL);
@@ -2440,7 +2439,7 @@
 					if (!rs->IsFreeBay(side)) return VETSB_CANNOT_ENTER;
 
 					/* Check if the vehicle is stopping at this road stop */
-					if (GetRoadStopType(tile) == (IsCargoInClass(v->cargo_type, CC_PASSENGERS) ? RoadStop::BUS : RoadStop::TRUCK) &&
+					if (GetRoadStopType(tile) == (IsCargoInClass(v->cargo_type, CC_PASSENGERS) ? ROADSTOP_BUS : ROADSTOP_TRUCK) &&
 							v->current_order.dest == GetStationIndex(tile)) {
 						SetBit(v->u.road.state, RVS_IS_STOPPING);
 						rs->AllocateDriveThroughBay(side);
@@ -2913,7 +2912,7 @@
 	} else {
 		if (IsDriveThroughStopTile(tile)) {
 			/* Remove the drive-through road stop */
-			DoCommand(tile, 0, (GetStationType(tile) == STATION_TRUCK) ? RoadStop::TRUCK : RoadStop::BUS, DC_EXEC | DC_BANKRUPT, CMD_REMOVE_ROAD_STOP);
+			DoCommand(tile, 0, (GetStationType(tile) == STATION_TRUCK) ? ROADSTOP_TRUCK : ROADSTOP_BUS, DC_EXEC | DC_BANKRUPT, CMD_REMOVE_ROAD_STOP);
 			assert(IsTileType(tile, MP_ROAD));
 			/* Change owner of tile and all roadtypes */
 			ChangeTileOwner(tile, old_player, new_player);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/station_func.h	Mon Mar 31 00:06:17 2008 +0000
@@ -0,0 +1,43 @@
+/* $Id$ */
+
+/** @file station_func.h Functions related to stations. */
+
+#ifndef STATION_FUNC_H
+#define STATION_FUNC_H
+
+#include "station_type.h"
+#include "sprite.h"
+#include "road_type.h"
+#include "tile_type.h"
+#include "cargo_type.h"
+#include "vehicle_type.h"
+#include <set>
+
+void ModifyStationRatingAround(TileIndex tile, PlayerID owner, int amount, uint radius);
+
+/** A set of stations (\c const \c Station* ) */
+typedef std::set<Station*> StationSet;
+
+StationSet FindStationsAroundIndustryTile(TileIndex tile, int w, int h);
+
+void ShowStationViewWindow(StationID station);
+void UpdateAllStationVirtCoord();
+
+void AfterLoadStations();
+void GetProductionAroundTiles(AcceptedCargo produced, TileIndex tile, int w, int h, int rad);
+void GetAcceptanceAroundTiles(AcceptedCargo accepts, TileIndex tile, int w, int h, int rad);
+
+const DrawTileSprites *GetStationTileLayout(StationType st, byte gfx);
+void StationPickerDrawSprite(int x, int y, StationType st, RailType railtype, RoadType roadtype, int image);
+
+bool HasStationInUse(StationID station, PlayerID player);
+
+RoadStop * GetRoadStopByTile(TileIndex tile, RoadStopType type);
+uint GetNumRoadStops(const Station* st, RoadStopType type);
+RoadStop * AllocateRoadStop();
+
+void ClearSlot(Vehicle *v);
+
+void DeleteOilRig(TileIndex t);
+
+#endif /* STATION_FUNC_H */
--- a/src/station_gui.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/station_gui.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -8,7 +8,7 @@
 #include "gui.h"
 #include "window_gui.h"
 #include "textbuf_gui.h"
-#include "station.h"
+#include "station_base.h"
 #include "player_func.h"
 #include "economy_func.h"
 #include "town.h"
@@ -17,7 +17,7 @@
 #include "vehicle_gui.h"
 #include "cargotype.h"
 #include "station_gui.h"
-#include "station.h"
+#include "station_func.h"
 #include "strings_func.h"
 #include "core/alloc_func.hpp"
 #include "window_func.h"
--- a/src/station_map.h	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/station_map.h	Mon Mar 31 00:06:17 2008 +0000
@@ -8,8 +8,10 @@
 #include "rail_map.h"
 #include "road_map.h"
 #include "water_map.h"
-#include "station.h"
+#include "station_func.h"
+#include "station_base.h"
 #include "rail.h"
+#include "newgrf_station.h"
 
 typedef byte StationGfx;
 
@@ -49,10 +51,10 @@
 	return (StationType)GB(_m[t].m6, 3, 3);
 }
 
-static inline RoadStop::Type GetRoadStopType(TileIndex t)
+static inline RoadStopType GetRoadStopType(TileIndex t)
 {
 	assert(GetStationType(t) == STATION_TRUCK || GetStationType(t) == STATION_BUS);
-	return GetStationType(t) == STATION_TRUCK ? RoadStop::TRUCK : RoadStop::BUS;
+	return GetStationType(t) == STATION_TRUCK ? ROADSTOP_TRUCK : ROADSTOP_BUS;
 }
 
 static inline StationGfx GetStationGfx(TileIndex t)
@@ -260,15 +262,15 @@
 	SetRailType(t, rt);
 }
 
-static inline void MakeRoadStop(TileIndex t, Owner o, StationID sid, RoadStop::Type rst, RoadTypes rt, DiagDirection d)
+static inline void MakeRoadStop(TileIndex t, Owner o, StationID sid, RoadStopType rst, RoadTypes rt, DiagDirection d)
 {
-	MakeStation(t, o, sid, (rst == RoadStop::BUS ? STATION_BUS : STATION_TRUCK), d);
+	MakeStation(t, o, sid, (rst == ROADSTOP_BUS ? STATION_BUS : STATION_TRUCK), d);
 	SetRoadTypes(t, rt);
 }
 
-static inline void MakeDriveThroughRoadStop(TileIndex t, Owner o, StationID sid, RoadStop::Type rst, RoadTypes rt, Axis a, bool on_town_road)
+static inline void MakeDriveThroughRoadStop(TileIndex t, Owner o, StationID sid, RoadStopType rst, RoadTypes rt, Axis a, bool on_town_road)
 {
-	MakeStation(t, o, sid, (rst == RoadStop::BUS ? STATION_BUS : STATION_TRUCK), GFX_TRUCK_BUS_DRIVETHROUGH_OFFSET + a);
+	MakeStation(t, o, sid, (rst == ROADSTOP_BUS ? STATION_BUS : STATION_TRUCK), GFX_TRUCK_BUS_DRIVETHROUGH_OFFSET + a);
 	SB(_m[t].m6, 2, 1, on_town_road);
 	SetRoadTypes(t, rt);
 }
--- a/src/station_type.h	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/station_type.h	Mon Mar 31 00:06:17 2008 +0000
@@ -23,6 +23,12 @@
 	STATION_BUOY
 };
 
+/** Types of RoadStops */
+enum RoadStopType {
+	ROADSTOP_BUS,    ///< A standard stop for buses
+	ROADSTOP_TRUCK   ///< A standard stop for trucks
+};
+
 enum {
 	FACIL_TRAIN      = 0x01,
 	FACIL_TRUCK_STOP = 0x02,
--- a/src/strings.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/strings.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -6,7 +6,7 @@
 #include "openttd.h"
 #include "currency.h"
 #include "namegen_func.h"
-#include "station.h"
+#include "station_base.h"
 #include "town.h"
 #include "screenshot.h"
 #include "waypoint.h"
--- a/src/subsidy_gui.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/subsidy_gui.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -4,7 +4,7 @@
 
 #include "stdafx.h"
 #include "openttd.h"
-#include "station.h"
+#include "station_base.h"
 #include "industry.h"
 #include "town.h"
 #include "economy_func.h"
--- a/src/town_cmd.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/town_cmd.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -15,7 +15,7 @@
 #include "town.h"
 #include "command_func.h"
 #include "industry.h"
-#include "station.h"
+#include "station_base.h"
 #include "player_base.h"
 #include "news_func.h"
 #include "saveload.h"
--- a/src/train_cmd.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/train_cmd.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -16,7 +16,7 @@
 #include "command_func.h"
 #include "pathfind.h"
 #include "npf.h"
-#include "station.h"
+#include "station_base.h"
 #include "news_func.h"
 #include "engine.h"
 #include "player_func.h"
--- a/src/unmovable_cmd.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/unmovable_cmd.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -11,7 +11,6 @@
 #include "player_func.h"
 #include "player_base.h"
 #include "gui.h"
-#include "station.h"
 #include "town.h"
 #include "sprite.h"
 #include "bridge_map.h"
--- a/src/vehicle.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/vehicle.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -21,7 +21,6 @@
 #include "debug.h"
 #include "vehicle_gui.h"
 #include "depot.h"
-#include "station.h"
 #include "rail_type.h"
 #include "train.h"
 #include "aircraft.h"
--- a/src/vehicle_gui.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/vehicle_gui.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -6,7 +6,6 @@
 #include "openttd.h"
 #include "debug.h"
 #include "player_func.h"
-#include "station.h"
 #include "engine.h"
 #include "gui.h"
 #include "window_gui.h"
--- a/src/viewport.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/viewport.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -10,7 +10,7 @@
 #include "spritecache.h"
 #include "landscape.h"
 #include "viewport_func.h"
-#include "station.h"
+#include "station_base.h"
 #include "town.h"
 #include "signs.h"
 #include "waypoint.h"
@@ -25,6 +25,7 @@
 #include "vehicle_func.h"
 #include "player_func.h"
 #include "settings_type.h"
+#include "station_func.h"
 
 #include "table/sprites.h"
 #include "table/strings.h"
--- a/src/water_cmd.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/water_cmd.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -35,6 +35,8 @@
 #include "settings_type.h"
 #include "clear_map.h"
 #include "tree_map.h"
+#include "station_base.h"
+#include "airport.h"
 
 #include "table/sprites.h"
 #include "table/strings.h"
--- a/src/waypoint.cpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/waypoint.cpp	Mon Mar 31 00:06:17 2008 +0000
@@ -12,7 +12,7 @@
 #include "rail.h"
 #include "bridge_map.h"
 #include "saveload.h"
-#include "station.h"
+#include "station_base.h"
 #include "town.h"
 #include "waypoint.h"
 #include "variables.h"
--- a/src/yapf/yapf.h	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/yapf/yapf.h	Mon Mar 31 00:06:17 2008 +0000
@@ -7,6 +7,7 @@
 
 #include "../debug.h"
 #include "../depot_type.h"
+#include "../direction_type.h"
 
 /** Finds the best path for given ship.
  * @param v        the ship that needs to find a path
--- a/src/yapf/yapf.hpp	Sun Mar 30 23:24:18 2008 +0000
+++ b/src/yapf/yapf.hpp	Mon Mar 31 00:06:17 2008 +0000
@@ -14,7 +14,7 @@
 #include "../bridge_map.h"
 #include "../tunnelbridge_map.h"
 #include "../bridge.h"
-#include "../station.h"
+#include "../station_base.h"
 #include "../station_map.h"
 #include "../tile_cmd.h"
 #include "../landscape.h"