changeset 17152:c62cecf4dade draft

(svn r21890) -Cleanup: remove some unneeded includes
author rubidium <rubidium@openttd.org>
date Sat, 22 Jan 2011 14:52:20 +0000
parents f89e4ac875e8
children 99280ffcb222
files src/ai/ai_config.cpp src/ai/ai_gui.cpp src/ai/ai_info.cpp src/ai/ai_instance.cpp src/ai/ai_scanner.hpp src/ai/ai_storage.hpp src/ai/api/ai_accounting.hpp src/ai/api/ai_controller.cpp src/ai/api/ai_engine.hpp src/ai/api/ai_event_types.hpp src/ai/api/ai_group.hpp src/ai/api/ai_industrytypelist.hpp src/ai/api/ai_object.cpp src/ai/api/ai_order.cpp src/ai/api/ai_sign.hpp src/ai/api/ai_station.hpp src/ai/api/ai_subsidy.hpp src/ai/api/ai_tunnel.hpp src/ai/api/ai_vehicle.hpp src/autoreplace_gui.cpp src/autoslope.h src/blitter/32bpp_optimized.hpp src/blitter/null.hpp src/bridge_gui.cpp src/cheat_gui.cpp src/clear_cmd.cpp src/command.cpp src/console_cmds.cpp src/console_internal.h src/core/overflowsafe_type.hpp src/core/smallvec_type.hpp src/depot_gui.cpp src/dock_gui.cpp src/economy.cpp src/fios.cpp src/fios_gui.cpp src/gamelog.cpp src/genworld.cpp src/genworld_gui.cpp src/graph_gui.cpp src/group_gui.cpp src/highscore_gui.cpp src/industry_cmd.cpp src/industry_gui.cpp src/intro_gui.cpp src/misc/blob.hpp src/misc/str.hpp src/misc_gui.cpp src/network/network_admin.cpp src/network/network_chat_gui.cpp src/network/network_client.cpp src/network/network_command.cpp src/network/network_server.cpp src/newgrf_canal.h src/newgrf_commons.cpp src/newgrf_industrytiles.cpp src/newgrf_industrytiles.h src/newgrf_object.cpp src/newgrf_object.h src/newgrf_sound.cpp src/newgrf_station.h src/object_cmd.cpp src/object_gui.cpp src/openttd.cpp src/order_gui.cpp src/road.cpp src/roadstop_base.h src/roadveh.h src/roadveh_cmd.cpp src/saveload/misc_sl.cpp src/saveload/oldloader.cpp src/screenshot.cpp src/settings.cpp src/settings_gui.cpp src/ship_cmd.cpp src/sortlist_type.h src/spriteloader/grf.cpp src/station_type.h src/statusbar_gui.cpp src/strgen/strgen.cpp src/terraform_cmd.cpp src/tilearea.cpp src/toolbar_gui.cpp src/town_gui.cpp src/tree_gui.cpp src/vehicle.cpp src/vehicle_base.h src/vehicle_func.h src/vehicle_gui.cpp src/vehiclelist.cpp src/viewport.cpp src/viewport_func.h src/viewport_gui.cpp src/waypoint_func.h src/window.cpp
diffstat 95 files changed, 14 insertions(+), 131 deletions(-) [+]
line wrap: on
line diff
--- a/src/ai/ai_config.cpp
+++ b/src/ai/ai_config.cpp
@@ -10,10 +10,8 @@
 /** @file ai_config.cpp Implementation of AIConfig. */
 
 #include "../stdafx.h"
-#include "../openttd.h"
 #include "../settings_type.h"
 #include "../core/random_func.hpp"
-#include "../core/math_func.hpp"
 #include "ai.hpp"
 #include "ai_config.hpp"
 
--- a/src/ai/ai_gui.cpp
+++ b/src/ai/ai_gui.cpp
@@ -10,7 +10,6 @@
 /** @file ai_gui.cpp Window for configuring the AIs */
 
 #include "../stdafx.h"
-#include "../openttd.h"
 #include "../table/sprites.h"
 #include "../gui.h"
 #include "../querystring_gui.h"
--- a/src/ai/ai_info.cpp
+++ b/src/ai/ai_info.cpp
@@ -15,7 +15,6 @@
 #include "ai_info.hpp"
 #include "ai_scanner.hpp"
 #include "../settings_type.h"
-#include "../openttd.h"
 #include "../debug.h"
 #include "../rev.h"
 
--- a/src/ai/ai_instance.cpp
+++ b/src/ai/ai_instance.cpp
@@ -74,6 +74,7 @@
 #include "api/ai_waypointlist.hpp.sq"
 
 #include "../company_base.h"
+#include "../company_func.h"
 #include "../fileio_func.h"
 
 /** The maximum number of operations for saving or loading the data of an AI. */
--- a/src/ai/ai_scanner.hpp
+++ b/src/ai/ai_scanner.hpp
@@ -12,11 +12,8 @@
 #ifndef AI_SCANNER_HPP
 #define AI_SCANNER_HPP
 
-#include <squirrel.h>
 #include "../script/script_scanner.hpp"
-#include "../core/string_compare_type.hpp"
 #include "ai.hpp"
-#include <map>
 
 /**
  * Class that scans for available AIs.
--- a/src/ai/ai_storage.hpp
+++ b/src/ai/ai_storage.hpp
@@ -12,12 +12,7 @@
 #ifndef AI_STORAGE_HPP
 #define AI_STORAGE_HPP
 
-#include "../command_func.h"
-#include "../map_func.h"
-#include "../network/network.h"
-#include "../company_func.h"
 #include "../signs_func.h"
-#include "../tunnelbridge.h"
 #include "../vehicle_func.h"
 #include "../road_type.h"
 #include "../group.h"
--- a/src/ai/api/ai_accounting.hpp
+++ b/src/ai/api/ai_accounting.hpp
@@ -12,7 +12,6 @@
 #ifndef AI_ACCOUNTING_HPP
 #define AI_ACCOUNTING_HPP
 
-#include "../../stdafx.h"
 #include "ai_object.hpp"
 
 /**
--- a/src/ai/api/ai_controller.cpp
+++ b/src/ai/api/ai_controller.cpp
@@ -10,13 +10,12 @@
 /** @file ai_controller.cpp Implementation of AIControler. */
 
 #include "../../stdafx.h"
-#include "../../stdafx.h"
 #include "../../string_func.h"
 #include "../../company_base.h"
+#include "../../company_func.h"
 #include "../../rev.h"
 
 #include "ai_controller.hpp"
-#include "../ai_storage.hpp"
 #include "../ai_instance.hpp"
 #include "../ai_config.hpp"
 #include "ai_log.hpp"
--- a/src/ai/api/ai_engine.hpp
+++ b/src/ai/api/ai_engine.hpp
@@ -12,9 +12,7 @@
 #ifndef AI_ENGINE_HPP
 #define AI_ENGINE_HPP
 
-#include "ai_object.hpp"
 #include "ai_vehicle.hpp"
-#include "ai_road.hpp"
 #include "ai_rail.hpp"
 #include "ai_airport.hpp"
 
--- a/src/ai/api/ai_event_types.hpp
+++ b/src/ai/api/ai_event_types.hpp
@@ -12,7 +12,6 @@
 #ifndef AI_EVENT_TYPES_HPP
 #define AI_EVENT_TYPES_HPP
 
-#include "ai_object.hpp"
 #include "ai_event.hpp"
 #include "ai_company.hpp"
 
--- a/src/ai/api/ai_group.hpp
+++ b/src/ai/api/ai_group.hpp
@@ -12,7 +12,6 @@
 #ifndef AI_GROUP_HPP
 #define AI_GROUP_HPP
 
-#include "ai_object.hpp"
 #include "ai_vehicle.hpp"
 
 /**
--- a/src/ai/api/ai_industrytypelist.hpp
+++ b/src/ai/api/ai_industrytypelist.hpp
@@ -12,7 +12,6 @@
 #ifndef AI_INDUSTRYTYPELIST_HPP
 #define AI_INDUSTRYTYPELIST_HPP
 
-#include "ai_list.hpp"
 #include "ai_industrytype.hpp"
 
 /**
--- a/src/ai/api/ai_object.cpp
+++ b/src/ai/api/ai_object.cpp
@@ -11,7 +11,11 @@
 
 #include "../../stdafx.h"
 #include "../../script/squirrel.hpp"
+#include "../../command_func.h"
 #include "../../company_base.h"
+#include "../../company_func.h"
+#include "../../network/network.h"
+#include "../../tunnelbridge.h"
 
 #include "../ai_storage.hpp"
 #include "../ai_instance.hpp"
--- a/src/ai/api/ai_order.cpp
+++ b/src/ai/api/ai_order.cpp
@@ -10,6 +10,7 @@
 /** @file ai_order.cpp Implementation of AIOrder. */
 
 #include "../../stdafx.h"
+#include "ai_order.hpp"
 #include "ai_vehicle.hpp"
 #include "../ai_instance.hpp"
 #include "../../debug.h"
--- a/src/ai/api/ai_sign.hpp
+++ b/src/ai/api/ai_sign.hpp
@@ -12,9 +12,7 @@
 #ifndef AI_SIGN_HPP
 #define AI_SIGN_HPP
 
-#include "ai_object.hpp"
 #include "ai_error.hpp"
-#include "ai_company.hpp"
 
 /**
  * Class that handles all sign related functions.
--- a/src/ai/api/ai_station.hpp
+++ b/src/ai/api/ai_station.hpp
@@ -12,8 +12,6 @@
 #ifndef AI_STATION_HPP
 #define AI_STATION_HPP
 
-#include "ai_object.hpp"
-#include "ai_error.hpp"
 #include "ai_road.hpp"
 #include "ai_basestation.hpp"
 
--- a/src/ai/api/ai_subsidy.hpp
+++ b/src/ai/api/ai_subsidy.hpp
@@ -12,7 +12,6 @@
 #ifndef AI_SUBSIDY_HPP
 #define AI_SUBSIDY_HPP
 
-#include "ai_object.hpp"
 #include "ai_company.hpp"
 
 /**
--- a/src/ai/api/ai_tunnel.hpp
+++ b/src/ai/api/ai_tunnel.hpp
@@ -12,7 +12,6 @@
 #ifndef AI_TUNNEL_HPP
 #define AI_TUNNEL_HPP
 
-#include "ai_object.hpp"
 #include "ai_vehicle.hpp"
 
 /**
--- a/src/ai/api/ai_vehicle.hpp
+++ b/src/ai/api/ai_vehicle.hpp
@@ -12,10 +12,7 @@
 #ifndef AI_VEHICLE_HPP
 #define AI_VEHICLE_HPP
 
-#include "ai_object.hpp"
-#include "ai_error.hpp"
 #include "ai_road.hpp"
-#include "ai_order.hpp"
 
 /**
  * Class that handles all vehicle related functions.
--- a/src/autoreplace_gui.cpp
+++ b/src/autoreplace_gui.cpp
@@ -19,7 +19,6 @@
 #include "window_func.h"
 #include "autoreplace_func.h"
 #include "company_func.h"
-#include "widgets/dropdown_type.h"
 #include "engine_base.h"
 #include "window_gui.h"
 #include "engine_gui.h"
--- a/src/autoslope.h
+++ b/src/autoslope.h
@@ -16,7 +16,6 @@
 #include "depot_func.h"
 #include "slope_func.h"
 #include "tile_map.h"
-#include "openttd.h"
 
 /**
  * Autoslope check for tiles with an entrance on an edge.
--- a/src/blitter/32bpp_optimized.hpp
+++ b/src/blitter/32bpp_optimized.hpp
@@ -13,7 +13,6 @@
 #define BLITTER_32BPP_OPTIMIZED_HPP
 
 #include "32bpp_simple.hpp"
-#include "factory.hpp"
 
 class Blitter_32bppOptimized : public Blitter_32bppSimple {
 public:
--- a/src/blitter/null.hpp
+++ b/src/blitter/null.hpp
@@ -12,7 +12,6 @@
 #ifndef BLITTER_NULL_HPP
 #define BLITTER_NULL_HPP
 
-#include "base.hpp"
 #include "factory.hpp"
 
 class Blitter_Null : public Blitter {
--- 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 "bridge.h"
 #include "rail.h"
 #include "strings_func.h"
 #include "window_func.h"
@@ -22,7 +21,6 @@
 #include "sortlist_type.h"
 #include "widgets/dropdown_func.h"
 #include "core/geometry_func.hpp"
-#include "openttd.h"
 #include "cmd_helper.h"
 #include "tunnelbridge_map.h"
 #include "road_gui.h"
--- a/src/cheat_gui.cpp
+++ b/src/cheat_gui.cpp
@@ -14,11 +14,10 @@
 #include "cheat_type.h"
 #include "company_base.h"
 #include "company_func.h"
-#include "gfx_func.h"
 #include "date_func.h"
 #include "saveload/saveload.h"
+#include "textbuf_gui.h"
 #include "window_gui.h"
-#include "querystring_gui.h"
 #include "newgrf.h"
 #include "string_func.h"
 #include "strings_func.h"
--- a/src/clear_cmd.cpp
+++ b/src/clear_cmd.cpp
@@ -10,7 +10,6 @@
 /** @file clear_cmd.cpp Commands related to clear tiles. */
 
 #include "stdafx.h"
-#include "openttd.h"
 #include "clear_map.h"
 #include "command_func.h"
 #include "landscape.h"
--- a/src/command.cpp
+++ b/src/command.cpp
@@ -10,7 +10,6 @@
 /** @file command.cpp Handling of commands. */
 
 #include "stdafx.h"
-#include "openttd.h"
 #include "landscape.h"
 #include "gui.h"
 #include "command_func.h"
--- a/src/console_cmds.cpp
+++ b/src/console_cmds.cpp
@@ -29,7 +29,6 @@
 #include "viewport_func.h"
 #include "window_func.h"
 #include "date_func.h"
-#include "vehicle_func.h"
 #include "company_func.h"
 #include "gamelog.h"
 #include "ai/ai.hpp"
--- a/src/console_internal.h
+++ b/src/console_internal.h
@@ -12,7 +12,7 @@
 #ifndef CONSOLE_INTERNAL_H
 #define CONSOLE_INTERNAL_H
 
-#include "console_type.h"
+#include "gfx_type.h"
 
 static const uint ICON_CMDLN_SIZE     = 1024; ///< maximum length of a typed in command
 static const uint ICON_MAX_STREAMSIZE = 2048; ///< maximum length of a totally expanded command
--- a/src/core/overflowsafe_type.hpp
+++ b/src/core/overflowsafe_type.hpp
@@ -12,7 +12,6 @@
 #ifndef OVERFLOWSAFE_TYPE_HPP
 #define OVERFLOWSAFE_TYPE_HPP
 
-#include "math_func.hpp"
 
 /**
  * Overflow safe template for integers, i.e. integers that will never overflow
--- a/src/core/smallvec_type.hpp
+++ b/src/core/smallvec_type.hpp
@@ -14,7 +14,6 @@
 
 #include "alloc_func.hpp"
 #include "mem_func.hpp"
-#include "math_func.hpp"
 
 /**
  * Simple vector template class.
--- a/src/depot_gui.cpp
+++ b/src/depot_gui.cpp
@@ -13,7 +13,6 @@
 #include "train.h"
 #include "ship.h"
 #include "aircraft.h"
-#include "roadveh.h"
 #include "gui.h"
 #include "textbuf_gui.h"
 #include "viewport_func.h"
--- a/src/dock_gui.cpp
+++ b/src/dock_gui.cpp
@@ -10,7 +10,6 @@
 /** @file dock_gui.cpp GUI to create amazing water objects. */
 
 #include "stdafx.h"
-#include "openttd.h"
 #include "terraform_gui.h"
 #include "window_gui.h"
 #include "station_gui.h"
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -20,10 +20,11 @@
 #include "vehicle_gui.h"
 #include "ai/ai.hpp"
 #include "aircraft.h"
-#include "train.h"
+#include "newgrf_engine.h"
+#include "engine_base.h"
+#include "ground_vehicle.hpp"
 #include "newgrf_cargo.h"
 #include "newgrf_sound.h"
-#include "newgrf_industries.h"
 #include "newgrf_industrytiles.h"
 #include "newgrf_station.h"
 #include "newgrf_airporttiles.h"
--- a/src/fios.cpp
+++ b/src/fios.cpp
@@ -13,7 +13,6 @@
  */
 
 #include "stdafx.h"
-#include "openttd.h"
 #include "fios.h"
 #include "fileio_func.h"
 #include "tar_type.h"
--- a/src/fios_gui.cpp
+++ b/src/fios_gui.cpp
@@ -10,7 +10,6 @@
 /** @file fios_gui.cpp GUIs for loading/saving games, scenarios, heightmaps, ... */
 
 #include "stdafx.h"
-#include "openttd.h"
 #include "saveload/saveload.h"
 #include "gui.h"
 #include "gfx_func.h"
--- a/src/gamelog.cpp
+++ b/src/gamelog.cpp
@@ -10,7 +10,6 @@
 /** @file gamelog.cpp Definition of functions used for logging of important changes in the game */
 
 #include "stdafx.h"
-#include "openttd.h"
 #include "saveload/saveload.h"
 #include "string_func.h"
 #include "settings_type.h"
--- a/src/genworld.cpp
+++ b/src/genworld.cpp
@@ -10,7 +10,6 @@
 /** @file genworld.cpp Functions to generate a map. */
 
 #include "stdafx.h"
-#include "openttd.h"
 #include "landscape.h"
 #include "company_func.h"
 #include "thread/thread.h"
--- a/src/genworld_gui.cpp
+++ b/src/genworld_gui.cpp
@@ -10,7 +10,6 @@
 /** @file genworld_gui.cpp GUI to configure and show progress during map generation. */
 
 #include "stdafx.h"
-#include "openttd.h"
 #include "heightmap.h"
 #include "debug.h"
 #include "genworld.h"
--- a/src/graph_gui.cpp
+++ b/src/graph_gui.cpp
@@ -10,7 +10,6 @@
 /** @file graph_gui.cpp GUI that shows performance graphs. */
 
 #include "stdafx.h"
-#include "openttd.h"
 #include "graph_gui.h"
 #include "window_gui.h"
 #include "company_base.h"
--- a/src/group_gui.cpp
+++ b/src/group_gui.cpp
@@ -10,7 +10,6 @@
 /** @file group_gui.cpp GUI for the group window. */
 
 #include "stdafx.h"
-#include "openttd.h"
 #include "textbuf_gui.h"
 #include "command_func.h"
 #include "vehicle_gui.h"
--- a/src/highscore_gui.cpp
+++ b/src/highscore_gui.cpp
@@ -21,7 +21,6 @@
 #include "company_func.h"
 #include "company_base.h"
 #include "strings_func.h"
-#include "openttd.h"
 #include "hotkeys.h"
 
 enum HighscoreWidgets {
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -23,7 +23,6 @@
 #include "tree_map.h"
 #include "newgrf_cargo.h"
 #include "newgrf_debug.h"
-#include "newgrf_industries.h"
 #include "newgrf_industrytiles.h"
 #include "autoslope.h"
 #include "water.h"
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -10,7 +10,6 @@
 /** @file industry_gui.cpp GUIs related to industries. */
 
 #include "stdafx.h"
-#include "openttd.h"
 #include "gui.h"
 #include "sound_func.h"
 #include "window_func.h"
--- a/src/intro_gui.cpp
+++ b/src/intro_gui.cpp
@@ -10,7 +10,6 @@
 /** @file intro_gui.cpp The main menu GUI. */
 
 #include "stdafx.h"
-#include "openttd.h"
 #include "gui.h"
 #include "window_gui.h"
 #include "textbuf_gui.h"
--- a/src/misc/blob.hpp
+++ b/src/misc/blob.hpp
@@ -13,8 +13,6 @@
 #define BLOB_HPP
 
 #include "../core/alloc_func.hpp"
-#include "../core/mem_func.hpp"
-#include <new>
 
 /**
  * Base class for simple binary blobs.
--- a/src/misc/str.hpp
+++ b/src/misc/str.hpp
@@ -15,6 +15,7 @@
 #include <errno.h>
 #include <stdarg.h>
 #include "blob.hpp"
+#include "../core/math_func.hpp"
 #include "../string_func.h"
 
 /** Blob based case sensitive ANSI/UTF-8 string */
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -26,7 +26,6 @@
 #include "strings_func.h"
 #include "zoom_func.h"
 #include "window_func.h"
-#include "tilehighlight_func.h"
 #include "querystring_gui.h"
 #include "console_func.h"
 #include "core/geometry_func.hpp"
--- a/src/network/network_admin.cpp
+++ b/src/network/network_admin.cpp
@@ -12,11 +12,9 @@
 #ifdef ENABLE_NETWORK
 
 #include "../stdafx.h"
-#include "../debug.h"
 #include "../strings_func.h"
 #include "../date_func.h"
 #include "network_admin.h"
-#include "network.h"
 #include "network_base.h"
 #include "network_server.h"
 #include "../command_func.h"
@@ -26,8 +24,6 @@
 #include "../map_func.h"
 #include "../rev.h"
 
-#include "table/strings.h"
-#include "network_client.h"
 
 /* This file handles all the admin network commands. */
 
--- a/src/network/network_chat_gui.cpp
+++ b/src/network/network_chat_gui.cpp
@@ -14,7 +14,6 @@
 #ifdef ENABLE_NETWORK
 
 #include "../stdafx.h"
-#include "../date_func.h"
 #include "../gfx_func.h"
 #include "../strings_func.h"
 #include "../blitter/factory.hpp"
--- a/src/network/network_client.cpp
+++ b/src/network/network_client.cpp
@@ -13,14 +13,11 @@
 
 #include "../stdafx.h"
 #include "../debug.h"
-#include "network_internal.h"
 #include "network_gui.h"
 #include "../saveload/saveload.h"
 #include "../saveload/saveload_filter.h"
 #include "../command_func.h"
 #include "../console_func.h"
-#include "../fileio_func.h"
-#include "../3rdparty/md5/md5.h"
 #include "../strings_func.h"
 #include "../window_func.h"
 #include "../company_func.h"
--- a/src/network/network_command.cpp
+++ b/src/network/network_command.cpp
@@ -12,11 +12,9 @@
 #ifdef ENABLE_NETWORK
 
 #include "../stdafx.h"
-#include "../debug.h"
 #include "network_admin.h"
 #include "network_client.h"
 #include "network_server.h"
-#include "network.h"
 #include "../command_func.h"
 #include "../company_func.h"
 #include "../settings_type.h"
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -12,13 +12,11 @@
 #ifdef ENABLE_NETWORK
 
 #include "../stdafx.h"
-#include "../debug.h"
 #include "../strings_func.h"
 #include "../date_func.h"
 #include "network_admin.h"
 #include "network_server.h"
 #include "network_udp.h"
-#include "network.h"
 #include "network_base.h"
 #include "../console_func.h"
 #include "../company_base.h"
@@ -27,7 +25,6 @@
 #include "../saveload/saveload_filter.h"
 #include "../station_base.h"
 #include "../genworld.h"
-#include "../fileio_func.h"
 #include "../company_func.h"
 #include "../company_gui.h"
 #include "../window_func.h"
@@ -37,7 +34,6 @@
 #include "../core/random_func.hpp"
 #include "../rev.h"
 
-#include "table/strings.h"
 
 /* This file handles all the server-commands */
 
--- a/src/newgrf_canal.h
+++ b/src/newgrf_canal.h
@@ -15,7 +15,6 @@
 #include "gfx_type.h"
 #include "tile_type.h"
 #include "newgrf_generic.h"
-#include "newgrf_callbacks.h"
 
 /**
  * List of different canal 'features'.
--- a/src/newgrf_commons.cpp
+++ b/src/newgrf_commons.cpp
@@ -23,7 +23,6 @@
 #include "tunnelbridge_map.h"
 #include "newgrf_object.h"
 #include "genworld.h"
-#include "core/mem_func.hpp"
 
 /**
  * Constructor of generic class
--- a/src/newgrf_industrytiles.cpp
+++ b/src/newgrf_industrytiles.cpp
@@ -14,7 +14,6 @@
 #include "viewport_func.h"
 #include "landscape.h"
 #include "newgrf.h"
-#include "newgrf_industries.h"
 #include "newgrf_industrytiles.h"
 #include "newgrf_sound.h"
 #include "newgrf_text.h"
--- a/src/newgrf_industrytiles.h
+++ b/src/newgrf_industrytiles.h
@@ -13,9 +13,7 @@
 #define NEWGRF_INDUSTRYTILES_H
 
 #include "tile_cmd.h"
-#include "industry_type.h"
 #include "newgrf_animation_type.h"
-#include "newgrf_callbacks.h"
 #include "newgrf_industries.h"
 #include "core/random_func.hpp"
 
--- a/src/newgrf_object.cpp
+++ b/src/newgrf_object.cpp
@@ -12,7 +12,6 @@
 #include "stdafx.h"
 #include "company_base.h"
 #include "company_func.h"
-#include "core/mem_func.hpp"
 #include "debug.h"
 #include "newgrf.h"
 #include "newgrf_class_func.h"
--- a/src/newgrf_object.h
+++ b/src/newgrf_object.h
@@ -13,9 +13,7 @@
 #define NEWGRF_OBJECT_H
 
 #include "newgrf_callbacks.h"
-#include "date_type.h"
 #include "economy_func.h"
-#include "strings_type.h"
 #include "tile_cmd.h"
 #include "object_type.h"
 #include "newgrf_animation_type.h"
--- a/src/newgrf_sound.cpp
+++ b/src/newgrf_sound.cpp
@@ -16,7 +16,6 @@
 #include "newgrf_sound.h"
 #include "vehicle_base.h"
 #include "sound_func.h"
-#include "core/mem_func.hpp"
 
 static SmallVector<SoundEntry, 8> _sounds;
 
--- a/src/newgrf_station.h
+++ b/src/newgrf_station.h
@@ -17,7 +17,6 @@
 #include "newgrf_class.h"
 #include "newgrf_commons.h"
 #include "sprite.h"
-#include "direction_type.h"
 #include "cargo_type.h"
 #include "station_type.h"
 #include "rail_type.h"
--- a/src/object_cmd.cpp
+++ b/src/object_cmd.cpp
@@ -30,7 +30,6 @@
 #include "core/pool_func.hpp"
 #include "object_map.h"
 #include "object_base.h"
-#include "newgrf.h"
 #include "newgrf_config.h"
 #include "newgrf_object.h"
 #include "date_func.h"
--- a/src/object_gui.cpp
+++ b/src/object_gui.cpp
@@ -11,14 +11,12 @@
 
 #include "stdafx.h"
 #include "command_func.h"
-#include "core/geometry_func.hpp"
 #include "newgrf.h"
 #include "newgrf_object.h"
 #include "newgrf_text.h"
 #include "sprite.h"
 #include "strings_func.h"
 #include "viewport_func.h"
-#include "widgets/dropdown_type.h"
 #include "window_gui.h"
 
 #include "table/strings.h"
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -45,7 +45,6 @@
 #include "date_func.h"
 #include "vehicle_func.h"
 #include "gamelog.h"
-#include "cheat_type.h"
 #include "animated_tile_func.h"
 #include "roadstop_base.h"
 #include "functions.h"
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -18,7 +18,6 @@
 #include "timetable.h"
 #include "strings_func.h"
 #include "window_func.h"
-#include "vehicle_func.h"
 #include "company_func.h"
 #include "widgets/dropdown_func.h"
 #include "textbuf_gui.h"
--- a/src/road.cpp
+++ b/src/road.cpp
@@ -10,7 +10,6 @@
 /** @file road.cpp Generic road related functions. */
 
 #include "stdafx.h"
-#include "openttd.h"
 #include "rail_map.h"
 #include "road_map.h"
 #include "water_map.h"
--- a/src/roadstop_base.h
+++ b/src/roadstop_base.h
@@ -15,7 +15,6 @@
 #include "station_type.h"
 #include "core/pool_type.hpp"
 #include "core/bitmath_func.hpp"
-#include "direction_type.h"
 #include "vehicle_type.h"
 
 typedef Pool<RoadStop, RoadStopID, 32, 64000> RoadStopPool;
--- a/src/roadveh.h
+++ b/src/roadveh.h
@@ -17,7 +17,6 @@
 #include "cargotype.h"
 #include "track_func.h"
 #include "road_type.h"
-#include "newgrf_properties.h"
 #include "newgrf_engine.h"
 
 struct RoadVehicle;
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -18,7 +18,6 @@
 #include "company_func.h"
 #include "vehicle_gui.h"
 #include "articulated_vehicles.h"
-#include "newgrf_engine.h"
 #include "newgrf_sound.h"
 #include "pathfinder/yapf/yapf.h"
 #include "strings_func.h"
--- a/src/saveload/misc_sl.cpp
+++ b/src/saveload/misc_sl.cpp
@@ -11,7 +11,6 @@
 
 #include "../stdafx.h"
 #include "../date_func.h"
-#include "../openttd.h"
 #include "../zoom_func.h"
 #include "../vehicle_func.h"
 #include "../window_gui.h"
--- a/src/saveload/oldloader.cpp
+++ b/src/saveload/oldloader.cpp
@@ -10,7 +10,6 @@
 /** @file oldloader.cpp Functions for handling of TTO/TTD/TTDP savegames. */
 
 #include "../stdafx.h"
-#include "../openttd.h"
 #include "../debug.h"
 #include "../strings_type.h"
 #include "../string_func.h"
--- a/src/screenshot.cpp
+++ b/src/screenshot.cpp
@@ -10,7 +10,6 @@
 /** @file screenshot.cpp The creation of screenshots! */
 
 #include "stdafx.h"
-#include "openttd.h"
 #include "fileio_func.h"
 #include "viewport_func.h"
 #include "gfx_func.h"
@@ -18,7 +17,6 @@
 #include "blitter/factory.hpp"
 #include "zoom_func.h"
 #include "core/endian_func.hpp"
-#include "map_func.h"
 #include "saveload/saveload.h"
 #include "company_func.h"
 #include "strings_func.h"
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -36,7 +36,6 @@
 #include "train.h"
 #include "news_func.h"
 #include "window_func.h"
-#include "strings_func.h"
 #include "vehicle_func.h"
 #include "sound_func.h"
 #include "company_func.h"
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -24,7 +24,6 @@
 #include "string_func.h"
 #include "widgets/dropdown_type.h"
 #include "widgets/dropdown_func.h"
-#include "openttd.h"
 #include "highscore.h"
 #include "base_media_base.h"
 #include "company_base.h"
@@ -33,7 +32,6 @@
 #include "core/geometry_func.hpp"
 #include "ai/ai.hpp"
 #include "language.h"
-#include <map>
 
 #include "table/sprites.h"
 #include "table/strings.h"
--- a/src/ship_cmd.cpp
+++ b/src/ship_cmd.cpp
@@ -13,7 +13,6 @@
 #include "ship.h"
 #include "landscape.h"
 #include "timetable.h"
-#include "command_func.h"
 #include "news_func.h"
 #include "company_func.h"
 #include "pathfinder/npf/npf_func.h"
@@ -32,7 +31,6 @@
 #include "sound_func.h"
 #include "ai/ai.hpp"
 #include "pathfinder/opf/opf_ship.h"
-#include "landscape_type.h"
 #include "engine_base.h"
 #include "company_base.h"
 
--- a/src/sortlist_type.h
+++ b/src/sortlist_type.h
@@ -14,7 +14,6 @@
 
 #include "core/enum_type.hpp"
 #include "core/bitmath_func.hpp"
-#include "core/mem_func.hpp"
 #include "core/sort_func.hpp"
 #include "core/smallvec_type.hpp"
 #include "date_type.h"
--- a/src/spriteloader/grf.cpp
+++ b/src/spriteloader/grf.cpp
@@ -16,6 +16,7 @@
 #include "../strings_func.h"
 #include "table/strings.h"
 #include "../gui.h"
+#include "../core/math_func.hpp"
 #include "grf.hpp"
 
 /**
--- a/src/station_type.h
+++ b/src/station_type.h
@@ -12,7 +12,6 @@
 #ifndef STATION_TYPE_H
 #define STATION_TYPE_H
 
-#include "core/enum_type.hpp"
 #include "core/smallvec_type.hpp"
 #include "tilearea_type.h"
 
--- a/src/statusbar_gui.cpp
+++ b/src/statusbar_gui.cpp
@@ -10,7 +10,6 @@
 /** @file statusbar_gui.cpp The GUI for the bottom status bar. */
 
 #include "stdafx.h"
-#include "openttd.h"
 #include "date_func.h"
 #include "gfx_func.h"
 #include "news_func.h"
--- a/src/strgen/strgen.cpp
+++ b/src/strgen/strgen.cpp
@@ -10,10 +10,7 @@
 /** @file strgen.cpp Tool to create computer readable (stand-alone) translation files. */
 
 #include "../stdafx.h"
-#include "../core/alloc_func.hpp"
 #include "../core/endian_func.hpp"
-#include "../core/math_func.hpp"
-#include "../core/mem_func.hpp"
 #include "../string_func.h"
 #include "../strings_type.h"
 #include "../language.h"
--- a/src/terraform_cmd.cpp
+++ b/src/terraform_cmd.cpp
@@ -10,7 +10,6 @@
 /** @file terraform_cmd.cpp Commands related to terraforming. */
 
 #include "stdafx.h"
-#include "openttd.h"
 #include "command_func.h"
 #include "tunnel_map.h"
 #include "bridge_map.h"
--- a/src/tilearea.cpp
+++ b/src/tilearea.cpp
@@ -11,7 +11,6 @@
 
 #include "stdafx.h"
 
-#include "map_func.h"
 #include "tilearea_type.h"
 
 /**
--- a/src/toolbar_gui.cpp
+++ b/src/toolbar_gui.cpp
@@ -37,8 +37,6 @@
 #include "news_gui.h"
 #include "ai/ai_gui.hpp"
 #include "tilehighlight_func.h"
-#include "rail.h"
-#include "widgets/dropdown_type.h"
 #include "smallmap_gui.h"
 #include "graph_gui.h"
 #include "textbuf_gui.h"
--- a/src/town_gui.cpp
+++ b/src/town_gui.cpp
@@ -10,10 +10,8 @@
 /** @file town_gui.cpp GUI for towns. */
 
 #include "stdafx.h"
-#include "openttd.h"
 #include "town.h"
 #include "viewport_func.h"
-#include "gfx_func.h"
 #include "gui.h"
 #include "command_func.h"
 #include "company_func.h"
@@ -36,7 +34,6 @@
 #include "genworld.h"
 #include "sprite.h"
 
-#include "table/sprites.h"
 #include "table/strings.h"
 
 typedef GUIList<const Town*> GUITownList;
--- a/src/tree_gui.cpp
+++ b/src/tree_gui.cpp
@@ -10,7 +10,6 @@
 /** @file tree_gui.cpp GUIs for building trees. */
 
 #include "stdafx.h"
-#include "openttd.h"
 #include "window_gui.h"
 #include "gfx_func.h"
 #include "tilehighlight_func.h"
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -52,7 +52,6 @@
 #include "vehiclelist.h"
 #include "tunnel_map.h"
 #include "depot_map.h"
-#include "ground_vehicle.hpp"
 
 #include "table/strings.h"
 
--- a/src/vehicle_base.h
+++ b/src/vehicle_base.h
@@ -13,7 +13,6 @@
 #define VEHICLE_BASE_H
 
 #include "track_type.h"
-#include "direction_type.h"
 #include "command_type.h"
 #include "order_base.h"
 #include "cargopacket.h"
--- a/src/vehicle_func.h
+++ b/src/vehicle_func.h
@@ -19,7 +19,6 @@
 #include "engine_type.h"
 #include "transport_type.h"
 #include "newgrf_config.h"
-#include "company_type.h"
 #include "track_type.h"
 #include "livery.h"
 
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -32,7 +32,6 @@
 #include "string_func.h"
 #include "widgets/dropdown_func.h"
 #include "timetable.h"
-#include "vehiclelist.h"
 #include "articulated_vehicles.h"
 #include "spritecache.h"
 #include "core/geometry_func.hpp"
--- a/src/vehiclelist.cpp
+++ b/src/vehiclelist.cpp
@@ -10,7 +10,6 @@
 /** @file vehiclelist.cpp Lists of vehicles. */
 
 #include "stdafx.h"
-#include "vehicle_gui.h"
 #include "train.h"
 #include "vehiclelist.h"
 
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -45,7 +45,6 @@
 #include "window_func.h"
 #include "tilehighlight_func.h"
 #include "window_gui.h"
-#include "terraform_gui.h"
 
 #include "table/strings.h"
 
--- a/src/viewport_func.h
+++ b/src/viewport_func.h
@@ -14,7 +14,6 @@
 
 #include "gfx_type.h"
 #include "viewport_type.h"
-#include "vehicle_type.h"
 #include "window_type.h"
 #include "tile_type.h"
 
--- a/src/viewport_gui.cpp
+++ b/src/viewport_gui.cpp
@@ -13,11 +13,9 @@
 #include "landscape.h"
 #include "window_gui.h"
 #include "viewport_func.h"
-#include "gfx_func.h"
 #include "strings_func.h"
 #include "zoom_func.h"
 #include "window_func.h"
-#include "tilehighlight_func.h"
 
 #include "table/strings.h"
 #include "table/sprites.h"
--- a/src/waypoint_func.h
+++ b/src/waypoint_func.h
@@ -12,7 +12,6 @@
 #ifndef WAYPOINT_FUNC_H
 #define WAYPOINT_FUNC_H
 
-#include "direction_type.h"
 #include "rail_type.h"
 #include "command_type.h"
 #include "station_type.h"
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -11,7 +11,6 @@
 
 #include "stdafx.h"
 #include <stdarg.h>
-#include "openttd.h"
 #include "company_func.h"
 #include "gfx_func.h"
 #include "console_func.h"
@@ -20,9 +19,7 @@
 #include "genworld.h"
 #include "blitter/factory.hpp"
 #include "zoom_func.h"
-#include "map_func.h"
 #include "vehicle_base.h"
-#include "cheat_type.h"
 #include "window_func.h"
 #include "tilehighlight_func.h"
 #include "network/network.h"
@@ -35,7 +32,6 @@
 #include "toolbar_gui.h"
 #include "statusbar_gui.h"
 
-#include "table/sprites.h"
 
 static Point _drag_delta; ///< delta between mouse cursor and upper left corner of dragged window
 static Window *_mouseover_last_w = NULL; ///< Window of the last #MOUSEOVER event.