summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-03-28 16:32:27 +0000
committerrubidium <rubidium@openttd.org>2008-03-28 16:32:27 +0000
commit7f139373aa2f884ba6d74fd7a07030df4b29db62 (patch)
treeed475a8e0c2e0d66570aa6756d880db92f3884d4
parent450d234745250712b90a8ce91a8fb43673cb9204 (diff)
downloadopenttd-7f139373aa2f884ba6d74fd7a07030df4b29db62.tar.xz
(svn r12467) -Codechange: move DepotID to a more logical location.
-rw-r--r--projects/openttd_vs80.vcproj4
-rw-r--r--projects/openttd_vs90.vcproj4
-rw-r--r--source.list1
-rw-r--r--src/depot.h2
-rw-r--r--src/depot_type.h11
-rw-r--r--src/openttd.h2
-rw-r--r--src/yapf/yapf.h1
7 files changed, 22 insertions, 3 deletions
diff --git a/projects/openttd_vs80.vcproj b/projects/openttd_vs80.vcproj
index 48efeed1c..5b61359f0 100644
--- a/projects/openttd_vs80.vcproj
+++ b/projects/openttd_vs80.vcproj
@@ -892,6 +892,10 @@
>
</File>
<File
+ RelativePath=".\..\src\depot_type.h"
+ >
+ </File>
+ <File
RelativePath=".\..\src\direction_func.h"
>
</File>
diff --git a/projects/openttd_vs90.vcproj b/projects/openttd_vs90.vcproj
index c7edde6e8..98c44fdff 100644
--- a/projects/openttd_vs90.vcproj
+++ b/projects/openttd_vs90.vcproj
@@ -889,6 +889,10 @@
>
</File>
<File
+ RelativePath=".\..\src\depot_type.h"
+ >
+ </File>
+ <File
RelativePath=".\..\src\direction_func.h"
>
</File>
diff --git a/source.list b/source.list
index 805452390..34d49fc49 100644
--- a/source.list
+++ b/source.list
@@ -131,6 +131,7 @@ debug.h
video/dedicated_v.h
ai/default/default.h
depot.h
+depot_type.h
direction_func.h
direction_type.h
music/dmusic.h
diff --git a/src/depot.h b/src/depot.h
index f551f943f..42bd84b54 100644
--- a/src/depot.h
+++ b/src/depot.h
@@ -6,13 +6,13 @@
#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"
-struct Depot;
DECLARE_OLD_POOL(Depot, Depot, 3, 8000)
struct Depot : PoolItem<Depot, DepotID, &_Depot_pool> {
diff --git a/src/depot_type.h b/src/depot_type.h
new file mode 100644
index 000000000..71372cce5
--- /dev/null
+++ b/src/depot_type.h
@@ -0,0 +1,11 @@
+/* $Id$ */
+
+/** @file depot_type.h Header files for depots (not hangars) */
+
+#ifndef DEPOT_TYPE_H
+#define DEPOT_TYPE_H
+
+typedef uint16 DepotID;
+struct Depot;
+
+#endif /* DEPOT_TYPE_H */
diff --git a/src/openttd.h b/src/openttd.h
index 196851234..8530d6dd3 100644
--- a/src/openttd.h
+++ b/src/openttd.h
@@ -9,7 +9,6 @@
#endif
// Forward declarations of structs.
-struct Depot;
struct Waypoint;
struct Station;
struct ViewPort;
@@ -26,7 +25,6 @@ typedef EngineID *EngineList; ///< engine list type placeholder acceptable for C
typedef uint16 StationID;
static const StationID INVALID_STATION = 0xFFFF;
typedef uint16 RoadStopID;
-typedef uint16 DepotID;
typedef uint16 WaypointID;
typedef uint16 OrderID;
typedef uint16 SignID;
diff --git a/src/yapf/yapf.h b/src/yapf/yapf.h
index 51ba06b92..40851eb42 100644
--- a/src/yapf/yapf.h
+++ b/src/yapf/yapf.h
@@ -6,6 +6,7 @@
#define YAPF_H
#include "../debug.h"
+#include "../depot_type.h"
/** Finds the best path for given ship.
* @param v the ship that needs to find a path