summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-03-31 06:42:26 +0000
committerrubidium <rubidium@openttd.org>2008-03-31 06:42:26 +0000
commit877ca99198b7c4113d18d2c2aa744732b843d735 (patch)
treeca1da1b595ee5229eb189471cdef8c2c304464b4
parentdf1d9bd8808fbf0f7e871f6ab5b361b7c8c4ad9d (diff)
downloadopenttd-877ca99198b7c4113d18d2c2aa744732b843d735.tar.xz
(svn r12495) -Codechange: reduce the dependency on newgrf_station.h (especially because newgrf_station.h includes a lot of stuff).
-rw-r--r--src/misc_gui.cpp1
-rw-r--r--src/newgrf.cpp1
-rw-r--r--src/newgrf.h2
-rw-r--r--src/newgrf_sound.h1
-rw-r--r--src/newgrf_spritegroup.h7
-rw-r--r--src/newgrf_station.h6
-rw-r--r--src/newgrf_text.cpp1
-rw-r--r--src/openttd.cpp15
-rw-r--r--src/order_cmd.cpp1
-rw-r--r--src/order_gui.cpp1
-rw-r--r--src/station_base.h6
-rw-r--r--src/station_func.h8
-rw-r--r--src/station_gui.cpp1
-rw-r--r--src/station_map.h1
-rw-r--r--src/station_type.h1
-rw-r--r--src/town_cmd.cpp1
-rw-r--r--src/water_cmd.cpp1
-rw-r--r--src/waypoint.cpp1
18 files changed, 38 insertions, 18 deletions
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp
index b92501d3e..04a7374d3 100644
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -40,6 +40,7 @@
#include "string_func.h"
#include "player_gui.h"
#include "settings_type.h"
+#include "newgrf_cargo.h"
#include "table/sprites.h"
#include "table/strings.h"
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 088333530..281219aae 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -25,6 +25,7 @@
#include "newgrf_house.h"
#include "newgrf_sound.h"
#include "newgrf_spritegroup.h"
+#include "newgrf_station.h"
#include "cargotype.h"
#include "industry.h"
#include "newgrf_canal.h"
diff --git a/src/newgrf.h b/src/newgrf.h
index b0e3b5c04..4bfc38f4e 100644
--- a/src/newgrf.h
+++ b/src/newgrf.h
@@ -9,7 +9,7 @@
#include "newgrf_config.h"
#include "cargotype.h"
#include "industry_type.h"
-#include "newgrf_station.h"
+#include "station_type.h"
enum GrfLoadingStage {
GLS_FILESCAN,
diff --git a/src/newgrf_sound.h b/src/newgrf_sound.h
index 1965e3aae..608c7c659 100644
--- a/src/newgrf_sound.h
+++ b/src/newgrf_sound.h
@@ -6,6 +6,7 @@
#define NEWGRF_SOUND_H
#include "sound_type.h"
+#include "tile_type.h"
enum VehicleSoundEvent {
VSE_START = 1,
diff --git a/src/newgrf_spritegroup.h b/src/newgrf_spritegroup.h
index d3fcde0f6..fe8ef405b 100644
--- a/src/newgrf_spritegroup.h
+++ b/src/newgrf_spritegroup.h
@@ -7,10 +7,15 @@
#include "town_type.h"
#include "industry_type.h"
-#include "newgrf_storage.h"
#include "core/bitmath_func.hpp"
#include "gfx_type.h"
+#include "engine_type.h"
+#include "tile_type.h"
+
+#include "newgrf_cargo.h"
+#include "newgrf_callbacks.h"
#include "newgrf_generic.h"
+#include "newgrf_storage.h"
/**
* Gets the value of a so-called newgrf "register".
diff --git a/src/newgrf_station.h b/src/newgrf_station.h
index 6cf164a35..81443577c 100644
--- a/src/newgrf_station.h
+++ b/src/newgrf_station.h
@@ -123,12 +123,6 @@ SpriteID GetCustomStationRelocation(const StationSpec *statspec, const Station *
SpriteID GetCustomStationGroundRelocation(const StationSpec *statspec, const Station *st, TileIndex tile);
uint16 GetStationCallback(CallbackID callback, uint32 param1, uint32 param2, const StationSpec *statspec, const Station *st, TileIndex tile);
-/* Check if a rail station tile is traversable. */
-bool IsStationTileBlocked(TileIndex tile);
-
-/* Check if a rail station tile is electrifiable. */
-bool IsStationTileElectrifiable(TileIndex tile);
-
/* Allocate a StationSpec to a Station. This is called once per build operation. */
int AllocateSpecToStation(const StationSpec *statspec, Station *st, bool exec);
diff --git a/src/newgrf_text.cpp b/src/newgrf_text.cpp
index 9417c7d68..4037290a7 100644
--- a/src/newgrf_text.cpp
+++ b/src/newgrf_text.cpp
@@ -19,6 +19,7 @@
#include "core/alloc_func.hpp"
#include "newgrf_storage.h"
#include "string_func.h"
+#include "date_type.h"
#include "table/strings.h"
#include "table/control_codes.h"
diff --git a/src/openttd.cpp b/src/openttd.cpp
index f11e10f7d..2ffecf803 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -9,15 +9,11 @@
#include "saveload.h"
#include "openttd.h"
-#include "bridge_map.h"
#include "mixer.h"
#include "spritecache.h"
#include "gfxinit.h"
#include "gui.h"
#include "landscape.h"
-#include "station_map.h"
-#include "town_map.h"
-#include "tunnel_map.h"
#include "viewport_func.h"
#include "gfx_func.h"
#include "window_func.h"
@@ -44,7 +40,6 @@
#include "yapf/yapf.h"
#include "settings_func.h"
#include "genworld.h"
-#include "clear_map.h"
#include "fontcache.h"
#include "newgrf.h"
#include "newgrf_config.h"
@@ -64,15 +59,19 @@
#include "sound_func.h"
#include "variables.h"
#include "road_func.h"
+#include "newgrf_station.h"
-#include "bridge_map.h"
#include "clear_map.h"
+#include "tree_map.h"
#include "rail_map.h"
#include "road_map.h"
-#include "water_map.h"
+#include "station_map.h"
+#include "town_map.h"
#include "industry_map.h"
#include "unmovable_map.h"
-#include "tree_map.h"
+#include "tunnel_map.h"
+#include "bridge_map.h"
+#include "water_map.h"
#include "tunnelbridge_map.h"
#include "void_map.h"
#include "water.h"
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp
index 3aa87886b..82a1a613a 100644
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -22,6 +22,7 @@
#include "window_func.h"
#include "settings_type.h"
#include "string_func.h"
+#include "newgrf_cargo.h"
#include "table/strings.h"
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index 8d2fd6b1d..5b1daa96d 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -25,6 +25,7 @@
#include "vehicle_func.h"
#include "settings_type.h"
#include "player_func.h"
+#include "newgrf_cargo.h"
#include "table/sprites.h"
#include "table/strings.h"
diff --git a/src/station_base.h b/src/station_base.h
index ffc40a624..eed0a7253 100644
--- a/src/station_base.h
+++ b/src/station_base.h
@@ -11,7 +11,11 @@
#include "cargopacket.h"
#include "cargo_type.h"
#include "town_type.h"
-#include "newgrf_station.h"
+#include "strings_type.h"
+#include "date_type.h"
+#include "vehicle_type.h"
+#include "player_type.h"
+#include "core/geometry_type.hpp"
#include <list>
DECLARE_OLD_POOL(Station, Station, 6, 1000)
diff --git a/src/station_func.h b/src/station_func.h
index 2db114279..917314402 100644
--- a/src/station_func.h
+++ b/src/station_func.h
@@ -7,6 +7,7 @@
#include "station_type.h"
#include "sprite.h"
+#include "rail_type.h"
#include "road_type.h"
#include "tile_type.h"
#include "cargo_type.h"
@@ -40,4 +41,11 @@ void ClearSlot(Vehicle *v);
void DeleteOilRig(TileIndex t);
+/* Check if a rail station tile is traversable. */
+bool IsStationTileBlocked(TileIndex tile);
+
+/* Check if a rail station tile is electrifiable. */
+bool IsStationTileElectrifiable(TileIndex tile);
+
+
#endif /* STATION_FUNC_H */
diff --git a/src/station_gui.cpp b/src/station_gui.cpp
index ab35ea2ff..b28f96211 100644
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -24,6 +24,7 @@
#include "viewport_func.h"
#include "gfx_func.h"
#include "widgets/dropdown_func.h"
+#include "newgrf_cargo.h"
#include "table/strings.h"
#include "table/sprites.h"
diff --git a/src/station_map.h b/src/station_map.h
index 826fb4e3d..e06221bab 100644
--- a/src/station_map.h
+++ b/src/station_map.h
@@ -11,7 +11,6 @@
#include "station_func.h"
#include "station_base.h"
#include "rail.h"
-#include "newgrf_station.h"
typedef byte StationGfx;
diff --git a/src/station_type.h b/src/station_type.h
index d88972021..5a2ef93e6 100644
--- a/src/station_type.h
+++ b/src/station_type.h
@@ -10,6 +10,7 @@ typedef uint16 RoadStopID;
struct Station;
struct RoadStop;
+struct StationSpec;
static const StationID INVALID_STATION = 0xFFFF;
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index 46745c210..fdf03b970 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -39,6 +39,7 @@
#include "strings_func.h"
#include "window_func.h"
#include "string_func.h"
+#include "newgrf_cargo.h"
#include "table/strings.h"
#include "table/sprites.h"
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index 5d8376347..349d0cab8 100644
--- a/src/water_cmd.cpp
+++ b/src/water_cmd.cpp
@@ -37,6 +37,7 @@
#include "tree_map.h"
#include "station_base.h"
#include "airport.h"
+#include "newgrf_cargo.h"
#include "table/sprites.h"
#include "table/strings.h"
diff --git a/src/waypoint.cpp b/src/waypoint.cpp
index f69334012..608c545ab 100644
--- a/src/waypoint.cpp
+++ b/src/waypoint.cpp
@@ -31,6 +31,7 @@
#include "signal_func.h"
#include "player_func.h"
#include "settings_type.h"
+#include "newgrf_station.h"
#include "table/strings.h"