(svn r12754) -Codechange: split depot.h into depot_map.h, depot_func.h and depot_base.h and remove quite a lot of unneeded (before this) includes of depot.h.
authorrubidium
Thu, 17 Apr 2008 19:10:30 +0000
changeset 10222 b6919c94cc77
parent 10221 faef62283f5f
child 10223 eba00e1551eb
(svn r12754) -Codechange: split depot.h into depot_map.h, depot_func.h and depot_base.h and remove quite a lot of unneeded (before this) includes of depot.h.
src/ai/default/default.cpp
src/ai/trolly/pathfinder.cpp
src/ai/trolly/trolly.cpp
src/aircraft_cmd.cpp
src/aircraft_gui.cpp
src/airport_gui.cpp
src/autoreplace_cmd.cpp
src/autoslope.h
src/build_vehicle_gui.cpp
src/depot.cpp
src/depot.h
src/depot_base.h
src/depot_func.h
src/depot_gui.cpp
src/depot_map.h
src/group_gui.cpp
src/npf.cpp
src/oldloader.cpp
src/openttd.cpp
src/order_cmd.cpp
src/order_gui.cpp
src/pathfind.cpp
src/rail_cmd.cpp
src/road_cmd.cpp
src/road_map.cpp
src/roadveh_cmd.cpp
src/roadveh_gui.cpp
src/ship_cmd.cpp
src/ship_gui.cpp
src/station.cpp
src/station_cmd.cpp
src/timetable_gui.cpp
src/town_cmd.cpp
src/train_cmd.cpp
src/train_gui.cpp
src/tunnelbridge_cmd.cpp
src/unmovable_cmd.cpp
src/vehicle.cpp
src/vehicle_gui.cpp
src/water_cmd.cpp
src/waypoint.h
src/yapf/follow_track.hpp
src/yapf/yapf.hpp
src/yapf/yapf_road.cpp
--- a/src/ai/default/default.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/ai/default/default.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -16,7 +16,6 @@
 #include "../../industry.h"
 #include "../../pathfind.h"
 #include "../../airport.h"
-#include "../../depot.h"
 #include "../../variables.h"
 #include "../../bridge.h"
 #include "../../date_func.h"
--- a/src/ai/trolly/pathfinder.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/ai/trolly/pathfinder.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -6,7 +6,6 @@
 #include "../../debug.h"
 #include "../../command_func.h"
 #include "trolly.h"
-#include "../../depot.h"
 #include "../../tunnel_map.h"
 #include "../../bridge.h"
 #include "../../tunnelbridge_map.h"
--- a/src/ai/trolly/trolly.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/ai/trolly/trolly.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -24,12 +24,13 @@
 #include "../../station_map.h"
 #include "../../command_func.h"
 #include "trolly.h"
+#include "../../depot_base.h"
 #include "../../town.h"
 #include "../../industry.h"
 #include "../../station_base.h"
 #include "../../engine_func.h"
 #include "../../gui.h"
-#include "../../depot.h"
+#include "../../depot_base.h"
 #include "../../vehicle_base.h"
 #include "../../vehicle_func.h"
 #include "../../date_func.h"
--- a/src/aircraft_cmd.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/aircraft_cmd.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -10,7 +10,7 @@
 #include "landscape.h"
 #include "station_map.h"
 #include "timetable.h"
-#include "depot.h"
+#include "depot_func.h"
 #include "news_func.h"
 #include "aircraft.h"
 #include "airport.h"
--- a/src/aircraft_gui.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/aircraft_gui.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -7,7 +7,6 @@
 #include "aircraft.h"
 #include "debug.h"
 #include "gui.h"
-#include "depot.h"
 #include "vehicle_gui.h"
 #include "newgrf_engine.h"
 #include "strings_func.h"
--- a/src/airport_gui.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/airport_gui.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -10,7 +10,6 @@
 #include "terraform_gui.h"
 #include "command_func.h"
 #include "airport.h"
-#include "depot.h"
 #include "sound_func.h"
 #include "window_func.h"
 #include "settings_type.h"
@@ -18,6 +17,7 @@
 #include "gfx_func.h"
 #include "player_func.h"
 #include "order_func.h"
+#include "station_type.h"
 
 #include "table/sprites.h"
 #include "table/strings.h"
--- a/src/autoreplace_cmd.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/autoreplace_cmd.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -8,7 +8,6 @@
 #include "player_func.h"
 #include "debug.h"
 #include "vehicle_gui.h"
-#include "depot.h"
 #include "train.h"
 #include "aircraft.h"
 #include "cargotype.h"
--- a/src/autoslope.h	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/autoslope.h	Thu Apr 17 19:10:30 2008 +0000
@@ -5,9 +5,9 @@
 #ifndef AUTOSLOPE_H
 #define AUTOSLOPE_H
 
-#include "depot.h"
 #include "settings_type.h"
 #include "player_func.h"
+#include "depot_func.h"
 
 /**
  * Autoslope check for tiles with an entrance on an edge.
--- a/src/build_vehicle_gui.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/build_vehicle_gui.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -14,7 +14,6 @@
 #include "textbuf_gui.h"
 #include "command_func.h"
 #include "player_func.h"
-#include "depot.h"
 #include "airport.h"
 #include "vehicle_gui.h"
 #include "newgrf_engine.h"
--- a/src/depot.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/depot.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -4,7 +4,7 @@
 
 #include "stdafx.h"
 #include "openttd.h"
-#include "depot.h"
+#include "depot_base.h"
 #include "landscape.h"
 #include "saveload.h"
 #include "order_func.h"
--- a/src/depot.h	Thu Apr 17 18:24:45 2008 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/* $Id$ */
-
-/** @file depot.h Header files for depots (not hangars) */
-
-#ifndef DEPOT_H
-#define DEPOT_H
-
-#include "direction_type.h"
-#include "depot_type.h"
-#include "oldpool.h"
-#include "road_map.h"
-#include "rail_map.h"
-#include "water_map.h"
-#include "station_map.h"
-
-DECLARE_OLD_POOL(Depot, Depot, 3, 8000)
-
-struct Depot : PoolItem<Depot, DepotID, &_Depot_pool> {
-	TileIndex xy;
-	TownID town_index;
-
-	Depot(TileIndex xy = 0) : xy(xy) {}
-	~Depot();
-
-	inline bool IsValid() const { return this->xy != 0; }
-};
-
-static inline bool IsValidDepotID(DepotID index)
-{
-	return index < GetDepotPoolSize() && GetDepot(index)->IsValid();
-}
-
-void ShowDepotWindow(TileIndex tile, VehicleType type);
-
-#define FOR_ALL_DEPOTS_FROM(d, start) for (d = GetDepot(start); d != NULL; d = (d->index + 1U < GetDepotPoolSize()) ? GetDepot(d->index + 1U) : NULL) if (d->IsValid())
-#define FOR_ALL_DEPOTS(d) FOR_ALL_DEPOTS_FROM(d, 0)
-
-/**
- * Check if a tile is a depot and it is a depot of the given type.
- */
-static inline bool IsDepotTypeTile(TileIndex tile, TransportType type)
-{
-	switch (type) {
-		default: NOT_REACHED();
-		case TRANSPORT_RAIL:
-			return IsRailDepotTile(tile);
-
-		case TRANSPORT_ROAD:
-			return IsRoadDepotTile(tile);
-
-		case TRANSPORT_WATER:
-			return IsShipDepotTile(tile);
-	}
-}
-
-/**
- * Is the given tile a tile with a depot on it?
- * @param tile the tile to check
- * @return true if and only if there is a depot on the tile.
- */
-static inline bool IsDepotTile(TileIndex tile)
-{
-	return IsRailDepotTile(tile) || IsRoadDepotTile(tile) || IsShipDepotTile(tile) || IsHangarTile(tile);
-}
-
-/**
- * Find out if the slope of the tile is suitable to build a depot of given direction
- * @param direction The direction in which the depot's exit points
- * @param tileh The slope of the tile in question
- * @return true if the construction is possible
-
- * This is checked by the ugly 0x4C >> direction magic, which does the following:
- * 0x4C is 0100 1100 and tileh has only bits 0..3 set (steep tiles are ruled out)
- * So: for direction (only the significant bits are shown)<p>
- * 00 (exit towards NE) we need either bit 2 or 3 set in tileh: 0x4C >> 0 = 1100<p>
- * 01 (exit towards SE) we need either bit 1 or 2 set in tileh: 0x4C >> 1 = 0110<p>
- * 02 (exit towards SW) we need either bit 0 or 1 set in tileh: 0x4C >> 2 = 0011<p>
- * 03 (exit towards NW) we need either bit 0 or 4 set in tileh: 0x4C >> 3 = 1001<p>
- * So ((0x4C >> direction) & tileh) determines whether the depot can be built on the current tileh
- */
-static inline bool CanBuildDepotByTileh(DiagDirection direction, Slope tileh)
-{
-	return ((0x4C >> direction) & tileh) != 0;
-}
-
-Depot *GetDepotByTile(TileIndex tile);
-void InitializeDepots();
-
-void DeleteDepotHighlightOfVehicle(const Vehicle *v);
-
-#endif /* DEPOT_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/depot_base.h	Thu Apr 17 19:10:30 2008 +0000
@@ -0,0 +1,35 @@
+/* $Id$ */
+
+/** @file depot.h Base for all depots (except hangars) */
+
+#ifndef DEPOT_BASE_H
+#define DEPOT_BASE_H
+
+#include "tile_type.h"
+#include "depot_type.h"
+#include "oldpool.h"
+#include "town_type.h"
+
+DECLARE_OLD_POOL(Depot, Depot, 3, 8000)
+
+struct Depot : PoolItem<Depot, DepotID, &_Depot_pool> {
+	TileIndex xy;
+	TownID town_index;
+
+	Depot(TileIndex xy = 0) : xy(xy) {}
+	~Depot();
+
+	inline bool IsValid() const { return this->xy != 0; }
+};
+
+static inline bool IsValidDepotID(DepotID index)
+{
+	return index < GetDepotPoolSize() && GetDepot(index)->IsValid();
+}
+
+Depot *GetDepotByTile(TileIndex tile);
+
+#define FOR_ALL_DEPOTS_FROM(d, start) for (d = GetDepot(start); d != NULL; d = (d->index + 1U < GetDepotPoolSize()) ? GetDepot(d->index + 1U) : NULL) if (d->IsValid())
+#define FOR_ALL_DEPOTS(d) FOR_ALL_DEPOTS_FROM(d, 0)
+
+#endif /* DEPOT_BASE_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/depot_func.h	Thu Apr 17 19:10:30 2008 +0000
@@ -0,0 +1,39 @@
+/* $Id$ */
+
+/** @file depot_func.h Functions related to depots. */
+
+#ifndef DEPOT_FUNC_H
+#define DEPOT_FUNC_H
+
+#include "depot_type.h"
+#include "tile_type.h"
+#include "vehicle_type.h"
+#include "direction_type.h"
+#include "slope_type.h"
+
+void ShowDepotWindow(TileIndex tile, VehicleType type);
+void InitializeDepots();
+
+void DeleteDepotHighlightOfVehicle(const Vehicle *v);
+
+/**
+ * Find out if the slope of the tile is suitable to build a depot of given direction
+ * @param direction The direction in which the depot's exit points
+ * @param tileh The slope of the tile in question
+ * @return true if the construction is possible
+
+ * This is checked by the ugly 0x4C >> direction magic, which does the following:
+ * 0x4C is 0100 1100 and tileh has only bits 0..3 set (steep tiles are ruled out)
+ * So: for direction (only the significant bits are shown)<p>
+ * 00 (exit towards NE) we need either bit 2 or 3 set in tileh: 0x4C >> 0 = 1100<p>
+ * 01 (exit towards SE) we need either bit 1 or 2 set in tileh: 0x4C >> 1 = 0110<p>
+ * 02 (exit towards SW) we need either bit 0 or 1 set in tileh: 0x4C >> 2 = 0011<p>
+ * 03 (exit towards NW) we need either bit 0 or 4 set in tileh: 0x4C >> 3 = 1001<p>
+ * So ((0x4C >> direction) & tileh) determines whether the depot can be built on the current tileh
+ */
+static inline bool CanBuildDepotByTileh(DiagDirection direction, Slope tileh)
+{
+	return ((0x4C >> direction) & tileh) != 0;
+}
+
+#endif /* DEPOT_FUNC_H */
--- a/src/depot_gui.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/depot_gui.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -13,7 +13,7 @@
 #include "viewport_func.h"
 #include "gfx_func.h"
 #include "command_func.h"
-#include "depot.h"
+#include "depot_base.h"
 #include "vehicle_gui.h"
 #include "station_map.h"
 #include "newgrf_engine.h"
@@ -23,6 +23,7 @@
 #include "vehicle_func.h"
 #include "player_func.h"
 #include "order_func.h"
+#include "depot_base.h"
 
 #include "table/strings.h"
 #include "table/sprites.h"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/depot_map.h	Thu Apr 17 19:10:30 2008 +0000
@@ -0,0 +1,41 @@
+/* $Id$ */
+
+/** @file depot_map.h Map related accessors for depots. */
+
+#ifndef DEPOT_MAP_H
+#define DEPOT_MAP_H
+
+#include "road_map.h"
+#include "rail_map.h"
+#include "water_map.h"
+#include "station_map.h"
+
+/**
+ * Check if a tile is a depot and it is a depot of the given type.
+ */
+static inline bool IsDepotTypeTile(TileIndex tile, TransportType type)
+{
+	switch (type) {
+		default: NOT_REACHED();
+		case TRANSPORT_RAIL:
+			return IsRailDepotTile(tile);
+
+		case TRANSPORT_ROAD:
+			return IsRoadDepotTile(tile);
+
+		case TRANSPORT_WATER:
+			return IsShipDepotTile(tile);
+	}
+}
+
+/**
+ * Is the given tile a tile with a depot on it?
+ * @param tile the tile to check
+ * @return true if and only if there is a depot on the tile.
+ */
+static inline bool IsDepotTile(TileIndex tile)
+{
+	return IsRailDepotTile(tile) || IsRoadDepotTile(tile) || IsShipDepotTile(tile) || IsHangarTile(tile);
+}
+
+#endif /* DEPOT_MAP_H */
--- a/src/group_gui.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/group_gui.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -9,7 +9,6 @@
 #include "textbuf_gui.h"
 #include "command_func.h"
 #include "vehicle_gui.h"
-#include "depot.h"
 #include "train.h"
 #include "group.h"
 #include "debug.h"
--- a/src/npf.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/npf.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -14,7 +14,8 @@
 #include "pathfind.h"
 #include "station_base.h"
 #include "station_map.h"
-#include "depot.h"
+#include "depot_base.h"
+#include "depot_map.h"
 #include "tunnel_map.h"
 #include "network/network.h"
 #include "water_map.h"
--- a/src/oldloader.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/oldloader.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -15,7 +15,7 @@
 #include "train.h"
 #include "signs_base.h"
 #include "debug.h"
-#include "depot.h"
+#include "depot_base.h"
 #include "newgrf_config.h"
 #include "ai/ai.h"
 #include "ai/default/default.h"
--- a/src/openttd.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/openttd.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -46,7 +46,6 @@
 #include "network/network.h"
 #include "signs_base.h"
 #include "signs_func.h"
-#include "depot.h"
 #include "waypoint.h"
 #include "ai/ai.h"
 #include "train.h"
--- a/src/order_cmd.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/order_cmd.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -7,7 +7,7 @@
 #include "order_base.h"
 #include "order_func.h"
 #include "airport.h"
-#include "depot.h"
+#include "order_base.h"
 #include "waypoint.h"
 #include "command_func.h"
 #include "player_func.h"
@@ -26,6 +26,7 @@
 #include "timetable.h"
 #include "vehicle_func.h"
 #include "oldpool_func.h"
+#include "depot_base.h"
 
 #include "table/strings.h"
 
--- a/src/order_gui.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/order_gui.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -13,7 +13,7 @@
 #include "command_func.h"
 #include "viewport_func.h"
 #include "gfx_func.h"
-#include "depot.h"
+#include "depot_base.h"
 #include "waypoint.h"
 #include "train.h"
 #include "water_map.h"
@@ -29,6 +29,7 @@
 #include "widgets/dropdown_func.h"
 #include "textbuf_gui.h"
 #include "string_func.h"
+#include "depot_base.h"
 
 #include "table/sprites.h"
 #include "table/strings.h"
--- a/src/pathfind.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/pathfind.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -6,7 +6,6 @@
 #include "openttd.h"
 #include "bridge_map.h"
 #include "station_map.h"
-#include "depot.h"
 #include "tile_cmd.h"
 #include "landscape.h"
 #include "pathfind.h"
@@ -14,7 +13,6 @@
 #include "debug.h"
 #include "tunnel_map.h"
 #include "settings_type.h"
-#include "depot.h"
 #include "tunnelbridge_map.h"
 #include "core/random_func.hpp"
 #include "core/alloc_type.hpp"
--- a/src/rail_cmd.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/rail_cmd.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -20,7 +20,8 @@
 #include "engine_func.h"
 #include "town.h"
 #include "sprite.h"
-#include "depot.h"
+#include "depot_base.h"
+#include "depot_func.h"
 #include "waypoint.h"
 #include "rail.h"
 #include "newgrf.h"
@@ -40,6 +41,8 @@
 #include "sound_func.h"
 #include "signal_func.h"
 #include "tunnelbridge.h"
+#include "station_map.h"
+#include "water_map.h"
 
 #include "table/sprites.h"
 #include "table/strings.h"
--- a/src/road_cmd.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/road_cmd.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -18,7 +18,8 @@
 #include "command_func.h"
 #include "town.h"
 #include "yapf/yapf.h"
-#include "depot.h"
+#include "depot_base.h"
+#include "depot_func.h"
 #include "newgrf.h"
 #include "station_map.h"
 #include "tunnel_map.h"
--- a/src/road_map.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/road_map.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -9,7 +9,6 @@
 #include "road_map.h"
 #include "tunnel_map.h"
 #include "station_map.h"
-#include "depot.h"
 #include "tunnelbridge_map.h"
 
 
--- a/src/roadveh_cmd.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/roadveh_cmd.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -17,7 +17,6 @@
 #include "npf.h"
 #include "player_func.h"
 #include "player_base.h"
-#include "depot.h"
 #include "bridge.h"
 #include "tunnel_map.h"
 #include "bridge_map.h"
@@ -41,6 +40,8 @@
 #include "gfx_func.h"
 #include "settings_type.h"
 #include "order_func.h"
+#include "depot_base.h"
+#include "depot_func.h"
 
 #include "table/strings.h"
 
--- a/src/roadveh_gui.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/roadveh_gui.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -11,7 +11,6 @@
 #include "viewport_func.h"
 #include "gfx_func.h"
 #include "command_func.h"
-#include "depot.h"
 #include "vehicle_gui.h"
 #include "newgrf_engine.h"
 #include "strings_func.h"
--- a/src/ship_cmd.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/ship_cmd.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -17,7 +17,8 @@
 #include "player_func.h"
 #include "player_base.h"
 #include "npf.h"
-#include "depot.h"
+#include "depot_base.h"
+#include "depot_func.h"
 #include "vehicle_gui.h"
 #include "newgrf_engine.h"
 #include "water_map.h"
--- a/src/ship_gui.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/ship_gui.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -10,7 +10,6 @@
 #include "window_gui.h"
 #include "viewport_func.h"
 #include "gfx_func.h"
-#include "depot.h"
 #include "vehicle_gui.h"
 #include "newgrf_engine.h"
 #include "strings_func.h"
--- a/src/station.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/station.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -13,7 +13,6 @@
 #include "player_func.h"
 #include "airport.h"
 #include "sprite.h"
-#include "depot.h"
 #include "train.h"
 #include "water_map.h"
 #include "industry_map.h"
--- a/src/station_cmd.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/station_cmd.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -18,7 +18,6 @@
 #include "saveload.h"
 #include "airport.h"
 #include "sprite.h"
-#include "depot.h"
 #include "train.h"
 #include "roadveh.h"
 #include "water_map.h"
--- a/src/timetable_gui.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/timetable_gui.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -10,7 +10,6 @@
 #include "window_gui.h"
 #include "textbuf_gui.h"
 #include "cargotype.h"
-#include "depot.h"
 #include "strings_func.h"
 #include "vehicle_base.h"
 #include "string_func.h"
--- a/src/town_cmd.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/town_cmd.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -41,6 +41,9 @@
 #include "string_func.h"
 #include "newgrf_cargo.h"
 #include "oldpool_func.h"
+#include "sprite.h"
+#include "economy_func.h"
+#include "station_func.h"
 
 #include "table/strings.h"
 #include "table/sprites.h"
--- a/src/train_cmd.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/train_cmd.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -20,7 +20,8 @@
 #include "engine_func.h"
 #include "player_func.h"
 #include "player_base.h"
-#include "depot.h"
+#include "depot_base.h"
+#include "depot_func.h"
 #include "waypoint.h"
 #include "vehicle_gui.h"
 #include "train.h"
--- a/src/train_gui.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/train_gui.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -10,7 +10,6 @@
 #include "gfx_func.h"
 #include "command_func.h"
 #include "vehicle_gui.h"
-#include "depot.h"
 #include "train.h"
 #include "newgrf_engine.h"
 #include "strings_func.h"
--- a/src/tunnelbridge_cmd.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/tunnelbridge_cmd.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -35,6 +35,8 @@
 #include "tunnelbridge.h"
 #include "player_base.h"
 #include "engine_func.h"
+#include "economy_func.h"
+#include "rail.h"
 
 #include "table/sprites.h"
 #include "table/strings.h"
--- a/src/unmovable_cmd.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/unmovable_cmd.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -24,6 +24,8 @@
 #include "window_func.h"
 #include "vehicle_func.h"
 #include "player_gui.h"
+#include "station_type.h"
+#include "economy_func.h"
 
 #include "table/strings.h"
 #include "table/sprites.h"
--- a/src/vehicle.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/vehicle.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -19,7 +19,6 @@
 #include "player_func.h"
 #include "debug.h"
 #include "vehicle_gui.h"
-#include "depot.h"
 #include "rail_type.h"
 #include "train.h"
 #include "aircraft.h"
@@ -47,6 +46,7 @@
 #include "string_func.h"
 #include "settings_type.h"
 #include "oldpool_func.h"
+#include "depot_map.h"
 
 #include "table/sprites.h"
 #include "table/strings.h"
--- a/src/vehicle_gui.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/vehicle_gui.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -21,7 +21,7 @@
 #include "ship.h"
 #include "aircraft.h"
 #include "roadveh.h"
-#include "depot.h"
+#include "depot_base.h"
 #include "cargotype.h"
 #include "group.h"
 #include "group_gui.h"
@@ -35,6 +35,7 @@
 #include "settings_type.h"
 #include "widgets/dropdown_func.h"
 #include "order_func.h"
+#include "depot_base.h"
 
 #include "table/sprites.h"
 #include "table/strings.h"
--- a/src/water_cmd.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/water_cmd.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -14,7 +14,8 @@
 #include "command_func.h"
 #include "town.h"
 #include "news_func.h"
-#include "depot.h"
+#include "depot_base.h"
+#include "depot_func.h"
 #include "vehicle_gui.h"
 #include "train.h"
 #include "roadveh.h"
--- a/src/waypoint.h	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/waypoint.h	Thu Apr 17 19:10:30 2008 +0000
@@ -10,6 +10,7 @@
 #include "rail_map.h"
 #include "command_type.h"
 #include "station_type.h"
+#include "town_type.h"
 
 DECLARE_OLD_POOL(Waypoint, Waypoint, 3, 8000)
 
--- a/src/yapf/follow_track.hpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/yapf/follow_track.hpp	Thu Apr 17 19:10:30 2008 +0000
@@ -6,7 +6,7 @@
 #define  FOLLOW_TRACK_HPP
 
 #include "yapf.hpp"
-
+#include "../depot_map.h"
 
 /** Track follower helper template class (can serve pathfinders and vehicle
  *  controllers). See 6 different typedefs below for 3 different transport
--- a/src/yapf/yapf.hpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/yapf/yapf.hpp	Thu Apr 17 19:10:30 2008 +0000
@@ -8,7 +8,6 @@
 #include "track_dir.hpp"
 
 #include "../vehicle_base.h"
-#include "../depot.h"
 #include "../road_map.h"
 #include "../tunnel_map.h"
 #include "../bridge_map.h"
--- a/src/yapf/yapf_road.cpp	Thu Apr 17 18:24:45 2008 +0000
+++ b/src/yapf/yapf_road.cpp	Thu Apr 17 19:10:30 2008 +0000
@@ -3,6 +3,7 @@
 /** @file yapf_road.cpp */
 
 #include "../stdafx.h"
+#include "../depot_base.h"
 
 #include "yapf.hpp"
 #include "yapf_node_road.hpp"