diff --git a/src/ai/ai_core.cpp b/src/ai/ai_core.cpp index b6c072500f..b03e2a5ae8 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 d52d00f5c8..3cfee3f6a5 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 8ee4d4499b..ff5dca946b 100644 --- a/src/ai/ai_info.cpp +++ b/src/ai/ai_info.cpp @@ -11,8 +11,6 @@ #include "../stdafx.h" -#include -#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 0922405ce0..80cc06a7f0 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 -#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 7aea4a4cbf..e6c2e87e7a 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 -#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 137829cf8b..30089609cb 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 8f7c3eaef2..7b3d6d01a7 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 0b6e00552e..43bd433225 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 3890d2108d..b9e2b18de2 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 02f9e734b4..f003749548 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 #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 e10cdb4dfa..45cc78a3ac 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 b03efd8c9e..7cfa2c1cd0 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 37b9b84d6e..05615e485b 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 a816c73f1a..e62cb585be 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 511df3aebb..48c6f5fe1d 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 35d0b91045..08c9f8a88c 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 9ba518375d..165a330170 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 95250a7c34..c518a63b72 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 40581143a3..a8c9b9f3a1 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 6341c7b1b3..17860e8bf8 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 1bc23a327b..4b55a0e4b6 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 a743c987ef..7c953a5ab8 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 7aaaaf3431..08ece97e59 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 2e0917d502..77a888876c 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 ea1785c39e..273dea524a 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 1c276ffb59..c047340dd9 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 4b8111b6a8..d8d2cc5ef5 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 22b70ccd73..b480016944 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 803a09854b..7e86c0db3e 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 88d3ebcb8a..069fd3bbbe 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 69de8c089f..628970b39a 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 9137efc639..5457ca0b23 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 aa26298948..a528d5e27f 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 89fa870ab7..1a1d9cdf82 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 6e98be1e44..54fd44b2e3 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 0e920af8be..7867a34287 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 a8232b307e..d0010b121e 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 75fca70d12..51778a70cb 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 7cfb6eddfe..ae4eec92e1 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 0ea7cef8b2..b3f2002002 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 d10c24f9d4..9b954d6b46 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 ba08bb3015..e919ef6f61 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 df5635d3d1..ae8d0a3566 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 char *_hotkeys_file; diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index c0558427c0..8aa4ef7d91 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 996dda6214..3720a7c5c1 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 dc8befb75e..9c0b6ce544 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 9c930d694f..1e2761ad82 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 9096474e89..f7aedfc0a4 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 cafd6d7a95..9b1de9436b 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 struct CHashTableSlotT { diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index 422902265d..bf9f79c101 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 6de5cb8390..ac32d47daa 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 2173ae2ea6..f684e01569 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 608ceddc5d..ee110152de 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 34b2fd98b2..d6babd6cf5 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 -#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 836b962bd2..6a3b0b0ba3 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 b15a4c75a3..d08dfd4ec0 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 86de69a8ba..97eecc1b9a 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 ee60f48f81..26f0d67b7f 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 500e93ae02..7e139392d0 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 bd83376f7b..cfbec60733 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 a3e70b7836..952224f3d5 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 2771926d95..83a7904907 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 2d2e6f8565..49668d4011 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 74d3c5f859..aba4d93bfd 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 16aa5dce06..4cf9aae968 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 da4980b95c..d9362121b9 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 _building_counts; diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp index dfdf1019a1..f96b7a9ccd 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 3d90d65bbd..4e293e3256 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 c088a4ea22..24deef5a44 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 79d83b2d54..c11c011171 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 6eb136598a..116c58ff4d 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 d61917acf1..b9393dc2e4 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 6def19a8b4..fd443fe86b 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 /* static */ void NewGRFClass::InsertDefaults() diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp index 5713957988..0385b28a96 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 06485d8ffe..e08e36ee63 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 48b978a75a..d02c0f1e1f 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 162b472a27..25ee0045fc 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 81d485eb76..3e87b99d94 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 21cf685737..ea19baf102 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 f03b2d9afe..42a09a3f2e 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 e5615f7828..f01f22e0cc 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 a2dcf650d3..59f52c524e 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 554362ad45..78301c0e25 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 fc9a7d48ee..0c69ac23da 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 112239a0df..54dc7dd6b9 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 7ff00def7d..7fc5152fa6 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 8bf38a7ed4..929610ddeb 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 6b8c921c1e..3e9e6ac936 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 c745575561..85db80ccff 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 bc8786850d..3aca512fd3 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 95b86f4d66..b706fed601 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 917f29335d..b238ad8186 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 e6067c37ea..0218a5a205 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 c1463b7275..34b1098b00 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 abe4d411ab..b73207b385 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 b4405b1710..b59badbce3 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 7de25c1700..1088d38222 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 cd5ae3329b..b2ba232e27 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 e7842725b0..b42a866a34 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 4f2f548a50..807c42bc16 100644 --- a/src/script/script_info.cpp +++ b/src/script/script_info.cpp @@ -11,8 +11,6 @@ #include "../stdafx.h" -#include -#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 5c6a738013..995b2e1c37 100644 --- a/src/script/script_scanner.cpp +++ b/src/script/script_scanner.cpp @@ -14,7 +14,6 @@ #include "../fileio_func.h" #include -#include #include "../script/squirrel.hpp" #include "script_scanner.hpp" diff --git a/src/script/squirrel.cpp b/src/script/squirrel.cpp index dea7c62328..504f41a640 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 #include #include "../stdafx.h" #include "../debug.h" -#include "squirrel.hpp" #include "squirrel_std.hpp" #include "../fileio_func.h" #include diff --git a/src/script/squirrel.hpp b/src/script/squirrel.hpp index ec9871d72f..53a74eaaa8 100644 --- a/src/script/squirrel.hpp +++ b/src/script/squirrel.hpp @@ -12,6 +12,8 @@ #ifndef SQUIRREL_HPP #define SQUIRREL_HPP +#include + 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 9faf4a68eb..0a1ab73dc0 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 c1ecc64ad0..a7d0bf7ba2 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 +#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 a95020fcc4..21639ee103 100644 --- a/src/script/squirrel_std.cpp +++ b/src/script/squirrel_std.cpp @@ -13,7 +13,6 @@ #include #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 b791668599..248b9773e2 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 443702438e..3a29752af9 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 61106dcd15..071fefd107 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 #include "table/sprites.h" #include "table/strings.h" diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index 4475a8e055..826ca0308e 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 5a8d564d2a..d977958eb1 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 b614c3988f..7e6faee27f 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 e817de32c2..df4eec8efb 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 61a621b869..4ede1199f1 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 2d345a5892..ca0e598f9f 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 6dfb54f1c7..39a98453cf 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 97dbf5c728..a2b85a287e 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 5b5664f00b..f03ab65bf0 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 77f409e652..c4b5ac6de6 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 07a4fa743d..8d3fcc87fd 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 fb3e113949..7a2d76d700 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 9ceecf4ad4..be36cbbdb8 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 47a8589464..53d2a54747 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 fcbe3e0056..f5206daa3c 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 87e6fe6227..73bb7afa6f 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 65af9c75b3..5c2b22cba0 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 1fa3e770c9..e920d279a0 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 6c7f2b0bda..1ca3402830 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 0754e581cc..fd31393e23 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 ad954db7dc..5c922c0f1c 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 169e56f04c..f904e67567 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 74483f7cab..cb96e89ba4 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 852396e323..c5759c0d8e 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 d8e28a6da6..467680fd4a 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 766a738d85..9d694db13d 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"