diff --git a/src/ai/ai_config.hpp b/src/ai/ai_config.hpp index fb53b725b7..302a9942d8 100644 --- a/src/ai/ai_config.hpp +++ b/src/ai/ai_config.hpp @@ -15,6 +15,7 @@ #include #include "ai_info.hpp" #include "../core/string_compare_type.hpp" +#include "../company_type.h" class AIConfig { private: diff --git a/src/ai/ai_core.cpp b/src/ai/ai_core.cpp index eb93ecff33..9c730d8675 100644 --- a/src/ai/ai_core.cpp +++ b/src/ai/ai_core.cpp @@ -17,7 +17,6 @@ #include "../network/network.h" #include "../window_func.h" #include "../command_func.h" -#include "ai.hpp" #include "ai_scanner.hpp" #include "ai_instance.hpp" #include "ai_config.hpp" diff --git a/src/ai/ai_gui.hpp b/src/ai/ai_gui.hpp index c5f0b705db..56d775a160 100644 --- a/src/ai/ai_gui.hpp +++ b/src/ai/ai_gui.hpp @@ -12,6 +12,8 @@ #ifndef AI_GUI_HPP #define AI_GUI_HPP +#include "../company_type.h" + void ShowAIDebugWindow(CompanyID show_company = INVALID_COMPANY); void ShowAIConfigWindow(); diff --git a/src/ai/ai_info.cpp b/src/ai/ai_info.cpp index b753424e18..06fdc88ef2 100644 --- a/src/ai/ai_info.cpp +++ b/src/ai/ai_info.cpp @@ -14,7 +14,6 @@ #include #include "../script/squirrel.hpp" #include "../script/squirrel_helper.hpp" -#include "ai.hpp" #include "ai_info.hpp" #include "ai_scanner.hpp" #include "../settings_type.h" diff --git a/src/ai/ai_instance.cpp b/src/ai/ai_instance.cpp index d91fff0a1c..d321214b09 100644 --- a/src/ai/ai_instance.cpp +++ b/src/ai/ai_instance.cpp @@ -11,10 +11,8 @@ #include "../stdafx.h" #include "../debug.h" -#include "../vehicle_base.h" #include "../saveload/saveload.h" #include "../gui.h" -#include "table/strings.h" #include #include "../script/squirrel.hpp" @@ -79,6 +77,7 @@ #include "api/ai_waypoint.hpp.sq" #include "api/ai_waypointlist.hpp.sq" +#include "../company_base.h" #include "../fileio_func.h" AIStorage::~AIStorage() diff --git a/src/ai/ai_instance.hpp b/src/ai/ai_instance.hpp index f0862ea9e6..d9e519a7ed 100644 --- a/src/ai/ai_instance.hpp +++ b/src/ai/ai_instance.hpp @@ -12,6 +12,8 @@ #ifndef AI_INSTANCE_HPP #define AI_INSTANCE_HPP +#include + /** * The callback function when an AI suspends. */ diff --git a/src/ai/ai_scanner.cpp b/src/ai/ai_scanner.cpp index 065d4e4c28..dc3dd0d1b1 100644 --- a/src/ai/ai_scanner.cpp +++ b/src/ai/ai_scanner.cpp @@ -19,7 +19,6 @@ #include "../script/squirrel.hpp" #include "../script/squirrel_helper.hpp" #include "../script/squirrel_class.hpp" -#include "ai.hpp" #include "ai_info.hpp" #include "ai_scanner.hpp" #include "api/ai_controller.hpp" diff --git a/src/ai/ai_scanner.hpp b/src/ai/ai_scanner.hpp index ff3ce77907..26fc385b4c 100644 --- a/src/ai/ai_scanner.hpp +++ b/src/ai/ai_scanner.hpp @@ -12,8 +12,10 @@ #ifndef AI_SCANNER_HPP #define AI_SCANNER_HPP +#include #include "../script/script_scanner.hpp" #include "../core/string_compare_type.hpp" +#include "ai.hpp" #include class AIScanner : public ScriptScanner { diff --git a/src/ai/ai_storage.hpp b/src/ai/ai_storage.hpp index 2434782f6c..3130418ceb 100644 --- a/src/ai/ai_storage.hpp +++ b/src/ai/ai_storage.hpp @@ -19,8 +19,10 @@ #include "../signs_func.h" #include "../tunnelbridge.h" #include "../vehicle_func.h" +#include "../road_type.h" #include "../group.h" +#include "table/strings.h" #include /** diff --git a/src/ai/api/ai_abstractlist.cpp b/src/ai/api/ai_abstractlist.cpp index 6194558eb1..4d5cea3cba 100644 --- a/src/ai/api/ai_abstractlist.cpp +++ b/src/ai/api/ai_abstractlist.cpp @@ -9,7 +9,6 @@ /** @file ai_abstractlist.cpp Implementation of AIAbstractList. */ -#include #include "ai_abstractlist.hpp" #include "../../debug.h" #include "../../script/squirrel.hpp" diff --git a/src/ai/api/ai_controller.cpp b/src/ai/api/ai_controller.cpp index 6852e1142c..9084fbc4ca 100644 --- a/src/ai/api/ai_controller.cpp +++ b/src/ai/api/ai_controller.cpp @@ -13,9 +13,7 @@ #include "../../string_func.h" #include "../../company_base.h" #include "../../rev.h" -#include "table/strings.h" -#include "../ai.hpp" #include "ai_controller.hpp" #include "../ai_storage.hpp" #include "../ai_instance.hpp" diff --git a/src/ai/api/ai_engine.cpp b/src/ai/api/ai_engine.cpp index 157ee825d4..3793b748c9 100644 --- a/src/ai/api/ai_engine.cpp +++ b/src/ai/api/ai_engine.cpp @@ -14,7 +14,6 @@ #include "../../company_func.h" #include "../../company_base.h" #include "../../strings_func.h" -#include "../../settings_type.h" #include "../../rail.h" #include "../../engine_base.h" #include "../../articulated_vehicles.h" diff --git a/src/ai/api/ai_execmode.cpp b/src/ai/api/ai_execmode.cpp index 6808877700..0cede135f8 100644 --- a/src/ai/api/ai_execmode.cpp +++ b/src/ai/api/ai_execmode.cpp @@ -10,7 +10,6 @@ /** @file ai_execmode.cpp Implementation of AIExecMode. */ #include "ai_execmode.hpp" -#include "../../command_type.h" #include "../../company_base.h" #include "../../company_func.h" #include "../ai_instance.hpp" diff --git a/src/ai/api/ai_group.cpp b/src/ai/api/ai_group.cpp index 0aad40cf59..b1ececbe1c 100644 --- a/src/ai/api/ai_group.cpp +++ b/src/ai/api/ai_group.cpp @@ -16,7 +16,6 @@ #include "../../group.h" #include "../../string_func.h" #include "../../strings_func.h" -#include "../../command_func.h" #include "../../autoreplace_func.h" #include "../../settings_func.h" #include "table/strings.h" diff --git a/src/ai/api/ai_industrytype.cpp b/src/ai/api/ai_industrytype.cpp index 8bf892c8eb..993a88993d 100644 --- a/src/ai/api/ai_industrytype.cpp +++ b/src/ai/api/ai_industrytype.cpp @@ -14,6 +14,7 @@ #include "../../command_type.h" #include "../../strings_func.h" #include "../../industry.h" +#include "../../core/random_func.hpp" /* static */ bool AIIndustryType::IsValidIndustryType(IndustryType industry_type) { diff --git a/src/ai/api/ai_list.cpp b/src/ai/api/ai_list.cpp index f93e504f11..4194d10e85 100644 --- a/src/ai/api/ai_list.cpp +++ b/src/ai/api/ai_list.cpp @@ -9,7 +9,6 @@ /** @file ai_list.cpp Implementation of AIList. */ -#include #include "ai_list.hpp" void AIList::AddItem(int32 item, int32 value) diff --git a/src/ai/api/ai_map.cpp b/src/ai/api/ai_map.cpp index d5728b9ebc..c9432fa26b 100644 --- a/src/ai/api/ai_map.cpp +++ b/src/ai/api/ai_map.cpp @@ -9,7 +9,6 @@ /** @file ai_map.cpp Implementation of AIMap. */ -#include "../../stdafx.h" #include "ai_map.hpp" #include "../../tile_map.h" diff --git a/src/ai/api/ai_object.cpp b/src/ai/api/ai_object.cpp index c6b0da1bcd..eb9e247e7b 100644 --- a/src/ai/api/ai_object.cpp +++ b/src/ai/api/ai_object.cpp @@ -14,8 +14,6 @@ #include "../../script/squirrel.hpp" #include "../../company_base.h" -#include "table/strings.h" -#include "../ai.hpp" #include "../ai_storage.hpp" #include "../ai_instance.hpp" #include "ai_error.hpp" diff --git a/src/ai/api/ai_rail.cpp b/src/ai/api/ai_rail.cpp index 39781bc449..eb2e016285 100644 --- a/src/ai/api/ai_rail.cpp +++ b/src/ai/api/ai_rail.cpp @@ -16,6 +16,7 @@ #include "../../debug.h" #include "../../station_base.h" #include "../../company_func.h" +#include "../../newgrf.h" #include "../../newgrf_generic.h" #include "../../newgrf_station.h" diff --git a/src/ai/api/ai_road.cpp b/src/ai/api/ai_road.cpp index c221bbff0a..c43eb64ecb 100644 --- a/src/ai/api/ai_road.cpp +++ b/src/ai/api/ai_road.cpp @@ -9,7 +9,6 @@ /** @file ai_road.cpp Implementation of AIRoad. */ -#include "../../stdafx.h" #include "ai_map.hpp" #include "ai_station.hpp" #include "ai_cargo.hpp" diff --git a/src/ai/api/ai_station.cpp b/src/ai/api/ai_station.cpp index af9d184c8c..670355dffa 100644 --- a/src/ai/api/ai_station.cpp +++ b/src/ai/api/ai_station.cpp @@ -9,7 +9,6 @@ /** @file ai_station.cpp Implementation of AIStation. */ -#include "../../stdafx.h" #include "ai_station.hpp" #include "ai_cargo.hpp" #include "ai_map.hpp" diff --git a/src/ai/api/ai_testmode.cpp b/src/ai/api/ai_testmode.cpp index d7dc82ee3b..832aff3292 100644 --- a/src/ai/api/ai_testmode.cpp +++ b/src/ai/api/ai_testmode.cpp @@ -10,7 +10,6 @@ /** @file ai_testmode.cpp Implementation of AITestMode. */ #include "ai_testmode.hpp" -#include "../../command_type.h" #include "../../company_base.h" #include "../../company_func.h" #include "../ai_instance.hpp" diff --git a/src/ai/api/ai_tile.cpp b/src/ai/api/ai_tile.cpp index aeaba0b06f..04c977626d 100644 --- a/src/ai/api/ai_tile.cpp +++ b/src/ai/api/ai_tile.cpp @@ -14,7 +14,6 @@ #include "ai_town.hpp" #include "../../station_func.h" #include "../../company_func.h" -#include "../../road_map.h" #include "../../water_map.h" #include "../../clear_map.h" #include "../../tree_map.h" diff --git a/src/ai/api/ai_vehicle.cpp b/src/ai/api/ai_vehicle.cpp index 03f39bae63..6784ee4b82 100644 --- a/src/ai/api/ai_vehicle.cpp +++ b/src/ai/api/ai_vehicle.cpp @@ -22,6 +22,7 @@ #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.h b/src/aircraft.h index 1f28b2ea5d..049dca94fe 100644 --- a/src/aircraft.h +++ b/src/aircraft.h @@ -14,8 +14,6 @@ #include "station_map.h" #include "vehicle_base.h" -#include "engine_func.h" -#include "engine_base.h" struct Aircraft; diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index 0b2d1fcefe..91e6fb88e5 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -27,14 +27,15 @@ #include "sound_func.h" #include "functions.h" #include "cheat_type.h" -#include "autoreplace_func.h" +#include "company_base.h" #include "autoreplace_gui.h" -#include "gfx_func.h" #include "ai/ai.hpp" #include "company_func.h" #include "effectvehicle_func.h" #include "station_base.h" -#include "cargotype.h" +#include "engine_base.h" +#include "engine_func.h" +#include "core/random_func.hpp" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/aircraft_gui.cpp b/src/aircraft_gui.cpp index 202a8275dd..d7f2cb88bb 100644 --- a/src/aircraft_gui.cpp +++ b/src/aircraft_gui.cpp @@ -15,7 +15,6 @@ #include "newgrf_engine.h" #include "strings_func.h" #include "vehicle_func.h" -#include "gfx_func.h" #include "window_gui.h" #include "spritecache.h" diff --git a/src/airport.h b/src/airport.h index 65375a9b9d..2ee8d9ff5b 100644 --- a/src/airport.h +++ b/src/airport.h @@ -14,7 +14,6 @@ #include "direction_type.h" #include "map_type.h" -#include "tile_type.h" #include "date_type.h" /** Current limits for airports */ diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp index f022d561c6..6c036dd214 100644 --- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -22,6 +22,7 @@ #include "company_func.h" #include "tilehighlight_func.h" #include "company_base.h" +#include "station_type.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/articulated_vehicles.cpp b/src/articulated_vehicles.cpp index 80a30952b5..eb20b3b818 100644 --- a/src/articulated_vehicles.cpp +++ b/src/articulated_vehicles.cpp @@ -14,6 +14,8 @@ #include "roadveh.h" #include "newgrf_engine.h" #include "vehicle_func.h" +#include "engine_base.h" +#include "engine_func.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/autoreplace_base.h b/src/autoreplace_base.h index 11a436b994..77a31538ab 100644 --- a/src/autoreplace_base.h +++ b/src/autoreplace_base.h @@ -14,6 +14,8 @@ #include "core/pool_type.hpp" #include "autoreplace_type.h" +#include "engine_type.h" +#include "group_type.h" typedef uint16 EngineRenewID; diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp index 0e7507cf68..1ba37d4709 100644 --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -20,6 +20,7 @@ #include "functions.h" #include "autoreplace_func.h" #include "articulated_vehicles.h" +#include "core/random_func.hpp" #include "table/strings.h" diff --git a/src/autoreplace_func.h b/src/autoreplace_func.h index 8f0bf2c56b..fd5c0568b5 100644 --- a/src/autoreplace_func.h +++ b/src/autoreplace_func.h @@ -12,8 +12,10 @@ #ifndef AUTOREPLACE_FUNC_H #define AUTOREPLACE_FUNC_H -#include "autoreplace_type.h" +#include "command_type.h" #include "company_base.h" +#include "engine_type.h" +#include "group_type.h" /** * Remove all engine replacement settings for the company. diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp index cdfaff1e68..e318fe7c0b 100644 --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -18,13 +18,13 @@ #include "strings_func.h" #include "window_func.h" #include "autoreplace_func.h" -#include "gfx_func.h" #include "company_func.h" #include "widgets/dropdown_type.h" #include "engine_base.h" #include "window_gui.h" #include "engine_gui.h" #include "settings_func.h" +#include "core/geometry_func.hpp" #include "table/strings.h" diff --git a/src/autoreplace_gui.h b/src/autoreplace_gui.h index ccfda132b1..b9692616bb 100644 --- a/src/autoreplace_gui.h +++ b/src/autoreplace_gui.h @@ -12,6 +12,8 @@ #ifndef AUTOREPLACE_GUI_H #define AUTOREPLACE_GUI_H +#include "engine_type.h" +#include "group_type.h" #include "vehicle_type.h" /** diff --git a/src/autoslope.h b/src/autoslope.h index c67276d090..ba1c075511 100644 --- a/src/autoslope.h +++ b/src/autoslope.h @@ -12,10 +12,11 @@ #ifndef AUTOSLOPE_H #define AUTOSLOPE_H -#include "settings_type.h" #include "company_func.h" #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. diff --git a/src/base_media_func.h b/src/base_media_func.h index 6db7137e58..434a6c722a 100644 --- a/src/base_media_func.h +++ b/src/base_media_func.h @@ -10,8 +10,9 @@ /** @file base_media_func.h Generic function implementations for base data (graphics, sounds). */ #include "base_media_base.h" -#include "string_func.h" +#include "debug.h" #include "ini_type.h" +#include "string_func.h" template /* static */ const char *BaseMedia::ini_set; template /* static */ const Tbase_set *BaseMedia::used_set; diff --git a/src/base_station_base.h b/src/base_station_base.h index f4c26fa7ea..6a157dfcb2 100644 --- a/src/base_station_base.h +++ b/src/base_station_base.h @@ -12,12 +12,7 @@ #ifndef BASE_STATION_BASE_H #define BASE_STATION_BASE_H -#include "station_type.h" #include "core/pool_type.hpp" -#include "town_type.h" -#include "strings_type.h" -#include "date_type.h" -#include "company_type.h" #include "viewport_type.h" #include "station_map.h" diff --git a/src/blitter/32bpp_anim.cpp b/src/blitter/32bpp_anim.cpp index 3390838e0d..a119eac47c 100644 --- a/src/blitter/32bpp_anim.cpp +++ b/src/blitter/32bpp_anim.cpp @@ -11,7 +11,6 @@ #include "../stdafx.h" #include "../core/math_func.hpp" -#include "../gfx_func.h" #include "../video/video_driver.hpp" #include "32bpp_anim.hpp" diff --git a/src/blitter/32bpp_anim.hpp b/src/blitter/32bpp_anim.hpp index 9063bf14ce..51ad48ab40 100644 --- a/src/blitter/32bpp_anim.hpp +++ b/src/blitter/32bpp_anim.hpp @@ -13,7 +13,6 @@ #define BLITTER_32BPP_ANIM_HPP #include "32bpp_optimized.hpp" -#include "factory.hpp" class Blitter_32bppAnim : public Blitter_32bppOptimized { private: diff --git a/src/blitter/32bpp_base.cpp b/src/blitter/32bpp_base.cpp index 427a534c08..a7d7e34a2b 100644 --- a/src/blitter/32bpp_base.cpp +++ b/src/blitter/32bpp_base.cpp @@ -10,7 +10,6 @@ /** @file 32bpp_base.cpp Implementation of base for 32 bpp blitters. */ #include "../stdafx.h" -#include "../gfx_func.h" #include "32bpp_base.hpp" void *Blitter_32bppBase::MoveTo(const void *video, int x, int y) diff --git a/src/blitter/32bpp_base.hpp b/src/blitter/32bpp_base.hpp index a69315abd4..5967de5789 100644 --- a/src/blitter/32bpp_base.hpp +++ b/src/blitter/32bpp_base.hpp @@ -14,6 +14,7 @@ #include "base.hpp" #include "../core/bitmath_func.hpp" +#include "../gfx_func.h" class Blitter_32bppBase : public Blitter { public: diff --git a/src/blitter/32bpp_optimized.cpp b/src/blitter/32bpp_optimized.cpp index bfc8bd4225..492e4b66f7 100644 --- a/src/blitter/32bpp_optimized.cpp +++ b/src/blitter/32bpp_optimized.cpp @@ -11,7 +11,6 @@ #include "../stdafx.h" #include "../zoom_func.h" -#include "../gfx_func.h" #include "../core/math_func.hpp" #include "32bpp_optimized.hpp" diff --git a/src/blitter/32bpp_simple.cpp b/src/blitter/32bpp_simple.cpp index 03393cfbf9..d75f0a0d48 100644 --- a/src/blitter/32bpp_simple.cpp +++ b/src/blitter/32bpp_simple.cpp @@ -10,7 +10,6 @@ /** @file 32bpp_simple.cpp Implementation of the simple 32 bpp blitter. */ #include "../stdafx.h" -#include "../gfx_func.h" #include "../zoom_func.h" #include "32bpp_simple.hpp" diff --git a/src/blitter/base.hpp b/src/blitter/base.hpp index 278f3b7c8d..c8973c5423 100644 --- a/src/blitter/base.hpp +++ b/src/blitter/base.hpp @@ -14,7 +14,6 @@ #include "../spritecache.h" #include "../spriteloader/spriteloader.hpp" -#include "../zoom_type.h" enum BlitterMode { BM_NORMAL, diff --git a/src/bridge.h b/src/bridge.h index db55050755..8b374cd507 100644 --- a/src/bridge.h +++ b/src/bridge.h @@ -13,7 +13,6 @@ #define BRIDGE_H #include "gfx_type.h" -#include "direction_type.h" #include "tile_cmd.h" /** This enum is related to the definition of bridge pieces, diff --git a/src/bridge_gui.cpp b/src/bridge_gui.cpp index d943692322..0651c63d0f 100644 --- a/src/bridge_gui.cpp +++ b/src/bridge_gui.cpp @@ -11,7 +11,6 @@ #include "stdafx.h" #include "gui.h" -#include "window_gui.h" #include "command_func.h" #include "economy_func.h" #include "bridge.h" @@ -22,6 +21,7 @@ #include "tunnelbridge.h" #include "sortlist_type.h" #include "widgets/dropdown_func.h" +#include "core/geometry_func.hpp" #include "table/strings.h" diff --git a/src/bridge_map.h b/src/bridge_map.h index 695b842ade..514b405dd7 100644 --- a/src/bridge_map.h +++ b/src/bridge_map.h @@ -12,9 +12,6 @@ #ifndef BRIDGE_MAP_H #define BRIDGE_MAP_H -#include "direction_func.h" -#include "rail_type.h" -#include "transport_type.h" #include "road_map.h" #include "bridge.h" diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index a0660d4ed8..07b763de28 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -9,10 +9,9 @@ /** @file build_vehicle_gui.cpp GUI for building vehicles. */ -#include "train.h" -#include "roadveh.h" -#include "ship.h" -#include "aircraft.h" +#include "stdafx.h" +#include "engine_base.h" +#include "engine_func.h" #include "station_base.h" #include "articulated_vehicles.h" #include "textbuf_gui.h" @@ -26,9 +25,7 @@ #include "window_func.h" #include "date_func.h" #include "vehicle_func.h" -#include "gfx_func.h" #include "widgets/dropdown_func.h" -#include "window_gui.h" #include "engine_gui.h" #include "cargotype.h" diff --git a/src/cargopacket.h b/src/cargopacket.h index 64fd7145a9..dfd5e72d9c 100644 --- a/src/cargopacket.h +++ b/src/cargopacket.h @@ -14,7 +14,6 @@ #include "core/pool_type.hpp" #include "economy_type.h" -#include "tile_type.h" #include "station_type.h" #include "cargo_type.h" #include "vehicle_type.h" diff --git a/src/clear_cmd.cpp b/src/clear_cmd.cpp index 461cf4368b..863aa43196 100644 --- a/src/clear_cmd.cpp +++ b/src/clear_cmd.cpp @@ -21,6 +21,7 @@ #include "economy_func.h" #include "viewport_func.h" #include "water.h" +#include "core/random_func.hpp" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/company_base.h b/src/company_base.h index a88ca5800c..e43186d855 100644 --- a/src/company_base.h +++ b/src/company_base.h @@ -12,12 +12,9 @@ #ifndef COMPANY_BASE_H #define COMPANY_BASE_H -#include "company_type.h" #include "core/pool_type.hpp" #include "road_type.h" #include "rail_type.h" -#include "date_type.h" -#include "engine_type.h" #include "livery.h" #include "autoreplace_type.h" #include "economy_type.h" diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index 9629a0cb61..e968108ea3 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -34,6 +34,7 @@ #include "settings_func.h" #include "vehicle_base.h" #include "vehicle_func.h" +#include "sprite.h" #include "table/strings.h" diff --git a/src/company_func.h b/src/company_func.h index c458048ec4..4b520ce7bb 100644 --- a/src/company_func.h +++ b/src/company_func.h @@ -12,10 +12,8 @@ #ifndef COMPANY_FUNC_H #define COMPANY_FUNC_H -#include "core/math_func.hpp" #include "company_type.h" #include "tile_type.h" -#include "strings_type.h" #include "gfx_type.h" void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner); diff --git a/src/company_gui.cpp b/src/company_gui.cpp index 42a0a6cc09..642bb3e6d7 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -14,7 +14,6 @@ #include "window_gui.h" #include "textbuf_gui.h" #include "viewport_func.h" -#include "gfx_func.h" #include "company_func.h" #include "command_func.h" #include "network/network.h" @@ -28,6 +27,9 @@ #include "date_func.h" #include "widgets/dropdown_type.h" #include "tilehighlight_func.h" +#include "sprite.h" +#include "company_base.h" +#include "core/geometry_func.hpp" #include "table/strings.h" diff --git a/src/console.cpp b/src/console.cpp index c8bb2a5644..6799f7dd49 100644 --- a/src/console.cpp +++ b/src/console.cpp @@ -14,6 +14,7 @@ #include "network/network.h" #include "network/network_func.h" #include "debug.h" +#include "console_func.h" #include diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index 2d1261482b..6e50b50db8 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -34,6 +34,7 @@ #include "gamelog.h" #include "ai/ai.hpp" #include "ai/ai_config.hpp" +#include "console_func.h" #ifdef ENABLE_NETWORK #include "table/strings.h" diff --git a/src/console_gui.cpp b/src/console_gui.cpp index 746e83ca34..ac0e6103c9 100644 --- a/src/console_gui.cpp +++ b/src/console_gui.cpp @@ -18,6 +18,7 @@ #include "string_func.h" #include "gfx_func.h" #include "settings_type.h" +#include "console_func.h" #include "rev.h" diff --git a/src/console_internal.h b/src/console_internal.h index f36ee39508..d4b3748a02 100644 --- a/src/console_internal.h +++ b/src/console_internal.h @@ -12,7 +12,7 @@ #ifndef CONSOLE_INTERNAL_H #define CONSOLE_INTERNAL_H -#include "console_func.h" +#include "console_type.h" enum { ICON_CMDLN_SIZE = 1024, ///< maximum length of a typed in command diff --git a/src/core/mem_func.hpp b/src/core/mem_func.hpp index 2443d9ccbe..42e7b42f4c 100644 --- a/src/core/mem_func.hpp +++ b/src/core/mem_func.hpp @@ -12,7 +12,6 @@ #ifndef MEM_FUNC_HPP #define MEM_FUNC_HPP -#include #include "math_func.hpp" /** diff --git a/src/core/sort_func.hpp b/src/core/sort_func.hpp index d3bb7202ab..180191f4db 100644 --- a/src/core/sort_func.hpp +++ b/src/core/sort_func.hpp @@ -12,8 +12,6 @@ #ifndef SORT_FUNC_HPP #define SORT_FUNC_HPP -#include -#include "math_func.hpp" #include "mem_func.hpp" /** diff --git a/src/crashlog.cpp b/src/crashlog.cpp index 670d6a8dcd..60dbb480ea 100644 --- a/src/crashlog.cpp +++ b/src/crashlog.cpp @@ -26,12 +26,10 @@ #include "gfx_func.h" #include "network/network.h" -#include #include "ai/ai_info.hpp" #include "company_base.h" #include "company_func.h" -#include /* static */ const char *CrashLog::message = NULL; /* static */ char *CrashLog::gamelog_buffer = NULL; diff --git a/src/date_gui.cpp b/src/date_gui.cpp index bb4d363e4e..749b15c62a 100644 --- a/src/date_gui.cpp +++ b/src/date_gui.cpp @@ -12,10 +12,10 @@ #include "stdafx.h" #include "strings_func.h" #include "date_func.h" -#include "gfx_func.h" #include "window_func.h" #include "window_gui.h" #include "date_gui.h" +#include "core/geometry_func.hpp" #include "widgets/dropdown_type.h" diff --git a/src/date_gui.h b/src/date_gui.h index f15f6b34a2..314baba3ca 100644 --- a/src/date_gui.h +++ b/src/date_gui.h @@ -12,6 +12,9 @@ #ifndef DATE_GUI_H #define DATE_GUI_H +#include "date_type.h" +#include "window_type.h" + /** * Callback for when a date has been chosen * @param w the window that sends the callback diff --git a/src/debug.cpp b/src/debug.cpp index fcf7162550..39bef29139 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -14,13 +14,13 @@ #include "console_func.h" #include "debug.h" #include "string_func.h" -#include "network/core/core.h" #include "fileio_func.h" #include "settings_type.h" #include #if defined(ENABLE_NETWORK) +#include "network/core/os_abstraction.h" SOCKET _debug_socket = INVALID_SOCKET; #endif /* ENABLE_NETWORK */ diff --git a/src/depot_base.h b/src/depot_base.h index 521e1e33e7..82d78eb606 100644 --- a/src/depot_base.h +++ b/src/depot_base.h @@ -12,10 +12,8 @@ #ifndef DEPOT_BASE_H #define DEPOT_BASE_H -#include "tile_type.h" #include "depot_map.h" #include "core/pool_type.hpp" -#include "town_type.h" typedef Pool DepotPool; extern DepotPool _depot_pool; diff --git a/src/depot_func.h b/src/depot_func.h index 5332299db4..46c754b48d 100644 --- a/src/depot_func.h +++ b/src/depot_func.h @@ -12,7 +12,6 @@ #ifndef DEPOT_FUNC_H #define DEPOT_FUNC_H -#include "depot_type.h" #include "tile_type.h" #include "vehicle_type.h" #include "direction_type.h" diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp index 2f3a57940f..ee413dd59d 100644 --- a/src/depot_gui.cpp +++ b/src/depot_gui.cpp @@ -9,6 +9,8 @@ /** @file depot_gui.cpp The GUI for depots. */ +#include "stdafx.h" +#include "engine_base.h" #include "train.h" #include "ship.h" #include "aircraft.h" @@ -16,7 +18,6 @@ #include "gui.h" #include "textbuf_gui.h" #include "viewport_func.h" -#include "gfx_func.h" #include "command_func.h" #include "depot_base.h" #include "vehicle_gui.h" diff --git a/src/depot_map.h b/src/depot_map.h index ecf2960e14..b4f7a11ecf 100644 --- a/src/depot_map.h +++ b/src/depot_map.h @@ -12,9 +12,6 @@ #ifndef DEPOT_MAP_H #define DEPOT_MAP_H -#include "road_map.h" -#include "rail_map.h" -#include "water_map.h" #include "station_map.h" /** diff --git a/src/disaster_cmd.cpp b/src/disaster_cmd.cpp index 3dec6e5e09..873a6f421d 100644 --- a/src/disaster_cmd.cpp +++ b/src/disaster_cmd.cpp @@ -41,6 +41,8 @@ #include "effectvehicle_func.h" #include "roadveh.h" #include "ai/ai.hpp" +#include "company_base.h" +#include "core/random_func.hpp" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp index 59a17b512c..bdbb12c1f3 100644 --- a/src/dock_gui.cpp +++ b/src/dock_gui.cpp @@ -26,6 +26,7 @@ #include "slope_func.h" #include "tilehighlight_func.h" #include "company_base.h" +#include "station_type.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/driver.cpp b/src/driver.cpp index 96ccd761eb..f0e5d70dbe 100644 --- a/src/driver.cpp +++ b/src/driver.cpp @@ -14,6 +14,7 @@ #include "sound/sound_driver.hpp" #include "music/music_driver.hpp" #include "video/video_driver.hpp" +#include "string_func.h" VideoDriver *_video_driver; char *_ini_videodriver; diff --git a/src/driver.h b/src/driver.h index 17019877e6..cf86051de0 100644 --- a/src/driver.h +++ b/src/driver.h @@ -14,7 +14,6 @@ #include "core/enum_type.hpp" #include "core/string_compare_type.hpp" -#include "string_func.h" #include const char *GetDriverParam(const char * const *parm, const char *name); diff --git a/src/economy.cpp b/src/economy.cpp index 83fa47b0b5..0f814e0cf6 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -10,7 +10,6 @@ /** @file economy.cpp Handling of the economy. */ #include "stdafx.h" -#include "tile_cmd.h" #include "company_func.h" #include "command_func.h" #include "industry.h" @@ -36,7 +35,6 @@ #include "date_func.h" #include "vehicle_func.h" #include "sound_func.h" -#include "gfx_func.h" #include "autoreplace_func.h" #include "company_gui.h" #include "signs_base.h" @@ -46,6 +44,8 @@ #include "waypoint_base.h" #include "economy_base.h" #include "core/pool_func.hpp" +#include "newgrf.h" +#include "engine_base.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/economy_func.h b/src/economy_func.h index e03d057781..dfeefbb9c1 100644 --- a/src/economy_func.h +++ b/src/economy_func.h @@ -12,16 +12,11 @@ #ifndef ECONOMY_FUNC_H #define ECONOMY_FUNC_H -#include "core/geometry_type.hpp" #include "economy_type.h" +#include "station_type.h" #include "cargo_type.h" #include "vehicle_type.h" -#include "tile_type.h" -#include "town_type.h" -#include "industry_type.h" #include "company_type.h" -#include "station_type.h" -#include "station_func.h" void ResetPriceBaseMultipliers(); void SetPriceBaseMultiplier(Price price, int factor); diff --git a/src/economy_type.h b/src/economy_type.h index fd861e0b21..450b9cc88c 100644 --- a/src/economy_type.h +++ b/src/economy_type.h @@ -14,7 +14,6 @@ #include "core/overflowsafe_type.hpp" #include "core/enum_type.hpp" -#include "cargo_type.h" typedef OverflowSafeInt64 Money; diff --git a/src/effectvehicle.cpp b/src/effectvehicle.cpp index f6f912b351..1ad8cd297f 100644 --- a/src/effectvehicle.cpp +++ b/src/effectvehicle.cpp @@ -17,6 +17,7 @@ #include "sound_func.h" #include "animated_tile_func.h" #include "effectvehicle_func.h" +#include "effectvehicle_base.h" #include "table/sprites.h" diff --git a/src/effectvehicle_func.h b/src/effectvehicle_func.h index c4564aeb2c..573632a60e 100644 --- a/src/effectvehicle_func.h +++ b/src/effectvehicle_func.h @@ -12,7 +12,7 @@ #ifndef EFFECTVEHICLE_FUNC_H #define EFFECTVEHICLE_FUNC_H -#include "effectvehicle_base.h" +#include "vehicle_type.h" /** Effect vehicle types */ enum EffectVehicleType { diff --git a/src/elrail.cpp b/src/elrail.cpp index d121679e68..d53ade09e4 100644 --- a/src/elrail.cpp +++ b/src/elrail.cpp @@ -54,7 +54,6 @@ */ #include "stdafx.h" -#include "openttd.h" #include "station_map.h" #include "viewport_func.h" #include "landscape.h" @@ -64,6 +63,7 @@ #include "tunnelbridge.h" #include "elrail_func.h" #include "engine_base.h" +#include "company_base.h" #include "table/sprites.h" #include "table/elrail_data.h" diff --git a/src/elrail_func.h b/src/elrail_func.h index 0f5210613f..e72f784252 100644 --- a/src/elrail_func.h +++ b/src/elrail_func.h @@ -13,9 +13,8 @@ #define ELRAIL_FUNC_H #include "rail.h" -#include "transparency.h" #include "tile_cmd.h" -#include "settings_type.h" +#include "transparency.h" /** * Test if a rail type has catenary diff --git a/src/engine.cpp b/src/engine.cpp index 0656304758..f3d8133ec0 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -18,7 +18,6 @@ #include "newgrf_engine.h" #include "group.h" #include "strings_func.h" -#include "gfx_func.h" #include "core/random_func.hpp" #include "window_func.h" #include "date_func.h" @@ -27,6 +26,9 @@ #include "ai/ai.hpp" #include "core/pool_func.hpp" #include "engine_gui.h" +#include "engine_func.h" +#include "engine_base.h" +#include "company_base.h" #include "table/strings.h" #include "table/engines.h" diff --git a/src/engine_base.h b/src/engine_base.h index f3a8192770..c7e3823d5b 100644 --- a/src/engine_base.h +++ b/src/engine_base.h @@ -12,8 +12,9 @@ #ifndef ENGINE_BASE_H #define ENGINE_BASE_H +#include "company_type.h" #include "engine_type.h" -#include "economy_type.h" +#include "vehicle_type.h" #include "core/pool_type.hpp" #include "core/smallvec_type.hpp" diff --git a/src/engine_func.h b/src/engine_func.h index 518bdc4228..5b89f6cc53 100644 --- a/src/engine_func.h +++ b/src/engine_func.h @@ -13,6 +13,8 @@ #define ENGINE_H #include "engine_type.h" +#include "vehicle_type.h" +#include "company_type.h" void SetupEngines(); void StartupEngines(); diff --git a/src/engine_gui.h b/src/engine_gui.h index 139b6107c9..4e4b51ff6c 100644 --- a/src/engine_gui.h +++ b/src/engine_gui.h @@ -12,7 +12,9 @@ #ifndef ENGINE_GUI_H #define ENGINE_GUI_H +#include "engine_type.h" #include "sortlist_type.h" +#include "gfx_type.h" typedef GUIList GUIEngineList; diff --git a/src/engine_type.h b/src/engine_type.h index 234bc27e37..48a408b6dc 100644 --- a/src/engine_type.h +++ b/src/engine_type.h @@ -15,11 +15,8 @@ #include "economy_type.h" #include "rail_type.h" #include "cargo_type.h" -#include "vehicle_type.h" -#include "gfx_type.h" #include "date_type.h" #include "sound_type.h" -#include "company_type.h" #include "strings_type.h" typedef uint16 EngineID; diff --git a/src/fontcache.h b/src/fontcache.h index c84ddb581a..affc2606c4 100644 --- a/src/fontcache.h +++ b/src/fontcache.h @@ -12,7 +12,6 @@ #ifndef FONTCACHE_H #define FONTCACHE_H -#include "gfx_type.h" #include "spritecache.h" /** Get the SpriteID mapped to the given font size and key */ diff --git a/src/functions.h b/src/functions.h index 559f948466..28c8f16bbf 100644 --- a/src/functions.h +++ b/src/functions.h @@ -12,8 +12,6 @@ #ifndef FUNCTIONS_H #define FUNCTIONS_H -#include "core/random_func.hpp" -#include "command_type.h" #include "tile_cmd.h" /* clear_land.cpp */ diff --git a/src/gamelog.cpp b/src/gamelog.cpp index 17bc58cc47..d87bffb841 100644 --- a/src/gamelog.cpp +++ b/src/gamelog.cpp @@ -16,7 +16,6 @@ #include "variables.h" #include "string_func.h" #include "settings_type.h" -#include "gamelog.h" #include "gamelog_internal.h" #include "console_func.h" #include "debug.h" diff --git a/src/gamelog_internal.h b/src/gamelog_internal.h index cccda154f5..ad9921f4e8 100644 --- a/src/gamelog_internal.h +++ b/src/gamelog_internal.h @@ -13,6 +13,7 @@ #define GAMELOG_INTERNAL_H #include "network/core/config.h" +#include "gamelog.h" /** Type of logged change */ enum GamelogChangeType { diff --git a/src/genworld.cpp b/src/genworld.cpp index 05cac4d1af..f6f33d3dae 100644 --- a/src/genworld.cpp +++ b/src/genworld.cpp @@ -33,6 +33,7 @@ #include "void_map.h" #include "town.h" #include "newgrf.h" +#include "core/random_func.hpp" #include "table/sprites.h" diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp index 68faeca8d7..20417b68fe 100644 --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -23,7 +23,6 @@ #include "sound_func.h" #include "fios.h" #include "string_func.h" -#include "gfx_func.h" #include "widgets/dropdown_type.h" #include "widgets/dropdown_func.h" #include "landscape_type.h" @@ -31,6 +30,8 @@ #include "town.h" #include "thread/thread.h" #include "settings_func.h" +#include "core/geometry_func.hpp" +#include "core/random_func.hpp" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/gfx_type.h b/src/gfx_type.h index dd9795af25..fd34951593 100644 --- a/src/gfx_type.h +++ b/src/gfx_type.h @@ -13,7 +13,6 @@ #define GFX_TYPE_H #include "core/endian_type.hpp" -#include "core/enum_type.hpp" #include "core/geometry_type.hpp" #include "zoom_type.h" diff --git a/src/gfxinit.cpp b/src/gfxinit.cpp index ae01f6571a..999d248562 100644 --- a/src/gfxinit.cpp +++ b/src/gfxinit.cpp @@ -10,7 +10,6 @@ /** @file gfxinit.cpp Initializing of the (GRF) graphics. */ #include "stdafx.h" -#include "debug.h" #include "fios.h" #include "newgrf.h" #include "3rdparty/md5/md5.h" diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index 4867ffa61d..5f07a2b45c 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -22,6 +22,7 @@ #include "date_func.h" #include "gfx_func.h" #include "sortlist_type.h" +#include "core/geometry_func.hpp" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/group_gui.cpp b/src/group_gui.cpp index be0326465d..d5f54826be 100644 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -11,7 +11,6 @@ #include "stdafx.h" #include "openttd.h" -#include "window_gui.h" #include "textbuf_gui.h" #include "command_func.h" #include "vehicle_gui.h" @@ -21,12 +20,13 @@ #include "window_func.h" #include "vehicle_func.h" #include "autoreplace_gui.h" -#include "gfx_func.h" #include "company_func.h" #include "widgets/dropdown_type.h" #include "widgets/dropdown_func.h" #include "tilehighlight_func.h" #include "vehicle_gui_base.h" +#include "core/geometry_func.hpp" +#include "company_base.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/group_gui.h b/src/group_gui.h index 1a58f3ee86..108d611e75 100644 --- a/src/group_gui.h +++ b/src/group_gui.h @@ -12,6 +12,7 @@ #ifndef GROUP_GUI_H #define GROUP_GUI_H +#include "company_type.h" #include "vehicle_type.h" void ShowCompanyGroup(CompanyID company, VehicleType veh); diff --git a/src/gui.h b/src/gui.h index 744ae02c2b..3a01edba14 100644 --- a/src/gui.h +++ b/src/gui.h @@ -12,7 +12,6 @@ #ifndef GUI_H #define GUI_H -#include "window_type.h" #include "vehicle_type.h" #include "gfx_type.h" #include "economy_type.h" diff --git a/src/highscore.cpp b/src/highscore.cpp index 51fb841a60..d56e2f5118 100644 --- a/src/highscore.cpp +++ b/src/highscore.cpp @@ -9,6 +9,7 @@ /** @file highscore.cpp Definition of functions used for highscore handling */ +#include "stdafx.h" #include "highscore.h" #include "company_base.h" #include "company_func.h" diff --git a/src/highscore.h b/src/highscore.h index a3e8336371..d886d7648e 100644 --- a/src/highscore.h +++ b/src/highscore.h @@ -12,9 +12,7 @@ #ifndef HIGHSCORE_H #define HIGHSCORE_H -#include "stdafx.h" #include "strings_type.h" -#include "core/math_func.hpp" #include "company_type.h" struct HighScore { diff --git a/src/highscore_gui.cpp b/src/highscore_gui.cpp index d4e8c4b136..c65a5eaf85 100644 --- a/src/highscore_gui.cpp +++ b/src/highscore_gui.cpp @@ -9,6 +9,7 @@ /** @file highscore_gui.cpp Definition of the HighScore and EndGame windows */ +#include "stdafx.h" #include "highscore.h" #include "table/strings.h" #include "gfx_func.h" diff --git a/src/industry.h b/src/industry.h index dd81cba72d..27d56af5be 100644 --- a/src/industry.h +++ b/src/industry.h @@ -13,13 +13,7 @@ #define INDUSTRY_H #include "core/pool_type.hpp" -#include "core/random_func.hpp" #include "newgrf_storage.h" -#include "cargo_type.h" -#include "economy_type.h" -#include "map_type.h" -#include "industry_type.h" -#include "tile_type.h" #include "subsidy_type.h" #include "industry_map.h" #include "tilearea_type.h" diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 4a414ea83b..b2eb905f59 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -10,7 +10,6 @@ /** @file industry_cmd.cpp Handling of industry tiles. */ #include "stdafx.h" -#include "openttd.h" #include "clear_map.h" #include "industry.h" #include "station_base.h" @@ -30,7 +29,6 @@ #include "newgrf_industries.h" #include "newgrf_industrytiles.h" #include "autoslope.h" -#include "transparency.h" #include "water.h" #include "strings_func.h" #include "functions.h" @@ -40,6 +38,7 @@ #include "sound_func.h" #include "animated_tile_func.h" #include "effectvehicle_func.h" +#include "effectvehicle_base.h" #include "ai/ai.hpp" #include "core/pool_func.hpp" #include "subsidy_func.h" diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index 9749ae756c..97b2380371 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -12,7 +12,6 @@ #include "stdafx.h" #include "openttd.h" #include "gui.h" -#include "window_gui.h" #include "textbuf_gui.h" #include "command_func.h" #include "viewport_func.h" @@ -31,6 +30,8 @@ #include "sortlist_type.h" #include "widgets/dropdown_func.h" #include "company_base.h" +#include "core/geometry_func.hpp" +#include "core/random_func.hpp" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/industry_map.h b/src/industry_map.h index 1e07ca0729..02e7cfafed 100644 --- a/src/industry_map.h +++ b/src/industry_map.h @@ -13,7 +13,6 @@ #define INDUSTRY_MAP_H #include "industrytype.h" -#include "tile_map.h" #include "water_map.h" diff --git a/src/industrytype.h b/src/industrytype.h index 8b86526e1a..f4834a6cf1 100644 --- a/src/industrytype.h +++ b/src/industrytype.h @@ -12,13 +12,13 @@ #ifndef INDUSTRYTYPE_H #define INDUSTRYTYPE_H -#include "core/enum_type.hpp" #include "economy_type.h" #include "map_type.h" #include "slope_type.h" #include "industry_type.h" #include "landscape_type.h" -#include "tile_type.h" +#include "strings_type.h" +#include "cargo_type.h" enum { CLEAN_RANDOMSOUNDS, ///< Free the dynamically allocated sounds table diff --git a/src/intro_gui.cpp b/src/intro_gui.cpp index f994d8bff4..a643257fab 100644 --- a/src/intro_gui.cpp +++ b/src/intro_gui.cpp @@ -25,6 +25,7 @@ #include "functions.h" #include "ai/ai_gui.hpp" #include "gfx_func.h" +#include "core/geometry_func.hpp" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/landscape.cpp b/src/landscape.cpp index 3cc7a6fc8b..9bf1e29732 100644 --- a/src/landscape.cpp +++ b/src/landscape.cpp @@ -29,6 +29,7 @@ #include "effectvehicle_func.h" #include "landscape_type.h" #include "animated_tile_func.h" +#include "core/random_func.hpp" #include "table/sprites.h" diff --git a/src/landscape.h b/src/landscape.h index 46d263ae54..cc64b0cf1d 100644 --- a/src/landscape.h +++ b/src/landscape.h @@ -14,8 +14,6 @@ #include "core/geometry_type.hpp" #include "tile_cmd.h" -#include "slope_type.h" -#include "direction_type.h" enum { SNOW_LINE_MONTHS = 12, ///< Number of months in the snow line table. diff --git a/src/main_gui.cpp b/src/main_gui.cpp index 64f7cebad8..ed05584cf8 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp @@ -10,7 +10,6 @@ /** @file main_gui.cpp Handling of the main viewport. */ #include "stdafx.h" -#include "openttd.h" #include "currency.h" #include "spritecache.h" #include "window_gui.h" diff --git a/src/misc/array.hpp b/src/misc/array.hpp index 5ae836a085..f5a6021559 100644 --- a/src/misc/array.hpp +++ b/src/misc/array.hpp @@ -13,6 +13,7 @@ #define ARRAY_HPP #include "fixedsizearray.hpp" +#include "str.hpp" /** Flexible array with size limit. Implemented as fixed size * array of fixed size arrays */ diff --git a/src/misc/blob.hpp b/src/misc/blob.hpp index 17e3a5947c..d475231b66 100644 --- a/src/misc/blob.hpp +++ b/src/misc/blob.hpp @@ -14,6 +14,7 @@ #include "../core/alloc_func.hpp" #include "../core/mem_func.hpp" +#include /** Base class for simple binary blobs. * Item is byte. diff --git a/src/misc/dbg_helpers.h b/src/misc/dbg_helpers.h index 56eebb247d..670548d351 100644 --- a/src/misc/dbg_helpers.h +++ b/src/misc/dbg_helpers.h @@ -12,13 +12,16 @@ #ifndef DBG_HELPERS_H #define DBG_HELPERS_H -#include #include #include -#include "blob.hpp" #include "str.hpp" +#include "../direction_type.h" +#include "../signal_type.h" +#include "../tile_type.h" +#include "../track_type.h" + /** Helper template class that provides C array length and item type */ template struct ArrayT; diff --git a/src/misc/fixedsizearray.hpp b/src/misc/fixedsizearray.hpp index b17755c5eb..3e39cc4d9d 100644 --- a/src/misc/fixedsizearray.hpp +++ b/src/misc/fixedsizearray.hpp @@ -12,6 +12,7 @@ #ifndef FIXEDSIZEARRAY_HPP #define FIXEDSIZEARRAY_HPP +#include "../core/alloc_func.hpp" /** fixed size array * Upon construction it preallocates fixed size block of memory diff --git a/src/misc/str.hpp b/src/misc/str.hpp index 64e401adb8..8ef8e8f877 100644 --- a/src/misc/str.hpp +++ b/src/misc/str.hpp @@ -14,6 +14,7 @@ #include #include +#include "blob.hpp" #include "../string_func.h" /** Blob based case sensitive ANSI/UTF-8 string */ diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index 27b82a0c30..56e757d91a 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -33,6 +33,7 @@ #include "window_func.h" #include "tilehighlight_func.h" #include "querystring_gui.h" +#include "core/geometry_func.hpp" #include "table/strings.h" diff --git a/src/music.cpp b/src/music.cpp index f7e8bbc1ca..b095a41979 100644 --- a/src/music.cpp +++ b/src/music.cpp @@ -10,7 +10,6 @@ /** @file music.cpp The songs that OpenTTD knows. */ #include "stdafx.h" -#include "debug.h" /* The type of set we're replacing */ #define SET_TYPE "music" diff --git a/src/music/extmidi.cpp b/src/music/extmidi.cpp index 2600442682..48ee9d20eb 100644 --- a/src/music/extmidi.cpp +++ b/src/music/extmidi.cpp @@ -12,6 +12,7 @@ #ifndef __MORPHOS__ #include "../stdafx.h" #include "../debug.h" +#include "../string_func.h" #include "../sound/sound_driver.hpp" #include "../video/video_driver.hpp" #include "extmidi.h" diff --git a/src/music/win32_m.cpp b/src/music/win32_m.cpp index 6a4ff3ec6e..51530487c4 100644 --- a/src/music/win32_m.cpp +++ b/src/music/win32_m.cpp @@ -10,6 +10,7 @@ /** @file win32_m.cpp Music playback for Windows. */ #include "../stdafx.h" +#include "../string_func.h" #include "win32_m.h" #include #include diff --git a/src/music_gui.cpp b/src/music_gui.cpp index 00ce891f37..333e40e332 100644 --- a/src/music_gui.cpp +++ b/src/music_gui.cpp @@ -11,7 +11,6 @@ #include "stdafx.h" #include "openttd.h" -#include "fileio_func.h" #include "base_media_base.h" #include "music/music_driver.hpp" #include "window_gui.h" @@ -21,6 +20,8 @@ #include "gfx_func.h" #include "core/random_func.hpp" #include "gui.h" +#include "core/geometry_func.hpp" +#include "string_func.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/network/core/core.cpp b/src/network/core/core.cpp index 76049f6fbf..4c724e47e9 100644 --- a/src/network/core/core.cpp +++ b/src/network/core/core.cpp @@ -15,6 +15,7 @@ #include "../../stdafx.h" #include "../../debug.h" +#include "os_abstraction.h" #include "packet.h" diff --git a/src/network/core/core.h b/src/network/core/core.h index a47ebff87f..bf013909a3 100644 --- a/src/network/core/core.h +++ b/src/network/core/core.h @@ -14,7 +14,6 @@ #ifndef NETWORK_CORE_H #define NETWORK_CORE_H -#include "os_abstraction.h" #include "../../newgrf_config.h" #ifdef ENABLE_NETWORK diff --git a/src/network/core/host.h b/src/network/core/host.h index 48f24e3188..46bfa4e1fa 100644 --- a/src/network/core/host.h +++ b/src/network/core/host.h @@ -14,6 +14,8 @@ #ifndef NETWORK_CORE_HOST_H #define NETWORK_CORE_HOST_H +#include "address.h" + void NetworkFindBroadcastIPs(NetworkAddressList *broadcast); #endif /* NETWORK_CORE_HOST_H */ diff --git a/src/network/core/tcp.h b/src/network/core/tcp.h index b24e241f13..b9866cc4e4 100644 --- a/src/network/core/tcp.h +++ b/src/network/core/tcp.h @@ -14,9 +14,7 @@ #ifndef NETWORK_CORE_TCP_H #define NETWORK_CORE_TCP_H -#include "os_abstraction.h" #include "address.h" -#include "core.h" #include "packet.h" #ifdef ENABLE_NETWORK diff --git a/src/network/core/tcp_game.cpp b/src/network/core/tcp_game.cpp index 027498ea17..ec41d13272 100644 --- a/src/network/core/tcp_game.cpp +++ b/src/network/core/tcp_game.cpp @@ -15,6 +15,7 @@ #include "../../stdafx.h" +#include "../network.h" #include "../network_internal.h" #include "../../core/pool_func.hpp" diff --git a/src/network/core/tcp_game.h b/src/network/core/tcp_game.h index 7c049dfe32..a678c247a2 100644 --- a/src/network/core/tcp_game.h +++ b/src/network/core/tcp_game.h @@ -16,7 +16,7 @@ #include "os_abstraction.h" #include "tcp.h" -#include "packet.h" +#include "../network_type.h" #include "../../core/pool_type.hpp" #ifdef ENABLE_NETWORK diff --git a/src/network/core/udp.cpp b/src/network/core/udp.cpp index c9bbcf353e..e855bdfcf0 100644 --- a/src/network/core/udp.cpp +++ b/src/network/core/udp.cpp @@ -15,6 +15,7 @@ #include "../../stdafx.h" #include "../../date_func.h" +#include "../../debug.h" #include "udp.h" /** diff --git a/src/network/core/udp.h b/src/network/core/udp.h index b36c1c8b2a..82435d9ff3 100644 --- a/src/network/core/udp.h +++ b/src/network/core/udp.h @@ -71,12 +71,9 @@ #ifndef NETWORK_CORE_UDP_H #define NETWORK_CORE_UDP_H -#include "os_abstraction.h" #include "address.h" -#include "core.h" #include "game.h" #include "packet.h" -#include "../../debug.h" #ifdef ENABLE_NETWORK diff --git a/src/network/network.cpp b/src/network/network.cpp index 899ca88c82..c57703efbe 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -16,12 +16,12 @@ #include "../strings_func.h" #include "../command_func.h" #include "../date_func.h" -#include "network_internal.h" #include "network_client.h" #include "network_server.h" #include "network_content.h" #include "network_udp.h" #include "network_gamelist.h" +#include "network_base.h" #include "core/udp.h" #include "core/host.h" #include "network_gui.h" diff --git a/src/network/network.h b/src/network/network.h index 41569b26cb..3dd63d03cb 100644 --- a/src/network/network.h +++ b/src/network/network.h @@ -12,7 +12,6 @@ #ifndef NETWORK_H #define NETWORK_H -#include "../company_type.h" #ifdef ENABLE_NETWORK diff --git a/src/network/network_base.h b/src/network/network_base.h index 4ed03e1f2f..ff204062f3 100644 --- a/src/network/network_base.h +++ b/src/network/network_base.h @@ -15,7 +15,9 @@ #ifdef ENABLE_NETWORK #include "network_type.h" +#include "core/address.h" #include "../core/pool_type.hpp" +#include "../company_type.h" typedef Pool NetworkClientInfoPool; extern NetworkClientInfoPool _networkclientinfo_pool; diff --git a/src/network/network_chat_gui.cpp b/src/network/network_chat_gui.cpp index 522106b80a..f10d51a2b7 100644 --- a/src/network/network_chat_gui.cpp +++ b/src/network/network_chat_gui.cpp @@ -24,8 +24,10 @@ #include "../querystring_gui.h" #include "../town.h" #include "../window_func.h" -#include "network_internal.h" +#include "../core/geometry_func.hpp" +#include "network.h" #include "network_client.h" +#include "network_base.h" #include "table/strings.h" diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp index 592c210de3..688a21ef07 100644 --- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -26,6 +26,8 @@ #include "../company_base.h" #include "../company_gui.h" #include "../rev.h" +#include "network.h" +#include "network_base.h" #include "table/strings.h" diff --git a/src/network/network_client.h b/src/network/network_client.h index c987340ca4..17562fceca 100644 --- a/src/network/network_client.h +++ b/src/network/network_client.h @@ -14,6 +14,8 @@ #ifdef ENABLE_NETWORK +#include "network_internal.h" + DEF_CLIENT_SEND_COMMAND(PACKET_CLIENT_GAME_INFO); DEF_CLIENT_SEND_COMMAND(PACKET_CLIENT_COMPANY_INFO); DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_COMMAND)(const CommandPacket *cp); diff --git a/src/network/network_command.cpp b/src/network/network_command.cpp index 834d28da49..7e849cf9ad 100644 --- a/src/network/network_command.cpp +++ b/src/network/network_command.cpp @@ -13,13 +13,13 @@ #include "../stdafx.h" #include "../debug.h" -#include "network_internal.h" #include "network_client.h" +#include "network.h" #include "../command_func.h" #include "../company_func.h" /** Table with all the callbacks we'll use for conversion*/ -static const CommandCallback * const _callback_table[] = { +static CommandCallback * const _callback_table[] = { /* 0x00 */ NULL, /* 0x01 */ CcBuildPrimaryVehicle, /* 0x02 */ CcBuildAirport, diff --git a/src/network/network_content.h b/src/network/network_content.h index aa9a1ffbd3..ad9ab37836 100644 --- a/src/network/network_content.h +++ b/src/network/network_content.h @@ -13,7 +13,6 @@ #define NETWORK_CONTENT_H #include "core/tcp_content.h" -#include "../core/smallvec_type.hpp" #if defined(ENABLE_NETWORK) diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp index 7d3c223db3..af6bcc9bc9 100644 --- a/src/network/network_content_gui.cpp +++ b/src/network/network_content_gui.cpp @@ -19,6 +19,7 @@ #include "../base_media_base.h" #include "../sortlist_type.h" #include "../querystring_gui.h" +#include "../core/geometry_func.hpp" #include "network_content.h" #include "table/strings.h" diff --git a/src/network/network_func.h b/src/network/network_func.h index e6e6a30fd1..02cc131f5d 100644 --- a/src/network/network_func.h +++ b/src/network/network_func.h @@ -16,8 +16,8 @@ #include "network_type.h" #include "../console_type.h" #include "../gfx_type.h" -#include "../core/smallvec_type.hpp" #include "../openttd.h" +#include "../company_type.h" #ifdef ENABLE_NETWORK diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index 6b39c8afec..d8c8dd3903 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -14,10 +14,11 @@ #include "../strings_func.h" #include "../date_func.h" #include "../fios.h" -#include "network_internal.h" #include "network_client.h" #include "network_gui.h" #include "network_gamelist.h" +#include "network.h" +#include "network_base.h" #include "../gui.h" #include "network_udp.h" #include "../window_func.h" @@ -27,6 +28,7 @@ #include "../sortlist_type.h" #include "../company_base.h" #include "../company_func.h" +#include "../core/geometry_func.hpp" #include "table/strings.h" #include "../table/sprites.h" diff --git a/src/network/network_gui.h b/src/network/network_gui.h index eb64e1ed76..a196c75e9f 100644 --- a/src/network/network_gui.h +++ b/src/network/network_gui.h @@ -12,6 +12,8 @@ #ifndef NETWORK_GUI_H #define NETWORK_GUI_H +#include "../company_type.h" +#include "../economy_type.h" #include "../window_type.h" #include "network_type.h" diff --git a/src/network/network_internal.h b/src/network/network_internal.h index 6e5da115c3..0d6814b60e 100644 --- a/src/network/network_internal.h +++ b/src/network/network_internal.h @@ -12,13 +12,7 @@ #ifndef NETWORK_INTERNAL_H #define NETWORK_INTERNAL_H -#include "network.h" #include "network_func.h" -#include "network_base.h" -#include "core/os_abstraction.h" -#include "core/core.h" -#include "core/config.h" -#include "core/packet.h" #include "core/tcp_game.h" #include "../command_type.h" diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index 89d97ae508..8e68f5c979 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -14,12 +14,13 @@ #include "../stdafx.h" #include "../debug.h" #include "../strings_func.h" -#include "network_internal.h" -#include "../vehicle_base.h" #include "../date_func.h" #include "network_server.h" #include "network_udp.h" +#include "network.h" +#include "network_base.h" #include "../console_func.h" +#include "../company_base.h" #include "../command_func.h" #include "../saveload/saveload.h" #include "../station_base.h" diff --git a/src/network/network_server.h b/src/network/network_server.h index 2e52a07b5b..8e7342a9e4 100644 --- a/src/network/network_server.h +++ b/src/network/network_server.h @@ -14,6 +14,8 @@ #ifdef ENABLE_NETWORK +#include "network_internal.h" + DEF_SERVER_SEND_COMMAND(PACKET_SERVER_MAP); DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_ERROR_QUIT)(NetworkClientSocket *cs, ClientID client_id, NetworkErrorCode errorno); DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_ERROR)(NetworkClientSocket *cs, NetworkErrorCode error); diff --git a/src/network/network_type.h b/src/network/network_type.h index 4d5fcee690..f023fe985c 100644 --- a/src/network/network_type.h +++ b/src/network/network_type.h @@ -12,9 +12,6 @@ #ifndef NETWORK_TYPE_H #define NETWORK_TYPE_H -#include "../company_type.h" -#include "../economy_type.h" -#include "core/config.h" #include "core/game.h" #ifdef ENABLE_NETWORK diff --git a/src/network/network_udp.cpp b/src/network/network_udp.cpp index be6e01e335..817fb40d68 100644 --- a/src/network/network_udp.cpp +++ b/src/network/network_udp.cpp @@ -19,9 +19,11 @@ #include "../stdafx.h" #include "../date_func.h" #include "../map_func.h" +#include "../debug.h" #include "network_gamelist.h" #include "network_internal.h" #include "network_udp.h" +#include "network.h" #include "../core/endian_func.hpp" #include "../company_base.h" #include "../thread/thread.h" diff --git a/src/network/network_udp.h b/src/network/network_udp.h index 4200391cb4..bd315baba1 100644 --- a/src/network/network_udp.h +++ b/src/network/network_udp.h @@ -14,6 +14,8 @@ #ifdef ENABLE_NETWORK +#include "core/address.h" + void NetworkUDPInitialize(); void NetworkUDPSearchGame(); void NetworkUDPQueryMasterServer(); diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 37f830b1db..45d9fab37e 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -13,7 +13,6 @@ #include -#include "openttd.h" #include "debug.h" #include "fileio_func.h" #include "engine_func.h" @@ -26,6 +25,7 @@ #include "fontcache.h" #include "currency.h" #include "landscape.h" +#include "newgrf.h" #include "newgrf_cargo.h" #include "newgrf_house.h" #include "newgrf_sound.h" @@ -39,7 +39,6 @@ #include "fios.h" #include "rail.h" #include "strings_func.h" -#include "gfx_func.h" #include "date_func.h" #include "string_func.h" #include "network/network.h" diff --git a/src/newgrf.h b/src/newgrf.h index 64b8f91727..b38cf48032 100644 --- a/src/newgrf.h +++ b/src/newgrf.h @@ -12,7 +12,6 @@ #ifndef NEWGRF_H #define NEWGRF_H -#include "town_type.h" #include "newgrf_config.h" #include "cargotype.h" #include "industry_type.h" diff --git a/src/newgrf_canal.cpp b/src/newgrf_canal.cpp index ab2dddac7b..10fb06ffaf 100644 --- a/src/newgrf_canal.cpp +++ b/src/newgrf_canal.cpp @@ -10,12 +10,10 @@ /** @file newgrf_canal.cpp Implementation of NewGRF canals. */ #include "stdafx.h" -#include "tile_type.h" #include "debug.h" #include "newgrf_commons.h" #include "newgrf_spritegroup.h" #include "newgrf_canal.h" -#include "tile_map.h" #include "water_map.h" diff --git a/src/newgrf_canal.h b/src/newgrf_canal.h index 8591fe26e7..6a9c0c19c6 100644 --- a/src/newgrf_canal.h +++ b/src/newgrf_canal.h @@ -12,6 +12,10 @@ #ifndef NEWGRF_CANAL_H #define NEWGRF_CANAL_H +#include "gfx_type.h" +#include "tile_type.h" +#include "newgrf_generic.h" + /** List of different canal 'features'. * Each feature gets an entry in the canal spritegroup table */ enum CanalFeature { diff --git a/src/newgrf_cargo.cpp b/src/newgrf_cargo.cpp index e0f7b05b50..e5a762cd4c 100644 --- a/src/newgrf_cargo.cpp +++ b/src/newgrf_cargo.cpp @@ -13,6 +13,7 @@ #include "debug.h" #include "newgrf.h" #include "newgrf_spritegroup.h" +#include "core/bitmath_func.hpp" static uint32 CargoGetRandomBits(const ResolverObject *object) { diff --git a/src/newgrf_commons.h b/src/newgrf_commons.h index 8126dd8bcc..6ace3d0dac 100644 --- a/src/newgrf_commons.h +++ b/src/newgrf_commons.h @@ -14,7 +14,6 @@ #ifndef NEWGRF_COMMONS_H #define NEWGRF_COMMONS_H -#include "core/bitmath_func.hpp" #include "tile_cmd.h" #include "transparency.h" #include "sprite.h" diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp index dfd1199d5b..b7650c95be 100644 --- a/src/newgrf_engine.cpp +++ b/src/newgrf_engine.cpp @@ -24,6 +24,8 @@ #include "aircraft.h" #include "core/smallmap_type.hpp" #include "station_base.h" +#include "engine_base.h" +#include "company_base.h" struct WagonOverride { EngineID *train_id; diff --git a/src/newgrf_engine.h b/src/newgrf_engine.h index e62150ab65..91a15f4a7a 100644 --- a/src/newgrf_engine.h +++ b/src/newgrf_engine.h @@ -15,6 +15,9 @@ #include "direction_type.h" #include "newgrf_callbacks.h" #include "newgrf_properties.h" +#include "vehicle_type.h" +#include "engine_type.h" +#include "gfx_type.h" enum { TRAININFO_DEFAULT_VEHICLE_WIDTH = 29, diff --git a/src/newgrf_generic.cpp b/src/newgrf_generic.cpp index 08ea371676..462db6a2d1 100644 --- a/src/newgrf_generic.cpp +++ b/src/newgrf_generic.cpp @@ -13,6 +13,7 @@ #include "debug.h" #include "newgrf.h" #include "newgrf_spritegroup.h" +#include "core/bitmath_func.hpp" #include diff --git a/src/newgrf_generic.h b/src/newgrf_generic.h index 598087a9da..c461a8f30e 100644 --- a/src/newgrf_generic.h +++ b/src/newgrf_generic.h @@ -12,6 +12,9 @@ #ifndef NEWGRF_GENERIC_H #define NEWGRF_GENERIC_H +#include "cargo_type.h" +#include "industry_type.h" + enum AIConstructionEvent { AICE_TRAIN_CHECK_RAIL_ENGINE = 0x00, ///< Check if we should build an engine AICE_TRAIN_CHECK_ELRAIL_ENGINE = 0x01, diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index f7bed462de..f87f7bc93e 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -14,7 +14,6 @@ #include "newgrf.h" #include "strings_func.h" #include "window_func.h" -#include "gfx_func.h" #include "gamelog.h" #include "settings_func.h" #include "widgets/dropdown_type.h" @@ -22,6 +21,7 @@ #include "network/network_content.h" #include "sortlist_type.h" #include "querystring_gui.h" +#include "core/geometry_func.hpp" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp index 2a425192a5..37a85fb4f5 100644 --- a/src/newgrf_house.cpp +++ b/src/newgrf_house.cpp @@ -10,24 +10,22 @@ /** @file newgrf_house.cpp Implementation of NewGRF houses. */ #include "stdafx.h" -#include "openttd.h" #include "variables.h" #include "debug.h" #include "viewport_func.h" #include "landscape.h" -#include "sprite.h" #include "newgrf.h" #include "newgrf_house.h" #include "newgrf_spritegroup.h" #include "newgrf_town.h" #include "newgrf_sound.h" #include "newgrf_commons.h" -#include "transparency.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" static BuildingCounts _building_counts; static HouseClassMapping _class_mapping[HOUSE_CLASS_MAX]; diff --git a/src/newgrf_house.h b/src/newgrf_house.h index 11a830a5a2..6a6f40cb02 100644 --- a/src/newgrf_house.h +++ b/src/newgrf_house.h @@ -12,7 +12,6 @@ #ifndef NEWGRF_HOUSE_H #define NEWGRF_HOUSE_H -#include "town_type.h" #include "newgrf_callbacks.h" #include "tile_cmd.h" #include "house_type.h" diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp index 9a8ff580c5..9c099a2032 100644 --- a/src/newgrf_industries.cpp +++ b/src/newgrf_industries.cpp @@ -11,7 +11,6 @@ #include "stdafx.h" #include "debug.h" -#include "strings_type.h" #include "industry.h" #include "newgrf.h" #include "newgrf_industries.h" @@ -24,6 +23,7 @@ #include "command_func.h" #include "gui.h" #include "strings_func.h" +#include "core/random_func.hpp" #include "table/strings.h" diff --git a/src/newgrf_industries.h b/src/newgrf_industries.h index 3e10c80bc7..ba3cc71b7c 100644 --- a/src/newgrf_industries.h +++ b/src/newgrf_industries.h @@ -12,7 +12,6 @@ #ifndef NEWGRF_INDUSTRIES_H #define NEWGRF_INDUSTRIES_H -#include "industry_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 e455888e57..63a555ce54 100644 --- a/src/newgrf_industrytiles.cpp +++ b/src/newgrf_industrytiles.cpp @@ -10,21 +10,17 @@ /** @file newgrf_industrytiles.cpp NewGRF handling of industry tiles. */ #include "stdafx.h" -#include "openttd.h" #include "variables.h" #include "debug.h" #include "viewport_func.h" #include "landscape.h" #include "newgrf.h" -#include "core/random_func.hpp" #include "newgrf_commons.h" #include "newgrf_industries.h" #include "newgrf_industrytiles.h" #include "newgrf_sound.h" #include "newgrf_text.h" #include "industry.h" -#include "sprite.h" -#include "transparency.h" #include "functions.h" #include "town.h" #include "command_func.h" diff --git a/src/newgrf_industrytiles.h b/src/newgrf_industrytiles.h index 70095118fb..15751ff817 100644 --- a/src/newgrf_industrytiles.h +++ b/src/newgrf_industrytiles.h @@ -12,6 +12,11 @@ #ifndef NEWGRF_INDUSTRYTILES_H #define NEWGRF_INDUSTRYTILES_H +#include "tile_cmd.h" +#include "industry_type.h" +#include "newgrf_callbacks.h" +#include "core/random_func.hpp" + enum IndustryAnimationTrigger { IAT_CONSTRUCTION_STATE_CHANGE, IAT_TILELOOP, diff --git a/src/newgrf_sound.h b/src/newgrf_sound.h index d67180b20f..e25ca5055c 100644 --- a/src/newgrf_sound.h +++ b/src/newgrf_sound.h @@ -14,6 +14,7 @@ #include "sound_type.h" #include "tile_type.h" +#include "vehicle_type.h" enum VehicleSoundEvent { VSE_START = 1, diff --git a/src/newgrf_spritegroup.cpp b/src/newgrf_spritegroup.cpp index 348f8ebf08..993a75102e 100644 --- a/src/newgrf_spritegroup.cpp +++ b/src/newgrf_spritegroup.cpp @@ -13,6 +13,7 @@ #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 2b337bb2f8..a974056725 100644 --- a/src/newgrf_spritegroup.h +++ b/src/newgrf_spritegroup.h @@ -13,8 +13,6 @@ #define NEWGRF_SPRITEGROUP_H #include "town_type.h" -#include "industry_type.h" -#include "core/bitmath_func.hpp" #include "gfx_type.h" #include "engine_type.h" #include "tile_type.h" diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp index e99925adbe..418da8a6a3 100644 --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -23,13 +23,14 @@ #include "newgrf_sound.h" #include "town.h" #include "newgrf_town.h" -#include "gfx_func.h" #include "date_func.h" #include "company_func.h" #include "animated_tile_func.h" #include "functions.h" #include "tunnelbridge_map.h" #include "spritecache.h" +#include "newgrf.h" +#include "core/random_func.hpp" #include "table/strings.h" diff --git a/src/newgrf_station.h b/src/newgrf_station.h index b7cab7db91..84420c793b 100644 --- a/src/newgrf_station.h +++ b/src/newgrf_station.h @@ -12,14 +12,13 @@ #ifndef NEWGRF_STATION_H #define NEWGRF_STATION_H -#include "engine_type.h" #include "newgrf_callbacks.h" -#include "tile_type.h" -#include "station_type.h" -#include "strings_type.h" #include "sprite.h" #include "direction_type.h" -#include "newgrf.h" +#include "cargo_type.h" +#include "strings_type.h" +#include "station_type.h" +#include "rail_type.h" enum StationClassID { STAT_CLASS_BEGIN = 0, ///< the lowest valid value diff --git a/src/newgrf_text.h b/src/newgrf_text.h index 8a237c1e34..d75246e259 100644 --- a/src/newgrf_text.h +++ b/src/newgrf_text.h @@ -12,6 +12,8 @@ #ifndef NEWGRF_TEXT_H #define NEWGRF_TEXT_H +#include "strings_type.h" + StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid, bool new_scheme, const char *text_to_add, StringID def_string); StringID GetGRFStringID(uint32 grfid, uint16 stringid); const char *GetGRFStringPtr(uint16 stringid); diff --git a/src/newgrf_town.h b/src/newgrf_town.h index b591658e9d..bf888229e3 100644 --- a/src/newgrf_town.h +++ b/src/newgrf_town.h @@ -12,6 +12,8 @@ #ifndef NEWGRF_TOWN_H #define NEWGRF_TOWN_H +#include "town_type.h" + /* Currently there is no direct town resolver; we only need to get town * variable results from inside stations, house tiles and industry tiles. */ diff --git a/src/news_gui.cpp b/src/news_gui.cpp index 3814626f5f..753271b468 100644 --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -10,12 +10,9 @@ /** @file news_gui.cpp GUI functions related to news messages. */ #include "stdafx.h" -#include "openttd.h" #include "gui.h" -#include "window_gui.h" #include "viewport_func.h" #include "news_type.h" -#include "gfx_func.h" #include "strings_func.h" #include "window_func.h" #include "date_func.h" @@ -31,6 +28,7 @@ #include "company_manager_face.h" #include "company_func.h" #include "engine_gui.h" +#include "core/geometry_func.hpp" #include "table/strings.h" diff --git a/src/openttd.cpp b/src/openttd.cpp index 19b539f3fa..2543edf888 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -60,6 +60,10 @@ #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 "newgrf_commons.h" diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index 814e88be47..c347a95128 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -26,7 +26,7 @@ #include "roadveh.h" #include "station_base.h" #include "waypoint_base.h" -#include "roadstop_base.h" +#include "company_base.h" #include "table/strings.h" diff --git a/src/order_func.h b/src/order_func.h index 1e016858bf..e1ff810fe6 100644 --- a/src/order_func.h +++ b/src/order_func.h @@ -16,7 +16,6 @@ #include "vehicle_type.h" #include "tile_type.h" #include "group_type.h" -#include "date_type.h" #include "company_type.h" struct BackuppedOrders { diff --git a/src/order_gui.cpp b/src/order_gui.cpp index f148433c10..71c4834019 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -10,12 +10,9 @@ /** @file order_gui.cpp GUI related to orders. */ #include "stdafx.h" -#include "window_gui.h" #include "command_func.h" #include "viewport_func.h" -#include "gfx_func.h" #include "depot_base.h" -#include "vehicle_base.h" #include "vehicle_gui.h" #include "roadveh.h" #include "timetable.h" @@ -31,6 +28,7 @@ #include "network/network.h" #include "station_base.h" #include "waypoint_base.h" +#include "core/geometry_func.hpp" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/os/unix/unix.cpp b/src/os/unix/unix.cpp index c99f6c7953..a9b81e62cd 100644 --- a/src/os/unix/unix.cpp +++ b/src/os/unix/unix.cpp @@ -13,6 +13,7 @@ #include "../../textbuf_gui.h" #include "../../functions.h" #include "../../crashlog.h" +#include "../../core/random_func.hpp" #include diff --git a/src/pathfinder/follow_track.hpp b/src/pathfinder/follow_track.hpp index 62e36e1bc8..4c0fa7805a 100644 --- a/src/pathfinder/follow_track.hpp +++ b/src/pathfinder/follow_track.hpp @@ -12,13 +12,13 @@ #ifndef FOLLOW_TRACK_HPP #define FOLLOW_TRACK_HPP -#include "../depot_map.h" #include "../pbs.h" #include "../roadveh.h" #include "../station_base.h" #include "../train.h" #include "../tunnelbridge.h" #include "../tunnelbridge_map.h" +#include "../depot_map.h" #include "pf_performance_timer.hpp" /** Track follower helper template class (can serve pathfinders and vehicle diff --git a/src/pathfinder/npf/npf.cpp b/src/pathfinder/npf/npf.cpp index 4a5979542f..1423ae449b 100644 --- a/src/pathfinder/npf/npf.cpp +++ b/src/pathfinder/npf/npf.cpp @@ -12,15 +12,9 @@ #include "../../stdafx.h" #include "../../debug.h" #include "../../landscape.h" -#include "../../depot_base.h" #include "../../network/network.h" -#include "../../tunnelbridge_map.h" #include "../../functions.h" -#include "../../tunnelbridge.h" -#include "../../pbs.h" -#include "../../roadveh.h" #include "../../ship.h" -#include "../../train.h" #include "../../roadstop_base.h" #include "../pathfinder_func.h" #include "../pathfinder_type.h" diff --git a/src/pathfinder/npf/npf_func.h b/src/pathfinder/npf/npf_func.h index 6684d98976..f0913dfa8e 100644 --- a/src/pathfinder/npf/npf_func.h +++ b/src/pathfinder/npf/npf_func.h @@ -14,6 +14,7 @@ #include "../../track_type.h" #include "../../direction_type.h" +#include "../../vehicle_type.h" #include "../pathfinder_type.h" /** diff --git a/src/pathfinder/opf/opf_ship.cpp b/src/pathfinder/opf/opf_ship.cpp index 0d967c67a6..9fee6b2709 100644 --- a/src/pathfinder/opf/opf_ship.cpp +++ b/src/pathfinder/opf/opf_ship.cpp @@ -10,12 +10,10 @@ /** @file pathfind.cpp Implementation of the oldest supported pathfinder. */ #include "../../stdafx.h" -#include "../../debug.h" #include "../../tunnelbridge_map.h" #include "../../tunnelbridge.h" #include "../../ship.h" #include "../../core/random_func.hpp" -#include "opf_ship.h" struct RememberData { uint16 cur_length; diff --git a/src/pathfinder/opf/opf_ship.h b/src/pathfinder/opf/opf_ship.h index 10055067b9..b124ce34e8 100644 --- a/src/pathfinder/opf/opf_ship.h +++ b/src/pathfinder/opf/opf_ship.h @@ -12,6 +12,11 @@ #ifndef OPF_SHIP_H #define OPF_SHIP_H +#include "../../direction_type.h" +#include "../../tile_type.h" +#include "../../track_type.h" +#include "../../vehicle_type.h" + /** * Finds the best path for given ship using OPF. * @param v the ship that needs to find a path diff --git a/src/pathfinder/pathfinder_func.h b/src/pathfinder/pathfinder_func.h index 411b49f25e..4c0671941c 100644 --- a/src/pathfinder/pathfinder_func.h +++ b/src/pathfinder/pathfinder_func.h @@ -12,7 +12,6 @@ #ifndef PATHFINDER_FUNC_H #define PATHFINDER_FUNC_H -#include "../station_base.h" #include "../waypoint_base.h" /** diff --git a/src/pathfinder/pathfinder_type.h b/src/pathfinder/pathfinder_type.h index 5943537c23..cee1fd3f6c 100644 --- a/src/pathfinder/pathfinder_type.h +++ b/src/pathfinder/pathfinder_type.h @@ -12,6 +12,8 @@ #ifndef PATHFINDER_TYPE_H #define PATHFINDER_TYPE_H +#include "../tile_type.h" + /** Length (penalty) of one tile with NPF */ static const int NPF_TILE_LENGTH = 100; diff --git a/src/pathfinder/yapf/yapf.h b/src/pathfinder/yapf/yapf.h index 54e46ce751..e5615f7828 100644 --- a/src/pathfinder/yapf/yapf.h +++ b/src/pathfinder/yapf/yapf.h @@ -14,6 +14,8 @@ #include "../../direction_type.h" #include "../../station_type.h" +#include "../../track_type.h" +#include "../../vehicle_type.h" #include "../pathfinder_type.h" /** diff --git a/src/pbs.cpp b/src/pbs.cpp index 3c25dfa03a..173902a802 100644 --- a/src/pbs.cpp +++ b/src/pbs.cpp @@ -13,7 +13,6 @@ #include "functions.h" #include "vehicle_func.h" #include "pathfinder/follow_track.hpp" -//#include "depot_map.h" /** * Get the reserved trackbits for any tile, regardless of type. diff --git a/src/rail.h b/src/rail.h index 14dbdb89cb..6c6feee400 100644 --- a/src/rail.h +++ b/src/rail.h @@ -14,7 +14,6 @@ #include "rail_type.h" #include "track_type.h" -#include "vehicle_type.h" #include "gfx_type.h" #include "core/bitmath_func.hpp" #include "economy_func.h" diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 00b2a30bf9..9ca8d17e0b 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -10,7 +10,6 @@ /** @file rail_cmd.cpp Handling of rail tiles. */ #include "stdafx.h" -#include "openttd.h" #include "cmd_helper.h" #include "landscape.h" #include "viewport_func.h" @@ -34,6 +33,7 @@ #include "elrail_func.h" #include "town.h" #include "pbs.h" +#include "company_base.h" #include "table/strings.h" #include "table/railtypes.h" diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 3c9127a9fb..0aa4d1c446 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -15,7 +15,6 @@ #include "station_gui.h" #include "terraform_gui.h" #include "viewport_func.h" -#include "gfx_func.h" #include "command_func.h" #include "waypoint_func.h" #include "newgrf_station.h" @@ -30,6 +29,7 @@ #include "tunnelbridge.h" #include "tilehighlight_func.h" #include "spritecache.h" +#include "core/geometry_func.hpp" #include "station_map.h" #include "tunnelbridge_map.h" diff --git a/src/rail_map.h b/src/rail_map.h index f9cca02f0b..7aa4282cd1 100644 --- a/src/rail_map.h +++ b/src/rail_map.h @@ -15,7 +15,6 @@ #include "rail_type.h" #include "depot_type.h" #include "signal_func.h" -#include "direction_func.h" #include "track_func.h" #include "tile_map.h" #include "signal_type.h" diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp index 1a151f33aa..f6c58b1652 100644 --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -10,7 +10,6 @@ /** @file road_cmd.cpp Commands related to road tiles. */ #include "stdafx.h" -#include "openttd.h" #include "cmd_helper.h" #include "road_internal.h" #include "landscape.h" @@ -30,9 +29,12 @@ #include "cheat_type.h" #include "functions.h" #include "effectvehicle_func.h" +#include "effectvehicle_base.h" #include "elrail_func.h" #include "roadveh.h" #include "town.h" +#include "company_base.h" +#include "core/random_func.hpp" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/road_cmd.h b/src/road_cmd.h index 5c150657f9..3cf588dcd6 100644 --- a/src/road_cmd.h +++ b/src/road_cmd.h @@ -13,6 +13,7 @@ #define ROAD_CMD_H #include "direction_type.h" +#include "road_type.h" void DrawRoadDepotSprite(int x, int y, DiagDirection dir, RoadType rt); void UpdateNearestTownForRoadTiles(bool invalidate); diff --git a/src/road_func.h b/src/road_func.h index b2b15db2f0..151ae4e9fe 100644 --- a/src/road_func.h +++ b/src/road_func.h @@ -14,8 +14,9 @@ #include "core/bitmath_func.hpp" #include "road_type.h" -#include "direction_func.h" +#include "direction_type.h" #include "company_type.h" +#include "tile_type.h" /** * Whether the given roadtype is valid. diff --git a/src/road_gui.cpp b/src/road_gui.cpp index 3479c46188..6cd517f2f9 100644 --- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -10,15 +10,12 @@ /** @file road_gui.cpp GUI for building roads. */ #include "stdafx.h" -#include "openttd.h" #include "gui.h" #include "window_gui.h" #include "station_gui.h" #include "terraform_gui.h" #include "viewport_func.h" -#include "gfx_func.h" #include "command_func.h" -#include "road_type.h" #include "road_cmd.h" #include "road_map.h" #include "station_func.h" diff --git a/src/road_internal.h b/src/road_internal.h index 359d004f56..6b0d8c8d48 100644 --- a/src/road_internal.h +++ b/src/road_internal.h @@ -13,6 +13,7 @@ #define ROAD_INTERNAL_H #include "tile_cmd.h" +#include "road_type.h" /** * Clean up unneccesary RoadBits of a planed tile. diff --git a/src/road_map.h b/src/road_map.h index bea758e2cc..46060ddfd6 100644 --- a/src/road_map.h +++ b/src/road_map.h @@ -15,7 +15,6 @@ #include "track_func.h" #include "depot_type.h" #include "rail_type.h" -#include "town_type.h" #include "road_func.h" #include "tile_map.h" diff --git a/src/roadstop_base.h b/src/roadstop_base.h index d323e79c01..7bfdba16dd 100644 --- a/src/roadstop_base.h +++ b/src/roadstop_base.h @@ -15,6 +15,8 @@ #include "station_type.h" #include "core/pool_type.hpp" #include "core/bitmath_func.hpp" +#include "direction_type.h" +#include "vehicle_type.h" typedef Pool RoadStopPool; extern RoadStopPool _roadstop_pool; diff --git a/src/roadveh.h b/src/roadveh.h index 09e37b6ba3..da01854cc0 100644 --- a/src/roadveh.h +++ b/src/roadveh.h @@ -13,9 +13,7 @@ #define ROADVEH_H #include "vehicle_base.h" -#include "engine_func.h" -#include "engine_base.h" -#include "economy_func.h" +#include "road_type.h" struct RoadVehicle; diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 5df4572a62..9f87022ea7 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -30,14 +30,17 @@ #include "vehicle_func.h" #include "sound_func.h" #include "autoreplace_gui.h" -#include "gfx_func.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 "debug.h" +#include "core/random_func.hpp" +#include "engine_base.h" +#include "company_base.h" +#include "engine_func.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index a7399431d7..f7989849f9 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -15,7 +15,6 @@ #include "../depot_base.h" #include "../window_func.h" #include "../fios.h" -#include "../gamelog.h" #include "../gamelog_internal.h" #include "../network/network.h" #include "../gfxinit.h" @@ -23,8 +22,6 @@ #include "../industry.h" #include "../clear_map.h" #include "../vehicle_func.h" -#include "../newgrf_station.h" -#include "../openttd.h" #include "../debug.h" #include "../string_func.h" #include "../date_func.h" @@ -49,6 +46,10 @@ #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 "table/strings.h" diff --git a/src/saveload/autoreplace_sl.cpp b/src/saveload/autoreplace_sl.cpp index 295cd77d4d..afc2304b26 100644 --- a/src/saveload/autoreplace_sl.cpp +++ b/src/saveload/autoreplace_sl.cpp @@ -10,8 +10,6 @@ /** @file autoreplace_sl.cpp Code handling saving and loading of autoreplace rules */ #include "../stdafx.h" -#include "../engine_type.h" -#include "../group_type.h" #include "../autoreplace_base.h" #include "saveload.h" diff --git a/src/saveload/gamelog_sl.cpp b/src/saveload/gamelog_sl.cpp index dc0bebc5db..59820db4ee 100644 --- a/src/saveload/gamelog_sl.cpp +++ b/src/saveload/gamelog_sl.cpp @@ -10,7 +10,6 @@ /** @file gamelog_sl.cpp Code handling saving and loading of gamelog data */ #include "../stdafx.h" -#include "../gamelog.h" #include "../gamelog_internal.h" #include "../core/alloc_func.hpp" diff --git a/src/saveload/industry_sl.cpp b/src/saveload/industry_sl.cpp index ab2b24f315..9fef37935a 100644 --- a/src/saveload/industry_sl.cpp +++ b/src/saveload/industry_sl.cpp @@ -10,7 +10,6 @@ /** @file industry_sl.cpp Code handling saving and loading of industries */ #include "../stdafx.h" -#include "../strings_type.h" #include "../industry.h" #include "../newgrf_commons.h" diff --git a/src/saveload/misc_sl.cpp b/src/saveload/misc_sl.cpp index 06775d4e9b..67ca389769 100644 --- a/src/saveload/misc_sl.cpp +++ b/src/saveload/misc_sl.cpp @@ -20,7 +20,7 @@ #include "../viewport_func.h" #include "../gfx_func.h" #include "../company_base.h" -#include "../town.h" +#include "../core/random_func.hpp" #include "saveload.h" diff --git a/src/saveload/oldloader.h b/src/saveload/oldloader.h index eabf1332d3..d1908e1364 100644 --- a/src/saveload/oldloader.h +++ b/src/saveload/oldloader.h @@ -13,6 +13,7 @@ #define OLDLOADER_H #include "saveload.h" +#include "../tile_type.h" enum { BUFFER_SIZE = 4096, diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index a78a45244b..d21a3975cf 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -22,13 +22,15 @@ #include "../subsidy_base.h" #include "../debug.h" #include "../depot_base.h" -#include "../zoom_func.h" #include "../date_func.h" #include "../vehicle_func.h" #include "../variables.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" #include "oldloader.h" diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index 00d06ab307..c3e719bac9 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -21,7 +21,6 @@ * */ #include "../stdafx.h" -#include "../openttd.h" #include "../debug.h" #include "../station_base.h" #include "../thread/thread.h" @@ -30,7 +29,6 @@ #include "../variables.h" #include "../window_func.h" #include "../strings_func.h" -#include "../gfx_func.h" #include "../core/endian_func.hpp" #include "../vehicle_base.h" #include "../company_func.h" @@ -42,6 +40,7 @@ #include "../gamelog.h" #include "../string_func.h" #include "../engine_base.h" +#include "../company_base.h" #include "table/strings.h" diff --git a/src/saveload/saveload_internal.h b/src/saveload/saveload_internal.h index 04e01de330..b400861b4a 100644 --- a/src/saveload/saveload_internal.h +++ b/src/saveload/saveload_internal.h @@ -12,7 +12,6 @@ #ifndef SAVELOAD_INTERNAL_H #define SAVELOAD_INTERNAL_H -#include "../strings_type.h" #include "../company_manager_face.h" #include "../order_base.h" #include "../engine_type.h" diff --git a/src/saveload/signs_sl.cpp b/src/saveload/signs_sl.cpp index 8eff012937..cdd43303be 100644 --- a/src/saveload/signs_sl.cpp +++ b/src/saveload/signs_sl.cpp @@ -10,7 +10,6 @@ /** @file signs_sl.cpp Code handling saving and loading of economy data */ #include "../stdafx.h" -#include "../company_func.h" #include "../signs_base.h" #include "saveload.h" diff --git a/src/saveload/station_sl.cpp b/src/saveload/station_sl.cpp index a25eb556d1..99161ae1cc 100644 --- a/src/saveload/station_sl.cpp +++ b/src/saveload/station_sl.cpp @@ -15,7 +15,6 @@ #include "../roadstop_base.h" #include "../vehicle_base.h" #include "../newgrf_station.h" -#include "../station_map.h" #include "saveload.h" #include "table/strings.h" diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp index e787420736..7fdb78e614 100644 --- a/src/saveload/vehicle_sl.cpp +++ b/src/saveload/vehicle_sl.cpp @@ -17,6 +17,7 @@ #include "../aircraft.h" #include "../station_base.h" #include "../effectvehicle_base.h" +#include "../engine_base.h" #include "saveload.h" diff --git a/src/saveload/waypoint_sl.cpp b/src/saveload/waypoint_sl.cpp index be7bf01e5e..2cd95e104f 100644 --- a/src/saveload/waypoint_sl.cpp +++ b/src/saveload/waypoint_sl.cpp @@ -14,6 +14,7 @@ #include "../newgrf_station.h" #include "../vehicle_base.h" #include "../town.h" +#include "../newgrf.h" #include "table/strings.h" diff --git a/src/script/script_info.hpp b/src/script/script_info.hpp index a812df3e56..f25158049d 100644 --- a/src/script/script_info.hpp +++ b/src/script/script_info.hpp @@ -12,6 +12,7 @@ #ifndef SCRIPT_INFO #define SCRIPT_INFO +#include #include "../misc/countedptr.hpp" class ScriptFileInfo : public SimpleCountedObject { diff --git a/src/sdl.h b/src/sdl.h index 2f4131e1a7..ba5a30a77f 100644 --- a/src/sdl.h +++ b/src/sdl.h @@ -20,7 +20,6 @@ void SdlClose(uint32 x); #endif #ifdef DYNAMICALLY_LOADED_SDL - #include struct SDLProcs { int (SDLCALL *SDL_Init)(Uint32); diff --git a/src/settings.cpp b/src/settings.cpp index 00c0f21cc8..ef179a2055 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -57,10 +57,11 @@ #include "gamelog.h" #include "settings_func.h" #include "ini_type.h" -#include "ai/ai.hpp" #include "ai/ai_config.hpp" #include "newgrf.h" #include "ship.h" +#include "company_base.h" +#include "engine_base.h" #include "void_map.h" #include "station_base.h" diff --git a/src/settings_func.h b/src/settings_func.h index 3e80993fa7..29c9ad8360 100644 --- a/src/settings_func.h +++ b/src/settings_func.h @@ -13,6 +13,7 @@ #define SETTINGS_FUNC_H #include "core/smallvec_type.hpp" +#include "company_type.h" void IConsoleSetSetting(const char *name, const char *value); void IConsoleSetSetting(const char *name, int32 value); diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 9f35482a4b..0d59558717 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -10,10 +10,8 @@ /** @file settings_gui.cpp GUI for settings. */ #include "stdafx.h" -#include "openttd.h" #include "currency.h" #include "gui.h" -#include "window_gui.h" #include "textbuf_gui.h" #include "command_func.h" #include "screenshot.h" @@ -24,15 +22,15 @@ #include "strings_func.h" #include "window_func.h" #include "string_func.h" -#include "gfx_func.h" #include "widgets/dropdown_type.h" #include "widgets/dropdown_func.h" -#include "station_func.h" +#include "openttd.h" #include "highscore.h" #include "base_media_base.h" #include "company_base.h" #include "company_func.h" #include "viewport_func.h" +#include "core/geometry_func.hpp" #include #include "table/sprites.h" diff --git a/src/settings_internal.h b/src/settings_internal.h index 2903239c17..316c433423 100644 --- a/src/settings_internal.h +++ b/src/settings_internal.h @@ -14,6 +14,7 @@ #include "saveload/saveload.h" #include "settings_type.h" +#include "strings_type.h" /** Convention/Type of settings. This is then further specified if necessary * with the SLE_ (SLE_VAR/SLE_FILE) enums in saveload.h diff --git a/src/ship.h b/src/ship.h index cc0973a75c..2138e732e3 100644 --- a/src/ship.h +++ b/src/ship.h @@ -13,9 +13,6 @@ #define SHIP_H #include "vehicle_base.h" -#include "engine_func.h" -#include "engine_base.h" -#include "economy_func.h" void RecalcShipStuff(Vehicle *v); void GetShipSpriteSize(EngineID engine, uint &width, uint &height); diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index acd5754ece..f060218cbb 100644 --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -31,11 +31,14 @@ #include "vehicle_func.h" #include "sound_func.h" #include "autoreplace_gui.h" -#include "gfx_func.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" diff --git a/src/signal.cpp b/src/signal.cpp index b85c38636c..2eeef336c2 100644 --- a/src/signal.cpp +++ b/src/signal.cpp @@ -16,6 +16,7 @@ #include "vehicle_func.h" #include "functions.h" #include "train.h" +#include "company_base.h" /** these are the maximums used for updating signal blocks */ diff --git a/src/signs_base.h b/src/signs_base.h index 85938981df..548e9b8376 100644 --- a/src/signs_base.h +++ b/src/signs_base.h @@ -14,8 +14,8 @@ #include "signs_type.h" #include "viewport_type.h" -#include "tile_type.h" #include "core/pool_type.hpp" +#include "company_type.h" typedef Pool SignPool; extern SignPool _sign_pool; diff --git a/src/signs_func.h b/src/signs_func.h index c1ae4c7d72..0b75fcceef 100644 --- a/src/signs_func.h +++ b/src/signs_func.h @@ -13,6 +13,7 @@ #define SIGNS_FUNC_H #include "signs_type.h" +#include "tile_type.h" extern SignID _new_sign_id; diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp index b66eb5d0af..5d86e90f91 100644 --- a/src/signs_gui.cpp +++ b/src/signs_gui.cpp @@ -24,6 +24,7 @@ #include "querystring_gui.h" #include "sortlist_type.h" #include "string_func.h" +#include "core/geometry_func.hpp" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index 5956af7f93..5f9d8b6472 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -17,7 +17,6 @@ #include "window_gui.h" #include "tree_map.h" #include "viewport_func.h" -#include "gfx_func.h" #include "town.h" #include "blitter/factory.hpp" #include "tunnelbridge_map.h" @@ -26,6 +25,7 @@ #include "vehicle_base.h" #include "sound_func.h" #include "window_func.h" +#include "company_base.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/sound.cpp b/src/sound.cpp index 1fc5291c33..a0f3862976 100644 --- a/src/sound.cpp +++ b/src/sound.cpp @@ -16,7 +16,6 @@ #include "fios.h" #include "window_gui.h" #include "vehicle_base.h" -#include "debug.h" /* The type of set we're replacing */ #define SET_TYPE "sounds" diff --git a/src/sound/allegro_s.cpp b/src/sound/allegro_s.cpp index cef7164072..6bb1e756c9 100644 --- a/src/sound/allegro_s.cpp +++ b/src/sound/allegro_s.cpp @@ -13,7 +13,6 @@ #include "../stdafx.h" -#include "../driver.h" #include "../mixer.h" #include "../debug.h" #include "allegro_s.h" diff --git a/src/sound/win32_s.cpp b/src/sound/win32_s.cpp index e73f511f44..3024dd03c6 100644 --- a/src/sound/win32_s.cpp +++ b/src/sound/win32_s.cpp @@ -14,6 +14,7 @@ #include "../driver.h" #include "../mixer.h" #include "../core/alloc_func.hpp" +#include "../core/bitmath_func.hpp" #include "win32_s.h" #include #include diff --git a/src/spritecache.cpp b/src/spritecache.cpp index 2cf4eff2b9..65b640c492 100644 --- a/src/spritecache.cpp +++ b/src/spritecache.cpp @@ -10,7 +10,6 @@ /** @file spritecache.cpp Caching of sprites. */ #include "stdafx.h" -#include "gfx_type.h" #include "fileio_func.h" #include "spriteloader/grf.hpp" #include "gfx_func.h" diff --git a/src/spriteloader/png.cpp b/src/spriteloader/png.cpp index 51ae23b8d5..92e0c6d767 100644 --- a/src/spriteloader/png.cpp +++ b/src/spriteloader/png.cpp @@ -12,7 +12,6 @@ #ifdef WITH_PNG #include "../stdafx.h" -#include "../gfx_func.h" #include "../fileio_func.h" #include "../debug.h" #include "png.hpp" diff --git a/src/spriteloader/spriteloader.hpp b/src/spriteloader/spriteloader.hpp index 6a3d0122be..693c853290 100644 --- a/src/spriteloader/spriteloader.hpp +++ b/src/spriteloader/spriteloader.hpp @@ -13,6 +13,7 @@ #define SPRITELOADER_HPP #include "../core/alloc_type.hpp" +#include "../gfx_type.h" class SpriteLoader { public: diff --git a/src/station.cpp b/src/station.cpp index 4176a88940..e6b984d68c 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -23,6 +23,7 @@ #include "station_base.h" #include "roadstop_base.h" #include "industry.h" +#include "core/random_func.hpp" #include "table/strings.h" diff --git a/src/station_base.h b/src/station_base.h index 05de775608..5de9465811 100644 --- a/src/station_base.h +++ b/src/station_base.h @@ -15,10 +15,7 @@ #include "base_station_base.h" #include "airport.h" #include "cargopacket.h" -#include "cargo_type.h" #include "industry_type.h" -#include "core/geometry_type.hpp" -#include typedef Pool StationPool; extern StationPool _station_pool; diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index b0bc803b2a..f0191cf192 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -10,7 +10,6 @@ /** @file station_cmd.cpp Handling of station tiles. */ #include "stdafx.h" -#include "openttd.h" #include "aircraft.h" #include "bridge_map.h" #include "cmd_helper.h" @@ -45,6 +44,9 @@ #include "waypoint_func.h" #include "pbs.h" #include "debug.h" +#include "core/random_func.hpp" +#include "company_base.h" +#include "newgrf.h" #include "table/strings.h" diff --git a/src/station_func.h b/src/station_func.h index acc1243393..99aa47e5fd 100644 --- a/src/station_func.h +++ b/src/station_func.h @@ -16,10 +16,9 @@ #include "sprite.h" #include "rail_type.h" #include "road_type.h" -#include "tile_type.h" #include "cargo_type.h" -#include "vehicle_type.h" #include "transparency.h" +#include "company_type.h" void ModifyStationRatingAround(TileIndex tile, Owner owner, int amount, uint radius); diff --git a/src/station_gui.cpp b/src/station_gui.cpp index 45208d83a4..3bf2cf2338 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -10,10 +10,8 @@ /** @file station_gui.cpp The GUI for stations. */ #include "stdafx.h" -#include "openttd.h" #include "debug.h" #include "gui.h" -#include "window_gui.h" #include "textbuf_gui.h" #include "company_func.h" #include "command_func.h" @@ -23,13 +21,13 @@ #include "strings_func.h" #include "window_func.h" #include "viewport_func.h" -#include "gfx_func.h" #include "widgets/dropdown_func.h" #include "station_base.h" #include "waypoint_base.h" #include "tilehighlight_func.h" #include "company_base.h" #include "sortlist_type.h" +#include "core/geometry_func.hpp" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/station_gui.h b/src/station_gui.h index efd6ad166d..cb8b278cfc 100644 --- a/src/station_gui.h +++ b/src/station_gui.h @@ -13,7 +13,8 @@ #define STATION_GUI_H #include "command_type.h" -#include "station_type.h" +#include "tilearea_type.h" +#include "window_type.h" /** Enum for StationView, referring to _station_view_widgets and _station_view_expanded_widgets */ enum StationViewWidgets { diff --git a/src/station_type.h b/src/station_type.h index 26e766b8c8..d14bd20940 100644 --- a/src/station_type.h +++ b/src/station_type.h @@ -14,7 +14,6 @@ #include "core/enum_type.hpp" #include "core/smallvec_type.hpp" -#include "tile_type.h" #include "tilearea_type.h" typedef uint16 StationID; diff --git a/src/statusbar_gui.cpp b/src/statusbar_gui.cpp index 93e1d50a97..c4566e44ce 100644 --- a/src/statusbar_gui.cpp +++ b/src/statusbar_gui.cpp @@ -25,6 +25,7 @@ #include "variables.h" #include "window_func.h" #include "statusbar_gui.h" +#include "core/geometry_func.hpp" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/strings.cpp b/src/strings.cpp index 135ec6d90c..010106601b 100644 --- a/src/strings.cpp +++ b/src/strings.cpp @@ -10,7 +10,6 @@ /** @file strings.cpp Handling of translated strings. */ #include "stdafx.h" -#include "openttd.h" #include "currency.h" #include "station_base.h" #include "town.h" @@ -29,11 +28,11 @@ #include "core/endian_func.hpp" #include "date_func.h" #include "vehicle_base.h" -#include "video/video_driver.hpp" #include "engine_base.h" #include "strgen/strgen.h" -#include "gfx_func.h" #include "townname_func.h" +#include "string_func.h" +#include "company_base.h" #include "table/strings.h" #include "table/control_codes.h" diff --git a/src/subsidy.cpp b/src/subsidy.cpp index 631d80e816..66983ef30a 100644 --- a/src/subsidy.cpp +++ b/src/subsidy.cpp @@ -22,6 +22,7 @@ #include "subsidy_base.h" #include "subsidy_func.h" #include "core/pool_func.hpp" +#include "core/random_func.hpp" #include "table/strings.h" diff --git a/src/subsidy_func.h b/src/subsidy_func.h index 780303a7bb..31eb315ccd 100644 --- a/src/subsidy_func.h +++ b/src/subsidy_func.h @@ -14,9 +14,8 @@ #include "core/geometry_type.hpp" #include "station_type.h" -#include "town_type.h" -#include "industry_type.h" #include "company_type.h" +#include "cargo_type.h" Pair SetupSubsidyDecodeParam(const struct Subsidy *s, bool mode); void DeleteSubsidyWith(SourceType type, SourceID index); diff --git a/src/subsidy_gui.cpp b/src/subsidy_gui.cpp index 0903394c74..1204b216e9 100644 --- a/src/subsidy_gui.cpp +++ b/src/subsidy_gui.cpp @@ -10,7 +10,6 @@ /** @file subsidy_gui.cpp GUI for subsidies. */ #include "stdafx.h" -#include "strings_type.h" #include "industry.h" #include "town.h" #include "window_gui.h" @@ -21,6 +20,7 @@ #include "gui.h" #include "subsidy_func.h" #include "subsidy_base.h" +#include "core/geometry_func.hpp" #include "table/strings.h" diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp index 9b8d3b37ed..8684f287e1 100644 --- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -10,7 +10,6 @@ /** @file terraform_gui.cpp GUI related to terraforming the map. */ #include "stdafx.h" -#include "openttd.h" #include "clear_map.h" #include "company_func.h" #include "company_base.h" @@ -18,7 +17,6 @@ #include "window_gui.h" #include "window_func.h" #include "viewport_func.h" -#include "gfx_func.h" #include "command_func.h" #include "signs_func.h" #include "variables.h" diff --git a/src/texteff.cpp b/src/texteff.cpp index bc742924f1..c1c133e8db 100644 --- a/src/texteff.cpp +++ b/src/texteff.cpp @@ -10,13 +10,9 @@ /** @file texteff.cpp Handling of text effects. */ #include "stdafx.h" -#include "openttd.h" -#include "strings_type.h" #include "texteff.hpp" -#include "core/bitmath_func.hpp" #include "transparency.h" #include "strings_func.h" -#include "core/alloc_func.hpp" #include "core/smallvec_type.hpp" #include "viewport_func.h" #include "settings_type.h" diff --git a/src/texteff.hpp b/src/texteff.hpp index 4d6b9a286e..ca6a892888 100644 --- a/src/texteff.hpp +++ b/src/texteff.hpp @@ -13,6 +13,7 @@ #define TEXTEFF_HPP #include "gfx_type.h" +#include "strings_type.h" /** * Text effect modes. diff --git a/src/tile_cmd.h b/src/tile_cmd.h index 4ce9aa1a74..d8eede25dc 100644 --- a/src/tile_cmd.h +++ b/src/tile_cmd.h @@ -12,17 +12,10 @@ #ifndef TILE_CMD_H #define TILE_CMD_H -#include "slope_type.h" -#include "tile_type.h" #include "command_type.h" #include "vehicle_type.h" #include "cargo_type.h" -#include "strings_type.h" -#include "date_type.h" -#include "company_type.h" -#include "direction_type.h" #include "track_type.h" -#include "transport_type.h" #include "tile_map.h" /** The returned bits of VehicleEnterTile. */ diff --git a/src/tile_map.h b/src/tile_map.h index e8559097b9..fcbe2199c0 100644 --- a/src/tile_map.h +++ b/src/tile_map.h @@ -12,9 +12,7 @@ #ifndef TILE_MAP_H #define TILE_MAP_H -#include "tile_type.h" #include "slope_type.h" -#include "company_type.h" #include "map_func.h" #include "core/bitmath_func.hpp" #include "settings_type.h" diff --git a/src/tile_type.h b/src/tile_type.h index bd1d62daba..82e4146e0c 100644 --- a/src/tile_type.h +++ b/src/tile_type.h @@ -12,7 +12,6 @@ #ifndef TILE_TYPE_H #define TILE_TYPE_H -#include "core/enum_type.hpp" enum { TILE_SIZE = 16, ///< Tiles are 16x16 "units" in size diff --git a/src/tilehighlight_func.h b/src/tilehighlight_func.h index 36576587fc..778faff616 100644 --- a/src/tilehighlight_func.h +++ b/src/tilehighlight_func.h @@ -13,8 +13,6 @@ #define TILEHIGHLIGHT_FUNC_H #include "gfx_type.h" -#include "window_type.h" -#include "viewport_type.h" #include "tilehighlight_type.h" typedef void PlaceProc(TileIndex tile); diff --git a/src/tilehighlight_type.h b/src/tilehighlight_type.h index 46569bf6ea..15b26d9ed9 100644 --- a/src/tilehighlight_type.h +++ b/src/tilehighlight_type.h @@ -13,9 +13,9 @@ #define TILEHIGHLIGHT_TYPE_H #include "core/geometry_type.hpp" -#include "zoom_type.h" #include "window_type.h" #include "tile_type.h" +#include "viewport_type.h" /** Highlighting draw styles */ enum HighLightStyle { diff --git a/src/timetable.h b/src/timetable.h index 05b76d2e37..fe0848b564 100644 --- a/src/timetable.h +++ b/src/timetable.h @@ -13,6 +13,7 @@ #define TIMETABLE_H #include "date_type.h" +#include "vehicle_type.h" void ShowTimetableWindow(const Vehicle *v); void UpdateVehicleTimetable(Vehicle *v, bool travelling); diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index f9de4e7ebe..92eeba0c90 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -23,6 +23,7 @@ #include "date_func.h" #include "date_gui.h" #include "vehicle_gui.h" +#include "settings_type.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index f5c61cdcf9..fa708d507e 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -10,7 +10,6 @@ /** @file toolbar_gui.cpp Code related to the (main) toolbar. */ #include "stdafx.h" -#include "openttd.h" #include "gui.h" #include "window_gui.h" #include "window_func.h" @@ -41,6 +40,7 @@ #include "tilehighlight_func.h" #include "rail.h" #include "widgets/dropdown_type.h" +#include "company_base.h" #include "network/network.h" #include "network/network_gui.h" diff --git a/src/town.h b/src/town.h index 08d376fc35..284026fd6a 100644 --- a/src/town.h +++ b/src/town.h @@ -13,18 +13,7 @@ #define TOWN_H #include "core/pool_type.hpp" -#include "core/bitmath_func.hpp" -#include "core/random_func.hpp" -#include "cargo_type.h" -#include "tile_type.h" -#include "date_type.h" -#include "town_type.h" -#include "company_type.h" -#include "settings_type.h" -#include "strings_type.h" #include "viewport_type.h" -#include "economy_type.h" -#include "map_type.h" #include "command_type.h" #include "town_map.h" #include "subsidy_type.h" diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 0003a512ff..7e00409b21 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -10,8 +10,6 @@ /** @file town_cmd.cpp Handling of town tiles. */ #include "stdafx.h" -#include "openttd.h" -#include "road_type.h" #include "road_internal.h" /* Cleaning up road bits */ #include "road_cmd.h" #include "landscape.h" @@ -30,7 +28,6 @@ #include "newgrf_commons.h" #include "newgrf_text.h" #include "autoslope.h" -#include "transparency.h" #include "tunnelbridge_map.h" #include "strings_func.h" #include "window_func.h" @@ -46,6 +43,7 @@ #include "town.h" #include "townname_func.h" #include "townname_type.h" +#include "core/random_func.hpp" #include "table/strings.h" #include "table/town_land.h" diff --git a/src/town_gui.cpp b/src/town_gui.cpp index aed340c417..3c3cd6cfe2 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -33,6 +33,7 @@ #include "window_func.h" #include "townname_func.h" #include "townname_type.h" +#include "core/geometry_func.hpp" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/town_map.h b/src/town_map.h index 148fb2891d..c7bd2f5275 100644 --- a/src/town_map.h +++ b/src/town_map.h @@ -13,7 +13,6 @@ #define TOWN_MAP_H #include "road_map.h" -#include "town_type.h" #include "house.h" /** diff --git a/src/townname.cpp b/src/townname.cpp index 8193e3516b..f734f549b8 100644 --- a/src/townname.cpp +++ b/src/townname.cpp @@ -15,6 +15,7 @@ #include "town.h" #include "core/alloc_func.hpp" #include "strings_func.h" +#include "core/random_func.hpp" #include "table/townname.h" diff --git a/src/track_func.h b/src/track_func.h index 843203da99..2c2ec8e520 100644 --- a/src/track_func.h +++ b/src/track_func.h @@ -14,7 +14,6 @@ #include "core/bitmath_func.hpp" #include "track_type.h" -#include "direction_type.h" #include "slope_func.h" /** diff --git a/src/train.h b/src/train.h index 66a42dfd9e..1e45ffd007 100644 --- a/src/train.h +++ b/src/train.h @@ -12,8 +12,6 @@ #ifndef TRAIN_H #define TRAIN_H -#include "stdafx.h" -#include "core/bitmath_func.hpp" #include "vehicle_base.h" struct Train; diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 17a066423d..b9aad48bb6 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -15,8 +15,6 @@ #include "command_func.h" #include "pathfinder/npf/npf_func.h" #include "pathfinder/yapf/yapf.hpp" -#include "pathfinder/follow_track.hpp" -#include "openttd.h" #include "news_func.h" #include "company_func.h" #include "vehicle_gui.h" @@ -31,13 +29,18 @@ #include "vehicle_func.h" #include "sound_func.h" #include "autoreplace_gui.h" -#include "gfx_func.h" #include "ai/ai.hpp" #include "newgrf_station.h" #include "effectvehicle_func.h" +#include "effectvehicle_base.h" #include "gamelog.h" #include "network/network.h" #include "spritecache.h" +#include "core/random_func.hpp" +#include "company_base.h" +#include "engine_base.h" +#include "engine_func.h" +#include "newgrf.h" #include "table/strings.h" #include "table/train_cmd.h" diff --git a/src/train_gui.cpp b/src/train_gui.cpp index 1f923a79ca..4eb6da7626 100644 --- a/src/train_gui.cpp +++ b/src/train_gui.cpp @@ -19,6 +19,7 @@ #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/transparency_gui.cpp b/src/transparency_gui.cpp index 9b8803c647..69f8defaf4 100644 --- a/src/transparency_gui.cpp +++ b/src/transparency_gui.cpp @@ -10,7 +10,6 @@ /** @file transparency_gui.cpp The transparency GUI. */ #include "stdafx.h" -#include "openttd.h" #include "window_gui.h" #include "transparency.h" #include "sound_func.h" diff --git a/src/tree_cmd.cpp b/src/tree_cmd.cpp index 800cc73c50..7ea424727f 100644 --- a/src/tree_cmd.cpp +++ b/src/tree_cmd.cpp @@ -10,7 +10,6 @@ /** @file tree_cmd.cpp Handling of tree tiles. */ #include "stdafx.h" -#include "openttd.h" #include "clear_map.h" #include "landscape.h" #include "tree_map.h" @@ -28,6 +27,7 @@ #include "water.h" #include "landscape_type.h" #include "company_base.h" +#include "core/random_func.hpp" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/tree_map.h b/src/tree_map.h index 35bab6177d..05315ca253 100644 --- a/src/tree_map.h +++ b/src/tree_map.h @@ -12,6 +12,8 @@ #ifndef TREE_MAP_H #define TREE_MAP_H +#include "tile_map.h" + /** * List of tree types along all landscape types. * diff --git a/src/tunnel_map.h b/src/tunnel_map.h index 1644c0067c..2a167055a2 100644 --- a/src/tunnel_map.h +++ b/src/tunnel_map.h @@ -12,10 +12,6 @@ #ifndef TUNNEL_MAP_H #define TUNNEL_MAP_H -#include "direction_func.h" -#include "rail_type.h" -#include "road_type.h" -#include "transport_type.h" #include "road_map.h" diff --git a/src/tunnelbridge.h b/src/tunnelbridge.h index 6672e2af05..5bc417d477 100644 --- a/src/tunnelbridge.h +++ b/src/tunnelbridge.h @@ -12,7 +12,7 @@ #ifndef TUNNELBRIDGE_H #define TUNNELBRIDGE_H -#include "tile_type.h" +#include "map_func.h" /** * Calculates the length of a tunnel or a bridge (without end tiles) diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index bdf7ced771..6b3c8b976d 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -13,7 +13,6 @@ */ #include "stdafx.h" -#include "openttd.h" #include "rail_map.h" #include "landscape.h" #include "unmovable_map.h" @@ -39,6 +38,8 @@ #include "elrail_func.h" #include "landscape_type.h" #include "pbs.h" +#include "company_base.h" +#include "engine_base.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/tunnelbridge_map.h b/src/tunnelbridge_map.h index b0b73aec9d..ff3a36aace 100644 --- a/src/tunnelbridge_map.h +++ b/src/tunnelbridge_map.h @@ -12,13 +12,8 @@ #ifndef TUNNELBRIDGE_MAP_H #define TUNNELBRIDGE_MAP_H -#include "direction_func.h" -#include "core/bitmath_func.hpp" -#include "tile_map.h" #include "bridge_map.h" #include "tunnel_map.h" -#include "transport_type.h" -#include "track_func.h" /** diff --git a/src/unmovable.h b/src/unmovable.h index 8709bdc436..0940ce6916 100644 --- a/src/unmovable.h +++ b/src/unmovable.h @@ -12,9 +12,8 @@ #ifndef UNMOVABLE_H #define UNMOVABLE_H -#include "unmovable_map.h" -#include "economy_type.h" #include "economy_func.h" +#include "strings_type.h" void UpdateCompanyHQ(Company *c, uint score); diff --git a/src/unmovable_cmd.cpp b/src/unmovable_cmd.cpp index aab1470995..598088a0fa 100644 --- a/src/unmovable_cmd.cpp +++ b/src/unmovable_cmd.cpp @@ -10,7 +10,6 @@ /** @file unmovable_cmd.cpp Handling of unmovable tiles. */ #include "stdafx.h" -#include "openttd.h" #include "landscape.h" #include "command_func.h" #include "viewport_func.h" @@ -28,6 +27,9 @@ #include "landscape_type.h" #include "unmovable.h" #include "cargopacket.h" +#include "sprite.h" +#include "core/random_func.hpp" +#include "unmovable_map.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/unmovable_map.h b/src/unmovable_map.h index 8a2953b083..72cbc37395 100644 --- a/src/unmovable_map.h +++ b/src/unmovable_map.h @@ -12,7 +12,6 @@ #ifndef UNMOVABLE_MAP_H #define UNMOVABLE_MAP_H -#include "core/bitmath_func.hpp" #include "tile_map.h" /** Types of unmovable structure */ diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 6b625f782a..844977d12c 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -11,7 +11,6 @@ #include "stdafx.h" #include "gui.h" -#include "openttd.h" #include "debug.h" #include "roadveh.h" #include "ship.h" @@ -47,6 +46,9 @@ #include "economy_base.h" #include "articulated_vehicles.h" #include "roadstop_base.h" +#include "core/random_func.hpp" +#include "engine_base.h" +#include "newgrf.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/vehicle_base.h b/src/vehicle_base.h index b032b44e4d..f3aeb3349f 100644 --- a/src/vehicle_base.h +++ b/src/vehicle_base.h @@ -12,20 +12,12 @@ #ifndef VEHICLE_BASE_H #define VEHICLE_BASE_H -#include "vehicle_type.h" #include "track_type.h" -#include "cargo_type.h" #include "direction_type.h" -#include "gfx_type.h" #include "command_type.h" -#include "date_type.h" -#include "company_base.h" -#include "company_type.h" -#include "core/pool_type.hpp" #include "order_base.h" #include "cargopacket.h" #include "texteff.hpp" -#include "group_type.h" #include "engine_type.h" #include "order_func.h" #include "transport_type.h" diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp index 9345b8a320..3257372551 100644 --- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -11,7 +11,6 @@ #include "stdafx.h" #include "roadveh.h" -#include "gfx_func.h" #include "news_func.h" #include "airport.h" #include "command_func.h" @@ -27,6 +26,7 @@ #include "string_func.h" #include "depot_map.h" #include "vehiclelist.h" +#include "engine_base.h" #include "table/strings.h" diff --git a/src/vehicle_func.h b/src/vehicle_func.h index 5b58a8fefc..7aa48bb3e7 100644 --- a/src/vehicle_func.h +++ b/src/vehicle_func.h @@ -12,16 +12,14 @@ #ifndef VEHICLE_FUNC_H #define VEHICLE_FUNC_H -#include "tile_type.h" -#include "strings_type.h" #include "gfx_type.h" #include "direction_type.h" -#include "cargo_type.h" #include "command_type.h" #include "vehicle_type.h" #include "engine_type.h" #include "transport_type.h" #include "newgrf_config.h" +#include "company_type.h" #define is_custom_sprite(x) (x >= 0xFD) #define IS_CUSTOM_FIRSTHEAD_SPRITE(x) (x == 0xFD) diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 1415b0d7ad..c0a0011e53 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -10,17 +10,14 @@ /** @file vehicle_gui.cpp The base GUI for all vehicles. */ #include "stdafx.h" -#include "openttd.h" #include "debug.h" #include "company_func.h" #include "gui.h" -#include "window_gui.h" #include "textbuf_gui.h" #include "command_func.h" #include "vehicle_gui.h" #include "vehicle_gui_base.h" #include "viewport_func.h" -#include "gfx_func.h" #include "newgrf_engine.h" #include "newgrf_text.h" #include "waypoint_base.h" @@ -40,6 +37,10 @@ #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 "table/sprites.h" #include "table/strings.h" diff --git a/src/vehicle_gui.h b/src/vehicle_gui.h index 7064fbcc1e..fab4b6bb6f 100644 --- a/src/vehicle_gui.h +++ b/src/vehicle_gui.h @@ -17,7 +17,7 @@ #include "order_type.h" #include "station_type.h" #include "engine_type.h" -#include "tile_type.h" +#include "company_type.h" void ShowVehicleRefitWindow(const Vehicle *v, VehicleOrderID order, Window *parent); diff --git a/src/vehicle_gui_base.h b/src/vehicle_gui_base.h index 72dd8bcc39..7918cb1776 100644 --- a/src/vehicle_gui_base.h +++ b/src/vehicle_gui_base.h @@ -13,6 +13,7 @@ #define VEHICLE_GUI_BASE_H #include "sortlist_type.h" +#include "window_gui.h" typedef GUIList GUIVehicleList; diff --git a/src/vehiclelist.h b/src/vehiclelist.h index d50991ac0f..04caccb5a0 100644 --- a/src/vehiclelist.h +++ b/src/vehiclelist.h @@ -13,6 +13,9 @@ #define VEHICLELIST_H #include "core/smallvec_type.hpp" +#include "vehicle_type.h" +#include "company_type.h" +#include "tile_type.h" typedef SmallVector VehicleList; diff --git a/src/video/allegro_v.cpp b/src/video/allegro_v.cpp index dac11071e2..9d9ef1f579 100644 --- a/src/video/allegro_v.cpp +++ b/src/video/allegro_v.cpp @@ -18,16 +18,13 @@ #include "../stdafx.h" #include "../openttd.h" -#include "../debug.h" #include "../gfx_func.h" #include "../variables.h" #include "../rev.h" #include "../blitter/factory.hpp" #include "../network/network.h" -#include "../core/math_func.hpp" #include "../core/random_func.hpp" #include "../functions.h" -#include "../texteff.hpp" #include "allegro_v.h" #include diff --git a/src/video/dedicated_v.cpp b/src/video/dedicated_v.cpp index d7dcc36afd..69de090ab8 100644 --- a/src/video/dedicated_v.cpp +++ b/src/video/dedicated_v.cpp @@ -13,8 +13,8 @@ #ifdef ENABLE_NETWORK -#include "../openttd.h" #include "../gfx_func.h" +#include "../network/network.h" #include "../network/network_internal.h" #include "../console_func.h" #include "../variables.h" diff --git a/src/video/sdl_v.cpp b/src/video/sdl_v.cpp index 61f37a622e..399b5df126 100644 --- a/src/video/sdl_v.cpp +++ b/src/video/sdl_v.cpp @@ -22,6 +22,7 @@ #include "../functions.h" #include "../thread/thread.h" #include "../genworld.h" +#include "../core/random_func.hpp" #include "sdl_v.h" #include diff --git a/src/viewport.cpp b/src/viewport.cpp index 7b417f942e..0248ee95c2 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -26,7 +26,6 @@ */ #include "stdafx.h" -#include "openttd.h" #include "landscape.h" #include "viewport_func.h" #include "station_base.h" @@ -38,7 +37,6 @@ #include "vehicle_base.h" #include "vehicle_gui.h" #include "blitter/factory.hpp" -#include "transparency.h" #include "strings_func.h" #include "zoom_func.h" #include "vehicle_func.h" diff --git a/src/water.h b/src/water.h index e4ca10d4d1..62cfc37e2c 100644 --- a/src/water.h +++ b/src/water.h @@ -12,6 +12,10 @@ #ifndef WATER_H #define WATER_H +#include "tile_type.h" +#include "company_type.h" +#include "slope_type.h" + void TileLoop_Water(TileIndex tile); bool FloodHalftile(TileIndex t); void DoFloodTile(TileIndex target); diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index 7b9f70a505..df8c6221c0 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -10,7 +10,6 @@ /** @file water_cmd.cpp Handling of water tiles. */ #include "stdafx.h" -#include "openttd.h" #include "cmd_helper.h" #include "landscape.h" #include "viewport_func.h" @@ -19,17 +18,11 @@ #include "news_func.h" #include "depot_base.h" #include "depot_func.h" -#include "vehicle_gui.h" -#include "train.h" -#include "roadveh.h" #include "water.h" #include "industry_map.h" -#include "cargotype.h" #include "newgrf_canal.h" -#include "transparency.h" #include "strings_func.h" #include "functions.h" -#include "window_func.h" #include "vehicle_func.h" #include "sound_func.h" #include "company_func.h" @@ -40,6 +33,7 @@ #include "tunnelbridge_map.h" #include "station_base.h" #include "ai/ai.hpp" +#include "core/random_func.hpp" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/water_map.h b/src/water_map.h index b266aecc19..5193262695 100644 --- a/src/water_map.h +++ b/src/water_map.h @@ -14,6 +14,7 @@ #include "core/math_func.hpp" #include "depot_type.h" +#include "tile_map.h" enum WaterTileType { WATER_TILE_CLEAR, diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp index b48c3a9fbf..2b96f910f5 100644 --- a/src/waypoint_gui.cpp +++ b/src/waypoint_gui.cpp @@ -16,7 +16,6 @@ #include "vehicle_gui.h" #include "viewport_func.h" #include "strings_func.h" -#include "gfx_func.h" #include "command_func.h" #include "company_func.h" #include "window_func.h" diff --git a/src/widget.cpp b/src/widget.cpp index bf8a7d97b9..de89bf263a 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -10,13 +10,13 @@ /** @file widget.cpp Handling of the default/simple widgets. */ #include "stdafx.h" -#include "openttd.h" #include "company_func.h" #include "window_gui.h" #include "viewport_func.h" #include "zoom_func.h" #include "strings_func.h" #include "transparency.h" +#include "core/geometry_func.hpp" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/widget_type.h b/src/widget_type.h index 0119f37da5..820e5c268d 100644 --- a/src/widget_type.h +++ b/src/widget_type.h @@ -12,9 +12,11 @@ #ifndef WIDGET_TYPE_H #define WIDGET_TYPE_H +#include "core/alloc_type.hpp" #include "core/bitmath_func.hpp" #include "strings_type.h" #include "gfx_type.h" +#include "window_type.h" enum { WIDGET_LIST_END = -1, ///< indicate the end of widgets' list for vararg functions diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp index 72bc308563..1056ebced6 100644 --- a/src/widgets/dropdown.cpp +++ b/src/widgets/dropdown.cpp @@ -12,7 +12,6 @@ #include "../stdafx.h" #include "../window_gui.h" #include "../strings_func.h" -#include "../gfx_func.h" #include "../window_func.h" #include "dropdown_type.h" diff --git a/src/widgets/dropdown_func.h b/src/widgets/dropdown_func.h index 98971975ee..4c7e134562 100644 --- a/src/widgets/dropdown_func.h +++ b/src/widgets/dropdown_func.h @@ -12,6 +12,8 @@ #ifndef WIDGETS_DROPDOWN_FUNC_H #define WIDGETS_DROPDOWN_FUNC_H +#include "../window_gui.h" + /* Show drop down menu containing a fixed list of strings */ void ShowDropDownMenu(Window *w, const StringID *strings, int selected, int button, uint32 disabled_mask, uint32 hidden_mask, uint width = 0); diff --git a/src/widgets/dropdown_type.h b/src/widgets/dropdown_type.h index 5e71012dc9..5431263b07 100644 --- a/src/widgets/dropdown_type.h +++ b/src/widgets/dropdown_type.h @@ -13,6 +13,7 @@ #define WIDGETS_DROPDOWN_TYPE_H #include "../window_type.h" +#include "../gfx_func.h" #include /** diff --git a/src/window.cpp b/src/window.cpp index e7ea478960..ee5b040930 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -30,6 +30,7 @@ #include "querystring_gui.h" #include "widgets/dropdown_func.h" #include "strings_func.h" +#include "settings_type.h" #include "table/sprites.h" diff --git a/src/window_gui.h b/src/window_gui.h index 5d58fac163..eb2a6ac7f7 100644 --- a/src/window_gui.h +++ b/src/window_gui.h @@ -12,13 +12,10 @@ #ifndef WINDOW_GUI_H #define WINDOW_GUI_H -#include "core/geometry_func.hpp" #include "core/math_func.hpp" #include "vehicle_type.h" #include "viewport_type.h" #include "company_type.h" -#include "core/alloc_type.hpp" -#include "window_type.h" #include "tile_type.h" #include "widget_type.h" diff --git a/src/window_type.h b/src/window_type.h index 466ed69dd6..7178f930bc 100644 --- a/src/window_type.h +++ b/src/window_type.h @@ -12,7 +12,6 @@ #ifndef WINDOW_TYPE_H #define WINDOW_TYPE_H -#include "core/enum_type.hpp" /** * Window classes