summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-08-26 22:01:16 +0000
committerrubidium <rubidium@openttd.org>2010-08-26 22:01:16 +0000
commit30f2afac9bf023bce081e52e09b1c0a152d9849a (patch)
tree1fd76e3ca5130b7949df16018d6a87952a5b447c /src
parent08a41c6ee5f1500fcd472e953b2341ef996cb901 (diff)
downloadopenttd-30f2afac9bf023bce081e52e09b1c0a152d9849a.tar.xz
(svn r20632) -Cleanup: remove "a few" unneeded includes, and add them to some headers
Diffstat (limited to 'src')
-rw-r--r--src/ai/ai_core.cpp1
-rw-r--r--src/ai/ai_gui.cpp2
-rw-r--r--src/ai/ai_info.cpp2
-rw-r--r--src/ai/ai_instance.cpp3
-rw-r--r--src/ai/ai_scanner.cpp3
-rw-r--r--src/ai/api/ai_basestation.cpp1
-rw-r--r--src/ai/api/ai_gamesettings.cpp1
-rw-r--r--src/ai/api/ai_industrytype.cpp1
-rw-r--r--src/ai/api/ai_marine.cpp1
-rw-r--r--src/ai/api/ai_object.cpp1
-rw-r--r--src/ai/api/ai_rail.cpp2
-rw-r--r--src/ai/api/ai_road.cpp1
-rw-r--r--src/ai/api/ai_town.cpp1
-rw-r--r--src/ai/api/ai_vehicle.cpp2
-rw-r--r--src/aircraft_cmd.cpp4
-rw-r--r--src/aircraft_gui.cpp1
-rw-r--r--src/airport.cpp7
-rw-r--r--src/airport_gui.cpp3
-rw-r--r--src/articulated_vehicles.cpp2
-rw-r--r--src/autoreplace_cmd.cpp2
-rw-r--r--src/bridge_gui.cpp1
-rw-r--r--src/build_vehicle_gui.cpp1
-rw-r--r--src/command.cpp1
-rw-r--r--src/company_cmd.cpp1
-rw-r--r--src/company_gui.cpp4
-rw-r--r--src/console_cmds.cpp1
-rw-r--r--src/date.cpp1
-rw-r--r--src/depot_gui.cpp3
-rw-r--r--src/disaster_cmd.cpp2
-rw-r--r--src/dock_gui.cpp1
-rw-r--r--src/economy.cpp3
-rw-r--r--src/elrail.cpp4
-rw-r--r--src/fios.cpp1
-rw-r--r--src/fios.h6
-rw-r--r--src/gamelog.cpp1
-rw-r--r--src/genworld.cpp1
-rw-r--r--src/genworld_gui.cpp1
-rw-r--r--src/gfx.cpp1
-rw-r--r--src/gfxinit.cpp1
-rw-r--r--src/ground_vehicle.cpp2
-rw-r--r--src/group_cmd.cpp1
-rw-r--r--src/group_gui.cpp1
-rw-r--r--src/hotkeys.cpp2
-rw-r--r--src/industry_cmd.cpp3
-rw-r--r--src/industry_gui.cpp1
-rw-r--r--src/intro_gui.cpp1
-rw-r--r--src/map.cpp1
-rw-r--r--src/misc/binaryheap.hpp2
-rw-r--r--src/misc/hashtable.hpp2
-rw-r--r--src/misc_gui.cpp1
-rw-r--r--src/network/core/tcp_http.cpp1
-rw-r--r--src/network/core/tcp_http.h2
-rw-r--r--src/network/network_gui.cpp1
-rw-r--r--src/newgrf.cpp6
-rw-r--r--src/newgrf_airport.cpp6
-rw-r--r--src/newgrf_airport.h1
-rw-r--r--src/newgrf_airporttiles.cpp5
-rw-r--r--src/newgrf_animation_base.h7
-rw-r--r--src/newgrf_canal.cpp1
-rw-r--r--src/newgrf_class_func.h2
-rw-r--r--src/newgrf_commons.cpp1
-rw-r--r--src/newgrf_commons.h2
-rw-r--r--src/newgrf_config.cpp1
-rw-r--r--src/newgrf_debug_gui.cpp4
-rw-r--r--src/newgrf_engine.cpp3
-rw-r--r--src/newgrf_house.cpp5
-rw-r--r--src/newgrf_industries.cpp1
-rw-r--r--src/newgrf_industries.h1
-rw-r--r--src/newgrf_industrytiles.cpp4
-rw-r--r--src/newgrf_railtype.cpp9
-rw-r--r--src/newgrf_spritegroup.cpp1
-rw-r--r--src/newgrf_spritegroup.h1
-rw-r--r--src/newgrf_station.cpp6
-rw-r--r--src/object_cmd.cpp3
-rw-r--r--src/object_map.h1
-rw-r--r--src/openttd.cpp4
-rw-r--r--src/order_backup.cpp2
-rw-r--r--src/order_backup.h6
-rw-r--r--src/order_gui.cpp4
-rw-r--r--src/pathfinder/npf/npf.cpp1
-rw-r--r--src/pathfinder/yapf/yapf.h1
-rw-r--r--src/rail_cmd.cpp6
-rw-r--r--src/rail_gui.cpp1
-rw-r--r--src/rail_gui.h2
-rw-r--r--src/road_cmd.cpp1
-rw-r--r--src/road_gui.cpp2
-rw-r--r--src/road_gui.h4
-rw-r--r--src/roadstop.cpp1
-rw-r--r--src/roadveh.h4
-rw-r--r--src/roadveh_cmd.cpp6
-rw-r--r--src/saveload/afterload.cpp4
-rw-r--r--src/saveload/company_sl.cpp1
-rw-r--r--src/saveload/gamelog_sl.cpp1
-rw-r--r--src/saveload/map_sl.cpp1
-rw-r--r--src/saveload/misc_sl.cpp1
-rw-r--r--src/saveload/newgrf_sl.cpp3
-rw-r--r--src/saveload/oldloader_sl.cpp3
-rw-r--r--src/saveload/saveload.cpp1
-rw-r--r--src/saveload/vehicle_sl.cpp1
-rw-r--r--src/script/script_info.cpp2
-rw-r--r--src/script/script_scanner.cpp1
-rw-r--r--src/script/squirrel.cpp2
-rw-r--r--src/script/squirrel.hpp2
-rw-r--r--src/script/squirrel_class.hpp2
-rw-r--r--src/script/squirrel_helper.hpp2
-rw-r--r--src/script/squirrel_std.cpp1
-rw-r--r--src/script/squirrel_std.hpp2
-rw-r--r--src/settings.cpp2
-rw-r--r--src/settings_gui.cpp1
-rw-r--r--src/ship_cmd.cpp3
-rw-r--r--src/signal_type.h2
-rw-r--r--src/smallmap_gui.cpp1
-rw-r--r--src/sprite.cpp2
-rw-r--r--src/sprite.h1
-rw-r--r--src/station_base.h1
-rw-r--r--src/station_cmd.cpp2
-rw-r--r--src/station_gui.cpp1
-rw-r--r--src/strings.cpp1
-rw-r--r--src/terraform_gui.cpp3
-rw-r--r--src/tile_map.cpp1
-rw-r--r--src/tilearea.cpp3
-rw-r--r--src/toolbar_gui.cpp1
-rw-r--r--src/town_cmd.cpp2
-rw-r--r--src/train_cmd.cpp5
-rw-r--r--src/train_gui.cpp2
-rw-r--r--src/transport_type.h2
-rw-r--r--src/tunnelbridge_cmd.cpp4
-rw-r--r--src/vehicle.cpp7
-rw-r--r--src/vehicle_cmd.cpp2
-rw-r--r--src/vehicle_gui.cpp8
-rw-r--r--src/viewport.cpp1
-rw-r--r--src/water_cmd.cpp1
-rw-r--r--src/water_map.h1
-rw-r--r--src/widget_type.h1
-rw-r--r--src/window_gui.h1
135 files changed, 42 insertions, 263 deletions
diff --git a/src/ai/ai_core.cpp b/src/ai/ai_core.cpp
index b6c072500..b03e2a5ae 100644
--- a/src/ai/ai_core.cpp
+++ b/src/ai/ai_core.cpp
@@ -14,7 +14,6 @@
#include "../core/bitmath_func.hpp"
#include "../company_base.h"
#include "../company_func.h"
-#include "../debug.h"
#include "../network/network.h"
#include "../window_func.h"
#include "../command_func.h"
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp
index d52d00f5c..3cfee3f6a 100644
--- a/src/ai/ai_gui.cpp
+++ b/src/ai/ai_gui.cpp
@@ -13,7 +13,6 @@
#include "../openttd.h"
#include "../table/sprites.h"
#include "../gui.h"
-#include "../window_gui.h"
#include "../querystring_gui.h"
#include "../company_func.h"
#include "../company_base.h"
@@ -23,7 +22,6 @@
#include "../gfx_func.h"
#include "../command_func.h"
#include "../network/network.h"
-#include "../textbuf_gui.h"
#include "../settings_func.h"
#include "../network/network_content.h"
#include "../core/backup_type.hpp"
diff --git a/src/ai/ai_info.cpp b/src/ai/ai_info.cpp
index 8ee4d4499..ff5dca946 100644
--- a/src/ai/ai_info.cpp
+++ b/src/ai/ai_info.cpp
@@ -11,8 +11,6 @@
#include "../stdafx.h"
-#include <squirrel.h>
-#include "../script/squirrel.hpp"
#include "../script/squirrel_helper.hpp"
#include "ai_info.hpp"
#include "ai_scanner.hpp"
diff --git a/src/ai/ai_instance.cpp b/src/ai/ai_instance.cpp
index 0922405ce..80cc06a7f 100644
--- a/src/ai/ai_instance.cpp
+++ b/src/ai/ai_instance.cpp
@@ -14,9 +14,6 @@
#include "../saveload/saveload.h"
#include "../gui.h"
-#include <squirrel.h>
-#include "../script/squirrel.hpp"
-#include "../script/squirrel_helper.hpp"
#include "../script/squirrel_class.hpp"
#include "ai_config.hpp"
diff --git a/src/ai/ai_scanner.cpp b/src/ai/ai_scanner.cpp
index 7aea4a4cb..e6c2e87e7 100644
--- a/src/ai/ai_scanner.cpp
+++ b/src/ai/ai_scanner.cpp
@@ -15,9 +15,6 @@
#include "../network/network.h"
#include "../core/random_func.hpp"
-#include <squirrel.h>
-#include "../script/squirrel.hpp"
-#include "../script/squirrel_helper.hpp"
#include "../script/squirrel_class.hpp"
#include "ai_info.hpp"
#include "ai_scanner.hpp"
diff --git a/src/ai/api/ai_basestation.cpp b/src/ai/api/ai_basestation.cpp
index 137829cf8..30089609c 100644
--- a/src/ai/api/ai_basestation.cpp
+++ b/src/ai/api/ai_basestation.cpp
@@ -11,7 +11,6 @@
#include "ai_basestation.hpp"
#include "../../station_base.h"
-#include "../../command_func.h"
#include "../../string_func.h"
#include "../../strings_func.h"
#include "../../company_func.h"
diff --git a/src/ai/api/ai_gamesettings.cpp b/src/ai/api/ai_gamesettings.cpp
index 8f7c3eaef..7b3d6d01a 100644
--- a/src/ai/api/ai_gamesettings.cpp
+++ b/src/ai/api/ai_gamesettings.cpp
@@ -11,7 +11,6 @@
#include "ai_gamesettings.hpp"
#include "../../settings_internal.h"
-#include "../../economy_func.h"
/* static */ bool AIGameSettings::IsValid(const char *setting)
{
diff --git a/src/ai/api/ai_industrytype.cpp b/src/ai/api/ai_industrytype.cpp
index 0b6e00552..43bd43322 100644
--- a/src/ai/api/ai_industrytype.cpp
+++ b/src/ai/api/ai_industrytype.cpp
@@ -11,7 +11,6 @@
#include "ai_industrytype.hpp"
#include "ai_map.hpp"
-#include "../../command_type.h"
#include "../../strings_func.h"
#include "../../industry.h"
#include "../../newgrf_industries.h"
diff --git a/src/ai/api/ai_marine.cpp b/src/ai/api/ai_marine.cpp
index 3890d2108..b9e2b18de 100644
--- a/src/ai/api/ai_marine.cpp
+++ b/src/ai/api/ai_marine.cpp
@@ -13,7 +13,6 @@
#include "ai_station.hpp"
#include "../../station_base.h"
#include "../../tile_cmd.h"
-#include "../../economy_func.h"
/* static */ bool AIMarine::IsWaterDepotTile(TileIndex tile)
diff --git a/src/ai/api/ai_object.cpp b/src/ai/api/ai_object.cpp
index 02f9e734b..f00374954 100644
--- a/src/ai/api/ai_object.cpp
+++ b/src/ai/api/ai_object.cpp
@@ -10,7 +10,6 @@
/** @file ai_object.cpp Implementation of AIObject. */
#include "../../stdafx.h"
-#include <squirrel.h>
#include "../../script/squirrel.hpp"
#include "../../company_base.h"
diff --git a/src/ai/api/ai_rail.cpp b/src/ai/api/ai_rail.cpp
index e10cdb4df..45cc78a3a 100644
--- a/src/ai/api/ai_rail.cpp
+++ b/src/ai/api/ai_rail.cpp
@@ -13,14 +13,12 @@
#include "ai_map.hpp"
#include "ai_station.hpp"
#include "ai_industrytype.hpp"
-#include "../../command_type.h"
#include "../../debug.h"
#include "../../station_base.h"
#include "../../company_func.h"
#include "../../newgrf.h"
#include "../../newgrf_generic.h"
#include "../../newgrf_station.h"
-#include "../../economy_func.h"
/* static */ bool AIRail::IsRailTile(TileIndex tile)
{
diff --git a/src/ai/api/ai_road.cpp b/src/ai/api/ai_road.cpp
index b03efd8c9..7cfa2c1cd 100644
--- a/src/ai/api/ai_road.cpp
+++ b/src/ai/api/ai_road.cpp
@@ -13,7 +13,6 @@
#include "ai_station.hpp"
#include "ai_cargo.hpp"
#include "../../station_base.h"
-#include "../../command_type.h"
#include "../../company_func.h"
#include "../../script/squirrel_helper_type.hpp"
diff --git a/src/ai/api/ai_town.cpp b/src/ai/api/ai_town.cpp
index 37b9b84d6..05615e485 100644
--- a/src/ai/api/ai_town.cpp
+++ b/src/ai/api/ai_town.cpp
@@ -14,7 +14,6 @@
#include "ai_cargo.hpp"
#include "ai_error.hpp"
#include "../../town.h"
-#include "../../town_type.h"
#include "../../strings_func.h"
#include "../../company_func.h"
#include "../../station_base.h"
diff --git a/src/ai/api/ai_vehicle.cpp b/src/ai/api/ai_vehicle.cpp
index a816c73f1..e62cb585b 100644
--- a/src/ai/api/ai_vehicle.cpp
+++ b/src/ai/api/ai_vehicle.cpp
@@ -15,14 +15,12 @@
#include "ai_group.hpp"
#include "../ai_instance.hpp"
#include "../../company_func.h"
-#include "../../aircraft.h"
#include "../../string_func.h"
#include "../../strings_func.h"
#include "../../command_func.h"
#include "../../roadveh.h"
#include "../../train.h"
#include "../../vehicle_func.h"
-#include "../../engine_base.h"
#include "table/strings.h"
/* static */ bool AIVehicle::IsValidVehicle(VehicleID vehicle_id)
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index 511df3aeb..48c6f5fe1 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -14,7 +14,6 @@
#include "stdafx.h"
#include "aircraft.h"
-#include "debug.h"
#include "landscape.h"
#include "news_func.h"
#include "vehicle_gui.h"
@@ -30,18 +29,15 @@
#include "functions.h"
#include "cheat_type.h"
#include "company_base.h"
-#include "autoreplace_gui.h"
#include "ai/ai.hpp"
#include "company_func.h"
#include "effectvehicle_func.h"
#include "station_base.h"
#include "engine_base.h"
-#include "engine_func.h"
#include "core/random_func.hpp"
#include "core/backup_type.hpp"
#include "table/strings.h"
-#include "table/sprites.h"
void Aircraft::UpdateDeltaXY(Direction direction)
{
diff --git a/src/aircraft_gui.cpp b/src/aircraft_gui.cpp
index 35d0b9104..08c9f8a88 100644
--- a/src/aircraft_gui.cpp
+++ b/src/aircraft_gui.cpp
@@ -18,7 +18,6 @@
#include "window_gui.h"
#include "spritecache.h"
-#include "table/sprites.h"
#include "table/strings.h"
/**
diff --git a/src/airport.cpp b/src/airport.cpp
index 9ba518375..165a33017 100644
--- a/src/airport.cpp
+++ b/src/airport.cpp
@@ -10,13 +10,6 @@
/** @file airport.cpp Functions related to airports. */
#include "stdafx.h"
-#include "debug.h"
-#include "airport.h"
-#include "map_type.h"
-#include "core/alloc_func.hpp"
-#include "date_func.h"
-#include "settings_type.h"
-#include "newgrf_airport.h"
#include "station_base.h"
#include "table/strings.h"
#include "table/airport_movement.h"
diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp
index 95250a7c3..c518a63b7 100644
--- a/src/airport_gui.cpp
+++ b/src/airport_gui.cpp
@@ -13,12 +13,10 @@
#include "window_gui.h"
#include "station_gui.h"
#include "terraform_gui.h"
-#include "airport.h"
#include "sound_func.h"
#include "window_func.h"
#include "strings_func.h"
#include "viewport_func.h"
-#include "gfx_func.h"
#include "company_func.h"
#include "tilehighlight_func.h"
#include "company_base.h"
@@ -30,7 +28,6 @@
#include "hotkeys.h"
#include "sprite.h"
-#include "table/sprites.h"
#include "table/strings.h"
static AirportClassID _selected_airport_class; ///< the currently visible airport class
diff --git a/src/articulated_vehicles.cpp b/src/articulated_vehicles.cpp
index 40581143a..a8c9b9f3a 100644
--- a/src/articulated_vehicles.cpp
+++ b/src/articulated_vehicles.cpp
@@ -12,9 +12,7 @@
#include "stdafx.h"
#include "train.h"
#include "roadveh.h"
-#include "newgrf_engine.h"
#include "vehicle_func.h"
-#include "engine_base.h"
#include "engine_func.h"
#include "table/strings.h"
diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp
index 6341c7b1b..17860e8bf 100644
--- a/src/autoreplace_cmd.cpp
+++ b/src/autoreplace_cmd.cpp
@@ -12,9 +12,7 @@
#include "stdafx.h"
#include "company_func.h"
#include "train.h"
-#include "rail.h"
#include "command_func.h"
-#include "engine_base.h"
#include "engine_func.h"
#include "vehicle_func.h"
#include "functions.h"
diff --git a/src/bridge_gui.cpp b/src/bridge_gui.cpp
index 1bc23a327..4b55a0e4b 100644
--- a/src/bridge_gui.cpp
+++ b/src/bridge_gui.cpp
@@ -12,7 +12,6 @@
#include "stdafx.h"
#include "gui.h"
#include "command_func.h"
-#include "economy_func.h"
#include "bridge.h"
#include "rail.h"
#include "strings_func.h"
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp
index a743c987e..7c953a5ab 100644
--- a/src/build_vehicle_gui.cpp
+++ b/src/build_vehicle_gui.cpp
@@ -29,7 +29,6 @@
#include "engine_gui.h"
#include "cargotype.h"
-#include "table/sprites.h"
#include "table/strings.h"
/**
diff --git a/src/command.cpp b/src/command.cpp
index 7aaaaf343..08ece97e5 100644
--- a/src/command.cpp
+++ b/src/command.cpp
@@ -23,7 +23,6 @@
#include "functions.h"
#include "town.h"
#include "date_func.h"
-#include "debug.h"
#include "company_func.h"
#include "company_base.h"
#include "signal_func.h"
diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp
index 2e0917d50..77a888876 100644
--- a/src/company_cmd.cpp
+++ b/src/company_cmd.cpp
@@ -25,7 +25,6 @@
#include "company_manager_face.h"
#include "window_func.h"
#include "strings_func.h"
-#include "gfx_func.h"
#include "date_func.h"
#include "sound_func.h"
#include "rail.h"
diff --git a/src/company_gui.cpp b/src/company_gui.cpp
index ea1785c39..273dea524 100644
--- a/src/company_gui.cpp
+++ b/src/company_gui.cpp
@@ -19,7 +19,6 @@
#include "network/network.h"
#include "network/network_gui.h"
#include "network/network_func.h"
-#include "economy_func.h"
#include "vehicle_func.h"
#include "newgrf.h"
#include "company_manager_face.h"
@@ -30,7 +29,8 @@
#include "sprite.h"
#include "company_base.h"
#include "core/geometry_func.hpp"
-#include "object.h"
+#include "economy_func.h"
+#include "object_type.h"
#include "table/strings.h"
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp
index 1c276ffb5..c047340dd 100644
--- a/src/console_cmds.cpp
+++ b/src/console_cmds.cpp
@@ -30,7 +30,6 @@
#include "date_func.h"
#include "vehicle_func.h"
#include "company_func.h"
-#include "company_base.h"
#include "gamelog.h"
#include "ai/ai.hpp"
#include "ai/ai_config.hpp"
diff --git a/src/date.cpp b/src/date.cpp
index 4b8111b6a..d8d2cc5ef 100644
--- a/src/date.cpp
+++ b/src/date.cpp
@@ -17,7 +17,6 @@
#include "settings_type.h"
#include "date_func.h"
#include "vehicle_base.h"
-#include "debug.h"
#include "rail_gui.h"
#include "saveload/saveload.h"
diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp
index 22b70ccd7..b48001694 100644
--- a/src/depot_gui.cpp
+++ b/src/depot_gui.cpp
@@ -10,7 +10,6 @@
/** @file depot_gui.cpp The GUI for depots. */
#include "stdafx.h"
-#include "engine_base.h"
#include "train.h"
#include "ship.h"
#include "aircraft.h"
@@ -21,7 +20,6 @@
#include "command_func.h"
#include "depot_base.h"
#include "vehicle_gui.h"
-#include "newgrf_engine.h"
#include "spritecache.h"
#include "strings_func.h"
#include "window_func.h"
@@ -33,7 +31,6 @@
#include "order_backup.h"
#include "table/strings.h"
-#include "table/sprites.h"
/*
* Since all depot window sizes aren't the same, we need to modify sizes a little.
diff --git a/src/disaster_cmd.cpp b/src/disaster_cmd.cpp
index 803a09854..7e86c0db3 100644
--- a/src/disaster_cmd.cpp
+++ b/src/disaster_cmd.cpp
@@ -25,7 +25,6 @@
#include "stdafx.h"
-#include "landscape.h"
#include "industry.h"
#include "station_base.h"
@@ -46,7 +45,6 @@
#include "core/backup_type.hpp"
#include "table/strings.h"
-#include "table/sprites.h"
/** Delay counter for considering the next disaster. */
uint16 _disaster_delay;
diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp
index 88d3ebcb8..069fd3bbb 100644
--- a/src/dock_gui.cpp
+++ b/src/dock_gui.cpp
@@ -11,7 +11,6 @@
#include "stdafx.h"
#include "openttd.h"
-#include "tile_map.h"
#include "terraform_gui.h"
#include "window_gui.h"
#include "station_gui.h"
diff --git a/src/economy.cpp b/src/economy.cpp
index 69de8c089..628970b39 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -22,7 +22,6 @@
#include "aircraft.h"
#include "train.h"
#include "newgrf_cargo.h"
-#include "newgrf_engine.h"
#include "newgrf_sound.h"
#include "newgrf_industries.h"
#include "newgrf_industrytiles.h"
@@ -46,11 +45,9 @@
#include "economy_base.h"
#include "core/pool_func.hpp"
#include "newgrf.h"
-#include "engine_base.h"
#include "core/backup_type.hpp"
#include "table/strings.h"
-#include "table/sprites.h"
#include "table/pricebase.h"
diff --git a/src/elrail.cpp b/src/elrail.cpp
index 9137efc63..5457ca0b2 100644
--- a/src/elrail.cpp
+++ b/src/elrail.cpp
@@ -57,18 +57,14 @@
#include "stdafx.h"
#include "station_map.h"
#include "viewport_func.h"
-#include "landscape.h"
#include "train.h"
#include "rail_gui.h"
#include "tunnelbridge_map.h"
#include "tunnelbridge.h"
#include "elrail_func.h"
-#include "engine_base.h"
#include "company_base.h"
-#include "rail.h"
#include "newgrf_railtype.h"
-#include "table/sprites.h"
#include "table/elrail_data.h"
static inline TLG GetTLG(TileIndex t)
diff --git a/src/fios.cpp b/src/fios.cpp
index aa2629894..a528d5e27 100644
--- a/src/fios.cpp
+++ b/src/fios.cpp
@@ -14,7 +14,6 @@
#include "stdafx.h"
#include "openttd.h"
-#include "core/sort_func.hpp"
#include "fios.h"
#include "fileio_func.h"
#include "tar_type.h"
diff --git a/src/fios.h b/src/fios.h
index 89fa870ab..1a1d9cdf8 100644
--- a/src/fios.h
+++ b/src/fios.h
@@ -12,13 +12,7 @@
#ifndef FIOS_H
#define FIOS_H
-#include "strings_type.h"
-#include "core/smallvec_type.hpp"
-#include "core/smallmap_type.hpp"
-#include "core/enum_type.hpp"
#include "gfx_type.h"
-#include "date_type.h"
-#include "settings_type.h"
#include "company_base.h"
#include "newgrf_config.h"
diff --git a/src/gamelog.cpp b/src/gamelog.cpp
index 6e98be1e4..54fd44b2e 100644
--- a/src/gamelog.cpp
+++ b/src/gamelog.cpp
@@ -12,7 +12,6 @@
#include "stdafx.h"
#include "openttd.h"
#include "saveload/saveload.h"
-#include "core/alloc_func.hpp"
#include "string_func.h"
#include "settings_type.h"
#include "gamelog_internal.h"
diff --git a/src/genworld.cpp b/src/genworld.cpp
index 0e920af8b..7867a3428 100644
--- a/src/genworld.cpp
+++ b/src/genworld.cpp
@@ -14,7 +14,6 @@
#include "landscape.h"
#include "company_func.h"
#include "thread/thread.h"
-#include "command_func.h"
#include "genworld.h"
#include "gfxinit.h"
#include "window_func.h"
diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp
index a8232b307..d0010b121 100644
--- a/src/genworld_gui.cpp
+++ b/src/genworld_gui.cpp
@@ -15,7 +15,6 @@
#include "debug.h"
#include "genworld.h"
#include "network/network.h"
-#include "newgrf_config.h"
#include "strings_func.h"
#include "window_func.h"
#include "date_func.h"
diff --git a/src/gfx.cpp b/src/gfx.cpp
index 75fca70d1..51778a70c 100644
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -18,7 +18,6 @@
#include "video/video_driver.hpp"
#include "strings_func.h"
#include "settings_type.h"
-#include "landscape_type.h"
#include "network/network.h"
#include "network/network_func.h"
#include "thread/thread.h"
diff --git a/src/gfxinit.cpp b/src/gfxinit.cpp
index 7cfb6eddf..ae4eec92e 100644
--- a/src/gfxinit.cpp
+++ b/src/gfxinit.cpp
@@ -15,7 +15,6 @@
#include "3rdparty/md5/md5.h"
#include "fontcache.h"
#include "gfx_func.h"
-#include "settings_type.h"
/* The type of set we're replacing */
#define SET_TYPE "graphics"
diff --git a/src/ground_vehicle.cpp b/src/ground_vehicle.cpp
index 0ea7cef8b..b3f200200 100644
--- a/src/ground_vehicle.cpp
+++ b/src/ground_vehicle.cpp
@@ -12,8 +12,6 @@
#include "stdafx.h"
#include "train.h"
#include "roadveh.h"
-#include "ground_vehicle.hpp"
-#include "window_type.h"
#include "vehicle_gui.h"
#include "window_func.h"
diff --git a/src/group_cmd.cpp b/src/group_cmd.cpp
index d10c24f9d..9b954d6b4 100644
--- a/src/group_cmd.cpp
+++ b/src/group_cmd.cpp
@@ -14,7 +14,6 @@
#include "command_func.h"
#include "group.h"
#include "train.h"
-#include "engine_base.h"
#include "vehicle_gui.h"
#include "window_func.h"
#include "vehicle_func.h"
diff --git a/src/group_gui.cpp b/src/group_gui.cpp
index ba08bb301..e919ef6f6 100644
--- a/src/group_gui.cpp
+++ b/src/group_gui.cpp
@@ -21,7 +21,6 @@
#include "vehicle_func.h"
#include "autoreplace_gui.h"
#include "company_func.h"
-#include "widgets/dropdown_type.h"
#include "widgets/dropdown_func.h"
#include "tilehighlight_func.h"
#include "vehicle_gui_base.h"
diff --git a/src/hotkeys.cpp b/src/hotkeys.cpp
index df5635d3d..ae8d0a356 100644
--- a/src/hotkeys.cpp
+++ b/src/hotkeys.cpp
@@ -14,9 +14,7 @@
#include "hotkeys.h"
#include "ini_type.h"
#include "string_func.h"
-#include "gfx_type.h"
#include "window_gui.h"
-#include <string.h>
char *_hotkeys_file;
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index c0558427c..8aa4ef7d9 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -14,7 +14,6 @@
#include "industry.h"
#include "station_base.h"
#include "train.h"
-#include "landscape.h"
#include "viewport_func.h"
#include "command_func.h"
#include "town.h"
@@ -22,9 +21,7 @@
#include "cheat_type.h"
#include "genworld.h"
#include "tree_map.h"
-#include "newgrf.h"
#include "newgrf_cargo.h"
-#include "newgrf_commons.h"
#include "newgrf_debug.h"
#include "newgrf_industries.h"
#include "newgrf_industrytiles.h"
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index 996dda621..3720a7c5c 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -21,7 +21,6 @@
#include "industry.h"
#include "town.h"
#include "cheat_type.h"
-#include "newgrf.h"
#include "newgrf_industries.h"
#include "newgrf_text.h"
#include "newgrf_debug.h"
diff --git a/src/intro_gui.cpp b/src/intro_gui.cpp
index dc8befb75..9c0b6ce54 100644
--- a/src/intro_gui.cpp
+++ b/src/intro_gui.cpp
@@ -20,7 +20,6 @@
#include "network/network_content.h"
#include "landscape_type.h"
#include "strings_func.h"
-#include "window_func.h"
#include "fios.h"
#include "functions.h"
#include "ai/ai_gui.hpp"
diff --git a/src/map.cpp b/src/map.cpp
index 9c930d694..1e2761ad8 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -12,7 +12,6 @@
#include "stdafx.h"
#include "debug.h"
#include "core/alloc_func.hpp"
-#include "core/math_func.hpp"
#include "tile_map.h"
#if defined(_MSC_VER)
diff --git a/src/misc/binaryheap.hpp b/src/misc/binaryheap.hpp
index 9096474e8..f7aedfc0a 100644
--- a/src/misc/binaryheap.hpp
+++ b/src/misc/binaryheap.hpp
@@ -12,6 +12,8 @@
#ifndef BINARYHEAP_HPP
#define BINARYHEAP_HPP
+#include "../core/alloc_func.hpp"
+
/* Enable it if you suspect binary heap doesn't work well */
#define BINARYHEAP_CHECK 0
diff --git a/src/misc/hashtable.hpp b/src/misc/hashtable.hpp
index cafd6d7a9..9b1de9436 100644
--- a/src/misc/hashtable.hpp
+++ b/src/misc/hashtable.hpp
@@ -12,6 +12,8 @@
#ifndef HASHTABLE_HPP
#define HASHTABLE_HPP
+#include "../core/math_func.hpp"
+
template <class Titem_>
struct CHashTableSlotT
{
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp
index 422902265..bf9f79c10 100644
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -10,7 +10,6 @@
/** @file misc_gui.cpp GUIs for a number of misc windows. */
#include "stdafx.h"
-#include "openttd.h"
#include "debug.h"
#include "landscape.h"
#include "newgrf_text.h"
diff --git a/src/network/core/tcp_http.cpp b/src/network/core/tcp_http.cpp
index 6de5cb839..ac32d47da 100644
--- a/src/network/core/tcp_http.cpp
+++ b/src/network/core/tcp_http.cpp
@@ -18,7 +18,6 @@
#include "../../rev.h"
#include "../network_func.h"
-#include "tcp.h"
#include "tcp_http.h"
/** List of open HTTP connections. */
diff --git a/src/network/core/tcp_http.h b/src/network/core/tcp_http.h
index 2173ae2ea..f684e0156 100644
--- a/src/network/core/tcp_http.h
+++ b/src/network/core/tcp_http.h
@@ -14,7 +14,7 @@
#ifndef NETWORK_CORE_TCP_HTTP_H
#define NETWORK_CORE_TCP_HTTP_H
-#include "address.h"
+#include "tcp.h"
#ifdef ENABLE_NETWORK
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index 608ceddc5..ee110152d 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -26,7 +26,6 @@
#include "../widgets/dropdown_func.h"
#include "../querystring_gui.h"
#include "../sortlist_type.h"
-#include "../company_base.h"
#include "../company_func.h"
#include "../core/geometry_func.hpp"
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 34b2fd98b..d6babd6cf 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -29,23 +29,19 @@
#include "newgrf_house.h"
#include "newgrf_sound.h"
#include "newgrf_station.h"
-#include "industry.h"
+#include "industrytype.h"
#include "newgrf_canal.h"
-#include "newgrf_commons.h"
#include "newgrf_townname.h"
#include "newgrf_industries.h"
#include "newgrf_airporttiles.h"
#include "newgrf_airport.h"
#include "rev.h"
#include "fios.h"
-#include "rail.h"
#include "strings_func.h"
#include "date_func.h"
#include "string_func.h"
#include "network/network.h"
#include <map>
-#include "core/alloc_type.hpp"
-#include "core/mem_func.hpp"
#include "smallmap_gui.h"
#include "genworld.h"
#include "gui.h"
diff --git a/src/newgrf_airport.cpp b/src/newgrf_airport.cpp
index 836b962bd..6a3b0b0ba 100644
--- a/src/newgrf_airport.cpp
+++ b/src/newgrf_airport.cpp
@@ -11,17 +11,11 @@
#include "stdafx.h"
#include "debug.h"
-#include "airport.h"
-#include "newgrf_airport.h"
#include "date_func.h"
-#include "settings_type.h"
-#include "core/alloc_type.hpp"
#include "newgrf.h"
-#include "newgrf_commons.h"
#include "newgrf_spritegroup.h"
#include "newgrf_text.h"
#include "station_base.h"
-#include "table/strings.h"
#include "newgrf_class_func.h"
/**
diff --git a/src/newgrf_airport.h b/src/newgrf_airport.h
index b15a4c75a..d08dfd4ec 100644
--- a/src/newgrf_airport.h
+++ b/src/newgrf_airport.h
@@ -12,6 +12,7 @@
#ifndef NEWGRF_AIRPORT_H
#define NEWGRF_AIRPORT_H
+#include "airport.h"
#include "date_type.h"
#include "map_type.h"
#include "newgrf_class.h"
diff --git a/src/newgrf_airporttiles.cpp b/src/newgrf_airporttiles.cpp
index 86de69a8b..97eecc1b9 100644
--- a/src/newgrf_airporttiles.cpp
+++ b/src/newgrf_airporttiles.cpp
@@ -11,23 +11,18 @@
#include "stdafx.h"
#include "debug.h"
-#include "airport.h"
#include "newgrf.h"
#include "newgrf_airporttiles.h"
#include "newgrf_spritegroup.h"
#include "newgrf_sound.h"
-#include "animated_tile_func.h"
#include "station_base.h"
#include "water.h"
#include "viewport_func.h"
#include "landscape.h"
#include "company_base.h"
#include "town.h"
-#include "functions.h"
-#include "core/random_func.hpp"
#include "table/strings.h"
#include "table/airporttiles.h"
-#include "date_func.h"
#include "newgrf_animation_base.h"
diff --git a/src/newgrf_animation_base.h b/src/newgrf_animation_base.h
index ee60f48f8..26f0d67b7 100644
--- a/src/newgrf_animation_base.h
+++ b/src/newgrf_animation_base.h
@@ -11,6 +11,13 @@
/* No inclusion guards as this file must only be included from .cpp files. */
+#include "animated_tile_func.h"
+#include "core/random_func.hpp"
+#include "date_func.h"
+#include "functions.h"
+#include "newgrf_animation_type.h"
+#include "newgrf_callbacks.h"
+
/**
* Helper class for a unified approach to NewGRF animation.
* @tparam Tbase Instantiation of this class.
diff --git a/src/newgrf_canal.cpp b/src/newgrf_canal.cpp
index 500e93ae0..7e139392d 100644
--- a/src/newgrf_canal.cpp
+++ b/src/newgrf_canal.cpp
@@ -11,7 +11,6 @@
#include "stdafx.h"
#include "debug.h"
-#include "newgrf_commons.h"
#include "newgrf_spritegroup.h"
#include "newgrf_canal.h"
#include "water_map.h"
diff --git a/src/newgrf_class_func.h b/src/newgrf_class_func.h
index bd83376f7..cfbec6073 100644
--- a/src/newgrf_class_func.h
+++ b/src/newgrf_class_func.h
@@ -9,8 +9,6 @@
/** @file newgrf_class_func.h Implementation of the NewGRF class' functions. */
-#include "stdafx.h"
-#include "core/alloc_func.hpp"
#include "newgrf_class.h"
#include "table/strings.h"
diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp
index a3e70b783..952224f3d 100644
--- a/src/newgrf_commons.cpp
+++ b/src/newgrf_commons.cpp
@@ -17,7 +17,6 @@
#include "house.h"
#include "industrytype.h"
#include "newgrf.h"
-#include "newgrf_commons.h"
#include "clear_map.h"
#include "station_map.h"
#include "tree_map.h"
diff --git a/src/newgrf_commons.h b/src/newgrf_commons.h
index 2771926d9..83a790490 100644
--- a/src/newgrf_commons.h
+++ b/src/newgrf_commons.h
@@ -15,7 +15,7 @@
#ifndef NEWGRF_COMMONS_H
#define NEWGRF_COMMONS_H
-#include "tile_cmd.h"
+#include "tile_type.h"
/** Contextx for tile accesses */
enum TileContext {
diff --git a/src/newgrf_config.cpp b/src/newgrf_config.cpp
index 2d2e6f856..49668d401 100644
--- a/src/newgrf_config.cpp
+++ b/src/newgrf_config.cpp
@@ -13,7 +13,6 @@
#include "debug.h"
#include "3rdparty/md5/md5.h"
#include "newgrf.h"
-#include "gamelog.h"
#include "network/network_func.h"
#include "gfx_func.h"
#include "newgrf_text.h"
diff --git a/src/newgrf_debug_gui.cpp b/src/newgrf_debug_gui.cpp
index 74d3c5f85..aba4d93bf 100644
--- a/src/newgrf_debug_gui.cpp
+++ b/src/newgrf_debug_gui.cpp
@@ -14,17 +14,13 @@
#include "window_gui.h"
#include "window_func.h"
#include "fileio_func.h"
-#include "gfx_func.h"
#include "spritecache.h"
#include "string_func.h"
#include "strings_func.h"
#include "textbuf_gui.h"
-#include "tunnelbridge_map.h"
#include "engine_base.h"
-#include "house.h"
#include "industry.h"
-#include "rail.h"
#include "station_base.h"
#include "town.h"
#include "vehicle_base.h"
diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp
index 16aa5dce0..4cf9aae96 100644
--- a/src/newgrf_engine.cpp
+++ b/src/newgrf_engine.cpp
@@ -16,15 +16,12 @@
#include "company_func.h"
#include "newgrf.h"
#include "newgrf_cargo.h"
-#include "newgrf_engine.h"
#include "newgrf_spritegroup.h"
#include "date_func.h"
#include "vehicle_func.h"
#include "core/random_func.hpp"
#include "aircraft.h"
-#include "core/smallmap_type.hpp"
#include "station_base.h"
-#include "engine_base.h"
#include "company_base.h"
#include "newgrf_railtype.h"
diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp
index da4980b95..d9362121b 100644
--- a/src/newgrf_house.cpp
+++ b/src/newgrf_house.cpp
@@ -18,16 +18,11 @@
#include "newgrf_spritegroup.h"
#include "newgrf_town.h"
#include "newgrf_sound.h"
-#include "newgrf_commons.h"
-#include "functions.h"
#include "company_func.h"
-#include "animated_tile_func.h"
#include "company_base.h"
#include "town.h"
-#include "core/random_func.hpp"
#include "sprite.h"
#include "genworld.h"
-#include "date_func.h"
#include "newgrf_animation_base.h"
static BuildingCounts<uint32> _building_counts;
diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp
index dfdf1019a..f96b7a9cc 100644
--- a/src/newgrf_industries.cpp
+++ b/src/newgrf_industries.cpp
@@ -14,7 +14,6 @@
#include "industry.h"
#include "newgrf.h"
#include "newgrf_industries.h"
-#include "newgrf_commons.h"
#include "newgrf_text.h"
#include "newgrf_town.h"
#include "newgrf_cargo.h"
diff --git a/src/newgrf_industries.h b/src/newgrf_industries.h
index 3d90d65bb..4e293e325 100644
--- a/src/newgrf_industries.h
+++ b/src/newgrf_industries.h
@@ -13,6 +13,7 @@
#define NEWGRF_INDUSTRIES_H
#include "command_type.h"
+#include "company_type.h"
#include "newgrf_spritegroup.h"
/** When should the industry(tile) be triggered for random bits? */
diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp
index c088a4ea2..24deef5a4 100644
--- a/src/newgrf_industrytiles.cpp
+++ b/src/newgrf_industrytiles.cpp
@@ -14,19 +14,15 @@
#include "viewport_func.h"
#include "landscape.h"
#include "newgrf.h"
-#include "newgrf_commons.h"
#include "newgrf_industries.h"
#include "newgrf_industrytiles.h"
#include "newgrf_sound.h"
#include "newgrf_text.h"
#include "industry.h"
-#include "functions.h"
#include "town.h"
#include "command_func.h"
-#include "animated_tile_func.h"
#include "water.h"
#include "sprite.h"
-#include "date_func.h"
#include "newgrf_animation_base.h"
#include "table/strings.h"
diff --git a/src/newgrf_railtype.cpp b/src/newgrf_railtype.cpp
index 79d83b2d5..c11c01117 100644
--- a/src/newgrf_railtype.cpp
+++ b/src/newgrf_railtype.cpp
@@ -10,20 +10,11 @@
/** @file newgrf_railtype.cpp NewGRF handling of rail types. */
#include "stdafx.h"
-#include "openttd.h"
#include "debug.h"
-#include "strings_type.h"
-#include "rail.h"
-#include "road_map.h"
#include "newgrf.h"
-#include "newgrf_callbacks.h"
-#include "newgrf_commons.h"
-#include "newgrf_railtype.h"
#include "newgrf_spritegroup.h"
-#include "core/bitmath_func.hpp"
#include "date_func.h"
#include "depot_base.h"
-#include "rail_map.h"
static uint32 RailTypeGetRandomBits(const ResolverObject *object)
{
diff --git a/src/newgrf_spritegroup.cpp b/src/newgrf_spritegroup.cpp
index 6eb136598..116c58ff4 100644
--- a/src/newgrf_spritegroup.cpp
+++ b/src/newgrf_spritegroup.cpp
@@ -13,7 +13,6 @@
#include "newgrf.h"
#include "newgrf_spritegroup.h"
#include "sprite.h"
-#include "core/bitmath_func.hpp"
#include "core/pool_func.hpp"
SpriteGroupPool _spritegroup_pool("SpriteGroup");
diff --git a/src/newgrf_spritegroup.h b/src/newgrf_spritegroup.h
index d61917acf..b9393dc2e 100644
--- a/src/newgrf_spritegroup.h
+++ b/src/newgrf_spritegroup.h
@@ -15,7 +15,6 @@
#include "town_type.h"
#include "gfx_type.h"
#include "engine_type.h"
-#include "tile_type.h"
#include "core/pool_type.hpp"
#include "house_type.h"
diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp
index 6def19a8b..fd443fe86 100644
--- a/src/newgrf_station.cpp
+++ b/src/newgrf_station.cpp
@@ -15,24 +15,18 @@
#include "waypoint_base.h"
#include "roadstop_base.h"
#include "newgrf_cargo.h"
-#include "newgrf_commons.h"
#include "newgrf_station.h"
#include "newgrf_spritegroup.h"
#include "newgrf_sound.h"
#include "newgrf_railtype.h"
#include "town.h"
#include "newgrf_town.h"
-#include "date_func.h"
#include "company_func.h"
-#include "animated_tile_func.h"
-#include "functions.h"
#include "tunnelbridge_map.h"
#include "newgrf.h"
-#include "core/random_func.hpp"
#include "newgrf_animation_base.h"
#include "newgrf_class_func.h"
-#include "table/strings.h"
template <typename Tspec, typename Tid, Tid Tmax>
/* static */ void NewGRFClass<Tspec, Tid, Tmax>::InsertDefaults()
diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp
index 571395798..0385b28a9 100644
--- a/src/object_cmd.cpp
+++ b/src/object_cmd.cpp
@@ -18,10 +18,8 @@
#include "bridge_map.h"
#include "genworld.h"
#include "autoslope.h"
-#include "transparency.h"
#include "functions.h"
#include "window_func.h"
-#include "vehicle_func.h"
#include "company_gui.h"
#include "cheat_type.h"
#include "landscape_type.h"
@@ -35,7 +33,6 @@
#include "date_func.h"
#include "table/strings.h"
-#include "table/sprites.h"
#include "table/object_land.h"
ObjectPool _object_pool("Object");
diff --git a/src/object_map.h b/src/object_map.h
index 06485d8ff..e08e36ee6 100644
--- a/src/object_map.h
+++ b/src/object_map.h
@@ -12,7 +12,6 @@
#ifndef OBJECT_MAP_H
#define OBJECT_MAP_H
-#include "tile_map.h"
#include "water_map.h"
#include "object_type.h"
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 48b978a75..d02c0f1e1 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -23,7 +23,6 @@
#include "base_media_base.h"
#include "saveload/saveload.h"
-#include "landscape.h"
#include "company_func.h"
#include "command_func.h"
#include "news_func.h"
@@ -55,15 +54,12 @@
#include "thread/thread.h"
#include "station_base.h"
#include "crashlog.h"
-#include "company_base.h"
-#include "engine_base.h"
#include "engine_func.h"
#include "core/random_func.hpp"
#include "rail_gui.h"
#include "core/backup_type.hpp"
#include "hotkeys.h"
-#include "newgrf_commons.h"
#include "town.h"
#include "industry.h"
diff --git a/src/order_backup.cpp b/src/order_backup.cpp
index 162b472a2..25ee0045f 100644
--- a/src/order_backup.cpp
+++ b/src/order_backup.cpp
@@ -15,9 +15,7 @@
#include "network/network.h"
#include "network/network_func.h"
#include "order_backup.h"
-#include "order_base.h"
#include "vehicle_base.h"
-#include "settings_type.h"
OrderBackupPool _order_backup_pool("BackupOrder");
INSTANTIATE_POOL_METHODS(OrderBackup)
diff --git a/src/order_backup.h b/src/order_backup.h
index 81d485eb7..3e87b99d9 100644
--- a/src/order_backup.h
+++ b/src/order_backup.h
@@ -13,11 +13,11 @@
#define ORDER_BACKUP_H
#include "core/pool_type.hpp"
+#include "date_type.h"
+#include "group_type.h"
#include "order_type.h"
-#include "vehicle_type.h"
#include "tile_type.h"
-#include "group_type.h"
-#include "company_type.h"
+#include "vehicle_type.h"
/** Unique identifier for an order backup. */
typedef uint8 OrderBackupID;
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index 21cf68573..ea19baf10 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -12,11 +12,10 @@
#include "stdafx.h"
#include "command_func.h"
#include "viewport_func.h"
-#include "depot_base.h"
+#include "depot_map.h"
#include "vehicle_gui.h"
#include "roadveh.h"
#include "timetable.h"
-#include "cargotype.h"
#include "strings_func.h"
#include "window_func.h"
#include "vehicle_func.h"
@@ -31,7 +30,6 @@
#include "core/geometry_func.hpp"
#include "hotkeys.h"
-#include "table/sprites.h"
#include "table/strings.h"
/** Widget numbers of the order window. */
diff --git a/src/pathfinder/npf/npf.cpp b/src/pathfinder/npf/npf.cpp
index f03b2d9af..42a09a3f2 100644
--- a/src/pathfinder/npf/npf.cpp
+++ b/src/pathfinder/npf/npf.cpp
@@ -11,7 +11,6 @@
#include "../../stdafx.h"
#include "../../debug.h"
-#include "../../landscape.h"
#include "../../network/network.h"
#include "../../functions.h"
#include "../../ship.h"
diff --git a/src/pathfinder/yapf/yapf.h b/src/pathfinder/yapf/yapf.h
index e5615f782..f01f22e0c 100644
--- a/src/pathfinder/yapf/yapf.h
+++ b/src/pathfinder/yapf/yapf.h
@@ -13,7 +13,6 @@
#define YAPF_H
#include "../../direction_type.h"
-#include "../../station_type.h"
#include "../../track_type.h"
#include "../../vehicle_type.h"
#include "../pathfinder_type.h"
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index a2dcf650d..59f52c524 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -11,17 +11,12 @@
#include "stdafx.h"
#include "cmd_helper.h"
-#include "landscape.h"
#include "viewport_func.h"
#include "command_func.h"
-#include "engine_base.h"
#include "depot_base.h"
#include "pathfinder/yapf/yapf_cache.h"
-#include "newgrf_engine.h"
-#include "landscape_type.h"
#include "newgrf_debug.h"
#include "newgrf_railtype.h"
-#include "newgrf_commons.h"
#include "train.h"
#include "autoslope.h"
#include "water.h"
@@ -39,7 +34,6 @@
#include "date_func.h"
#include "table/strings.h"
-#include "table/sprites.h"
#include "table/railtypes.h"
#include "table/track_land.h"
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp
index 554362ad4..78301c0e2 100644
--- a/src/rail_gui.cpp
+++ b/src/rail_gui.cpp
@@ -35,7 +35,6 @@
#include "station_map.h"
#include "tunnelbridge_map.h"
-#include "table/sprites.h"
#include "table/strings.h"
static RailType _cur_railtype; ///< Rail type of the current build-rail toolbar.
diff --git a/src/rail_gui.h b/src/rail_gui.h
index fc9a7d48e..0c69ac23d 100644
--- a/src/rail_gui.h
+++ b/src/rail_gui.h
@@ -14,7 +14,7 @@
#include "rail_type.h"
-Window *ShowBuildRailToolbar(RailType railtype);
+struct Window *ShowBuildRailToolbar(RailType railtype);
void ReinitGuiAfterToggleElrail(bool disable);
bool ResetSignalVariant(int32 = 0);
void InitializeRailGUI();
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp
index 112239a0d..54dc7dd6b 100644
--- a/src/road_cmd.cpp
+++ b/src/road_cmd.cpp
@@ -12,7 +12,6 @@
#include "stdafx.h"
#include "cmd_helper.h"
#include "road_internal.h"
-#include "landscape.h"
#include "viewport_func.h"
#include "command_func.h"
#include "pathfinder/yapf/yapf_cache.h"
diff --git a/src/road_gui.cpp b/src/road_gui.cpp
index 7ff00def7..7fc5152fa 100644
--- a/src/road_gui.cpp
+++ b/src/road_gui.cpp
@@ -17,7 +17,6 @@
#include "viewport_func.h"
#include "command_func.h"
#include "road_cmd.h"
-#include "road_map.h"
#include "station_func.h"
#include "functions.h"
#include "window_func.h"
@@ -30,7 +29,6 @@
#include "company_base.h"
#include "hotkeys.h"
-#include "table/sprites.h"
#include "table/strings.h"
static void ShowRVStationPicker(Window *parent, RoadStopType rs);
diff --git a/src/road_gui.h b/src/road_gui.h
index 8bf38a7ed..929610dde 100644
--- a/src/road_gui.h
+++ b/src/road_gui.h
@@ -14,7 +14,7 @@
#include "road_type.h"
-Window *ShowBuildRoadToolbar(RoadType roadtype);
-Window *ShowBuildRoadScenToolbar();
+struct Window *ShowBuildRoadToolbar(RoadType roadtype);
+struct Window *ShowBuildRoadScenToolbar();
#endif /* ROAD_GUI_H */
diff --git a/src/roadstop.cpp b/src/roadstop.cpp
index 6b8c921c1..3e9e6ac93 100644
--- a/src/roadstop.cpp
+++ b/src/roadstop.cpp
@@ -15,7 +15,6 @@
#include "roadstop_base.h"
#include "station_base.h"
#include "vehicle_func.h"
-#include "landscape.h"
RoadStopPool _roadstop_pool("RoadStop");
INSTANTIATE_POOL_METHODS(RoadStop)
diff --git a/src/roadveh.h b/src/roadveh.h
index c74557556..85db80ccf 100644
--- a/src/roadveh.h
+++ b/src/roadveh.h
@@ -12,11 +12,11 @@
#ifndef ROADVEH_H
#define ROADVEH_H
-#include "road_type.h"
#include "ground_vehicle.hpp"
#include "engine_base.h"
#include "cargotype.h"
-#include "road_map.h"
+#include "track_func.h"
+#include "road_type.h"
struct RoadVehicle;
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index bc8786850..3aca512fd 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -10,7 +10,6 @@
/** @file roadveh_cmd.cpp Handling of road vehicles. */
#include "stdafx.h"
-#include "landscape.h"
#include "roadveh.h"
#include "command_func.h"
#include "news_func.h"
@@ -29,22 +28,17 @@
#include "date_func.h"
#include "vehicle_func.h"
#include "sound_func.h"
-#include "autoreplace_gui.h"
#include "ai/ai.hpp"
#include "depot_map.h"
#include "effectvehicle_func.h"
#include "effectvehicle_base.h"
#include "roadstop_base.h"
-#include "cargotype.h"
#include "spritecache.h"
#include "core/random_func.hpp"
-#include "engine_base.h"
#include "company_base.h"
-#include "engine_func.h"
#include "core/backup_type.hpp"
#include "table/strings.h"
-#include "table/sprites.h"
static const uint16 _roadveh_images[63] = {
0xCD4, 0xCDC, 0xCE4, 0xCEC, 0xCF4, 0xCFC, 0xD0C, 0xD14,
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index 95b86f4d6..b706fed60 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -22,7 +22,6 @@
#include "../industry.h"
#include "../clear_map.h"
#include "../vehicle_func.h"
-#include "../debug.h"
#include "../string_func.h"
#include "../date_func.h"
#include "../roadveh.h"
@@ -31,7 +30,6 @@
#include "../waypoint_base.h"
#include "../roadstop_base.h"
#include "../tunnelbridge_map.h"
-#include "../landscape.h"
#include "../pathfinder/yapf/yapf_cache.h"
#include "../elrail_func.h"
#include "../signs_func.h"
@@ -48,9 +46,7 @@
#include "../animated_tile_func.h"
#include "../subsidy_base.h"
#include "../subsidy_func.h"
-#include "../company_base.h"
#include "../newgrf.h"
-#include "../engine_base.h"
#include "../engine_func.h"
#include "../rail_gui.h"
#include "../core/backup_type.hpp"
diff --git a/src/saveload/company_sl.cpp b/src/saveload/company_sl.cpp
index 917f29335..b238ad818 100644
--- a/src/saveload/company_sl.cpp
+++ b/src/saveload/company_sl.cpp
@@ -10,7 +10,6 @@
/** @file company_sl.cpp Code handling saving and loading of company data */
#include "../stdafx.h"
-#include "../company_base.h"
#include "../company_func.h"
#include "../company_manager_face.h"
#include "../fios.h"
diff --git a/src/saveload/gamelog_sl.cpp b/src/saveload/gamelog_sl.cpp
index e6067c37e..0218a5a20 100644
--- a/src/saveload/gamelog_sl.cpp
+++ b/src/saveload/gamelog_sl.cpp
@@ -11,7 +11,6 @@
#include "../stdafx.h"
#include "../gamelog_internal.h"
-#include "../core/alloc_func.hpp"
#include "saveload.h"
diff --git a/src/saveload/map_sl.cpp b/src/saveload/map_sl.cpp
index c1463b727..34b1098b0 100644
--- a/src/saveload/map_sl.cpp
+++ b/src/saveload/map_sl.cpp
@@ -11,7 +11,6 @@
#include "../stdafx.h"
#include "../map_func.h"
-#include "../core/alloc_type.hpp"
#include "../core/bitmath_func.hpp"
#include "../fios.h"
diff --git a/src/saveload/misc_sl.cpp b/src/saveload/misc_sl.cpp
index abe4d411a..b73207b38 100644
--- a/src/saveload/misc_sl.cpp
+++ b/src/saveload/misc_sl.cpp
@@ -18,7 +18,6 @@
#include "../window_func.h"
#include "../viewport_func.h"
#include "../gfx_func.h"
-#include "../company_base.h"
#include "../core/random_func.hpp"
#include "../fios.h"
diff --git a/src/saveload/newgrf_sl.cpp b/src/saveload/newgrf_sl.cpp
index b4405b171..b59badbce 100644
--- a/src/saveload/newgrf_sl.cpp
+++ b/src/saveload/newgrf_sl.cpp
@@ -10,10 +10,7 @@
/** @file newgrf_sl.cpp Code handling saving and loading of newgrf config */
#include "../stdafx.h"
-#include "../newgrf_config.h"
#include "../core/bitmath_func.hpp"
-#include "../core/alloc_func.hpp"
-#include "../gfx_func.h"
#include "../fios.h"
#include "saveload.h"
diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp
index 7de25c170..1088d3822 100644
--- a/src/saveload/oldloader_sl.cpp
+++ b/src/saveload/oldloader_sl.cpp
@@ -25,9 +25,6 @@
#include "../date_func.h"
#include "../vehicle_func.h"
#include "../effectvehicle_base.h"
-#include "../core/mem_func.hpp"
-#include "../core/alloc_type.hpp"
-#include "../engine_base.h"
#include "../engine_func.h"
#include "../company_base.h"
#include "saveload_internal.h"
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index cd5ae3329..b2ba232e2 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -40,7 +40,6 @@
#include "../gamelog.h"
#include "../string_func.h"
#include "../engine_base.h"
-#include "../company_base.h"
#include "../fios.h"
#include "table/strings.h"
diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp
index e7842725b..b42a866a3 100644
--- a/src/saveload/vehicle_sl.cpp
+++ b/src/saveload/vehicle_sl.cpp
@@ -17,7 +17,6 @@
#include "../aircraft.h"
#include "../station_base.h"
#include "../effectvehicle_base.h"
-#include "../engine_base.h"
#include "saveload.h"
diff --git a/src/script/script_info.cpp b/src/script/script_info.cpp
index 4f2f548a5..807c42bc1 100644
--- a/src/script/script_info.cpp
+++ b/src/script/script_info.cpp
@@ -11,8 +11,6 @@
#include "../stdafx.h"
-#include <squirrel.h>
-#include "squirrel.hpp"
#include "squirrel_helper.hpp"
#include "script_info.hpp"
diff --git a/src/script/script_scanner.cpp b/src/script/script_scanner.cpp
index 5c6a73801..995b2e1c3 100644
--- a/src/script/script_scanner.cpp
+++ b/src/script/script_scanner.cpp
@@ -14,7 +14,6 @@
#include "../fileio_func.h"
#include <sys/stat.h>
-#include <squirrel.h>
#include "../script/squirrel.hpp"
#include "script_scanner.hpp"
diff --git a/src/script/squirrel.cpp b/src/script/squirrel.cpp
index dea7c6232..504f41a64 100644
--- a/src/script/squirrel.cpp
+++ b/src/script/squirrel.cpp
@@ -9,11 +9,9 @@
/** @file squirrel.cpp the implementation of the Squirrel class. It handles all Squirrel-stuff and gives a nice API back to work with. */
-#include <squirrel.h>
#include <stdarg.h>
#include "../stdafx.h"
#include "../debug.h"
-#include "squirrel.hpp"
#include "squirrel_std.hpp"
#include "../fileio_func.h"
#include <sqstdaux.h>
diff --git a/src/script/squirrel.hpp b/src/script/squirrel.hpp
index ec9871d72..53a74eaaa 100644
--- a/src/script/squirrel.hpp
+++ b/src/script/squirrel.hpp
@@ -12,6 +12,8 @@
#ifndef SQUIRREL_HPP
#define SQUIRREL_HPP
+#include <squirrel.h>
+
class Squirrel {
private:
typedef void (SQPrintFunc)(bool error_msg, const SQChar *message);
diff --git a/src/script/squirrel_class.hpp b/src/script/squirrel_class.hpp
index 9faf4a68e..0a1ab73dc 100644
--- a/src/script/squirrel_class.hpp
+++ b/src/script/squirrel_class.hpp
@@ -12,6 +12,8 @@
#ifndef SQUIRREL_CLASS_HPP
#define SQUIRREL_CLASS_HPP
+#include "squirrel_helper.hpp"
+
/**
* The template to define classes in Squirrel. It takes care of the creation
* and calling of such classes, to make the AI Layer cleaner while having a
diff --git a/src/script/squirrel_helper.hpp b/src/script/squirrel_helper.hpp
index c1ecc64ad..a7d0bf7ba 100644
--- a/src/script/squirrel_helper.hpp
+++ b/src/script/squirrel_helper.hpp
@@ -12,7 +12,7 @@
#ifndef SQUIRREL_HELPER_HPP
#define SQUIRREL_HELPER_HPP
-#include <squirrel.h>
+#include "squirrel.hpp"
#include "../core/math_func.hpp"
#include "../core/smallvec_type.hpp"
#include "../economy_type.h"
diff --git a/src/script/squirrel_std.cpp b/src/script/squirrel_std.cpp
index a95020fcc..21639ee10 100644
--- a/src/script/squirrel_std.cpp
+++ b/src/script/squirrel_std.cpp
@@ -13,7 +13,6 @@
#include <sqstdmath.h>
#include "../stdafx.h"
#include "../debug.h"
-#include "squirrel.hpp"
#include "squirrel_std.hpp"
#include "../core/alloc_func.hpp"
#include "../core/math_func.hpp"
diff --git a/src/script/squirrel_std.hpp b/src/script/squirrel_std.hpp
index b79166859..248b9773e 100644
--- a/src/script/squirrel_std.hpp
+++ b/src/script/squirrel_std.hpp
@@ -12,6 +12,8 @@
#ifndef SQUIRREL_STD_HPP
#define SQUIRREL_STD_HPP
+#include "squirrel.hpp"
+
#if defined(__APPLE__)
/* Which idiotic system makes 'require' a macro? :s Oh well.... */
#undef require
diff --git a/src/settings.cpp b/src/settings.cpp
index 443702438..3a29752af 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -61,8 +61,6 @@
#include "ai/ai.hpp"
#include "newgrf.h"
#include "ship.h"
-#include "company_base.h"
-#include "engine_base.h"
#include "smallmap_gui.h"
#include "roadveh.h"
#include "fios.h"
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp
index 61106dcd1..071fefd10 100644
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -32,7 +32,6 @@
#include "viewport_func.h"
#include "core/geometry_func.hpp"
#include "ai/ai.hpp"
-#include <map>
#include "table/sprites.h"
#include "table/strings.h"
diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp
index 4475a8e05..826ca0308 100644
--- a/src/ship_cmd.cpp
+++ b/src/ship_cmd.cpp
@@ -30,18 +30,15 @@
#include "date_func.h"
#include "vehicle_func.h"
#include "sound_func.h"
-#include "autoreplace_gui.h"
#include "effectvehicle_func.h"
#include "effectvehicle_base.h"
#include "ai/ai.hpp"
#include "pathfinder/opf/opf_ship.h"
#include "landscape_type.h"
#include "engine_base.h"
-#include "engine_func.h"
#include "company_base.h"
#include "table/strings.h"
-#include "table/sprites.h"
static const uint16 _ship_sprites[] = {0x0E5D, 0x0E55, 0x0E65, 0x0E6D};
diff --git a/src/signal_type.h b/src/signal_type.h
index 5a8d564d2..d977958eb 100644
--- a/src/signal_type.h
+++ b/src/signal_type.h
@@ -12,6 +12,8 @@
#ifndef SIGNAL_TYPE_H
#define SIGNAL_TYPE_H
+#include "core/enum_type.hpp"
+
/** Variant of the signal, i.e. how does the signal look? */
enum SignalVariant {
SIG_ELECTRIC = 0, ///< Light signal
diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp
index b614c3988..7e6faee27 100644
--- a/src/smallmap_gui.cpp
+++ b/src/smallmap_gui.cpp
@@ -28,7 +28,6 @@
#include "company_base.h"
#include "table/strings.h"
-#include "table/sprites.h"
/** Widget numbers of the small map window. */
enum SmallMapWindowWidgets {
diff --git a/src/sprite.cpp b/src/sprite.cpp
index e817de32c..df4eec8ef 100644
--- a/src/sprite.cpp
+++ b/src/sprite.cpp
@@ -11,12 +11,10 @@
#include "stdafx.h"
#include "sprite.h"
-#include "tile_cmd.h"
#include "viewport_func.h"
#include "landscape.h"
#include "spritecache.h"
-#include "table/sprites.h"
/**
* Draws a tile sprite sequence.
diff --git a/src/sprite.h b/src/sprite.h
index 61a621b86..4ede1199f 100644
--- a/src/sprite.h
+++ b/src/sprite.h
@@ -12,7 +12,6 @@
#ifndef SPRITE_H
#define SPRITE_H
-#include "gfx_type.h"
#include "transparency.h"
#include "table/sprites.h"
diff --git a/src/station_base.h b/src/station_base.h
index 2d345a589..ca0e598f9 100644
--- a/src/station_base.h
+++ b/src/station_base.h
@@ -13,7 +13,6 @@
#define STATION_BASE_H
#include "base_station_base.h"
-#include "airport.h"
#include "newgrf_airport.h"
#include "cargopacket.h"
#include "industry_type.h"
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 6dfb54f1c..39a98453c 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -13,7 +13,6 @@
#include "aircraft.h"
#include "bridge_map.h"
#include "cmd_helper.h"
-#include "landscape.h"
#include "viewport_func.h"
#include "command_func.h"
#include "town.h"
@@ -46,7 +45,6 @@
#include "debug.h"
#include "core/random_func.hpp"
#include "company_base.h"
-#include "newgrf.h"
#include "table/airporttile_ids.h"
#include "newgrf_airporttiles.h"
#include "order_backup.h"
diff --git a/src/station_gui.cpp b/src/station_gui.cpp
index 97dbf5c72..a2b85a287 100644
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -30,7 +30,6 @@
#include "core/geometry_func.hpp"
#include "table/strings.h"
-#include "table/sprites.h"
/**
* Draw a (multi)line of cargos seperated by commas, and prefixed with a string.
diff --git a/src/strings.cpp b/src/strings.cpp
index 5b5664f00..f03ab65bf 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -34,7 +34,6 @@
#include "townname_func.h"
#include "string_func.h"
#include "company_base.h"
-#include "industrytype.h"
#include "smallmap_gui.h"
#include "table/strings.h"
diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp
index 77f409e65..c4b5ac6de 100644
--- a/src/terraform_gui.cpp
+++ b/src/terraform_gui.cpp
@@ -22,7 +22,7 @@
#include "functions.h"
#include "sound_func.h"
#include "base_station_base.h"
-#include "object_map.h"
+#include "object_type.h"
#include "textbuf_gui.h"
#include "genworld.h"
#include "tree_map.h"
@@ -31,7 +31,6 @@
#include "strings_func.h"
#include "hotkeys.h"
-#include "table/sprites.h"
#include "table/strings.h"
void CcTerraform(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
diff --git a/src/tile_map.cpp b/src/tile_map.cpp
index 07a4fa743..8d3fcc87f 100644
--- a/src/tile_map.cpp
+++ b/src/tile_map.cpp
@@ -11,7 +11,6 @@
#include "stdafx.h"
#include "tile_map.h"
-#include "core/math_func.hpp"
/**
* Return the slope of a given tile
diff --git a/src/tilearea.cpp b/src/tilearea.cpp
index fb3e11394..7a2d76d70 100644
--- a/src/tilearea.cpp
+++ b/src/tilearea.cpp
@@ -11,8 +11,7 @@
#include "stdafx.h"
-#include "tile_map.h"
-#include "core/math_func.hpp"
+#include "map_func.h"
#include "tilearea_type.h"
/**
diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp
index 9ceecf4ad..be36cbbdb 100644
--- a/src/toolbar_gui.cpp
+++ b/src/toolbar_gui.cpp
@@ -39,7 +39,6 @@
#include "tilehighlight_func.h"
#include "rail.h"
#include "widgets/dropdown_type.h"
-#include "company_base.h"
#include "smallmap_gui.h"
#include "graph_gui.h"
#include "textbuf_gui.h"
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index 47a858946..53d2a5474 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -25,7 +25,6 @@
#include "genworld.h"
#include "newgrf_debug.h"
#include "newgrf_house.h"
-#include "newgrf_commons.h"
#include "newgrf_text.h"
#include "newgrf_config.h"
#include "autoslope.h"
@@ -39,7 +38,6 @@
#include "animated_tile_func.h"
#include "date_func.h"
#include "subsidy_func.h"
-#include "core/smallmap_type.hpp"
#include "core/pool_func.hpp"
#include "town.h"
#include "townname_func.h"
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index fcbe3e005..f5206daa3 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -18,17 +18,14 @@
#include "news_func.h"
#include "company_func.h"
#include "vehicle_gui.h"
-#include "newgrf_engine.h"
#include "newgrf_sound.h"
#include "newgrf_text.h"
#include "group.h"
-#include "table/sprites.h"
#include "strings_func.h"
#include "functions.h"
#include "window_func.h"
#include "vehicle_func.h"
#include "sound_func.h"
-#include "autoreplace_gui.h"
#include "ai/ai.hpp"
#include "newgrf_station.h"
#include "effectvehicle_func.h"
@@ -38,8 +35,6 @@
#include "spritecache.h"
#include "core/random_func.hpp"
#include "company_base.h"
-#include "engine_base.h"
-#include "engine_func.h"
#include "newgrf.h"
#include "order_backup.h"
diff --git a/src/train_gui.cpp b/src/train_gui.cpp
index 87e6fe622..73bb7afa6 100644
--- a/src/train_gui.cpp
+++ b/src/train_gui.cpp
@@ -17,9 +17,7 @@
#include "train.h"
#include "strings_func.h"
#include "vehicle_func.h"
-#include "engine_base.h"
#include "window_func.h"
-#include "settings_type.h"
#include "table/sprites.h"
#include "table/strings.h"
diff --git a/src/transport_type.h b/src/transport_type.h
index 65af9c75b..5c2b22cba 100644
--- a/src/transport_type.h
+++ b/src/transport_type.h
@@ -12,6 +12,8 @@
#ifndef TRANSPORT_TYPE_H
#define TRANSPORT_TYPE_H
+#include "core/enum_type.hpp"
+
typedef uint16 UnitID;
/** Available types of transport */
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp
index 1fa3e770c..e920d279a 100644
--- a/src/tunnelbridge_cmd.cpp
+++ b/src/tunnelbridge_cmd.cpp
@@ -14,8 +14,6 @@
*/
#include "stdafx.h"
-#include "rail_map.h"
-#include "landscape.h"
#include "object.h"
#include "viewport_func.h"
#include "cmd_helper.h"
@@ -37,10 +35,8 @@
#include "tunnelbridge.h"
#include "cheat_type.h"
#include "elrail_func.h"
-#include "landscape_type.h"
#include "pbs.h"
#include "company_base.h"
-#include "engine_base.h"
#include "newgrf_railtype.h"
#include "table/sprites.h"
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 6c7f2b0bd..1ca340283 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -11,11 +11,9 @@
#include "stdafx.h"
#include "gui.h"
-#include "debug.h"
#include "roadveh.h"
#include "ship.h"
#include "spritecache.h"
-#include "landscape.h"
#include "timetable.h"
#include "viewport_func.h"
#include "news_func.h"
@@ -25,7 +23,6 @@
#include "train.h"
#include "aircraft.h"
#include "newgrf_debug.h"
-#include "newgrf_engine.h"
#include "newgrf_sound.h"
#include "newgrf_station.h"
#include "group.h"
@@ -40,7 +37,6 @@
#include "autoreplace_gui.h"
#include "station_base.h"
#include "ai/ai.hpp"
-#include "core/smallmap_type.hpp"
#include "depot_func.h"
#include "network/network.h"
#include "core/pool_func.hpp"
@@ -48,12 +44,9 @@
#include "articulated_vehicles.h"
#include "roadstop_base.h"
#include "core/random_func.hpp"
-#include "engine_base.h"
-#include "newgrf.h"
#include "core/backup_type.hpp"
#include "order_backup.h"
-#include "table/sprites.h"
#include "table/strings.h"
#define GEN_HASH(x, y) ((GB((y), 6, 6) << 6) + GB((x), 7, 6))
diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp
index 0754e581c..fd31393e2 100644
--- a/src/vehicle_cmd.cpp
+++ b/src/vehicle_cmd.cpp
@@ -19,7 +19,6 @@
#include "vehicle_gui.h"
#include "train.h"
#include "aircraft.h"
-#include "newgrf_engine.h"
#include "newgrf_text.h"
#include "functions.h"
#include "window_func.h"
@@ -27,7 +26,6 @@
#include "string_func.h"
#include "depot_map.h"
#include "vehiclelist.h"
-#include "engine_base.h"
#include "engine_func.h"
#include "articulated_vehicles.h"
#include "autoreplace_gui.h"
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index ad954db7d..5c922c0f1 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -18,14 +18,12 @@
#include "vehicle_gui.h"
#include "vehicle_gui_base.h"
#include "viewport_func.h"
-#include "newgrf_engine.h"
#include "newgrf_text.h"
#include "newgrf_debug.h"
-#include "waypoint_base.h"
#include "roadveh.h"
#include "train.h"
#include "aircraft.h"
-#include "depot_base.h"
+#include "depot_map.h"
#include "group_gui.h"
#include "strings_func.h"
#include "window_func.h"
@@ -36,16 +34,12 @@
#include "timetable.h"
#include "vehiclelist.h"
#include "articulated_vehicles.h"
-#include "cargotype.h"
#include "spritecache.h"
#include "core/geometry_func.hpp"
#include "company_base.h"
-#include "engine_base.h"
#include "engine_func.h"
-#include "newgrf.h"
#include "station_base.h"
-#include "table/sprites.h"
#include "table/strings.h"
Sorting _sorting;
diff --git a/src/viewport.cpp b/src/viewport.cpp
index 169e56f04..f904e6756 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -46,7 +46,6 @@
#include "tilehighlight_func.h"
#include "window_gui.h"
-#include "table/sprites.h"
#include "table/strings.h"
PlaceProc *_place_proc;
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index 74483f7ca..cb96e89ba 100644
--- a/src/water_cmd.cpp
+++ b/src/water_cmd.cpp
@@ -37,7 +37,6 @@
#include "core/backup_type.hpp"
#include "date_func.h"
-#include "table/sprites.h"
#include "table/strings.h"
/**
diff --git a/src/water_map.h b/src/water_map.h
index 852396e32..c5759c0d8 100644
--- a/src/water_map.h
+++ b/src/water_map.h
@@ -12,7 +12,6 @@
#ifndef WATER_MAP_H
#define WATER_MAP_H
-#include "core/math_func.hpp"
#include "depot_type.h"
#include "tile_map.h"
diff --git a/src/widget_type.h b/src/widget_type.h
index d8e28a6da..467680fd4 100644
--- a/src/widget_type.h
+++ b/src/widget_type.h
@@ -14,6 +14,7 @@
#include "core/alloc_type.hpp"
#include "core/bitmath_func.hpp"
+#include "core/math_func.hpp"
#include "strings_type.h"
#include "gfx_type.h"
#include "window_type.h"
diff --git a/src/window_gui.h b/src/window_gui.h
index 766a738d8..9d694db13 100644
--- a/src/window_gui.h
+++ b/src/window_gui.h
@@ -12,7 +12,6 @@
#ifndef WINDOW_GUI_H
#define WINDOW_GUI_H
-#include "core/math_func.hpp"
#include "vehicle_type.h"
#include "viewport_type.h"
#include "company_type.h"