diff --git a/src/ai/ai_config.cpp b/src/ai/ai_config.cpp index 2f08e0d148..1cad24bb73 100644 --- a/src/ai/ai_config.cpp +++ b/src/ai/ai_config.cpp @@ -8,7 +8,6 @@ #include "../core/random_func.hpp" #include "ai.hpp" #include "ai_config.hpp" -#include "ai_info.hpp" void AIConfig::ChangeAI(const char *name, int version) { diff --git a/src/ai/ai_core.cpp b/src/ai/ai_core.cpp index 60475f24b9..e9e2a5bd27 100644 --- a/src/ai/ai_core.cpp +++ b/src/ai/ai_core.cpp @@ -3,18 +3,14 @@ /** @file ai_core.cpp Implementation of AI. */ #include "../stdafx.h" -#include "../openttd.h" -#include "../company_type.h" #include "../company_base.h" #include "../company_func.h" #include "../debug.h" #include "../network/network.h" #include "../settings_type.h" -#include "../window_type.h" #include "../window_func.h" #include "../command_func.h" #include "ai.hpp" -#include "ai_info.hpp" #include "ai_scanner.hpp" #include "ai_instance.hpp" #include "ai_config.hpp" diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp index a686135300..4c34531dff 100644 --- a/src/ai/ai_gui.cpp +++ b/src/ai/ai_gui.cpp @@ -3,21 +3,14 @@ /** @file ai_gui.cpp Window for configuring the AIs */ #include "../stdafx.h" -#include "../openttd.h" #include "../gui.h" #include "../window_gui.h" #include "../company_func.h" #include "../company_base.h" #include "../company_gui.h" -#include "../economy_func.h" -#include "../variables.h" -#include "../cargotype.h" #include "../strings_func.h" -#include "../core/alloc_func.hpp" #include "../window_func.h" -#include "../date_func.h" #include "../gfx_func.h" -#include "../debug.h" #include "../command_func.h" #include "../network/network.h" #include "../string_func.h" @@ -26,15 +19,10 @@ #include "../network/network_content.h" #include "ai.hpp" -#include "api/ai_types.hpp" -#include "api/ai_controller.hpp" -#include "api/ai_object.hpp" #include "api/ai_log.hpp" -#include "ai_info.hpp" #include "ai_config.hpp" #include "table/strings.h" -#include "../table/sprites.h" /** * Window that let you choose an available AI. diff --git a/src/ai/ai_info.cpp b/src/ai/ai_info.cpp index 4c70e2ab56..8dae0511ec 100644 --- a/src/ai/ai_info.cpp +++ b/src/ai/ai_info.cpp @@ -3,17 +3,13 @@ /** @file ai_info.cpp Implementation of AIFileInfo */ #include "../stdafx.h" -#include "../core/alloc_func.hpp" #include #include "../script/squirrel.hpp" #include "../script/squirrel_helper.hpp" -#include "../script/squirrel_class.hpp" -#include "../script/squirrel_std.hpp" #include "ai.hpp" #include "ai_info.hpp" #include "ai_scanner.hpp" -#include "api/ai_controller.hpp" #include "../settings_type.h" #include "../openttd.h" diff --git a/src/ai/ai_instance.cpp b/src/ai/ai_instance.cpp index 5ad763ae9c..14413d0bda 100644 --- a/src/ai/ai_instance.cpp +++ b/src/ai/ai_instance.cpp @@ -3,13 +3,8 @@ /** @file ai_instance.cpp Implementation of AIInstance. */ #include "../stdafx.h" -#include "../openttd.h" #include "../debug.h" -#include "../company_func.h" -#include "../core/alloc_func.hpp" -#include "../string_func.h" #include "../settings_type.h" -#include "../company_base.h" #include "../vehicle_base.h" #include "../saveload/saveload.h" #include "table/strings.h" @@ -22,7 +17,6 @@ #define DEFINE_SCRIPT_FILES -#include "ai.hpp" #include "ai_info.hpp" #include "ai_storage.hpp" #include "ai_instance.hpp" diff --git a/src/ai/ai_scanner.cpp b/src/ai/ai_scanner.cpp index e1a58b702b..e9174504fc 100644 --- a/src/ai/ai_scanner.cpp +++ b/src/ai/ai_scanner.cpp @@ -4,13 +4,11 @@ #include "../stdafx.h" #include "../debug.h" -#include "../openttd.h" #include "../string_func.h" #include "../fileio_func.h" #include "../fios.h" #include "../network/network.h" #include "../core/random_func.hpp" -#include #include #include diff --git a/src/ai/api/ai_airport.cpp b/src/ai/api/ai_airport.cpp index 2b0c3155b7..ec3d400298 100644 --- a/src/ai/api/ai_airport.cpp +++ b/src/ai/api/ai_airport.cpp @@ -4,12 +4,8 @@ #include "ai_airport.hpp" #include "ai_station.hpp" -#include "ai_error.hpp" -#include "../../openttd.h" -#include "../../variables.h" #include "../../station_map.h" #include "../../company_func.h" -#include "../../settings_type.h" #include "../../command_type.h" #include "../../town.h" diff --git a/src/ai/api/ai_bridge.cpp b/src/ai/api/ai_bridge.cpp index 1ca26b81d4..310c23f253 100644 --- a/src/ai/api/ai_bridge.cpp +++ b/src/ai/api/ai_bridge.cpp @@ -5,14 +5,11 @@ #include "ai_bridge.hpp" #include "ai_rail.hpp" #include "../ai_instance.hpp" -#include "../../openttd.h" #include "../../bridge_map.h" #include "../../strings_func.h" #include "../../core/alloc_func.hpp" #include "../../economy_func.h" #include "../../settings_type.h" -#include "../../road_map.h" -#include "table/strings.h" /* static */ bool AIBridge::IsValidBridge(BridgeID bridge_id) { diff --git a/src/ai/api/ai_bridgelist.cpp b/src/ai/api/ai_bridgelist.cpp index 4f2fb2719c..9fd6728c24 100644 --- a/src/ai/api/ai_bridgelist.cpp +++ b/src/ai/api/ai_bridgelist.cpp @@ -4,7 +4,6 @@ #include "ai_bridgelist.hpp" #include "ai_bridge.hpp" -#include "../../openttd.h" #include "../../bridge.h" #include "../../date_func.h" diff --git a/src/ai/api/ai_cargo.cpp b/src/ai/api/ai_cargo.cpp index dccf2af6ec..1e2684f1af 100644 --- a/src/ai/api/ai_cargo.cpp +++ b/src/ai/api/ai_cargo.cpp @@ -3,7 +3,6 @@ /** @file ai_cargo.cpp Implementation of AICargo. */ #include "ai_cargo.hpp" -#include "../../openttd.h" #include "../../cargotype.h" #include "../../economy_func.h" #include "../../core/alloc_func.hpp" diff --git a/src/ai/api/ai_cargolist.cpp b/src/ai/api/ai_cargolist.cpp index e480895fc6..fe92a38867 100644 --- a/src/ai/api/ai_cargolist.cpp +++ b/src/ai/api/ai_cargolist.cpp @@ -4,7 +4,6 @@ #include "ai_cargolist.hpp" #include "ai_industry.hpp" -#include "../../openttd.h" #include "../../cargotype.h" #include "../../tile_type.h" #include "../../industry.h" diff --git a/src/ai/api/ai_company.cpp b/src/ai/api/ai_company.cpp index 439215a7e6..a2f85e2020 100644 --- a/src/ai/api/ai_company.cpp +++ b/src/ai/api/ai_company.cpp @@ -5,14 +5,12 @@ #include "ai_company.hpp" #include "ai_error.hpp" #include "ai_log.hpp" -#include "../../openttd.h" #include "../../command_func.h" #include "../../company_func.h" #include "../../company_base.h" #include "../../economy_func.h" #include "../../strings_func.h" #include "../../tile_map.h" -#include "../../variables.h" #include "../../core/alloc_func.hpp" #include "../../string_func.h" #include "table/strings.h" diff --git a/src/ai/api/ai_controller.cpp b/src/ai/api/ai_controller.cpp index cb1fb6819f..96f9715a80 100644 --- a/src/ai/api/ai_controller.cpp +++ b/src/ai/api/ai_controller.cpp @@ -3,18 +3,12 @@ /** @file ai_controller.cpp Implementation of AIControler. */ #include "../../stdafx.h" -#include "../../openttd.h" -#include "../../company_func.h" -#include "../../core/alloc_func.hpp" #include "../../string_func.h" -#include "../../settings_type.h" #include "../../company_base.h" -#include "../../saveload/saveload.h" #include "table/strings.h" #include "../ai.hpp" #include "ai_controller.hpp" -#include "../ai_info.hpp" #include "../ai_storage.hpp" #include "../ai_instance.hpp" #include "../ai_config.hpp" diff --git a/src/ai/api/ai_depotlist.cpp b/src/ai/api/ai_depotlist.cpp index b93ec3aefa..f4cdb1a08e 100644 --- a/src/ai/api/ai_depotlist.cpp +++ b/src/ai/api/ai_depotlist.cpp @@ -3,7 +3,6 @@ /** @file ai_depotlist.cpp Implementation of AIDepotList and friends. */ #include "ai_depotlist.hpp" -#include "../../core/math_func.hpp" #include "../../tile_map.h" #include "../../company_func.h" #include "../../depot_base.h" diff --git a/src/ai/api/ai_engine.cpp b/src/ai/api/ai_engine.cpp index 5d301f47c2..564dbc0182 100644 --- a/src/ai/api/ai_engine.cpp +++ b/src/ai/api/ai_engine.cpp @@ -4,18 +4,10 @@ #include "ai_engine.hpp" #include "ai_cargo.hpp" -#include "ai_rail.hpp" -#include "../../openttd.h" #include "../../company_func.h" #include "../../strings_func.h" -#include "../../roadveh.h" -#include "../../train.h" -#include "../../ship.h" #include "../../aircraft.h" #include "../../vehicle_func.h" -#include "../../core/alloc_func.hpp" -#include "../../economy_func.h" -#include "../../core/bitmath_func.hpp" #include "../../settings_type.h" #include "../../articulated_vehicles.h" #include "table/strings.h" diff --git a/src/ai/api/ai_error.cpp b/src/ai/api/ai_error.cpp index e060532d42..7aca7d51e4 100644 --- a/src/ai/api/ai_error.cpp +++ b/src/ai/api/ai_error.cpp @@ -3,7 +3,6 @@ /** @file ai_error.cpp Implementation of AIError. */ #include "ai_error.hpp" -#include "table/strings.h" #include "../../core/bitmath_func.hpp" AIError::AIErrorMap AIError::error_map = AIError::AIErrorMap(); diff --git a/src/ai/api/ai_event.cpp b/src/ai/api/ai_event.cpp index b18fa47776..1d6bdbce60 100644 --- a/src/ai/api/ai_event.cpp +++ b/src/ai/api/ai_event.cpp @@ -2,11 +2,9 @@ /** @file ai_event.cpp Implementation of AIEvent. */ -#include "ai_event.hpp" #include "ai_event_types.hpp" #include -#include struct AIEventData { std::queue stack; diff --git a/src/ai/api/ai_event_types.cpp b/src/ai/api/ai_event_types.cpp index 6230caad6b..1cf14f32d2 100644 --- a/src/ai/api/ai_event_types.cpp +++ b/src/ai/api/ai_event_types.cpp @@ -3,14 +3,9 @@ /** @file ai_event_types.cpp Implementation of all EventTypes. */ #include "ai_event_types.hpp" -#include "../../openttd.h" -#include "../../core/alloc_func.hpp" #include "../../strings_func.h" -#include "../../roadveh.h" -#include "../../train.h" -#include "../../ship.h" -#include "../../aircraft.h" #include "../../settings_type.h" +#include "../../aircraft.h" #include "../../articulated_vehicles.h" #include "table/strings.h" diff --git a/src/ai/api/ai_gamesettings.cpp b/src/ai/api/ai_gamesettings.cpp index b3b4fb85a2..16c95e72be 100644 --- a/src/ai/api/ai_gamesettings.cpp +++ b/src/ai/api/ai_gamesettings.cpp @@ -4,7 +4,6 @@ #include "ai_gamesettings.hpp" #include "../../settings_internal.h" -#include "../../saveload/saveload.h" /* static */ bool AIGameSettings::IsValid(const char *setting) { diff --git a/src/ai/api/ai_group.cpp b/src/ai/api/ai_group.cpp index ea3af7d8c4..23846d815b 100644 --- a/src/ai/api/ai_group.cpp +++ b/src/ai/api/ai_group.cpp @@ -3,10 +3,8 @@ /** @file ai_group.cpp Implementation of AIGroup. */ #include "ai_group.hpp" -#include "ai_vehicle.hpp" #include "ai_engine.hpp" #include "../ai_instance.hpp" -#include "../../openttd.h" #include "../../company_func.h" #include "../../group.h" #include "../../string_func.h" diff --git a/src/ai/api/ai_grouplist.cpp b/src/ai/api/ai_grouplist.cpp index be57b37509..6ff0c3cf51 100644 --- a/src/ai/api/ai_grouplist.cpp +++ b/src/ai/api/ai_grouplist.cpp @@ -3,7 +3,6 @@ /** @file ai_grouplist.cpp Implementation of AIGroupList and friends. */ #include "ai_grouplist.hpp" -#include "../../openttd.h" #include "../../company_func.h" #include "../../group.h" diff --git a/src/ai/api/ai_industry.cpp b/src/ai/api/ai_industry.cpp index 0cb5989aae..6876b270be 100644 --- a/src/ai/api/ai_industry.cpp +++ b/src/ai/api/ai_industry.cpp @@ -5,13 +5,10 @@ #include "ai_industry.hpp" #include "ai_cargo.hpp" #include "ai_map.hpp" -#include "../../openttd.h" #include "../../tile_type.h" #include "../../industry.h" -#include "../../tile_map.h" #include "../../strings_func.h" #include "../../station_map.h" -#include "../../station_func.h" #include "table/strings.h" /* static */ IndustryID AIIndustry::GetMaxIndustryID() diff --git a/src/ai/api/ai_industrylist.cpp b/src/ai/api/ai_industrylist.cpp index 8917e9cc08..ab14a3c10a 100644 --- a/src/ai/api/ai_industrylist.cpp +++ b/src/ai/api/ai_industrylist.cpp @@ -3,7 +3,6 @@ /** @file ai_industrylist.cpp Implementation of AIIndustryList and friends. */ #include "ai_industrylist.hpp" -#include "../../openttd.h" #include "../../tile_type.h" #include "../../industry.h" diff --git a/src/ai/api/ai_industrytype.cpp b/src/ai/api/ai_industrytype.cpp index 18ea41de5d..095aaa45f4 100644 --- a/src/ai/api/ai_industrytype.cpp +++ b/src/ai/api/ai_industrytype.cpp @@ -4,11 +4,9 @@ #include "ai_industrytype.hpp" #include "ai_map.hpp" -#include "../../openttd.h" #include "../../command_type.h" #include "../../settings_type.h" #include "../../strings_func.h" -#include "../../tile_type.h" #include "../../industry.h" /* static */ bool AIIndustryType::IsValidIndustryType(IndustryType industry_type) diff --git a/src/ai/api/ai_industrytypelist.cpp b/src/ai/api/ai_industrytypelist.cpp index b5ef34b508..0b1e90a656 100644 --- a/src/ai/api/ai_industrytypelist.cpp +++ b/src/ai/api/ai_industrytypelist.cpp @@ -3,7 +3,6 @@ /** @file ai_industrytypelist.cpp Implementation of AIIndustryTypeList. */ #include "ai_industrytypelist.hpp" -#include "../../openttd.h" #include "../../tile_type.h" #include "../../industry.h" diff --git a/src/ai/api/ai_map.cpp b/src/ai/api/ai_map.cpp index dd6151f198..61cfed87f6 100644 --- a/src/ai/api/ai_map.cpp +++ b/src/ai/api/ai_map.cpp @@ -3,7 +3,6 @@ /** @file ai_map.cpp Implementation of AIMap. */ #include "ai_map.hpp" -#include "../../map_func.h" #include "../../tile_map.h" /* static */ bool AIMap::IsValidTile(TileIndex t) diff --git a/src/ai/api/ai_marine.cpp b/src/ai/api/ai_marine.cpp index d2160b4ca0..e1712ab69e 100644 --- a/src/ai/api/ai_marine.cpp +++ b/src/ai/api/ai_marine.cpp @@ -3,11 +3,7 @@ /** @file ai_marine.cpp Implementation of AIMarine. */ #include "ai_marine.hpp" -#include "../../openttd.h" -#include "../../command_type.h" -#include "../../variables.h" #include "../../station_map.h" -#include "../../water_map.h" #include "../../tile_cmd.h" diff --git a/src/ai/api/ai_object.cpp b/src/ai/api/ai_object.cpp index 1ae5b4fd07..64ae493494 100644 --- a/src/ai/api/ai_object.cpp +++ b/src/ai/api/ai_object.cpp @@ -2,26 +2,12 @@ /** @file ai_object.cpp Implementation of AIObject. */ -#include "ai_object.hpp" #include "ai_log.hpp" -#include "ai_error.hpp" #include "table/strings.h" -#include "../../openttd.h" -#include "../../command_func.h" -#include "../../map_func.h" -#include "../../network/network.h" -#include "../../company_func.h" -#include "../../signs_func.h" -#include "../../tunnelbridge.h" -#include "../../vehicle_func.h" -#include "../../group.h" #include "../ai.hpp" -#include "ai_controller.hpp" #include "../ai_storage.hpp" #include "../ai_instance.hpp" -#include - static AIStorage *GetStorage() { return AIInstance::GetStorage(); diff --git a/src/ai/api/ai_order.cpp b/src/ai/api/ai_order.cpp index 1f30688e43..6e8b1163ac 100644 --- a/src/ai/api/ai_order.cpp +++ b/src/ai/api/ai_order.cpp @@ -3,18 +3,12 @@ /** @file ai_order.cpp Implementation of AIOrder. */ #include "ai_order.hpp" -#include "ai_map.hpp" #include "ai_vehicle.hpp" #include "../ai_instance.hpp" -#include "../../openttd.h" #include "../../debug.h" #include "../../vehicle_base.h" #include "../../depot_base.h" -#include "../../landscape.h" -#include "../../rail_map.h" -#include "../../road_map.h" #include "../../station_map.h" -#include "../../water_map.h" #include "../../waypoint.h" /** diff --git a/src/ai/api/ai_rail.cpp b/src/ai/api/ai_rail.cpp index f35f98de3c..5d08690d94 100644 --- a/src/ai/api/ai_rail.cpp +++ b/src/ai/api/ai_rail.cpp @@ -3,21 +3,13 @@ /** @file ai_rail.cpp Implementation of AIRail. */ #include "ai_rail.hpp" -#include "ai_object.hpp" #include "ai_map.hpp" -#include "../../openttd.h" #include "../../debug.h" -#include "../../rail_map.h" -#include "../../road_map.h" -#include "../../command_type.h" #include "../../station_map.h" #include "../../company_func.h" -#include "../../core/math_func.hpp" #include "../../waypoint.h" -#include "../../newgrf.h" #include "../../newgrf_generic.h" #include "../../newgrf_station.h" -#include "../../newgrf_callbacks.h" /* static */ bool AIRail::IsRailTile(TileIndex tile) { diff --git a/src/ai/api/ai_road.cpp b/src/ai/api/ai_road.cpp index 2e3137f231..be40caf4cb 100644 --- a/src/ai/api/ai_road.cpp +++ b/src/ai/api/ai_road.cpp @@ -4,14 +4,10 @@ #include "ai_road.hpp" #include "ai_map.hpp" -#include "ai_list.hpp" -#include "../../openttd.h" -#include "../../road_map.h" #include "../../station_map.h" -#include "../../tunnelbridge_map.h" #include "../../command_type.h" -#include "../../company_func.h" #include "../../settings_type.h" +#include "../../company_func.h" #include "../../script/squirrel_helper_type.hpp" /* static */ bool AIRoad::IsRoadTile(TileIndex tile) diff --git a/src/ai/api/ai_sign.cpp b/src/ai/api/ai_sign.cpp index 4683e2d322..3f397a4f05 100644 --- a/src/ai/api/ai_sign.cpp +++ b/src/ai/api/ai_sign.cpp @@ -5,7 +5,6 @@ #include "ai_sign.hpp" #include "table/strings.h" #include "../ai_instance.hpp" -#include "../../openttd.h" #include "../../command_func.h" #include "../../core/alloc_func.hpp" #include "../../signs_base.h" diff --git a/src/ai/api/ai_station.cpp b/src/ai/api/ai_station.cpp index 4086b56a20..364b09538a 100644 --- a/src/ai/api/ai_station.cpp +++ b/src/ai/api/ai_station.cpp @@ -6,16 +6,12 @@ #include "ai_cargo.hpp" #include "ai_map.hpp" #include "ai_town.hpp" -#include "../../openttd.h" #include "../../command_func.h" #include "../../debug.h" #include "../../station_map.h" -#include "../../variables.h" #include "../../string_func.h" #include "../../strings_func.h" -#include "../../core/alloc_func.hpp" #include "../../company_func.h" -#include "../../settings_type.h" #include "../../town.h" #include "table/strings.h" diff --git a/src/ai/api/ai_stationlist.cpp b/src/ai/api/ai_stationlist.cpp index 43cb338780..f392513e7d 100644 --- a/src/ai/api/ai_stationlist.cpp +++ b/src/ai/api/ai_stationlist.cpp @@ -4,7 +4,6 @@ #include "ai_stationlist.hpp" #include "ai_vehicle.hpp" -#include "../../openttd.h" #include "../../company_func.h" #include "../../station_base.h" #include "../../vehicle_base.h" diff --git a/src/ai/api/ai_subsidy.cpp b/src/ai/api/ai_subsidy.cpp index 1d0ec65d16..d4a8b7e0fd 100644 --- a/src/ai/api/ai_subsidy.cpp +++ b/src/ai/api/ai_subsidy.cpp @@ -3,10 +3,7 @@ /** @file ai_subsidy.cpp Implementation of AISubsidy. */ #include "ai_subsidy.hpp" -#include "ai_error.hpp" -#include "ai_company.hpp" #include "ai_date.hpp" -#include "../../openttd.h" #include "../../economy_func.h" #include "../../station_base.h" #include "../../cargotype.h" diff --git a/src/ai/api/ai_tile.cpp b/src/ai/api/ai_tile.cpp index 04b8c02908..8a04c17728 100644 --- a/src/ai/api/ai_tile.cpp +++ b/src/ai/api/ai_tile.cpp @@ -5,14 +5,7 @@ #include "ai_tile.hpp" #include "ai_map.hpp" #include "ai_town.hpp" -#include "../../openttd.h" -#include "../../tile_map.h" -#include "../../tile_cmd.h" -#include "../../map_func.h" -#include "../../variables.h" #include "../../station_func.h" -#include "../../command_type.h" -#include "../../settings_type.h" #include "../../company_func.h" #include "../../road_map.h" #include "../../water_map.h" diff --git a/src/ai/api/ai_tilelist.cpp b/src/ai/api/ai_tilelist.cpp index 2360765f4d..d2fa8c4680 100644 --- a/src/ai/api/ai_tilelist.cpp +++ b/src/ai/api/ai_tilelist.cpp @@ -4,15 +4,10 @@ #include "ai_tilelist.hpp" #include "ai_industry.hpp" -#include "../../openttd.h" -#include "../../landscape.h" -#include "../../settings_type.h" -#include "../../station_func.h" -#include "../../map_func.h" #include "../../tile_map.h" #include "../../industry_map.h" -#include "../../station_base.h" #include "../../station_map.h" +#include "../../settings_type.h" void AITileList::FixRectangleSpan(TileIndex &t1, TileIndex &t2) { diff --git a/src/ai/api/ai_town.cpp b/src/ai/api/ai_town.cpp index ebb575e965..60fbdb7993 100644 --- a/src/ai/api/ai_town.cpp +++ b/src/ai/api/ai_town.cpp @@ -7,7 +7,6 @@ #include "ai_cargo.hpp" #include "ai_error.hpp" #include "../../command_type.h" -#include "../../openttd.h" #include "../../town.h" #include "../../strings_func.h" #include "../../core/alloc_func.hpp" diff --git a/src/ai/api/ai_townlist.cpp b/src/ai/api/ai_townlist.cpp index 34612d8572..d14c280c93 100644 --- a/src/ai/api/ai_townlist.cpp +++ b/src/ai/api/ai_townlist.cpp @@ -3,7 +3,6 @@ /** @file ai_townlist.cpp Implementation of AITownList and friends. */ #include "ai_townlist.hpp" -#include "../../openttd.h" #include "../../town.h" AITownList::AITownList() diff --git a/src/ai/api/ai_tunnel.cpp b/src/ai/api/ai_tunnel.cpp index 6c4c7b2162..2b1fb1e319 100644 --- a/src/ai/api/ai_tunnel.cpp +++ b/src/ai/api/ai_tunnel.cpp @@ -3,13 +3,9 @@ /** @file ai_tunnel.cpp Implementation of AITunnel. */ #include "ai_tunnel.hpp" -#include "ai_map.hpp" #include "ai_rail.hpp" #include "../ai_instance.hpp" -#include "../../openttd.h" -#include "../../landscape.h" #include "../../tunnel_map.h" -#include "../../road_type.h" #include "../../command_func.h" #include "../../tunnelbridge.h" #include "../../road_func.h" diff --git a/src/ai/api/ai_vehicle.cpp b/src/ai/api/ai_vehicle.cpp index 197b558b81..93732130b2 100644 --- a/src/ai/api/ai_vehicle.cpp +++ b/src/ai/api/ai_vehicle.cpp @@ -2,19 +2,15 @@ /** @file ai_vehicle.cpp Implementation of AIVehicle. */ -#include "ai_vehicle.hpp" #include "ai_engine.hpp" #include "ai_cargo.hpp" -#include "ai_order.hpp" #include "ai_gamesettings.hpp" #include "ai_group.hpp" #include "../ai_instance.hpp" -#include "../../openttd.h" #include "../../company_func.h" #include "../../aircraft.h" #include "../../string_func.h" #include "../../strings_func.h" -#include "../../core/alloc_func.hpp" #include "../../command_func.h" #include "../../roadveh.h" #include "../../train.h" diff --git a/src/ai/api/ai_vehiclelist.cpp b/src/ai/api/ai_vehiclelist.cpp index 127ac77e9a..c7e75c7956 100644 --- a/src/ai/api/ai_vehiclelist.cpp +++ b/src/ai/api/ai_vehiclelist.cpp @@ -4,7 +4,6 @@ #include "ai_vehiclelist.hpp" #include "ai_station.hpp" -#include "../../openttd.h" #include "../../company_func.h" #include "../../vehicle_base.h" diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index 4a14c28872..587cf24532 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -4,22 +4,14 @@ * This file deals with aircraft and airport movements functionalities */ #include "stdafx.h" -#include "openttd.h" #include "aircraft.h" #include "debug.h" #include "landscape.h" -#include "station_map.h" -#include "timetable.h" -#include "depot_func.h" #include "news_func.h" -#include "airport.h" #include "vehicle_gui.h" #include "newgrf_engine.h" -#include "newgrf_callbacks.h" -#include "newgrf_text.h" #include "newgrf_sound.h" #include "spritecache.h" -#include "cargotype.h" #include "strings_func.h" #include "command_func.h" #include "window_func.h" @@ -28,15 +20,14 @@ #include "sound_func.h" #include "functions.h" #include "variables.h" -#include "cheat_func.h" +#include "cheat_type.h" #include "autoreplace_func.h" #include "autoreplace_gui.h" #include "gfx_func.h" #include "ai/ai.hpp" #include "company_func.h" -#include "settings_type.h" -#include "order_func.h" #include "effectvehicle_func.h" +#include "settings_type.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/aircraft_gui.cpp b/src/aircraft_gui.cpp index d4a484a317..7097ca6c9b 100644 --- a/src/aircraft_gui.cpp +++ b/src/aircraft_gui.cpp @@ -3,16 +3,12 @@ /** @file aircraft_gui.cpp The GUI of aircraft. */ #include "stdafx.h" -#include "openttd.h" #include "aircraft.h" -#include "debug.h" -#include "gui.h" #include "vehicle_gui.h" #include "newgrf_engine.h" #include "strings_func.h" #include "vehicle_func.h" #include "gfx_func.h" -#include "order_func.h" #include "window_gui.h" #include "table/sprites.h" diff --git a/src/airport.cpp b/src/airport.cpp index 5872cc4229..d099cc34b5 100644 --- a/src/airport.cpp +++ b/src/airport.cpp @@ -3,7 +3,6 @@ /** @file airport.cpp Functions related to airports. */ #include "stdafx.h" -#include "openttd.h" #include "debug.h" #include "airport.h" #include "airport_movement.h" diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp index eefc1f1f50..ff6a70627b 100644 --- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -3,12 +3,9 @@ /** @file airport_gui.cpp The GUI for airports. */ #include "stdafx.h" -#include "openttd.h" #include "window_gui.h" -#include "gui.h" #include "station_gui.h" #include "terraform_gui.h" -#include "command_func.h" #include "airport.h" #include "sound_func.h" #include "window_func.h" @@ -17,7 +14,6 @@ #include "viewport_func.h" #include "gfx_func.h" #include "company_func.h" -#include "order_func.h" #include "station_type.h" #include "tilehighlight_func.h" #include "company_base.h" diff --git a/src/animated_tile.cpp b/src/animated_tile.cpp index fd3fc12f8a..5f499ace86 100644 --- a/src/animated_tile.cpp +++ b/src/animated_tile.cpp @@ -3,8 +3,6 @@ /** @file animated_tile.cpp Everything related to animated tiles. */ #include "stdafx.h" -#include "openttd.h" -#include "landscape.h" #include "core/alloc_func.hpp" #include "functions.h" diff --git a/src/articulated_vehicles.cpp b/src/articulated_vehicles.cpp index bb21b49f89..0c4eeec8e1 100644 --- a/src/articulated_vehicles.cpp +++ b/src/articulated_vehicles.cpp @@ -3,11 +3,8 @@ /** @file articulated_vehicles.cpp Implementation of articulated vehicles. */ #include "stdafx.h" -#include "openttd.h" -#include "articulated_vehicles.h" #include "train.h" #include "roadveh.h" -#include "newgrf_callbacks.h" #include "newgrf_engine.h" #include "vehicle_func.h" diff --git a/src/autoreplace.cpp b/src/autoreplace.cpp index 8302360193..f37731d14e 100644 --- a/src/autoreplace.cpp +++ b/src/autoreplace.cpp @@ -3,8 +3,6 @@ /** @file autoreplace.cpp Management of replacement lists. */ #include "stdafx.h" -#include "openttd.h" -#include "debug.h" #include "command_func.h" #include "group.h" #include "autoreplace_base.h" diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp index c0483ff1cf..3cad32e25b 100644 --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -3,13 +3,9 @@ /** @file autoreplace_cmd.cpp Deals with autoreplace execution but not the setup */ #include "stdafx.h" -#include "openttd.h" #include "company_func.h" -#include "debug.h" #include "vehicle_gui.h" #include "train.h" -#include "aircraft.h" -#include "roadveh.h" #include "rail.h" #include "command_func.h" #include "engine_base.h" diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp index 2e6558956f..c36142bc93 100644 --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -3,29 +3,21 @@ /** @file autoreplace_gui.cpp GUI for autoreplace handling. */ #include "stdafx.h" -#include "openttd.h" -#include "debug.h" -#include "gui.h" #include "command_func.h" -#include "variables.h" #include "vehicle_gui.h" #include "newgrf_engine.h" #include "group.h" #include "rail.h" #include "strings_func.h" #include "window_func.h" -#include "vehicle_func.h" #include "autoreplace_func.h" #include "gfx_func.h" #include "company_func.h" #include "widgets/dropdown_type.h" -#include "widgets/dropdown_func.h" -#include "engine_func.h" #include "engine_base.h" #include "window_gui.h" #include "engine_gui.h" -#include "table/sprites.h" #include "table/strings.h" void DrawEngineList(VehicleType type, int x, int r, int y, const GUIEngineList *eng_list, uint16 min, uint16 max, EngineID selected_id, int count_location, GroupID selected_group); diff --git a/src/aystar.cpp b/src/aystar.cpp index be1e6aaf86..d34e9911d1 100644 --- a/src/aystar.cpp +++ b/src/aystar.cpp @@ -19,7 +19,6 @@ */ #include "stdafx.h" -#include "openttd.h" #include "aystar.h" #include "core/alloc_func.hpp" diff --git a/src/blitter/32bpp_anim.cpp b/src/blitter/32bpp_anim.cpp index d9e8eea45c..2b78878555 100644 --- a/src/blitter/32bpp_anim.cpp +++ b/src/blitter/32bpp_anim.cpp @@ -6,8 +6,6 @@ #include "../core/alloc_func.hpp" #include "../core/math_func.hpp" #include "../gfx_func.h" -#include "../zoom_func.h" -#include "../debug.h" #include "../video/video_driver.hpp" #include "32bpp_anim.hpp" diff --git a/src/blitter/32bpp_optimized.cpp b/src/blitter/32bpp_optimized.cpp index 717701bce6..d37615448f 100644 --- a/src/blitter/32bpp_optimized.cpp +++ b/src/blitter/32bpp_optimized.cpp @@ -5,7 +5,6 @@ #include "../stdafx.h" #include "../zoom_func.h" #include "../gfx_func.h" -#include "../debug.h" #include "../core/math_func.hpp" #include "../core/alloc_func.hpp" #include "32bpp_optimized.hpp" diff --git a/src/blitter/32bpp_simple.cpp b/src/blitter/32bpp_simple.cpp index 0d60a72342..7b46af10fc 100644 --- a/src/blitter/32bpp_simple.cpp +++ b/src/blitter/32bpp_simple.cpp @@ -5,7 +5,6 @@ #include "../stdafx.h" #include "../gfx_func.h" #include "../zoom_func.h" -#include "../debug.h" #include "32bpp_simple.hpp" #include "../table/sprites.h" diff --git a/src/blitter/8bpp_optimized.cpp b/src/blitter/8bpp_optimized.cpp index 656f910f28..f002dc070b 100644 --- a/src/blitter/8bpp_optimized.cpp +++ b/src/blitter/8bpp_optimized.cpp @@ -4,7 +4,6 @@ #include "../stdafx.h" #include "../zoom_func.h" -#include "../debug.h" #include "../core/alloc_func.hpp" #include "../core/math_func.hpp" #include "8bpp_optimized.hpp" diff --git a/src/bridge_gui.cpp b/src/bridge_gui.cpp index d27d1589bb..21f3c55288 100644 --- a/src/bridge_gui.cpp +++ b/src/bridge_gui.cpp @@ -3,18 +3,15 @@ /** @file bridge_gui.cpp Graphical user interface for bridge construction */ #include "stdafx.h" -#include "openttd.h" #include "gui.h" #include "window_gui.h" #include "command_func.h" #include "economy_func.h" -#include "variables.h" #include "bridge.h" #include "strings_func.h" #include "window_func.h" #include "sound_func.h" #include "map_func.h" -#include "viewport_func.h" #include "gfx_func.h" #include "tunnelbridge.h" #include "sortlist_type.h" diff --git a/src/bridge_map.cpp b/src/bridge_map.cpp index 8509f305fd..6ebd333489 100644 --- a/src/bridge_map.cpp +++ b/src/bridge_map.cpp @@ -3,10 +3,7 @@ /** @file bridge_map.cpp Map accessor functions for bridges. */ #include "stdafx.h" -#include "openttd.h" #include "bridge_map.h" -#include "bridge.h" -#include "variables.h" #include "landscape.h" #include "tunnelbridge_map.h" diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index a7840150fd..a3e104a0c0 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -2,34 +2,26 @@ /** @file build_vehicle_gui.cpp GUI for building vehicles. */ -#include "stdafx.h" -#include "openttd.h" #include "train.h" #include "roadveh.h" #include "ship.h" #include "aircraft.h" -#include "debug.h" -#include "gui.h" #include "articulated_vehicles.h" #include "textbuf_gui.h" #include "command_func.h" #include "company_func.h" -#include "airport.h" #include "vehicle_gui.h" #include "newgrf_engine.h" -#include "cargotype.h" #include "group.h" -#include "road_map.h" #include "strings_func.h" #include "window_func.h" #include "date_func.h" #include "vehicle_func.h" -#include "settings_type.h" #include "gfx_func.h" #include "widgets/dropdown_func.h" -#include "string_func.h" #include "window_gui.h" #include "engine_gui.h" +#include "settings_type.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/callback_table.cpp b/src/callback_table.cpp index 0bab107596..f1da418475 100644 --- a/src/callback_table.cpp +++ b/src/callback_table.cpp @@ -3,8 +3,8 @@ /** @file callback_table.cpp All command callbacks. */ #include "stdafx.h" -#include "openttd.h" #include "callback_table.h" +#include "command_type.h" /* If you add a callback for DoCommandP, also add the callback in here * see below for the full list! diff --git a/src/cargopacket.cpp b/src/cargopacket.cpp index 3c043829aa..f94363fd9d 100644 --- a/src/cargopacket.cpp +++ b/src/cargopacket.cpp @@ -4,7 +4,6 @@ #include "stdafx.h" #include "station_base.h" -#include "cargopacket.h" #include "oldpool_func.h" /* Initialize the cargopacket-pool */ diff --git a/src/cargotype.cpp b/src/cargotype.cpp index 7f9cd956b8..7c533b5274 100644 --- a/src/cargotype.cpp +++ b/src/cargotype.cpp @@ -3,7 +3,6 @@ /** @file cargotype.cpp Implementation of cargos. */ #include "stdafx.h" -#include "openttd.h" #include "newgrf_cargo.h" #include "cargotype.h" #include "core/bitmath_func.hpp" diff --git a/src/cheat_gui.cpp b/src/cheat_gui.cpp index 1ddb1c662b..bfb9a2b6f5 100644 --- a/src/cheat_gui.cpp +++ b/src/cheat_gui.cpp @@ -3,9 +3,8 @@ /** @file cheat_gui.cpp GUI related to cheating. */ #include "stdafx.h" -#include "openttd.h" #include "command_func.h" -#include "cheat_func.h" +#include "cheat_type.h" #include "company_base.h" #include "company_func.h" #include "gfx_func.h" diff --git a/src/clear_cmd.cpp b/src/clear_cmd.cpp index 81d45bbaac..9892fe0b1b 100644 --- a/src/clear_cmd.cpp +++ b/src/clear_cmd.cpp @@ -6,19 +6,15 @@ #include "openttd.h" #include "clear_map.h" #include "command_func.h" -#include "bridge.h" #include "landscape.h" #include "variables.h" -#include "unmovable_map.h" #include "genworld.h" #include "industry.h" -#include "water_map.h" -#include "tile_cmd.h" #include "functions.h" #include "economy_func.h" #include "viewport_func.h" -#include "settings_type.h" #include "water.h" +#include "settings_type.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/command.cpp b/src/command.cpp index aa0d48e421..73d44393b6 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -9,7 +9,6 @@ #include "gui.h" #include "command_func.h" #include "network/network.h" -#include "variables.h" #include "genworld.h" #include "newgrf_storage.h" #include "strings_func.h" diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index 31e9bcef05..a5ebc3e366 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -4,7 +4,6 @@ #include "stdafx.h" #include "openttd.h" -#include "engine_func.h" #include "engine_base.h" #include "company_func.h" #include "company_gui.h" @@ -22,23 +21,18 @@ #include "tile_map.h" #include "strings_func.h" #include "gfx_func.h" -#include "functions.h" #include "date_func.h" -#include "vehicle_func.h" #include "sound_func.h" #include "core/alloc_func.hpp" -#include "core/sort_func.hpp" #include "autoreplace_func.h" #include "autoreplace_gui.h" #include "string_func.h" #include "road_func.h" #include "rail.h" #include "sprite.h" -#include "debug.h" #include "oldpool_func.h" #include "table/strings.h" -#include "table/sprites.h" CompanyByte _local_company; CompanyByte _current_company; diff --git a/src/company_gui.cpp b/src/company_gui.cpp index 9f9339f051..913331d6f7 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -9,29 +9,22 @@ #include "viewport_func.h" #include "gfx_func.h" #include "company_func.h" -#include "company_base.h" #include "command_func.h" #include "network/network.h" #include "network/network_gui.h" #include "network/network_func.h" -#include "variables.h" #include "roadveh.h" #include "train.h" #include "aircraft.h" #include "newgrf.h" #include "company_manager_face.h" #include "strings_func.h" -#include "functions.h" -#include "window_func.h" #include "date_func.h" #include "string_func.h" -#include "settings_type.h" -#include "widgets/dropdown_func.h" #include "widgets/dropdown_type.h" #include "tilehighlight_func.h" -#include "highscore.h" +#include "settings_type.h" -#include "table/sprites.h" #include "table/strings.h" enum { diff --git a/src/console.cpp b/src/console.cpp index b0a5191a19..e9d0286d1b 100644 --- a/src/console.cpp +++ b/src/console.cpp @@ -4,18 +4,14 @@ #include "stdafx.h" #include "core/alloc_func.hpp" -#include "string_func.h" -#include "strings_type.h" #include "core/math_func.hpp" +#include "string_func.h" #include "console_internal.h" #include "network/network.h" #include "network/network_func.h" -#include "rev.h" #include -#include "table/strings.h" - #define ICON_BUFFER 79 #define ICON_HISTORY_SIZE 20 #define ICON_LINE_HEIGHT 12 diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index fdd620a8c8..3fb5d8234f 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -22,7 +22,6 @@ #include "strings_func.h" #include "viewport_func.h" #include "window_func.h" -#include "functions.h" #include "map_func.h" #include "date_func.h" #include "vehicle_func.h" diff --git a/src/console_gui.cpp b/src/console_gui.cpp index d068338204..e2bbf11f60 100644 --- a/src/console_gui.cpp +++ b/src/console_gui.cpp @@ -3,12 +3,9 @@ /** @file console_gui.cpp Handling the GUI of the in-game console. */ #include "stdafx.h" -#include "openttd.h" #include "textbuf_gui.h" #include "window_gui.h" #include "console_gui.h" -#include -#include #include "console_internal.h" #include "window_func.h" #include "string_func.h" diff --git a/src/core/bitmath_func.cpp b/src/core/bitmath_func.cpp index 1b8662386e..12df3c780f 100644 --- a/src/core/bitmath_func.cpp +++ b/src/core/bitmath_func.cpp @@ -6,14 +6,14 @@ #include "bitmath_func.hpp" const uint8 _ffb_64[64] = { - 0, 0, 1, 0, 2, 0, 1, 0, - 3, 0, 1, 0, 2, 0, 1, 0, - 4, 0, 1, 0, 2, 0, 1, 0, - 3, 0, 1, 0, 2, 0, 1, 0, - 5, 0, 1, 0, 2, 0, 1, 0, - 3, 0, 1, 0, 2, 0, 1, 0, - 4, 0, 1, 0, 2, 0, 1, 0, - 3, 0, 1, 0, 2, 0, 1, 0, + 0, 0, 1, 0, 2, 0, 1, 0, + 3, 0, 1, 0, 2, 0, 1, 0, + 4, 0, 1, 0, 2, 0, 1, 0, + 3, 0, 1, 0, 2, 0, 1, 0, + 5, 0, 1, 0, 2, 0, 1, 0, + 3, 0, 1, 0, 2, 0, 1, 0, + 4, 0, 1, 0, 2, 0, 1, 0, + 3, 0, 1, 0, 2, 0, 1, 0, }; /** diff --git a/src/currency.cpp b/src/currency.cpp index c40c6ec9c1..73b2dd7b11 100644 --- a/src/currency.cpp +++ b/src/currency.cpp @@ -3,7 +3,6 @@ /** @file currency.cpp Support for different currencies. */ #include "stdafx.h" -#include "openttd.h" #include "currency.h" #include "news_func.h" #include "settings_type.h" diff --git a/src/debug.cpp b/src/debug.cpp index 62f75e1577..7717749f0c 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -5,7 +5,6 @@ #include "stdafx.h" #include #include -#include "openttd.h" #include "console_func.h" #include "debug.h" #include "string_func.h" diff --git a/src/dedicated.cpp b/src/dedicated.cpp index cb760c208e..42f885da9d 100644 --- a/src/dedicated.cpp +++ b/src/dedicated.cpp @@ -8,10 +8,8 @@ #if defined(UNIX) && !defined(__MORPHOS__) -#include "openttd.h" #include "variables.h" -#include #include #if defined(SUNOS) && !defined(_LP64) && !defined(_I32LPx) diff --git a/src/depot.cpp b/src/depot.cpp index cf6ec603a2..e8b6b3e5ce 100644 --- a/src/depot.cpp +++ b/src/depot.cpp @@ -4,13 +4,10 @@ #include "stdafx.h" #include "depot_base.h" -#include "landscape.h" #include "order_func.h" #include "window_func.h" #include "oldpool_func.h" -#include "table/strings.h" - DEFINE_OLD_POOL_GENERIC(Depot, Depot) /** diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp index c33ab94047..c964d42983 100644 --- a/src/depot_gui.cpp +++ b/src/depot_gui.cpp @@ -2,10 +2,7 @@ /** @file depot_gui.cpp The GUI for depots. */ -#include "stdafx.h" -#include "openttd.h" #include "train.h" -#include "roadveh.h" #include "ship.h" #include "aircraft.h" #include "gui.h" @@ -15,14 +12,12 @@ #include "command_func.h" #include "depot_base.h" #include "vehicle_gui.h" -#include "station_map.h" #include "newgrf_engine.h" #include "spritecache.h" #include "strings_func.h" #include "window_func.h" #include "vehicle_func.h" #include "company_func.h" -#include "order_func.h" #include "tilehighlight_func.h" #include "window_gui.h" #include "vehiclelist.h" diff --git a/src/disaster_cmd.cpp b/src/disaster_cmd.cpp index 221e599628..709e73c715 100644 --- a/src/disaster_cmd.cpp +++ b/src/disaster_cmd.cpp @@ -17,27 +17,19 @@ #include "stdafx.h" -#include "openttd.h" #include "landscape.h" #include "industry_map.h" #include "station_map.h" #include "command_func.h" -#include "tile_cmd.h" #include "news_func.h" -#include "station_base.h" -#include "waypoint.h" #include "town.h" -#include "industry.h" #include "company_func.h" -#include "airport.h" #include "variables.h" -#include "settings_type.h" #include "strings_func.h" #include "date_func.h" #include "functions.h" #include "vehicle_func.h" -#include "vehicle_base.h" #include "sound_func.h" #include "effectvehicle_func.h" #include "roadveh.h" diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp index 7cc13acdb6..433d4c34a5 100644 --- a/src/dock_gui.cpp +++ b/src/dock_gui.cpp @@ -6,12 +6,10 @@ #include "openttd.h" #include "tile_map.h" #include "station_type.h" -#include "gui.h" #include "terraform_gui.h" #include "window_gui.h" #include "station_gui.h" #include "command_func.h" -#include "settings_type.h" #include "water.h" #include "window_func.h" #include "vehicle_func.h" @@ -22,6 +20,7 @@ #include "slope_func.h" #include "tilehighlight_func.h" #include "company_base.h" +#include "settings_type.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/driver.cpp b/src/driver.cpp index f1b2d59275..5d5a86cd96 100644 --- a/src/driver.cpp +++ b/src/driver.cpp @@ -3,10 +3,7 @@ /** @file driver.cpp Base for all driver handling. */ #include "stdafx.h" -#include "openttd.h" #include "debug.h" -#include "driver.h" - #include "sound/sound_driver.hpp" #include "music/music_driver.hpp" #include "video/video_driver.hpp" diff --git a/src/driver.h b/src/driver.h index 727e9875f7..61fede9c44 100644 --- a/src/driver.h +++ b/src/driver.h @@ -5,7 +5,6 @@ #ifndef DRIVER_H #define DRIVER_H -#include "debug.h" #include "core/enum_type.hpp" #include "string_func.h" #include diff --git a/src/dummy_land.cpp b/src/dummy_land.cpp index de244f99b6..c28952fea7 100644 --- a/src/dummy_land.cpp +++ b/src/dummy_land.cpp @@ -3,7 +3,6 @@ /** @file dummy_land.cpp Handling of void (or dummy) tiles. */ #include "stdafx.h" -#include "openttd.h" #include "tile_cmd.h" #include "command_func.h" #include "viewport_func.h" diff --git a/src/economy.cpp b/src/economy.cpp index a10b54e8f1..4c5fe53cdb 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -4,49 +4,34 @@ #include "stdafx.h" #include "openttd.h" -#include "currency.h" -#include "landscape.h" -#include "company_base.h" +#include "tile_cmd.h" #include "company_func.h" #include "command_func.h" -#include "industry.h" #include "industry_map.h" #include "town.h" #include "news_func.h" #include "network/network.h" #include "network/network_func.h" -#include "variables.h" #include "vehicle_gui.h" #include "ai/ai.hpp" -#include "train.h" -#include "roadveh.h" #include "aircraft.h" #include "newgrf_engine.h" #include "newgrf_sound.h" -#include "newgrf_callbacks.h" #include "newgrf_industries.h" #include "newgrf_industrytiles.h" #include "newgrf_station.h" #include "unmovable.h" -#include "cargotype.h" #include "group.h" #include "strings_func.h" -#include "tile_cmd.h" #include "functions.h" #include "window_func.h" #include "date_func.h" #include "vehicle_func.h" #include "sound_func.h" -#include "track_type.h" -#include "track_func.h" -#include "road_func.h" -#include "rail_map.h" -#include "signal_func.h" #include "gfx_func.h" #include "autoreplace_func.h" #include "company_gui.h" #include "signs_base.h" -#include "core/smallvec_type.hpp" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/effectvehicle.cpp b/src/effectvehicle.cpp index 4d13684f13..9ad90f120c 100644 --- a/src/effectvehicle.cpp +++ b/src/effectvehicle.cpp @@ -3,54 +3,15 @@ /** @file effectvehicle.cpp Implementation of everything generic to vehicles. */ #include "stdafx.h" -#include "openttd.h" -#include "road_map.h" -#include "roadveh.h" -#include "ship.h" -#include "spritecache.h" -#include "tile_cmd.h" #include "landscape.h" -#include "timetable.h" -#include "viewport_func.h" -#include "gfx_func.h" -#include "news_func.h" -#include "command_func.h" -#include "company_func.h" -#include "debug.h" -#include "vehicle_gui.h" -#include "rail_type.h" -#include "train.h" -#include "aircraft.h" #include "industry_map.h" -#include "station_map.h" -#include "water_map.h" -#include "yapf/yapf.h" -#include "newgrf_callbacks.h" -#include "newgrf_engine.h" -#include "newgrf_sound.h" -#include "group.h" -#include "order_func.h" -#include "strings_func.h" -#include "zoom_func.h" -#include "functions.h" -#include "date_func.h" -#include "window_func.h" #include "vehicle_func.h" -#include "signal_func.h" #include "sound_func.h" -#include "variables.h" -#include "autoreplace_func.h" -#include "autoreplace_gui.h" -#include "string_func.h" -#include "settings_type.h" -#include "oldpool_func.h" -#include "depot_map.h" #include "animated_tile_func.h" #include "effectvehicle_base.h" #include "effectvehicle_func.h" #include "table/sprites.h" -#include "table/strings.h" static void ChimneySmokeInit(Vehicle *v) { diff --git a/src/elrail.cpp b/src/elrail.cpp index 8188c8b497..08bd0f6530 100644 --- a/src/elrail.cpp +++ b/src/elrail.cpp @@ -50,23 +50,12 @@ #include "openttd.h" #include "station_map.h" #include "viewport_func.h" -#include "settings_type.h" #include "landscape.h" -#include "rail_type.h" -#include "debug.h" -#include "tunnel_map.h" -#include "road_map.h" -#include "bridge_map.h" -#include "bridge.h" -#include "rail_map.h" #include "train.h" #include "rail_gui.h" -#include "transparency.h" #include "tunnelbridge_map.h" #include "vehicle_func.h" -#include "company_base.h" #include "tunnelbridge.h" -#include "engine_func.h" #include "elrail_func.h" #include "engine_base.h" diff --git a/src/engine.cpp b/src/engine.cpp index 37886699d6..1e388a3e19 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -3,30 +3,25 @@ /** @file engine.cpp Base for all engine handling. */ #include "stdafx.h" -#include "openttd.h" #include "debug.h" -#include "company_base.h" #include "company_func.h" #include "command_func.h" #include "news_func.h" #include "variables.h" -#include "train.h" #include "aircraft.h" -#include "newgrf_cargo.h" #include "newgrf_engine.h" #include "group.h" #include "strings_func.h" #include "gfx_func.h" -#include "functions.h" +#include "core/random_func.hpp" #include "window_func.h" #include "date_func.h" #include "autoreplace_gui.h" #include "string_func.h" -#include "settings_type.h" #include "oldpool_func.h" #include "ai/ai.hpp" -#include "core/alloc_func.hpp" #include "vehicle_func.h" +#include "settings_type.h" #include "table/strings.h" #include "table/engines.h" diff --git a/src/engine_gui.cpp b/src/engine_gui.cpp index 2593994b7d..0cf3d99d32 100644 --- a/src/engine_gui.cpp +++ b/src/engine_gui.cpp @@ -3,16 +3,12 @@ /** @file engine_gui.cpp GUI to show engine related information. */ #include "stdafx.h" -#include "openttd.h" -#include "gui.h" #include "window_gui.h" #include "gfx_func.h" #include "engine_func.h" #include "engine_base.h" #include "command_func.h" -#include "economy_func.h" -#include "news_func.h" -#include "variables.h" +#include "news_type.h" #include "newgrf_engine.h" #include "strings_func.h" #include "engine_gui.h" diff --git a/src/fileio.cpp b/src/fileio.cpp index be61441603..19f4f4de15 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -3,20 +3,16 @@ /** @file fileio.cpp Standard In/Out file operations */ #include "stdafx.h" -#include "openttd.h" #include "fileio_func.h" #include "variables.h" #include "debug.h" #include "fios.h" -#include "core/alloc_func.hpp" -#include "core/math_func.hpp" #include "string_func.h" #include "tar_type.h" #ifdef WIN32 #include #else #include -#include #endif #include #include diff --git a/src/fios.cpp b/src/fios.cpp index b822167b03..28d09a2a0d 100644 --- a/src/fios.cpp +++ b/src/fios.cpp @@ -6,13 +6,9 @@ #include "stdafx.h" #include "openttd.h" -#include "variables.h" -#include "heightmap.h" #include "fios.h" #include "fileio_func.h" -#include "functions.h" #include "string_func.h" -#include #include #ifdef WIN32 diff --git a/src/fontcache.cpp b/src/fontcache.cpp index d76172a2ef..bc28c10348 100644 --- a/src/fontcache.cpp +++ b/src/fontcache.cpp @@ -3,11 +3,8 @@ /** @file fontcache.cpp Cache for characters from fonts. */ #include "stdafx.h" -#include "openttd.h" -#include "debug.h" #include "spritecache.h" #include "fontcache.h" -#include "spriteloader/spriteloader.hpp" #include "blitter/factory.hpp" #include "gfx_func.h" #include "core/alloc_func.hpp" diff --git a/src/gamelog.cpp b/src/gamelog.cpp index 3f29aaec32..65340a2a58 100644 --- a/src/gamelog.cpp +++ b/src/gamelog.cpp @@ -6,20 +6,15 @@ #include "openttd.h" #include "saveload/saveload.h" #include "core/alloc_func.hpp" -#include "core/bitmath_func.hpp" -#include "core/math_func.hpp" -#include "network/core/config.h" #include "variables.h" #include "string_func.h" #include "settings_type.h" -#include "newgrf_config.h" #include "gamelog.h" #include "gamelog_internal.h" #include "console_func.h" #include "debug.h" #include "rev.h" -#include #include extern const uint16 SAVEGAME_VERSION; ///< current savegame version diff --git a/src/genworld.cpp b/src/genworld.cpp index a238853a19..cf50e8eb37 100644 --- a/src/genworld.cpp +++ b/src/genworld.cpp @@ -13,22 +13,19 @@ #include "gfxinit.h" #include "window_func.h" #include "network/network.h" -#include "debug.h" -#include "settings_func.h" #include "heightmap.h" #include "viewport_func.h" #include "gfx_func.h" -#include "map_func.h" #include "date_func.h" #include "core/random_func.hpp" #include "engine_func.h" -#include "settings_type.h" #include "newgrf_storage.h" #include "water.h" #include "blitter/factory.hpp" #include "tilehighlight_func.h" #include "saveload/saveload.h" #include "void_map.h" +#include "settings_type.h" #include "table/sprites.h" diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp index 056d58b9fe..4be385a72c 100644 --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -6,16 +6,11 @@ #include "openttd.h" #include "heightmap.h" #include "gui.h" -#include "window_gui.h" -#include "textbuf_gui.h" -#include "gfxinit.h" -#include "command_func.h" #include "variables.h" #include "settings_func.h" #include "debug.h" #include "genworld.h" #include "network/network.h" -#include "thread.h" #include "newgrf_config.h" #include "strings_func.h" #include "window_func.h" diff --git a/src/gfx.cpp b/src/gfx.cpp index 81bbe69c60..af699c665f 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -3,19 +3,15 @@ /** @file gfx.cpp Handling of drawing text and other gfx related stuff. */ #include "stdafx.h" -#include "openttd.h" #include "gfx_func.h" -#include "spritecache.h" #include "variables.h" +#include "spritecache.h" #include "fontcache.h" #include "genworld.h" -#include "debug.h" #include "zoom_func.h" -#include "texteff.hpp" #include "blitter/factory.hpp" #include "video/video_driver.hpp" #include "strings_func.h" -#include "core/math_func.hpp" #include "settings_type.h" #include "core/alloc_func.hpp" #include "core/sort_func.hpp" diff --git a/src/gfxinit.cpp b/src/gfxinit.cpp index f0c529d4da..2db1a4c16c 100644 --- a/src/gfxinit.cpp +++ b/src/gfxinit.cpp @@ -3,21 +3,14 @@ /** @file gfxinit.cpp Initializing of the (GRF) graphics. */ #include "stdafx.h" -#include "openttd.h" #include "debug.h" -#include "gfxinit.h" #include "spritecache.h" #include "fileio_func.h" #include "fios.h" #include "newgrf.h" #include "md5.h" -#include "variables.h" #include "fontcache.h" #include "gfx_func.h" -#include "core/alloc_func.hpp" -#include "core/bitmath_func.hpp" -#include "core/smallvec_type.hpp" -#include #include "settings_type.h" #include "string_func.h" #include "ini_type.h" diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index 704b84e4e9..acd220a2ea 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -9,17 +9,14 @@ #include "company_base.h" #include "company_gui.h" #include "economy_func.h" -#include "variables.h" #include "cargotype.h" #include "strings_func.h" -#include "core/alloc_func.hpp" #include "window_func.h" #include "date_func.h" #include "gfx_func.h" #include "sortlist_type.h" #include "table/strings.h" -#include "table/sprites.h" /* Bitmasks of company and cargo indices that shouldn't be drawn. */ static uint _legend_excluded_companies; diff --git a/src/group_cmd.cpp b/src/group_cmd.cpp index dc32e2f5a7..6ec8f5f29a 100644 --- a/src/group_cmd.cpp +++ b/src/group_cmd.cpp @@ -3,23 +3,17 @@ /** @file group_cmd.cpp Handling of the engine groups */ #include "stdafx.h" -#include "openttd.h" -#include "variables.h" #include "command_func.h" -#include "debug.h" #include "group.h" #include "train.h" -#include "aircraft.h" +#include "engine_base.h" #include "vehicle_gui.h" -#include "strings_func.h" -#include "functions.h" #include "window_func.h" #include "vehicle_func.h" #include "autoreplace_base.h" #include "autoreplace_func.h" #include "string_func.h" #include "company_func.h" -#include "order_func.h" #include "oldpool_func.h" #include "core/alloc_func.hpp" diff --git a/src/group_gui.cpp b/src/group_gui.cpp index 7fde5ddc3e..3ec8668018 100644 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -4,22 +4,17 @@ #include "stdafx.h" #include "openttd.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 "train.h" +#include "vehicle_base.h" #include "group.h" -#include "debug.h" #include "strings_func.h" -#include "core/alloc_func.hpp" #include "window_func.h" #include "vehicle_func.h" #include "autoreplace_gui.h" -#include "string_func.h" -#include "viewport_func.h" #include "gfx_func.h" #include "company_func.h" #include "widgets/dropdown_type.h" diff --git a/src/heightmap.cpp b/src/heightmap.cpp index 2a4186aa62..27d247bfa4 100644 --- a/src/heightmap.cpp +++ b/src/heightmap.cpp @@ -3,17 +3,13 @@ /** @file heightmap.cpp Creating of maps from heightmaps. */ #include "stdafx.h" -#include "openttd.h" -#include "variables.h" #include "heightmap.h" #include "clear_map.h" #include "void_map.h" -#include "debug.h" #include "gui.h" #include "saveload/saveload.h" #include "bmp.h" #include "gfx_func.h" -#include "core/alloc_func.hpp" #include "fios.h" #include "settings_type.h" diff --git a/src/highscore.cpp b/src/highscore.cpp index c109c7539a..34447a2c3a 100644 --- a/src/highscore.cpp +++ b/src/highscore.cpp @@ -3,7 +3,6 @@ /** @file highscore.cpp Definition of functions used for highscore handling */ #include "highscore.h" -#include "table/strings.h" #include "settings_type.h" #include "company_base.h" #include "company_func.h" diff --git a/src/highscore_gui.cpp b/src/highscore_gui.cpp index ed6c23f4eb..d6400bb6a0 100644 --- a/src/highscore_gui.cpp +++ b/src/highscore_gui.cpp @@ -10,7 +10,6 @@ #include "window_func.h" #include "network/network.h" #include "command_func.h" -#include "command_type.h" #include "company_func.h" #include "company_base.h" #include "settings_type.h" diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 45def31e51..e656ce033f 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -11,38 +11,31 @@ #include "landscape.h" #include "viewport_func.h" #include "command_func.h" -#include "industry.h" #include "town.h" #include "news_func.h" #include "variables.h" -#include "cheat_func.h" +#include "cheat_type.h" #include "genworld.h" -#include "water_map.h" #include "tree_map.h" -#include "cargotype.h" #include "newgrf.h" #include "newgrf_commons.h" #include "newgrf_industries.h" #include "newgrf_industrytiles.h" -#include "newgrf_callbacks.h" #include "autoslope.h" #include "transparency.h" #include "water.h" #include "strings_func.h" -#include "tile_cmd.h" #include "functions.h" #include "window_func.h" #include "date_func.h" #include "vehicle_func.h" #include "sound_func.h" -#include "station_base.h" #include "oldpool_func.h" #include "animated_tile_func.h" #include "effectvehicle_func.h" #include "ai/ai.hpp" #include "table/strings.h" -#include "table/sprites.h" #include "table/industry_land.h" #include "table/build_industry.h" diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index 721f7e5e5d..d630026749 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -14,16 +14,13 @@ #include "industry.h" #include "town.h" #include "variables.h" -#include "cheat_func.h" -#include "cargotype.h" +#include "cheat_type.h" #include "newgrf.h" -#include "newgrf_callbacks.h" #include "newgrf_industries.h" #include "newgrf_text.h" #include "strings_func.h" #include "map_func.h" #include "company_func.h" -#include "settings_type.h" #include "tilehighlight_func.h" #include "string_func.h" #include "sortlist_type.h" diff --git a/src/intro_gui.cpp b/src/intro_gui.cpp index 45786bbb01..e3f100befe 100644 --- a/src/intro_gui.cpp +++ b/src/intro_gui.cpp @@ -9,17 +9,16 @@ #include "textbuf_gui.h" #include "network/network.h" #include "variables.h" -#include "heightmap.h" #include "genworld.h" #include "network/network_gui.h" #include "network/network_content.h" -#include "newgrf.h" +#include "landscape_type.h" #include "strings_func.h" #include "window_func.h" #include "fios.h" -#include "gfx_func.h" #include "settings_type.h" #include "functions.h" +#include "newgrf_config.h" #include "ai/ai_gui.hpp" #include "table/strings.h" diff --git a/src/landscape.cpp b/src/landscape.cpp index 900ec71fd4..d9a17e4eff 100644 --- a/src/landscape.cpp +++ b/src/landscape.cpp @@ -5,31 +5,23 @@ /** @defgroup SnowLineGroup Snowline functions and data structures */ #include "stdafx.h" -#include "openttd.h" -#include "bridge_map.h" #include "heightmap.h" #include "clear_map.h" #include "spritecache.h" -#include #include "viewport_func.h" #include "command_func.h" #include "landscape.h" #include "variables.h" #include "void_map.h" -#include "water_map.h" #include "tgp.h" #include "genworld.h" -#include "tile_cmd.h" -#include "core/alloc_func.hpp" #include "fios.h" -#include "window_func.h" #include "functions.h" #include "date_func.h" -#include "vehicle_func.h" -#include "settings_type.h" #include "water.h" #include "effectvehicle_func.h" #include "landscape_type.h" +#include "settings_type.h" #include "table/sprites.h" diff --git a/src/main_gui.cpp b/src/main_gui.cpp index c2e9255c97..e4e6913f2a 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp @@ -6,31 +6,25 @@ #include "openttd.h" #include "currency.h" #include "spritecache.h" -#include "gui.h" #include "window_gui.h" #include "window_func.h" #include "textbuf_gui.h" #include "viewport_func.h" #include "command_func.h" -#include "news_gui.h" #include "console_gui.h" -#include "waypoint.h" +#include "map_func.h" #include "genworld.h" #include "transparency_gui.h" -#include "date_func.h" #include "functions.h" #include "sound_func.h" #include "transparency.h" #include "strings_func.h" #include "zoom_func.h" -#include "string_func.h" #include "company_base.h" #include "company_func.h" -#include "company_gui.h" #include "settings_type.h" #include "toolbar_gui.h" #include "statusbar_gui.h" -#include "variables.h" #include "tilehighlight_func.h" #include "network/network.h" diff --git a/src/map.cpp b/src/map.cpp index 76ff175e4e..77952cc2f5 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -4,7 +4,6 @@ #include "stdafx.h" #include "debug.h" -#include "direction_func.h" #include "core/bitmath_func.hpp" #include "core/alloc_func.hpp" #include "core/math_func.hpp" diff --git a/src/misc.cpp b/src/misc.cpp index daa437b6fa..ce527cb4bb 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -4,35 +4,27 @@ #include "stdafx.h" #include "openttd.h" -#include "currency.h" #include "landscape.h" #include "news_func.h" -#include "vehicle_gui.h" #include "variables.h" -#include "cheat_func.h" #include "ai/ai.hpp" #include "newgrf_house.h" #include "cargotype.h" #include "group.h" -#include "viewport_func.h" #include "economy_func.h" -#include "zoom_func.h" #include "functions.h" #include "map_func.h" #include "date_func.h" #include "vehicle_func.h" #include "texteff.hpp" #include "gfx_func.h" -#include "core/alloc_type.hpp" #include "gamelog.h" #include "animated_tile_func.h" #include "settings_type.h" #include "tilehighlight_func.h" -#include "core/bitmath_func.hpp" #include "network/network_func.h" #include "window_func.h" -#include "table/strings.h" #include "table/sprites.h" extern TileIndex _cur_tileloop_tile; diff --git a/src/misc/dbg_helpers.cpp b/src/misc/dbg_helpers.cpp index 11fdaf19b5..305f7361e4 100644 --- a/src/misc/dbg_helpers.cpp +++ b/src/misc/dbg_helpers.cpp @@ -3,10 +3,6 @@ /** @file dbg_helpers.cpp Helpers for outputting debug information. */ #include "../stdafx.h" -#include "../openttd.h" -#include "../direction_type.h" -#include "../strings_type.h" -#include "../rail.h" #include "../rail_map.h" #include "dbg_helpers.h" diff --git a/src/misc_cmd.cpp b/src/misc_cmd.cpp index 1ea5ef2c39..6a30772306 100644 --- a/src/misc_cmd.cpp +++ b/src/misc_cmd.cpp @@ -6,12 +6,9 @@ #include "openttd.h" #include "command_func.h" #include "economy_func.h" -#include "gui.h" #include "window_func.h" #include "textbuf_gui.h" #include "network/network.h" -#include "variables.h" -#include "livery.h" #include "company_manager_face.h" #include "strings_func.h" #include "gfx_func.h" diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index 333a6fc190..e4c6223686 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -4,49 +4,35 @@ #include "stdafx.h" #include "openttd.h" -#include "heightmap.h" #include "debug.h" #include "landscape.h" -#include "newgrf.h" #include "newgrf_text.h" #include "saveload/saveload.h" #include "tile_map.h" #include "gui.h" -#include "window_gui.h" #include "station_gui.h" -#include "textbuf_gui.h" #include "viewport_func.h" #include "gfx_func.h" #include "station_func.h" #include "command_func.h" #include "company_func.h" -#include "company_base.h" #include "town.h" #include "network/network.h" #include "variables.h" -#include "cheat_func.h" -#include "train.h" -#include "tgp.h" +#include "company_base.h" +#include "texteff.hpp" #include "cargotype.h" #include "company_manager_face.h" #include "strings_func.h" #include "fileio_func.h" #include "fios.h" -#include "tile_cmd.h" #include "zoom_func.h" -#include "functions.h" #include "window_func.h" -#include "date_func.h" -#include "sound_func.h" #include "string_func.h" -#include "company_gui.h" -#include "settings_type.h" #include "newgrf_cargo.h" -#include "rail_gui.h" #include "tilehighlight_func.h" #include "querystring_gui.h" -#include "table/sprites.h" #include "table/strings.h" /* Variables to display file lists */ diff --git a/src/mixer.cpp b/src/mixer.cpp index 4314e3ddfc..3a55b7fadb 100644 --- a/src/mixer.cpp +++ b/src/mixer.cpp @@ -3,7 +3,6 @@ /** @file mixer.cpp Mixing of sound samples. */ #include "stdafx.h" -#include "openttd.h" #include "mixer.h" #include "core/math_func.hpp" diff --git a/src/music/extmidi.cpp b/src/music/extmidi.cpp index 0e0a427d54..c3af20140f 100644 --- a/src/music/extmidi.cpp +++ b/src/music/extmidi.cpp @@ -4,9 +4,6 @@ #ifndef __MORPHOS__ #include "../stdafx.h" -#include "../openttd.h" -#include "../sound_func.h" -#include "../variables.h" #include "../debug.h" #include "extmidi.h" #include diff --git a/src/music_gui.cpp b/src/music_gui.cpp index a79f1429d6..904914b3f3 100644 --- a/src/music_gui.cpp +++ b/src/music_gui.cpp @@ -5,7 +5,6 @@ #include "stdafx.h" #include "openttd.h" #include "fileio_func.h" -#include "variables.h" #include "music.h" #include "music/music_driver.hpp" #include "window_gui.h" diff --git a/src/namegen.cpp b/src/namegen.cpp index e02228fc67..6ed4656445 100644 --- a/src/namegen.cpp +++ b/src/namegen.cpp @@ -3,8 +3,6 @@ /** @file namegen.cpp Town name generators. */ #include "stdafx.h" -#include "openttd.h" -#include "debug.h" #include "namegen_func.h" #include "string_func.h" diff --git a/src/network/network.cpp b/src/network/network.cpp index 237dbd57a1..99b63cf4a9 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -8,13 +8,10 @@ #ifdef ENABLE_NETWORK #include "../openttd.h" -#include "../debug.h" #include "../strings_func.h" -#include "../map_func.h" #include "../command_func.h" #include "../variables.h" #include "../date_func.h" -#include "../newgrf_config.h" #include "network_internal.h" #include "network_client.h" #include "network_server.h" @@ -22,18 +19,15 @@ #include "network_udp.h" #include "network_gamelist.h" #include "core/udp.h" -#include "core/tcp.h" -#include "core/core.h" #include "core/host.h" #include "network_gui.h" #include "../console_func.h" -#include /* va_list */ #include "../md5.h" -#include "../texteff.hpp" #include "../core/random_func.hpp" #include "../window_func.h" #include "../string_func.h" #include "../company_func.h" +#include "../company_base.h" #include "../settings_type.h" #include "../landscape_type.h" #include "../rev.h" @@ -42,7 +36,6 @@ #include "../fileio_func.h" #endif /* DEBUG_DUMP_COMMANDS */ #include "table/strings.h" -#include "../company_base.h" #include "../oldpool_func.h" DECLARE_POSTFIX_INCREMENT(ClientID); diff --git a/src/network/network_chat_gui.cpp b/src/network/network_chat_gui.cpp index 8968007ea2..e53a8dbf3f 100644 --- a/src/network/network_chat_gui.cpp +++ b/src/network/network_chat_gui.cpp @@ -7,8 +7,6 @@ #ifdef ENABLE_NETWORK #include "../stdafx.h" -#include "network.h" -#include "network_type.h" #include "../date_func.h" #include "../gfx_func.h" #include "../strings_func.h" @@ -16,12 +14,9 @@ #include "../console_func.h" #include "../video/video_driver.hpp" #include "../table/sprites.h" -#include "../window_gui.h" -#include "../textbuf_gui.h" #include "../querystring_gui.h" #include "../town.h" #include "../window_func.h" -#include "../settings_type.h" #include "network_internal.h" #include "network_client.h" diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp index 59a0b3922a..52cc42e8f3 100644 --- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -9,15 +9,10 @@ #include "../openttd.h" #include "../gfx_func.h" #include "network_internal.h" -#include "core/tcp.h" -#include "network_client.h" -#include "network_gamelist.h" #include "network_gui.h" #include "../saveload/saveload.h" #include "../command_func.h" #include "../console_func.h" -#include "../variables.h" -#include "../core/alloc_func.hpp" #include "../fileio_func.h" #include "../md5.h" #include "../strings_func.h" @@ -26,7 +21,6 @@ #include "../company_func.h" #include "../company_base.h" #include "../company_gui.h" -#include "../company_type.h" #include "../settings_type.h" #include "../rev.h" diff --git a/src/network/network_command.cpp b/src/network/network_command.cpp index 4adeb92f6b..36a3a11363 100644 --- a/src/network/network_command.cpp +++ b/src/network/network_command.cpp @@ -12,7 +12,6 @@ #include "../callback_table.h" #include "../core/alloc_func.hpp" #include "../string_func.h" -#include "../date_func.h" #include "../company_func.h" /** Local queue of packets */ diff --git a/src/network/network_content.cpp b/src/network/network_content.cpp index fa7f836247..6f918f2e31 100644 --- a/src/network/network_content.cpp +++ b/src/network/network_content.cpp @@ -5,18 +5,13 @@ #if defined(ENABLE_NETWORK) #include "../stdafx.h" -#include "../debug.h" #include "../rev.h" -#include "../core/alloc_func.hpp" -#include "../core/math_func.hpp" -#include "../newgrf_config.h" #include "../fileio_func.h" #include "../string_func.h" #include "../ai/ai.hpp" #include "../window_func.h" #include "../gui.h" #include "../variables.h" -#include "core/host.h" #include "network_content.h" #include "table/strings.h" diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp index c5ccd933b2..633db8687c 100644 --- a/src/network/network_content_gui.cpp +++ b/src/network/network_content_gui.cpp @@ -10,7 +10,6 @@ #include "../window_func.h" #include "../window_gui.h" #include "../gui.h" -#include "../core/smallvec_type.hpp" #include "../ai/ai.hpp" #include "../gfxinit.h" #include "../sortlist_type.h" diff --git a/src/network/network_gamelist.cpp b/src/network/network_gamelist.cpp index e50f5cc386..8d897d9bd8 100644 --- a/src/network/network_gamelist.cpp +++ b/src/network/network_gamelist.cpp @@ -9,15 +9,12 @@ #include "../stdafx.h" #include "../debug.h" -#include "../newgrf_config.h" #include "../core/alloc_func.hpp" #include "../thread.h" #include "../string_func.h" #include "network_internal.h" -#include "core/game.h" #include "network_udp.h" #include "network_gamelist.h" -#include "network_gui.h" NetworkGameList *_network_game_list = NULL; diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index 712e800d5c..6a59e1a6c5 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -6,26 +6,18 @@ #include "../stdafx.h" #include "../openttd.h" #include "../strings_func.h" -#include "network.h" #include "../date_func.h" #include "../fios.h" #include "network_internal.h" #include "network_client.h" -#include "network_content.h" #include "network_gui.h" #include "network_gamelist.h" #include "../gui.h" -#include "../window_gui.h" -#include "../variables.h" #include "network_server.h" #include "network_udp.h" -#include "../newgrf.h" -#include "../functions.h" #include "../window_func.h" -#include "../core/alloc_func.hpp" #include "../string_func.h" #include "../gfx_func.h" -#include "../company_func.h" #include "../settings_type.h" #include "../widgets/dropdown_func.h" #include "../querystring_gui.h" diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index f33714f0b0..20820c4ab0 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -5,13 +5,10 @@ #ifdef ENABLE_NETWORK #include "../stdafx.h" -#include "../openttd.h" // XXX StringID #include "../debug.h" #include "../strings_func.h" #include "network_internal.h" -#include "core/tcp.h" #include "../vehicle_base.h" -#include "../vehicle_func.h" #include "../date_func.h" #include "network_server.h" #include "network_udp.h" @@ -19,12 +16,9 @@ #include "../command_func.h" #include "../saveload/saveload.h" #include "../station_base.h" -#include "../variables.h" #include "../genworld.h" -#include "../core/alloc_func.hpp" #include "../fileio_func.h" #include "../string_func.h" -#include "../company_base.h" #include "../company_func.h" #include "../company_gui.h" #include "../settings_type.h" diff --git a/src/network/network_udp.cpp b/src/network/network_udp.cpp index 193b21b680..00c5410dbe 100644 --- a/src/network/network_udp.cpp +++ b/src/network/network_udp.cpp @@ -10,20 +10,16 @@ #ifdef ENABLE_NETWORK #include "../stdafx.h" -#include "../debug.h" #include "../date_func.h" #include "../map_func.h" #include "network_gamelist.h" #include "network_internal.h" #include "network_udp.h" #include "core/host.h" -#include "../variables.h" -#include "../newgrf_config.h" #include "../core/endian_func.hpp" #include "../core/alloc_func.hpp" #include "../string_func.h" #include "../company_base.h" -#include "../company_func.h" #include "../settings_type.h" #include "../thread.h" #include "../rev.h" diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 99774c397e..7163e0147c 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -12,8 +12,6 @@ #include "engine_func.h" #include "engine_base.h" #include "spritecache.h" -#include "sprite.h" -#include "newgrf.h" #include "variables.h" #include "bridge.h" #include "town.h" @@ -22,18 +20,14 @@ #include "fontcache.h" #include "currency.h" #include "landscape.h" -#include "newgrf_config.h" #include "newgrf_house.h" #include "newgrf_sound.h" -#include "newgrf_spritegroup.h" #include "newgrf_station.h" -#include "cargotype.h" #include "industry.h" #include "newgrf_canal.h" #include "newgrf_commons.h" #include "newgrf_townname.h" #include "newgrf_industries.h" -#include "gfxinit.h" #include "rev.h" #include "fios.h" #include "rail.h" @@ -43,16 +37,11 @@ #include "vehicle_func.h" #include "sound_func.h" #include "string_func.h" -#include "road_func.h" -#include "company_base.h" -#include "settings_type.h" #include "network/network.h" #include "map_func.h" #include #include "table/strings.h" -#include "table/sprites.h" -#include "table/town_land.h" #include "table/build_industry.h" /* TTDPatch extended GRF format codec diff --git a/src/newgrf_canal.cpp b/src/newgrf_canal.cpp index 3d0af0b617..c74bfd4d12 100644 --- a/src/newgrf_canal.cpp +++ b/src/newgrf_canal.cpp @@ -3,12 +3,9 @@ /** @file newgrf_canal.cpp Implementation of NewGRF canals. */ #include "stdafx.h" -#include "openttd.h" -#include "variables.h" -#include "landscape.h" +#include "core/overflowsafe_type.hpp" +#include "tile_type.h" #include "debug.h" -#include "newgrf.h" -#include "newgrf_callbacks.h" #include "newgrf_commons.h" #include "newgrf_spritegroup.h" #include "newgrf_canal.h" diff --git a/src/newgrf_cargo.cpp b/src/newgrf_cargo.cpp index 06c6caedf4..5e322a9ec0 100644 --- a/src/newgrf_cargo.cpp +++ b/src/newgrf_cargo.cpp @@ -3,15 +3,11 @@ /** @file newgrf_cargo.cpp Implementation of NewGRF cargoes. */ #include "stdafx.h" -#include "openttd.h" #include "debug.h" -#include "cargotype.h" #include "newgrf.h" -#include "newgrf_callbacks.h" #include "newgrf_spritegroup.h" #include "newgrf_cargo.h" - static uint32 CargoGetRandomBits(const ResolverObject *object) { return 0; diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp index fce5afe0b0..0b1e26a582 100644 --- a/src/newgrf_commons.cpp +++ b/src/newgrf_commons.cpp @@ -5,16 +5,12 @@ */ #include "stdafx.h" -#include "openttd.h" -#include "variables.h" #include "landscape.h" #include "town.h" #include "industry.h" #include "newgrf.h" #include "newgrf_commons.h" -#include "tile_map.h" #include "station_map.h" -#include "settings_type.h" #include "tree_map.h" /** Constructor of generic class diff --git a/src/newgrf_config.cpp b/src/newgrf_config.cpp index 6902fcdb59..b752200e73 100644 --- a/src/newgrf_config.cpp +++ b/src/newgrf_config.cpp @@ -3,13 +3,9 @@ /** @file newgrf_config.cpp Finding NewGRFs and configuring them. */ #include "stdafx.h" -#include "openttd.h" #include "debug.h" -#include "variables.h" #include "md5.h" #include "newgrf.h" -#include "newgrf_config.h" -#include "core/alloc_func.hpp" #include "string_func.h" #include "gamelog.h" #include "network/network_type.h" diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp index 2b8746ff1e..bde2fd56eb 100644 --- a/src/newgrf_engine.cpp +++ b/src/newgrf_engine.cpp @@ -3,33 +3,17 @@ /** @file newgrf_engine.cpp NewGRF handling of engines. */ #include "stdafx.h" -#include "openttd.h" -#include "variables.h" #include "debug.h" -#include "engine_func.h" -#include "engine_base.h" #include "train.h" #include "company_func.h" -#include "company_base.h" -#include "station_base.h" -#include "airport.h" -#include "newgrf.h" -#include "newgrf_callbacks.h" #include "newgrf_engine.h" -#include "newgrf_station.h" #include "newgrf_spritegroup.h" -#include "newgrf_cargo.h" -#include "cargotype.h" #include "date_func.h" #include "vehicle_func.h" #include "core/random_func.hpp" -#include "direction_func.h" -#include "rail_map.h" -#include "rail.h" -#include "settings_type.h" #include "aircraft.h" #include "core/smallmap_type.hpp" - +#include "settings_type.h" int _traininfo_vehicle_pitch = 0; int _traininfo_vehicle_width = 29; diff --git a/src/newgrf_generic.cpp b/src/newgrf_generic.cpp index c2dd2734e9..465c75266d 100644 --- a/src/newgrf_generic.cpp +++ b/src/newgrf_generic.cpp @@ -3,16 +3,9 @@ /** @file newgrf_generic.cpp Handling of generic feature callbacks. */ #include "stdafx.h" -#include "openttd.h" -#include "variables.h" -#include "landscape.h" #include "debug.h" #include "newgrf.h" -#include "newgrf_callbacks.h" -#include "newgrf_commons.h" #include "newgrf_spritegroup.h" -#include "newgrf_generic.h" -#include "tile_map.h" #include diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index e41de64d1b..f1fbf20820 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -3,16 +3,12 @@ /** @file newgrf_gui.cpp GUI to change NewGRF settings. */ #include "stdafx.h" -#include "openttd.h" -#include "variables.h" #include "gui.h" #include "window_gui.h" #include "textbuf_gui.h" #include "newgrf.h" -#include "newgrf_config.h" #include "strings_func.h" #include "window_func.h" -#include "core/alloc_func.hpp" #include "string_func.h" #include "gfx_func.h" #include "gamelog.h" diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp index c02e0e42b9..5f318cf96b 100644 --- a/src/newgrf_house.cpp +++ b/src/newgrf_house.cpp @@ -8,13 +8,11 @@ #include "debug.h" #include "viewport_func.h" #include "landscape.h" -#include "town.h" #include "town_map.h" #include "sprite.h" #include "newgrf.h" #include "newgrf_house.h" #include "newgrf_spritegroup.h" -#include "newgrf_callbacks.h" #include "newgrf_town.h" #include "newgrf_sound.h" #include "newgrf_commons.h" @@ -22,13 +20,8 @@ #include "functions.h" #include "company_func.h" #include "animated_tile_func.h" -#include "date_func.h" #include "company_base.h" -#include "table/strings.h" -#include "table/sprites.h" -#include "table/town_land.h" - static BuildingCounts _building_counts; static HouseClassMapping _class_mapping[HOUSE_CLASS_MAX]; diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp index d65570c93f..6a61d59d81 100644 --- a/src/newgrf_industries.cpp +++ b/src/newgrf_industries.cpp @@ -3,23 +3,18 @@ /** @file newgrf_industries.cpp Handling of NewGRF industries. */ #include "stdafx.h" -#include "openttd.h" #include "debug.h" -#include "variables.h" -#include "landscape.h" -#include "industry.h" +#include "tile_type.h" +#include "strings_type.h" +#include "company_type.h" #include "industry_map.h" #include "newgrf.h" -#include "newgrf_callbacks.h" -#include "newgrf_spritegroup.h" #include "newgrf_industries.h" -#include "newgrf_industrytiles.h" #include "newgrf_commons.h" #include "newgrf_text.h" #include "newgrf_town.h" #include "window_func.h" #include "town.h" -#include "company_func.h" #include "company_base.h" #include "command_func.h" diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp index 97706038c4..2619a143b3 100644 --- a/src/newgrf_industrytiles.cpp +++ b/src/newgrf_industrytiles.cpp @@ -9,16 +9,13 @@ #include "viewport_func.h" #include "landscape.h" #include "newgrf.h" -#include "industry.h" +#include "core/random_func.hpp" #include "newgrf_commons.h" -#include "newgrf_spritegroup.h" -#include "newgrf_callbacks.h" #include "newgrf_industries.h" #include "newgrf_industrytiles.h" #include "newgrf_sound.h" #include "newgrf_text.h" #include "industry_map.h" -#include "clear_map.h" #include "sprite.h" #include "transparency.h" #include "functions.h" @@ -27,7 +24,6 @@ #include "animated_tile_func.h" #include "water.h" -#include "table/sprites.h" #include "table/strings.h" /** diff --git a/src/newgrf_sound.cpp b/src/newgrf_sound.cpp index bc36bfd8a8..7f8f31179a 100644 --- a/src/newgrf_sound.cpp +++ b/src/newgrf_sound.cpp @@ -3,11 +3,7 @@ /** @file newgrf_sound.cpp Handling NewGRF provided sounds. */ #include "stdafx.h" -#include "openttd.h" -#include "oldpool.h" -#include "engine_func.h" #include "engine_base.h" -#include "newgrf_callbacks.h" #include "newgrf_engine.h" #include "newgrf_sound.h" #include "vehicle_base.h" diff --git a/src/newgrf_spritegroup.cpp b/src/newgrf_spritegroup.cpp index d730d50171..c0c3f44ecf 100644 --- a/src/newgrf_spritegroup.cpp +++ b/src/newgrf_spritegroup.cpp @@ -3,16 +3,10 @@ /** @file newgrf_spritegroup.cpp Handling of primarily NewGRF action 2. */ #include "stdafx.h" -#include "openttd.h" -#include "variables.h" -#include "landscape.h" #include "oldpool.h" #include "newgrf.h" -#include "newgrf_callbacks.h" #include "newgrf_spritegroup.h" #include "sprite.h" -#include "date_func.h" -#include "settings_type.h" static void SpriteGroupPoolCleanBlock(uint start_item, uint end_item); diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp index dd54739537..9cec024dcf 100644 --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -3,21 +3,14 @@ /** @file newgrf_station.cpp Functions for dealing with station classes and custom stations. */ #include "stdafx.h" -#include "openttd.h" #include "variables.h" -#include "tile_cmd.h" #include "landscape.h" #include "debug.h" -#include "sprite.h" -#include "station_base.h" #include "station_map.h" -#include "newgrf.h" -#include "newgrf_callbacks.h" #include "newgrf_commons.h" #include "newgrf_station.h" #include "newgrf_spritegroup.h" #include "newgrf_sound.h" -#include "cargotype.h" #include "town.h" #include "newgrf_town.h" #include "gfx_func.h" @@ -26,10 +19,8 @@ #include "animated_tile_func.h" #include "functions.h" #include "tunnelbridge_map.h" -#include "rail_map.h" #include "spritecache.h" -#include "table/sprites.h" #include "table/strings.h" StationClass _station_classes[STAT_CLASS_MAX]; diff --git a/src/newgrf_text.cpp b/src/newgrf_text.cpp index c62d2c4452..d630b01dc0 100644 --- a/src/newgrf_text.cpp +++ b/src/newgrf_text.cpp @@ -10,13 +10,8 @@ */ #include "stdafx.h" -#include "debug.h" -#include "openttd.h" -#include "variables.h" #include "newgrf.h" -#include "newgrf_text.h" #include "strings_func.h" -#include "core/alloc_func.hpp" #include "newgrf_storage.h" #include "string_func.h" #include "date_type.h" diff --git a/src/newgrf_town.cpp b/src/newgrf_town.cpp index e198a0b022..4d24cce68e 100644 --- a/src/newgrf_town.cpp +++ b/src/newgrf_town.cpp @@ -3,11 +3,7 @@ /** @file newgrf_town.cpp Implementation of the town part of NewGRF houses. */ #include "stdafx.h" -#include "openttd.h" -#include "settings_type.h" #include "debug.h" -#include "core/bitmath_func.hpp" -#include "core/math_func.hpp" #include "town.h" /** This function implements the town variables that newGRF defines. diff --git a/src/newgrf_townname.cpp b/src/newgrf_townname.cpp index f06915b912..3b3eca57b4 100644 --- a/src/newgrf_townname.cpp +++ b/src/newgrf_townname.cpp @@ -7,13 +7,10 @@ */ #include "stdafx.h" -#include "openttd.h" #include "newgrf_townname.h" #include "core/alloc_func.hpp" #include "string_func.h" -#include "table/strings.h" - static GRFTownName *_grf_townnames = NULL; GRFTownName *GetGRFTownName(uint32 grfid) diff --git a/src/news_gui.cpp b/src/news_gui.cpp index 5ba424d5c1..06273e1270 100644 --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -7,7 +7,7 @@ #include "gui.h" #include "window_gui.h" #include "viewport_func.h" -#include "news_func.h" +#include "news_type.h" #include "settings_type.h" #include "transparency.h" #include "strings_func.h" @@ -17,11 +17,9 @@ #include "sound_func.h" #include "string_func.h" #include "widgets/dropdown_func.h" -#include "map_func.h" #include "statusbar_gui.h" #include "company_manager_face.h" -#include "table/sprites.h" #include "table/strings.h" #define NB_WIDG_PER_SETTING 4 diff --git a/src/npf.cpp b/src/npf.cpp index 021426a9a0..9fbad2798e 100644 --- a/src/npf.cpp +++ b/src/npf.cpp @@ -3,28 +3,18 @@ /** @file npf.cpp Implementation of the NPF pathfinder. */ #include "stdafx.h" -#include "openttd.h" #include "npf.h" -#include "bridge_map.h" #include "debug.h" -#include "tile_cmd.h" -#include "bridge.h" #include "landscape.h" -#include "aystar.h" -#include "pathfind.h" -#include "station_base.h" -#include "station_map.h" #include "depot_base.h" #include "depot_map.h" -#include "tunnel_map.h" #include "network/network.h" -#include "water_map.h" #include "tunnelbridge_map.h" #include "functions.h" #include "vehicle_base.h" -#include "settings_type.h" #include "tunnelbridge.h" #include "pbs.h" +#include "settings_type.h" static AyStar _npf_aystar; diff --git a/src/oldpool.cpp b/src/oldpool.cpp index 856bfdd17a..50b1635f6f 100644 --- a/src/oldpool.cpp +++ b/src/oldpool.cpp @@ -3,7 +3,6 @@ /** @file oldpool.cpp Implementation of the old pool. */ #include "stdafx.h" -#include "openttd.h" #include "debug.h" #include "oldpool.h" #include "core/alloc_func.hpp" diff --git a/src/openttd.cpp b/src/openttd.cpp index 101c7316c6..583815fdb1 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -10,7 +10,6 @@ #include "openttd.h" -#include "driver.h" #include "blitter/factory.hpp" #include "sound/sound_driver.hpp" #include "music/music_driver.hpp" @@ -18,75 +17,46 @@ #include "fontcache.h" #include "gfxinit.h" -#include "gfx_func.h" #include "gui.h" #include "mixer.h" #include "sound_func.h" #include "window_func.h" -#include "debug.h" #include "saveload/saveload.h" #include "landscape.h" #include "company_func.h" -#include "company_base.h" #include "command_func.h" -#include "town.h" -#include "industry.h" #include "news_func.h" #include "fileio_func.h" #include "fios.h" -#include "airport.h" #include "aircraft.h" #include "console_func.h" #include "screenshot.h" #include "network/network.h" #include "network/network_func.h" #include "signs_base.h" -#include "signs_func.h" -#include "waypoint.h" #include "ai/ai.hpp" #include "ai/ai_config.hpp" -#include "train.h" -#include "yapf/yapf.h" #include "settings_func.h" #include "genworld.h" -#include "company_manager_face.h" #include "group.h" #include "strings_func.h" #include "date_func.h" #include "vehicle_func.h" #include "gamelog.h" -#include "cheat_func.h" +#include "cheat_type.h" #include "animated_tile_func.h" #include "functions.h" #include "elrail_func.h" #include "rev.h" #include "highscore.h" -#include "newgrf.h" -#include "newgrf_config.h" -#include "newgrf_house.h" #include "newgrf_commons.h" -#include "newgrf_station.h" - -#include "clear_map.h" -#include "tree_map.h" -#include "rail_map.h" -#include "road_map.h" -#include "road_cmd.h" -#include "station_map.h" -#include "town_map.h" -#include "industry_map.h" -#include "unmovable_map.h" -#include "tunnel_map.h" -#include "bridge_map.h" -#include "water_map.h" -#include "tunnelbridge_map.h" -#include "void_map.h" -#include "water.h" + +#include "town.h" +#include "industry.h" #include -#include #include "table/strings.h" diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index 5e6f95d3d2..4eabc94c48 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -3,29 +3,23 @@ /** @file order_cmd.cpp Handling of orders. */ #include "stdafx.h" -#include "openttd.h" #include "debug.h" -#include "order_base.h" -#include "order_func.h" -#include "airport.h" -#include "waypoint.h" #include "command_func.h" #include "company_func.h" #include "news_func.h" #include "vehicle_gui.h" #include "cargotype.h" -#include "aircraft.h" +#include "station_map.h" +#include "vehicle_base.h" #include "strings_func.h" -#include "core/alloc_func.hpp" #include "functions.h" #include "window_func.h" -#include "settings_type.h" -#include "string_func.h" #include "newgrf_cargo.h" #include "timetable.h" #include "vehicle_func.h" #include "oldpool_func.h" #include "depot_base.h" +#include "settings_type.h" #include "table/strings.h" diff --git a/src/order_gui.cpp b/src/order_gui.cpp index a854cff21d..43978edb27 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -3,27 +3,19 @@ /** @file order_gui.cpp GUI related to orders. */ #include "stdafx.h" -#include "openttd.h" -#include "road_map.h" #include "station_map.h" -#include "gui.h" #include "window_gui.h" -#include "station_base.h" -#include "town.h" #include "command_func.h" #include "viewport_func.h" #include "gfx_func.h" #include "depot_base.h" -#include "waypoint.h" -#include "train.h" -#include "water_map.h" +#include "vehicle_base.h" #include "vehicle_gui.h" #include "timetable.h" #include "cargotype.h" #include "strings_func.h" #include "window_func.h" #include "vehicle_func.h" -#include "settings_type.h" #include "company_func.h" #include "newgrf_cargo.h" #include "widgets/dropdown_func.h" @@ -31,6 +23,7 @@ #include "string_func.h" #include "tilehighlight_func.h" #include "network/network.h" +#include "settings_type.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/osk_gui.cpp b/src/osk_gui.cpp index 1dfce4cfbc..99c25a041f 100644 --- a/src/osk_gui.cpp +++ b/src/osk_gui.cpp @@ -3,10 +3,6 @@ /** @file osk_gui.cpp The On Screen Keyboard GUI */ #include "stdafx.h" -#include "openttd.h" - -#include "textbuf_gui.h" -#include "window_gui.h" #include "string_func.h" #include "strings_func.h" #include "debug.h" diff --git a/src/pathfind.cpp b/src/pathfind.cpp index eb43d7d851..9152e88a0f 100644 --- a/src/pathfind.cpp +++ b/src/pathfind.cpp @@ -3,16 +3,10 @@ /** @file pathfind.cpp Implementation of the oldest supported pathfinder. */ #include "stdafx.h" -#include "openttd.h" -#include "bridge_map.h" #include "station_map.h" -#include "tile_cmd.h" -#include "landscape.h" +#include "settings_type.h" #include "pathfind.h" -#include "rail_type.h" #include "debug.h" -#include "tunnel_map.h" -#include "settings_type.h" #include "tunnelbridge_map.h" #include "core/random_func.hpp" #include "core/alloc_type.hpp" diff --git a/src/pbs.cpp b/src/pbs.cpp index b07bbecd6f..5adccaea6f 100644 --- a/src/pbs.cpp +++ b/src/pbs.cpp @@ -2,18 +2,8 @@ /** @file pbs.cpp */ #include "stdafx.h" -#include "openttd.h" #include "pbs.h" -#include "rail_map.h" -#include "road_map.h" -#include "station_map.h" -#include "tunnelbridge_map.h" #include "functions.h" -#include "debug.h" -#include "direction_func.h" -#include "settings_type.h" -#include "road_func.h" -#include "vehicle_base.h" #include "vehicle_func.h" #include "yapf/follow_track.hpp" diff --git a/src/queue.cpp b/src/queue.cpp index 0c736994a2..d84efb1bad 100644 --- a/src/queue.cpp +++ b/src/queue.cpp @@ -3,7 +3,6 @@ /** @file queue.cpp Implementation of the Queue/Hash. */ #include "stdafx.h" -#include "openttd.h" #include "queue.h" #include "core/alloc_func.hpp" diff --git a/src/rail.cpp b/src/rail.cpp index 377397d97e..ddc7162068 100644 --- a/src/rail.cpp +++ b/src/rail.cpp @@ -3,19 +3,13 @@ /** @file rail.cpp Implementation of rail specific functions. */ #include "stdafx.h" -#include "openttd.h" -#include "bridge_map.h" -#include "rail.h" #include "station_map.h" -#include "tunnel_map.h" #include "tunnelbridge_map.h" -#include "settings_type.h" #include "date_func.h" #include "company_func.h" #include "company_base.h" -#include "engine_func.h" #include "engine_base.h" - +#include "settings_type.h" /* XXX: Below 3 tables store duplicate data. Maybe remove some? */ /* Maps a trackdir to the bit that stores its status in the map arrays, in the diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index a8eb5c6dcc..1f94a72a06 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -4,53 +4,31 @@ #include "stdafx.h" #include "openttd.h" -#include "bridge_map.h" -#include "bridge.h" #include "cmd_helper.h" -#include "debug.h" -#include "tile_cmd.h" -#include "rail_map.h" -#include "road_map.h" #include "landscape.h" #include "town_map.h" -#include "tunnel_map.h" #include "viewport_func.h" #include "command_func.h" -#include "pathfind.h" -#include "engine_func.h" #include "engine_base.h" -#include "town.h" -#include "sprite.h" #include "depot_base.h" -#include "depot_func.h" #include "waypoint.h" -#include "rail.h" -#include "newgrf.h" #include "yapf/yapf.h" #include "newgrf_engine.h" -#include "newgrf_callbacks.h" #include "newgrf_station.h" #include "newgrf_commons.h" #include "train.h" #include "variables.h" #include "autoslope.h" -#include "transparency.h" #include "water.h" #include "tunnelbridge_map.h" #include "window_func.h" #include "vehicle_func.h" #include "sound_func.h" -#include "signal_func.h" #include "tunnelbridge.h" #include "station_map.h" -#include "water_map.h" #include "functions.h" #include "elrail_func.h" -#include "oldpool_func.h" -#include "pbs.h" -#include "core/smallvec_type.hpp" -#include "table/sprites.h" #include "table/strings.h" #include "table/railtypes.h" #include "table/track_land.h" diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 87e8901e0e..fbb4d1c42f 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -3,10 +3,6 @@ /** @file rail_gui.cpp File for dealing with rail construction user interface */ #include "stdafx.h" -#include "direction_type.h" -#include "openttd.h" -#include "tile_cmd.h" -#include "landscape.h" #include "gui.h" #include "window_gui.h" #include "station_gui.h" @@ -14,30 +10,21 @@ #include "viewport_func.h" #include "gfx_func.h" #include "command_func.h" -#include "town_type.h" #include "waypoint.h" -#include "debug.h" -#include "variables.h" -#include "newgrf_callbacks.h" #include "newgrf_station.h" -#include "train.h" +#include "company_base.h" #include "strings_func.h" #include "functions.h" #include "window_func.h" #include "date_func.h" #include "sound_func.h" #include "company_func.h" -#include "settings_type.h" #include "widgets/dropdown_type.h" -#include "widgets/dropdown_func.h" #include "tunnelbridge.h" #include "tilehighlight_func.h" +#include "settings_type.h" -#include "bridge_map.h" -#include "rail_map.h" -#include "road_map.h" #include "station_map.h" -#include "tunnel_map.h" #include "tunnelbridge_map.h" #include "table/sprites.h" diff --git a/src/road.cpp b/src/road.cpp index 4680911c31..d8c3d0e435 100644 --- a/src/road.cpp +++ b/src/road.cpp @@ -6,15 +6,13 @@ #include "openttd.h" #include "rail_map.h" #include "road_map.h" -#include "road_internal.h" #include "water_map.h" #include "genworld.h" #include "company_func.h" #include "company_base.h" -#include "engine_func.h" #include "engine_base.h" -#include "settings_type.h" #include "date_func.h" +#include "settings_type.h" bool IsPossibleCrossing(const TileIndex tile, Axis ax) { diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp index 71f917272f..44079d4a47 100644 --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -4,42 +4,29 @@ #include "stdafx.h" #include "openttd.h" -#include "map_func.h" -#include "bridge_map.h" -#include "bridge.h" #include "cmd_helper.h" -#include "rail_map.h" -#include "road_map.h" #include "road_internal.h" -#include "sprite.h" -#include "tile_cmd.h" #include "landscape.h" #include "town_map.h" #include "viewport_func.h" #include "command_func.h" -#include "town.h" #include "yapf/yapf.h" #include "depot_base.h" -#include "depot_func.h" #include "newgrf.h" #include "station_map.h" -#include "tunnel_map.h" #include "variables.h" #include "autoslope.h" -#include "transparency.h" #include "tunnelbridge_map.h" #include "window_func.h" #include "strings_func.h" #include "vehicle_func.h" #include "vehicle_base.h" #include "sound_func.h" -#include "road_func.h" #include "tunnelbridge.h" -#include "cheat_func.h" +#include "cheat_type.h" #include "functions.h" #include "effectvehicle_func.h" #include "elrail_func.h" -#include "oldpool_func.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/road_gui.cpp b/src/road_gui.cpp index 447cd7c42d..ad9357d992 100644 --- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -11,20 +11,19 @@ #include "viewport_func.h" #include "gfx_func.h" #include "command_func.h" -#include "variables.h" #include "road_type.h" #include "road_cmd.h" #include "road_map.h" -#include "station_map.h" +#include "station_func.h" #include "functions.h" #include "window_func.h" #include "vehicle_func.h" #include "sound_func.h" #include "company_func.h" -#include "settings_type.h" #include "tunnelbridge.h" #include "tilehighlight_func.h" #include "company_base.h" +#include "settings_type.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/road_map.cpp b/src/road_map.cpp index b0d6d60a2c..83a247c48e 100644 --- a/src/road_map.cpp +++ b/src/road_map.cpp @@ -3,11 +3,6 @@ /** @file road_map.cpp Complex road accessors. */ #include "stdafx.h" -#include "openttd.h" -#include "bridge_map.h" -#include "tile_cmd.h" -#include "road_map.h" -#include "tunnel_map.h" #include "station_map.h" #include "tunnelbridge_map.h" diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 209801d186..36b15df671 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -3,31 +3,19 @@ /** @file roadveh_cmd.cpp Handling of road vehicles. */ #include "stdafx.h" -#include "openttd.h" -#include "debug.h" -#include "tile_cmd.h" #include "landscape.h" -#include "road_map.h" #include "roadveh.h" #include "station_map.h" #include "command_func.h" -#include "station_base.h" #include "news_func.h" #include "pathfind.h" #include "npf.h" #include "company_func.h" -#include "company_base.h" -#include "bridge.h" -#include "tunnel_map.h" -#include "bridge_map.h" #include "vehicle_gui.h" #include "articulated_vehicles.h" -#include "newgrf_callbacks.h" #include "newgrf_engine.h" -#include "newgrf_text.h" #include "newgrf_sound.h" #include "yapf/yapf.h" -#include "cargotype.h" #include "strings_func.h" #include "tunnelbridge_map.h" #include "functions.h" @@ -39,12 +27,9 @@ #include "autoreplace_gui.h" #include "gfx_func.h" #include "ai/ai.hpp" -#include "settings_type.h" -#include "order_func.h" #include "depot_base.h" -#include "depot_func.h" #include "effectvehicle_func.h" -#include "core/alloc_func.hpp" +#include "settings_type.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/roadveh_gui.cpp b/src/roadveh_gui.cpp index 7dd2239f56..439151ecaf 100644 --- a/src/roadveh_gui.cpp +++ b/src/roadveh_gui.cpp @@ -3,20 +3,13 @@ /** @file roadveh_gui.cpp GUI for road vehicles. */ #include "stdafx.h" -#include "openttd.h" -#include "debug.h" #include "roadveh.h" -#include "gui.h" #include "window_gui.h" -#include "viewport_func.h" #include "gfx_func.h" -#include "command_func.h" #include "vehicle_gui.h" -#include "newgrf_engine.h" #include "strings_func.h" #include "vehicle_func.h" #include "string_func.h" -#include "order_func.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index af22f844c9..2b34622fc4 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -3,38 +3,24 @@ /** @file afterload.cpp Code updating data after game load */ #include "../stdafx.h" -#include "../strings_type.h" -#include "../tile_type.h" -#include "../tile_map.h" -#include "../map_type.h" -#include "../town.h" #include "../void_map.h" #include "../signs_base.h" #include "../window_func.h" #include "../fios.h" -#include "../date_func.h" #include "../train.h" #include "../string_func.h" -#include "../newgrf_config.h" #include "../gamelog.h" -#include "../waypoint.h" -#include "../station_map.h" -#include "../tunnelbridge_map.h" -#include "../debug.h" #include "../network/network.h" -#include "../openttd.h" #include "../gfxinit.h" #include "../functions.h" #include "../industry_map.h" #include "../town_map.h" #include "../clear_map.h" -#include "../engine_base.h" #include "../vehicle_func.h" #include "../newgrf_station.h" #include "../yapf/yapf.hpp" #include "../elrail_func.h" #include "../signs_func.h" -#include "../newgrf_house.h" #include "../aircraft.h" #include "../unmovable_map.h" #include "../tree_map.h" @@ -44,7 +30,6 @@ #include "table/strings.h" -#include "saveload.h" #include "saveload_internal.h" #include diff --git a/src/saveload/ai_sl.cpp b/src/saveload/ai_sl.cpp index c88dcbc327..69f05d7fdb 100644 --- a/src/saveload/ai_sl.cpp +++ b/src/saveload/ai_sl.cpp @@ -3,12 +3,10 @@ /** @file ai_sl.cpp Handles the saveload part of the AIs */ #include "../stdafx.h" -#include "../openttd.h" #include "../company_base.h" #include "../company_func.h" #include "../debug.h" #include "saveload.h" -#include "../settings_type.h" #include "../string_func.h" #include "../ai/ai.hpp" #include "../ai/ai_config.hpp" diff --git a/src/saveload/autoreplace_sl.cpp b/src/saveload/autoreplace_sl.cpp index d24c290a87..7ed3a2051a 100644 --- a/src/saveload/autoreplace_sl.cpp +++ b/src/saveload/autoreplace_sl.cpp @@ -3,7 +3,6 @@ /** @file autoreplace_sl.cpp Code handling saving and loading of autoreplace rules */ #include "../stdafx.h" -#include "../autoreplace_type.h" #include "../engine_type.h" #include "../group_type.h" #include "../autoreplace_base.h" diff --git a/src/saveload/cargopacket_sl.cpp b/src/saveload/cargopacket_sl.cpp index d38e4e22e6..c871d66c81 100644 --- a/src/saveload/cargopacket_sl.cpp +++ b/src/saveload/cargopacket_sl.cpp @@ -3,7 +3,6 @@ /** @file cargopacket_sl.cpp Code handling saving and loading of cargo packets */ #include "../stdafx.h" -#include "../openttd.h" #include "../cargopacket.h" #include "saveload.h" diff --git a/src/saveload/company_sl.cpp b/src/saveload/company_sl.cpp index 8231e9f3d1..22930f765c 100644 --- a/src/saveload/company_sl.cpp +++ b/src/saveload/company_sl.cpp @@ -5,8 +5,6 @@ #include "../stdafx.h" #include "../company_base.h" #include "../company_func.h" -#include "../network/network.h" -#include "../ai/ai.hpp" #include "../company_manager_face.h" #include "saveload.h" diff --git a/src/saveload/engine_sl.cpp b/src/saveload/engine_sl.cpp index 6dc47c56ac..29772c625a 100644 --- a/src/saveload/engine_sl.cpp +++ b/src/saveload/engine_sl.cpp @@ -3,7 +3,6 @@ /** @file engine_sl.cpp Code handling saving and loading of engines */ #include "../stdafx.h" -#include "saveload.h" #include "saveload_internal.h" #include "../engine_base.h" #include diff --git a/src/saveload/map_sl.cpp b/src/saveload/map_sl.cpp index 00139dde9a..005960582e 100644 --- a/src/saveload/map_sl.cpp +++ b/src/saveload/map_sl.cpp @@ -3,7 +3,6 @@ /** @file map_sl.cpp Code handling saving and loading of map */ #include "../stdafx.h" -#include "../tile_type.h" #include "../map_func.h" #include "../core/alloc_type.hpp" #include "../core/bitmath_func.hpp" diff --git a/src/saveload/misc_sl.cpp b/src/saveload/misc_sl.cpp index 5dd650c800..74086f934a 100644 --- a/src/saveload/misc_sl.cpp +++ b/src/saveload/misc_sl.cpp @@ -7,7 +7,6 @@ #include "../variables.h" #include "../core/random_func.hpp" #include "../openttd.h" -#include "../tile_type.h" #include "../zoom_func.h" #include "../vehicle_func.h" #include "../window_gui.h" diff --git a/src/saveload/oldloader.cpp b/src/saveload/oldloader.cpp index 5c1dd39ef5..dd55a9e290 100644 --- a/src/saveload/oldloader.cpp +++ b/src/saveload/oldloader.cpp @@ -12,7 +12,6 @@ #include "table/strings.h" -#include "saveload.h" #include "saveload_internal.h" #include "oldloader.h" diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index 1de4070826..6052312b07 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -3,7 +3,6 @@ /** @file oldloader_sl.cpp Chunks and fix-ups for TTO/TTD/TTDP savegames. TTO loader code is based on SVXConverter by Roman Vetter. */ #include "../stdafx.h" -#include "../station_map.h" #include "../town.h" #include "../industry.h" #include "../company_func.h" @@ -19,9 +18,7 @@ #include "../date_func.h" #include "../vehicle_func.h" #include "../variables.h" -#include "../strings_func.h" #include "../effectvehicle_base.h" -#include "../string_func.h" #include "../core/mem_func.hpp" #include "../core/alloc_type.hpp" #include "saveload_internal.h" diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index 466a67d539..43b0616f52 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -25,7 +25,6 @@ #include "../strings_func.h" #include "../gfx_func.h" #include "../core/alloc_func.hpp" -#include "../functions.h" #include "../core/endian_func.hpp" #include "../vehicle_base.h" #include "../company_func.h" @@ -37,11 +36,8 @@ #include "table/strings.h" -#include "saveload.h" #include "saveload_internal.h" -#include - extern const uint16 SAVEGAME_VERSION = 112; SavegameType _savegame_type; ///< type of savegame we are loading @@ -1160,7 +1156,6 @@ static void UninitNoComp() ********** START OF MEMORY CODE (in ram)**** ********************************************/ -#include "../table/sprites.h" #include "../gui.h" struct ThreadedSave { diff --git a/src/saveload/signs_sl.cpp b/src/saveload/signs_sl.cpp index 7dbb9e3550..3006a50de2 100644 --- a/src/saveload/signs_sl.cpp +++ b/src/saveload/signs_sl.cpp @@ -3,12 +3,9 @@ /** @file signs_sl.cpp Code handling saving and loading of economy data */ #include "../stdafx.h" -#include "../strings_func.h" #include "../company_func.h" #include "../signs_base.h" -#include "../signs_func.h" -#include "saveload_internal.h" #include "saveload.h" static const SaveLoad _sign_desc[] = { diff --git a/src/saveload/strings_sl.cpp b/src/saveload/strings_sl.cpp index e220d687a1..cd5cd187dd 100644 --- a/src/saveload/strings_sl.cpp +++ b/src/saveload/strings_sl.cpp @@ -3,17 +3,12 @@ /** @file strings_sl.cpp Code handling saving and loading of strings */ #include "../stdafx.h" -#include "../strings_type.h" -#include "../core/math_func.hpp" -#include "../core/bitmath_func.hpp" #include "../core/alloc_func.hpp" #include "../string_func.h" #include "saveload_internal.h" #include "table/strings.h" -#include "saveload.h" - /** * Remap a string ID from the old format to the new format * @param s StringID that requires remapping diff --git a/src/saveload/town_sl.cpp b/src/saveload/town_sl.cpp index eaa3edaa38..dac5201814 100644 --- a/src/saveload/town_sl.cpp +++ b/src/saveload/town_sl.cpp @@ -3,11 +3,9 @@ /** @file town_sl.cpp Code handling saving and loading of towns and houses */ #include "../stdafx.h" -#include "../town.h" #include "../newgrf_house.h" #include "../newgrf_commons.h" #include "../variables.h" -#include "../tile_map.h" #include "../town_map.h" #include "saveload.h" diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp index 90d7ef3124..1bde737d6e 100644 --- a/src/saveload/vehicle_sl.cpp +++ b/src/saveload/vehicle_sl.cpp @@ -3,7 +3,6 @@ /** @file vehicle_sl.cpp Code handling saving and loading of vehicles */ #include "../stdafx.h" -#include "../vehicle_base.h" #include "../vehicle_func.h" #include "../train.h" #include "../roadveh.h" diff --git a/src/screenshot.cpp b/src/screenshot.cpp index 4fd62c4dd6..86fedccf55 100644 --- a/src/screenshot.cpp +++ b/src/screenshot.cpp @@ -4,15 +4,12 @@ #include "stdafx.h" #include "openttd.h" -#include "debug.h" #include "fileio_func.h" #include "viewport_func.h" #include "gfx_func.h" -#include "core/math_func.hpp" #include "screenshot.h" #include "variables.h" #include "blitter/factory.hpp" -#include "strings_func.h" #include "zoom_func.h" #include "core/alloc_func.hpp" #include "core/endian_func.hpp" @@ -20,7 +17,6 @@ #include "saveload/saveload.h" #include "company_func.h" -#include "table/strings.h" char _screenshot_format_name[8]; uint _num_screenshot_formats; diff --git a/src/settings.cpp b/src/settings.cpp index 477801bf55..a103b7f969 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -31,26 +31,19 @@ #include "console_func.h" #include "npf.h" #include "yapf/yapf.h" -#include "newgrf.h" -#include "newgrf_config.h" #include "genworld.h" -#include "rail.h" #include "train.h" #include "news_func.h" #include "window_func.h" #include "strings_func.h" #include "vehicle_func.h" #include "sound_func.h" -#include "core/alloc_func.hpp" #include "company_func.h" #include "rev.h" #ifdef WITH_FREETYPE #include "fontcache.h" #endif -#include "spritecache.h" -#include "transparency.h" #include "textbuf_gui.h" -#include "string_func.h" #include "rail_gui.h" #include "elrail_func.h" #include "gui.h" @@ -64,11 +57,8 @@ #include "station_func.h" #include "settings_func.h" #include "ini_type.h" -#include "ai/ai.hpp" #include "ai/ai_config.hpp" -#include "ai/ai_info.hpp" -#include "tile_map.h" #include "void_map.h" #include "station_base.h" diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 7cada84119..1fd57f93db 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -11,16 +11,13 @@ #include "command_func.h" #include "engine_func.h" #include "screenshot.h" -#include "newgrf.h" #include "network/network.h" #include "town.h" #include "variables.h" #include "settings_internal.h" #include "newgrf_townname.h" #include "strings_func.h" -#include "functions.h" #include "window_func.h" -#include "core/alloc_func.hpp" #include "string_func.h" #include "gfx_func.h" #include "waypoint.h" diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index e675ebd777..275b9b9dc1 100644 --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -3,30 +3,19 @@ /** @file ship_cmd.cpp Handling of ships. */ #include "stdafx.h" -#include "openttd.h" #include "ship.h" -#include "tile_cmd.h" #include "landscape.h" #include "timetable.h" #include "command_func.h" #include "pathfind.h" #include "station_map.h" -#include "station_base.h" #include "news_func.h" -#include "engine_func.h" -#include "engine_base.h" #include "company_func.h" -#include "company_base.h" #include "npf.h" #include "depot_base.h" -#include "depot_func.h" #include "vehicle_gui.h" #include "newgrf_engine.h" -#include "water_map.h" #include "yapf/yapf.h" -#include "debug.h" -#include "newgrf_callbacks.h" -#include "newgrf_text.h" #include "newgrf_sound.h" #include "spritecache.h" #include "strings_func.h" @@ -38,9 +27,8 @@ #include "variables.h" #include "autoreplace_gui.h" #include "gfx_func.h" -#include "settings_type.h" -#include "order_func.h" #include "effectvehicle_func.h" +#include "settings_type.h" #include "ai/ai.hpp" #include "table/strings.h" diff --git a/src/ship_gui.cpp b/src/ship_gui.cpp index 2a57c3aeba..dd1ca03fd1 100644 --- a/src/ship_gui.cpp +++ b/src/ship_gui.cpp @@ -3,21 +3,14 @@ /** @file ship_gui.cpp GUI for ships. */ #include "stdafx.h" -#include "openttd.h" -#include "debug.h" -#include "ship.h" -#include "gui.h" +#include "vehicle_base.h" #include "window_gui.h" -#include "viewport_func.h" #include "gfx_func.h" #include "vehicle_gui.h" -#include "newgrf_engine.h" #include "strings_func.h" #include "vehicle_func.h" -#include "order_func.h" #include "table/strings.h" -#include "table/sprites.h" void DrawShipImage(const Vehicle *v, int x, int y, VehicleID selection) { diff --git a/src/signal.cpp b/src/signal.cpp index 98881c7f05..8269923706 100644 --- a/src/signal.cpp +++ b/src/signal.cpp @@ -3,21 +3,12 @@ /** @file signal.cpp functions related to rail signals updating */ #include "stdafx.h" -#include "openttd.h" #include "debug.h" -#include "tile_cmd.h" -#include "rail_map.h" -#include "road_map.h" #include "station_map.h" #include "tunnelbridge_map.h" #include "vehicle_func.h" -#include "train.h" -#include "newgrf_station.h" +#include "vehicle_base.h" #include "functions.h" -#include "track_type.h" -#include "track_func.h" -#include "signal_func.h" -#include "company_func.h" /** these are the maximums used for updating signal blocks */ diff --git a/src/signs.cpp b/src/signs.cpp index 22fe2a4214..267fa5e243 100644 --- a/src/signs.cpp +++ b/src/signs.cpp @@ -3,13 +3,11 @@ /** @file signs.cpp Handling of signs. */ #include "stdafx.h" -#include "openttd.h" #include "landscape.h" #include "company_func.h" #include "signs_base.h" #include "signs_func.h" #include "command_func.h" -#include "variables.h" #include "strings_func.h" #include "viewport_func.h" #include "tilehighlight_func.h" diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp index 23366cf507..0d3830d63d 100644 --- a/src/signs_gui.cpp +++ b/src/signs_gui.cpp @@ -3,19 +3,13 @@ /** @file signs_gui.cpp The GUI for signs. */ #include "stdafx.h" -#include "openttd.h" -#include "gui.h" -#include "textbuf_gui.h" -#include "window_gui.h" #include "company_gui.h" #include "company_func.h" #include "signs_base.h" #include "signs_func.h" #include "debug.h" -#include "variables.h" #include "command_func.h" #include "strings_func.h" -#include "core/alloc_func.hpp" #include "window_func.h" #include "map_func.h" #include "gfx_func.h" @@ -25,7 +19,6 @@ #include "string_func.h" #include "table/strings.h" -#include "table/sprites.h" struct SignList { typedef GUIList GUISignList; diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index 6e76a43ee5..0248083fe5 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -3,22 +3,15 @@ /** @file smallmap_gui.cpp GUI that shows a small map of the world with metadata like owner or height. */ #include "stdafx.h" -#include "openttd.h" -#include "bridge_map.h" #include "clear_map.h" #include "industry_map.h" -#include "industry.h" #include "station_map.h" #include "landscape.h" -#include "gui.h" #include "window_gui.h" #include "tree_map.h" -#include "tunnel_map.h" #include "viewport_func.h" #include "gfx_func.h" -#include "company_base.h" #include "town.h" -#include "variables.h" #include "blitter/factory.hpp" #include "tunnelbridge_map.h" #include "strings_func.h" @@ -26,7 +19,6 @@ #include "core/endian_func.hpp" #include "vehicle_base.h" #include "sound_func.h" -#include "settings_type.h" #include "window_func.h" #include "table/strings.h" diff --git a/src/sound.cpp b/src/sound.cpp index 429710f666..586d12c1a6 100644 --- a/src/sound.cpp +++ b/src/sound.cpp @@ -3,15 +3,12 @@ /** @file sound.cpp Handling of playing sounds. */ #include "stdafx.h" -#include "openttd.h" #include "landscape.h" #include "mixer.h" -#include "sound_func.h" #include "fileio_func.h" #include "newgrf_sound.h" #include "fios.h" #include "window_gui.h" -#include "core/alloc_func.hpp" #include "map_func.h" #include "vehicle_base.h" #include "debug.h" diff --git a/src/sound/sdl_s.cpp b/src/sound/sdl_s.cpp index 753bce7647..d111ac8ed0 100644 --- a/src/sound/sdl_s.cpp +++ b/src/sound/sdl_s.cpp @@ -6,7 +6,6 @@ #include "../stdafx.h" -#include "../driver.h" #include "../mixer.h" #include "../sdl.h" #include "sdl_s.h" diff --git a/src/spritecache.cpp b/src/spritecache.cpp index e26029a1bc..d380902558 100644 --- a/src/spritecache.cpp +++ b/src/spritecache.cpp @@ -3,21 +3,16 @@ /** @file spritecache.cpp Caching of sprites. */ #include "stdafx.h" -#include "openttd.h" -#include "variables.h" -#include "debug.h" -#include "spritecache.h" +#include "gfx_type.h" #include "fileio_func.h" #include "spriteloader/grf.hpp" #include "core/alloc_func.hpp" -#include "core/math_func.hpp" #include "gfx_func.h" #ifdef WITH_PNG #include "spriteloader/png.hpp" #endif /* WITH_PNG */ #include "blitter/factory.hpp" #include "core/math_func.hpp" -#include "core/enum_type.hpp" #include "table/sprites.h" diff --git a/src/station.cpp b/src/station.cpp index bb961b07f7..2480fb1aa0 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -3,20 +3,9 @@ /** @file station.cpp Implementation of the station base class. */ #include "stdafx.h" -#include "openttd.h" -#include "bridge_map.h" -#include "debug.h" -#include "station_map.h" -#include "station_base.h" -#include "town.h" #include "company_func.h" -#include "airport.h" -#include "sprite.h" -#include "train.h" -#include "water_map.h" -#include "industry_map.h" -#include "newgrf_callbacks.h" -#include "newgrf_station.h" +#include "industry.h" +#include "newgrf_cargo.h" #include "yapf/yapf.h" #include "cargotype.h" #include "roadveh.h" @@ -26,15 +15,12 @@ #include "functions.h" #include "window_func.h" #include "date_func.h" -#include "variables.h" -#include "settings_type.h" #include "command_func.h" -#include "order_func.h" #include "news_func.h" #include "aircraft.h" #include "vehicle_gui.h" +#include "settings_type.h" -#include "table/sprites.h" #include "table/strings.h" Station::Station(TileIndex tile) diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 67f1dbab69..74a8147d15 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -7,30 +7,20 @@ #include "aircraft.h" #include "bridge_map.h" #include "cmd_helper.h" -#include "debug.h" -#include "tile_cmd.h" #include "landscape.h" -#include "station_map.h" #include "viewport_func.h" #include "command_func.h" #include "town.h" #include "news_func.h" -#include "airport.h" -#include "sprite.h" #include "train.h" #include "roadveh.h" -#include "water_map.h" #include "industry_map.h" -#include "newgrf_callbacks.h" #include "newgrf_station.h" #include "newgrf_commons.h" #include "yapf/yapf.h" -#include "road_type.h" #include "road_internal.h" /* For drawing catenary/checking road removal */ -#include "cargotype.h" #include "variables.h" #include "autoslope.h" -#include "transparency.h" #include "water.h" #include "station_gui.h" #include "strings_func.h" @@ -39,14 +29,10 @@ #include "date_func.h" #include "vehicle_func.h" #include "string_func.h" -#include "signal_func.h" #include "oldpool_func.h" #include "animated_tile_func.h" #include "elrail_func.h" -#include "newgrf.h" -#include "core/smallvec_type.hpp" -#include "table/sprites.h" #include "table/strings.h" DEFINE_OLD_POOL_GENERIC(Station, Station) diff --git a/src/station_gui.cpp b/src/station_gui.cpp index 4cfdb6b901..62d3d642d5 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -8,33 +8,23 @@ #include "gui.h" #include "window_gui.h" #include "textbuf_gui.h" -#include "station_base.h" #include "company_func.h" -#include "economy_func.h" -#include "town.h" #include "command_func.h" -#include "variables.h" #include "vehicle_gui.h" #include "cargotype.h" #include "station_gui.h" -#include "station_func.h" #include "strings_func.h" -#include "core/alloc_func.hpp" #include "window_func.h" #include "viewport_func.h" #include "gfx_func.h" #include "widgets/dropdown_func.h" #include "newgrf_cargo.h" -#include "map_func.h" -#include "settings_type.h" -#include "tile_map.h" #include "station_map.h" #include "tilehighlight_func.h" -#include "core/smallvec_type.hpp" #include "core/smallmap_type.hpp" -#include "string_func.h" #include "company_base.h" #include "sortlist_type.h" +#include "settings_type.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/string.cpp b/src/string.cpp index f3ab416238..7a2f1aabb4 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -3,7 +3,6 @@ /** @file string.cpp Handling of C-type strings (char*). */ #include "stdafx.h" -#include "openttd.h" #include "debug.h" #include "core/alloc_func.hpp" #include "core/math_func.hpp" diff --git a/src/strings.cpp b/src/strings.cpp index 78cd652c6b..83231b2ceb 100644 --- a/src/strings.cpp +++ b/src/strings.cpp @@ -5,38 +5,29 @@ #include "stdafx.h" #include "openttd.h" #include "currency.h" +#include "spritecache.h" #include "namegen_func.h" #include "station_base.h" #include "town.h" #include "screenshot.h" #include "waypoint.h" #include "industry.h" -#include "variables.h" #include "newgrf_text.h" #include "music.h" #include "fileio_func.h" -#include "cargotype.h" #include "group.h" -#include "debug.h" #include "newgrf_townname.h" #include "signs_base.h" -#include "newgrf_engine.h" -#include "spritecache.h" +#include "cargotype.h" #include "fontcache.h" #include "gui.h" #include "strings_func.h" -#include "functions.h" #include "rev.h" #include "core/endian_func.hpp" #include "date_func.h" #include "vehicle_base.h" -#include "string_func.h" #include "company_func.h" -#include "company_base.h" -#include "fios.h" -#include "settings_type.h" #include "video/video_driver.hpp" -#include "engine_func.h" #include "engine_base.h" #include "strgen/strgen.h" diff --git a/src/subsidy_gui.cpp b/src/subsidy_gui.cpp index 53fe13647b..8f0c344d76 100644 --- a/src/subsidy_gui.cpp +++ b/src/subsidy_gui.cpp @@ -3,12 +3,10 @@ /** @file subsidy_gui.cpp GUI for subsidies. */ #include "stdafx.h" -#include "openttd.h" #include "station_base.h" #include "industry.h" #include "town.h" #include "economy_func.h" -#include "variables.h" #include "cargotype.h" #include "window_gui.h" #include "strings_func.h" diff --git a/src/terraform_cmd.cpp b/src/terraform_cmd.cpp index bdcc49fab2..c67312973b 100644 --- a/src/terraform_cmd.cpp +++ b/src/terraform_cmd.cpp @@ -4,14 +4,13 @@ #include "stdafx.h" #include "openttd.h" -#include "strings_type.h" #include "command_func.h" -#include "tile_map.h" #include "tunnel_map.h" #include "bridge_map.h" #include "variables.h" #include "functions.h" #include "economy_func.h" +#include "settings_type.h" #include "table/strings.h" diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp index 5a9a1cf408..f60d92cf76 100644 --- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -4,7 +4,6 @@ #include "stdafx.h" #include "openttd.h" -#include "bridge_map.h" #include "clear_map.h" #include "company_func.h" #include "company_base.h" @@ -22,10 +21,10 @@ #include "unmovable_map.h" #include "textbuf_gui.h" #include "genworld.h" -#include "settings_type.h" #include "tree_map.h" #include "landscape_type.h" #include "tilehighlight_func.h" +#include "settings_type.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/texteff.cpp b/src/texteff.cpp index cf71d9c5d5..ef8ba25fc1 100644 --- a/src/texteff.cpp +++ b/src/texteff.cpp @@ -4,9 +4,7 @@ #include "stdafx.h" #include "openttd.h" -#include "landscape.h" -#include "gfx_func.h" -#include "variables.h" +#include "strings_type.h" #include "texteff.hpp" #include "core/bitmath_func.hpp" #include "transparency.h" diff --git a/src/tgp.cpp b/src/tgp.cpp index 12bfbf69bc..4916e97a41 100644 --- a/src/tgp.cpp +++ b/src/tgp.cpp @@ -4,18 +4,13 @@ #include "stdafx.h" #include -#include "openttd.h" #include "clear_map.h" -#include "variables.h" #include "void_map.h" -#include "tgp.h" #include "genworld.h" #include "core/alloc_func.hpp" #include "core/random_func.hpp" -#include "settings_type.h" #include "landscape_type.h" - -#include "table/strings.h" +#include "settings_type.h" /* * diff --git a/src/thread_pthread.cpp b/src/thread_pthread.cpp index 2ab3d43f76..bcfaf8c857 100644 --- a/src/thread_pthread.cpp +++ b/src/thread_pthread.cpp @@ -4,12 +4,7 @@ #include "stdafx.h" #include "thread.h" -#include "debug.h" -#include "core/alloc_func.hpp" -#include #include -#include -#include /** * POSIX pthread version for ThreadObject. diff --git a/src/tile_map.cpp b/src/tile_map.cpp index c8977d6d18..201328b8ef 100644 --- a/src/tile_map.cpp +++ b/src/tile_map.cpp @@ -3,9 +3,9 @@ /** @file tile_map.cpp Global tile accessors. */ #include "stdafx.h" -#include "openttd.h" #include "tile_map.h" #include "core/math_func.hpp" +#include "settings_type.h" /** * Return the slope of a given tile diff --git a/src/timetable_cmd.cpp b/src/timetable_cmd.cpp index 3d35ceb127..7ff52684c8 100644 --- a/src/timetable_cmd.cpp +++ b/src/timetable_cmd.cpp @@ -3,12 +3,9 @@ /** @file timetable_cmd.cpp Commands related to time tabling. */ #include "stdafx.h" -#include "openttd.h" -#include "variables.h" #include "command_func.h" #include "functions.h" #include "window_func.h" -#include "vehicle_func.h" #include "vehicle_base.h" #include "settings_type.h" diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index 6920d2a1ee..7d1b463e43 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -3,20 +3,16 @@ /** @file timetable_gui.cpp GUI for time tabling. */ #include "stdafx.h" -#include "openttd.h" -#include "variables.h" #include "command_func.h" #include "gui.h" #include "window_gui.h" #include "window_func.h" #include "textbuf_gui.h" -#include "cargotype.h" #include "strings_func.h" #include "vehicle_base.h" #include "string_func.h" #include "gfx_func.h" #include "company_func.h" -#include "order_func.h" #include "settings_type.h" #include "table/strings.h" diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index 2ba49dab3f..29d5c62e62 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -10,8 +10,6 @@ #include "viewport_func.h" #include "command_func.h" #include "variables.h" -#include "train.h" -#include "roadveh.h" #include "vehicle_gui.h" #include "rail_gui.h" #include "road_gui.h" @@ -21,17 +19,12 @@ #include "terraform_gui.h" #include "transparency.h" #include "strings_func.h" -#include "company_base.h" #include "company_func.h" #include "company_gui.h" -#include "settings_type.h" -#include "toolbar_gui.h" #include "vehicle_base.h" -#include "gfx_func.h" #include "cheat_func.h" #include "transparency_gui.h" #include "screenshot.h" -#include "newgrf_config.h" #include "signs_func.h" #include "fios.h" #include "functions.h" @@ -40,8 +33,9 @@ #include "ai/ai_gui.hpp" #include "tilehighlight_func.h" #include "rail.h" -#include "widgets/dropdown_func.h" #include "widgets/dropdown_type.h" +#include "settings_type.h" +#include "newgrf_config.h" #include "network/network.h" #include "network/network_gui.h" diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 7be47fa6a0..4d00a9e913 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -4,16 +4,12 @@ #include "stdafx.h" #include "openttd.h" -#include "tile_cmd.h" -#include "debug.h" -#include "road_map.h" +#include "road_type.h" #include "road_internal.h" /* Cleaning up road bits */ #include "road_cmd.h" #include "landscape.h" #include "town_map.h" -#include "tunnel_map.h" #include "viewport_func.h" -#include "town.h" #include "command_func.h" #include "industry.h" #include "station_base.h" @@ -23,11 +19,9 @@ #include "unmovable_map.h" #include "water_map.h" #include "variables.h" -#include "bridge.h" -#include "bridge_map.h" +#include "slope_func.h" #include "genworld.h" #include "newgrf.h" -#include "newgrf_callbacks.h" #include "newgrf_house.h" #include "newgrf_commons.h" #include "newgrf_townname.h" @@ -41,17 +35,15 @@ #include "string_func.h" #include "newgrf_cargo.h" #include "oldpool_func.h" -#include "sprite.h" #include "economy_func.h" #include "station_func.h" -#include "cheat_func.h" +#include "cheat_type.h" #include "functions.h" #include "animated_tile_func.h" #include "date_func.h" #include "core/smallmap_type.hpp" #include "table/strings.h" -#include "table/sprites.h" #include "table/town_land.h" uint _total_towns; diff --git a/src/town_gui.cpp b/src/town_gui.cpp index 9a97b0b9c0..20f68492f7 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -4,7 +4,6 @@ #include "stdafx.h" #include "openttd.h" -#include "debug.h" #include "town.h" #include "viewport_func.h" #include "gfx_func.h" @@ -20,10 +19,7 @@ #include "strings_func.h" #include "sound_func.h" #include "economy_func.h" -#include "core/alloc_func.hpp" -#include "settings_type.h" #include "tilehighlight_func.h" -#include "string_func.h" #include "sortlist_type.h" #include "road_cmd.h" diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 68711db406..f6927164a0 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -3,59 +3,36 @@ /** @file train_cmd.cpp Handling of trains. */ #include "stdafx.h" -#include "openttd.h" -#include "bridge_map.h" -#include "debug.h" -#include "tile_cmd.h" -#include "landscape.h" #include "gui.h" -#include "station_map.h" -#include "tunnel_map.h" #include "articulated_vehicles.h" #include "command_func.h" -#include "pathfind.h" #include "npf.h" -#include "station_base.h" #include "news_func.h" #include "engine_func.h" #include "engine_base.h" #include "company_func.h" -#include "company_base.h" #include "depot_base.h" -#include "depot_func.h" -#include "waypoint.h" #include "vehicle_gui.h" #include "train.h" -#include "bridge.h" -#include "newgrf_callbacks.h" #include "newgrf_engine.h" #include "newgrf_sound.h" #include "newgrf_text.h" -#include "direction_func.h" -#include "yapf/yapf.h" #include "yapf/follow_track.hpp" -#include "cargotype.h" #include "group.h" #include "table/sprites.h" -#include "tunnelbridge_map.h" #include "strings_func.h" #include "functions.h" #include "window_func.h" -#include "date_func.h" #include "vehicle_func.h" #include "sound_func.h" -#include "signal_func.h" #include "variables.h" #include "autoreplace_gui.h" #include "gfx_func.h" #include "ai/ai.hpp" -#include "settings_type.h" -#include "order_func.h" #include "newgrf_station.h" #include "effectvehicle_func.h" #include "gamelog.h" #include "network/network.h" -#include "pbs.h" #include "table/strings.h" #include "table/train_cmd.h" diff --git a/src/train_gui.cpp b/src/train_gui.cpp index 57e96ce873..4956c29501 100644 --- a/src/train_gui.cpp +++ b/src/train_gui.cpp @@ -3,9 +3,6 @@ /** @file train_gui.cpp GUI for trains. */ #include "stdafx.h" -#include "openttd.h" -#include "debug.h" -#include "gui.h" #include "window_gui.h" #include "gfx_func.h" #include "command_func.h" @@ -14,11 +11,9 @@ #include "newgrf_engine.h" #include "strings_func.h" #include "vehicle_func.h" -#include "settings_type.h" -#include "order_func.h" -#include "engine_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 feff1c4ee9..c8b9a6ae7f 100644 --- a/src/transparency_gui.cpp +++ b/src/transparency_gui.cpp @@ -4,9 +4,7 @@ #include "stdafx.h" #include "openttd.h" -#include "gui.h" #include "window_gui.h" -#include "variables.h" #include "transparency.h" #include "sound_func.h" diff --git a/src/tree_cmd.cpp b/src/tree_cmd.cpp index 9526a4dffc..887d2d8194 100644 --- a/src/tree_cmd.cpp +++ b/src/tree_cmd.cpp @@ -4,9 +4,7 @@ #include "stdafx.h" #include "openttd.h" -#include "bridge_map.h" #include "clear_map.h" -#include "tile_cmd.h" #include "landscape.h" #include "tree_map.h" #include "viewport_func.h" @@ -19,7 +17,6 @@ #include "functions.h" #include "company_func.h" #include "sound_func.h" -#include "settings_type.h" #include "water_map.h" #include "water.h" #include "landscape_type.h" diff --git a/src/tunnel_map.cpp b/src/tunnel_map.cpp index 8400c94832..bbb6a27da4 100644 --- a/src/tunnel_map.cpp +++ b/src/tunnel_map.cpp @@ -3,8 +3,6 @@ /** @file tunnel_map.cpp Map accessors for tunnels. */ #include "stdafx.h" -#include "openttd.h" -#include "tunnel_map.h" #include "tunnelbridge_map.h" diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index 27667219fa..9799a557df 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -7,38 +7,28 @@ #include "stdafx.h" #include "openttd.h" -#include "bridge_map.h" #include "rail_map.h" -#include "road_map.h" -#include "tile_cmd.h" #include "landscape.h" -#include "tunnel_map.h" +#include "town_type.h" #include "unmovable_map.h" #include "viewport_func.h" #include "command_func.h" #include "town.h" #include "variables.h" -#include "bridge.h" #include "train.h" #include "water_map.h" #include "yapf/yapf.h" #include "newgrf_sound.h" #include "autoslope.h" -#include "transparency.h" #include "tunnelbridge_map.h" #include "strings_func.h" #include "date_func.h" #include "functions.h" #include "vehicle_func.h" #include "sound_func.h" -#include "signal_func.h" #include "tunnelbridge.h" -#include "company_base.h" -#include "engine_func.h" #include "engine_base.h" -#include "economy_func.h" -#include "rail.h" -#include "cheat_func.h" +#include "cheat_type.h" #include "elrail_func.h" #include "landscape_type.h" diff --git a/src/unmovable_cmd.cpp b/src/unmovable_cmd.cpp index adcc57bac2..ce7e09d26d 100644 --- a/src/unmovable_cmd.cpp +++ b/src/unmovable_cmd.cpp @@ -4,29 +4,23 @@ #include "stdafx.h" #include "openttd.h" -#include "tile_cmd.h" #include "landscape.h" #include "command_func.h" #include "viewport_func.h" -#include "company_func.h" #include "company_base.h" -#include "gui.h" #include "town.h" #include "sprite.h" #include "bridge_map.h" #include "unmovable_map.h" -#include "variables.h" #include "genworld.h" -#include "bridge.h" #include "autoslope.h" #include "transparency.h" #include "functions.h" #include "window_func.h" #include "vehicle_func.h" #include "company_gui.h" -#include "station_type.h" #include "economy_func.h" -#include "cheat_func.h" +#include "cheat_type.h" #include "landscape_type.h" #include "table/strings.h" diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 3adee91213..0e77d83b17 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -4,59 +4,42 @@ #include "stdafx.h" #include "openttd.h" -#include "road_map.h" #include "roadveh.h" #include "ship.h" #include "spritecache.h" -#include "tile_cmd.h" #include "landscape.h" #include "timetable.h" #include "viewport_func.h" #include "gfx_func.h" #include "news_func.h" #include "command_func.h" -#include "saveload/saveload.h" #include "company_func.h" -#include "debug.h" #include "vehicle_gui.h" -#include "rail_type.h" #include "train.h" #include "aircraft.h" -#include "industry_map.h" -#include "station_map.h" -#include "water_map.h" -#include "yapf/yapf.h" -#include "newgrf_callbacks.h" #include "newgrf_engine.h" #include "newgrf_sound.h" #include "newgrf_station.h" #include "newgrf_text.h" #include "group.h" #include "group_gui.h" -#include "order_func.h" #include "strings_func.h" #include "zoom_func.h" #include "functions.h" #include "date_func.h" #include "window_func.h" #include "vehicle_func.h" -#include "signal_func.h" -#include "sound_func.h" -#include "variables.h" #include "autoreplace_func.h" #include "autoreplace_gui.h" #include "string_func.h" -#include "settings_type.h" #include "oldpool_func.h" #include "depot_map.h" -#include "animated_tile_func.h" -#include "effectvehicle_base.h" #include "ai/ai.hpp" -#include "core/alloc_func.hpp" #include "core/smallmap_type.hpp" #include "vehiclelist.h" #include "core/mem_func.hpp" #include "depot_func.h" +#include "settings_type.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 76a26f3faa..2bfe386bf2 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -10,36 +10,25 @@ #include "window_gui.h" #include "textbuf_gui.h" #include "command_func.h" -#include "variables.h" #include "vehicle_gui.h" #include "vehicle_gui_base.h" #include "viewport_func.h" #include "gfx_func.h" -#include "train.h" -#include "newgrf_callbacks.h" #include "newgrf_engine.h" #include "newgrf_text.h" -#include "ship.h" -#include "aircraft.h" +#include "station_map.h" #include "roadveh.h" #include "depot_base.h" -#include "cargotype.h" -#include "group.h" #include "group_gui.h" #include "strings_func.h" -#include "functions.h" #include "window_func.h" #include "vehicle_func.h" #include "autoreplace_gui.h" -#include "core/alloc_func.hpp" -#include "core/mem_func.hpp" -#include "core/sort_func.hpp" #include "string_func.h" -#include "settings_type.h" #include "widgets/dropdown_func.h" -#include "order_func.h" #include "timetable.h" #include "vehiclelist.h" +#include "settings_type.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/vehiclelist.cpp b/src/vehiclelist.cpp index af3da1b125..6ecdc59643 100644 --- a/src/vehiclelist.cpp +++ b/src/vehiclelist.cpp @@ -3,12 +3,7 @@ /** @file vehiclelist.cpp Lists of vehicles. */ #include "stdafx.h" -#include "openttd.h" -#include "vehicle_type.h" -#include "vehicle_func.h" -#include "vehicle_base.h" #include "vehicle_gui.h" -#include "core/alloc_func.hpp" #include "train.h" #include "vehiclelist.h" diff --git a/src/video/dedicated_v.cpp b/src/video/dedicated_v.cpp index 57f936d981..21ce2bd1d7 100644 --- a/src/video/dedicated_v.cpp +++ b/src/video/dedicated_v.cpp @@ -7,9 +7,7 @@ #ifdef ENABLE_NETWORK #include "../openttd.h" -#include "../debug.h" #include "../gfx_func.h" -#include "../network/network.h" #include "../network/network_internal.h" #include "../console_func.h" #include "../variables.h" @@ -17,7 +15,6 @@ #include "../fileio_type.h" #include "../fios.h" #include "../blitter/factory.hpp" -#include "../core/alloc_func.hpp" #include "../company_func.h" #include "../core/random_func.hpp" #include "dedicated_v.h" diff --git a/src/video/null_v.cpp b/src/video/null_v.cpp index 85ea8f7586..bce99e7c75 100644 --- a/src/video/null_v.cpp +++ b/src/video/null_v.cpp @@ -3,10 +3,7 @@ /** @file null_v.cpp The videio driver that doesn't blit. */ #include "../stdafx.h" -#include "../openttd.h" #include "../gfx_func.h" -#include "../variables.h" -#include "../debug.h" #include "../blitter/factory.hpp" #include "null_v.h" diff --git a/src/video/sdl_v.cpp b/src/video/sdl_v.cpp index 380a3a8576..e9068bd7e2 100644 --- a/src/video/sdl_v.cpp +++ b/src/video/sdl_v.cpp @@ -6,17 +6,13 @@ #include "../stdafx.h" #include "../openttd.h" -#include "../debug.h" #include "../gfx_func.h" #include "../sdl.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 "sdl_v.h" #include diff --git a/src/viewport.cpp b/src/viewport.cpp index 114db297ee..b05c8694aa 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -20,20 +20,14 @@ #include "stdafx.h" #include "openttd.h" -#include "debug.h" -#include "tile_cmd.h" -#include "gui.h" -#include "spritecache.h" #include "landscape.h" #include "viewport_func.h" #include "station_base.h" #include "town.h" #include "signs_base.h" #include "signs_func.h" -#include "waypoint.h" #include "variables.h" -#include "train.h" -#include "roadveh.h" +#include "vehicle_base.h" #include "vehicle_gui.h" #include "blitter/factory.hpp" #include "transparency.h" @@ -41,10 +35,7 @@ #include "zoom_func.h" #include "vehicle_func.h" #include "company_func.h" -#include "settings_type.h" #include "station_func.h" -#include "core/alloc_type.hpp" -#include "core/smallvec_type.hpp" #include "window_func.h" #include "tilehighlight_func.h" #include "window_gui.h" diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index c24e8d5008..9d6921c106 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -4,11 +4,7 @@ #include "stdafx.h" #include "openttd.h" -#include "bridge_map.h" -#include "bridge.h" #include "cmd_helper.h" -#include "station_map.h" -#include "tile_cmd.h" #include "landscape.h" #include "viewport_func.h" #include "command_func.h" @@ -20,9 +16,8 @@ #include "train.h" #include "roadveh.h" #include "water.h" -#include "water_map.h" #include "industry_map.h" -#include "newgrf.h" +#include "cargotype.h" #include "newgrf_canal.h" #include "transparency.h" #include "strings_func.h" @@ -30,17 +25,12 @@ #include "window_func.h" #include "vehicle_func.h" #include "sound_func.h" -#include "variables.h" #include "company_func.h" -#include "settings_type.h" #include "clear_map.h" #include "tree_map.h" -#include "station_base.h" -#include "airport.h" #include "aircraft.h" #include "newgrf_cargo.h" #include "effectvehicle_func.h" -#include "oldpool_func.h" #include "tunnelbridge_map.h" #include "table/sprites.h" diff --git a/src/waypoint.cpp b/src/waypoint.cpp index 6ae6aa6b1e..c614a08e1e 100644 --- a/src/waypoint.cpp +++ b/src/waypoint.cpp @@ -3,36 +3,26 @@ /** @file waypoint.cpp Handling of waypoints. */ #include "stdafx.h" -#include "openttd.h" #include "command_func.h" #include "landscape.h" -#include "order_func.h" -#include "rail_map.h" #include "rail.h" #include "bridge_map.h" #include "station_base.h" #include "town.h" #include "waypoint.h" -#include "variables.h" #include "yapf/yapf.h" -#include "newgrf.h" #include "strings_func.h" #include "gfx_func.h" #include "functions.h" #include "window_func.h" -#include "economy_func.h" #include "date_func.h" #include "vehicle_func.h" -#include "vehicle_base.h" #include "string_func.h" -#include "signal_func.h" #include "company_func.h" -#include "settings_type.h" #include "newgrf_station.h" #include "oldpool_func.h" #include "viewport_func.h" -#include "pbs.h" #include "train.h" #include "table/strings.h" diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp index b4ec648ab5..906cf5c4dd 100644 --- a/src/waypoint_gui.cpp +++ b/src/waypoint_gui.cpp @@ -3,14 +3,11 @@ /** @file waypoint_gui.cpp Handling of waypoints gui. */ #include "stdafx.h" -#include "openttd.h" #include "window_gui.h" #include "gui.h" #include "textbuf_gui.h" #include "vehicle_gui.h" -#include "waypoint.h" #include "viewport_func.h" -#include "string_func.h" #include "strings_func.h" #include "gfx_func.h" #include "command_func.h" diff --git a/src/widget.cpp b/src/widget.cpp index 0e07870436..dfab0c9b34 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -3,13 +3,9 @@ /** @file widget.cpp Handling of the default/simple widgets. */ #include "stdafx.h" -#include "openttd.h" -#include "core/math_func.hpp" #include "company_func.h" #include "gfx_func.h" #include "window_gui.h" -#include "window_func.h" -#include "widgets/dropdown_func.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp index 63f1129ee5..083f31f38f 100644 --- a/src/widgets/dropdown.cpp +++ b/src/widgets/dropdown.cpp @@ -3,17 +3,13 @@ /** @file dropdown.cpp Implementation of the dropdown widget. */ #include "../stdafx.h" -#include "../openttd.h" -#include "../strings_type.h" #include "../window_gui.h" #include "../strings_func.h" #include "../gfx_func.h" #include "../window_func.h" #include "../core/math_func.hpp" #include "dropdown_type.h" -#include "dropdown_func.h" -#include "../table/sprites.h" #include "table/strings.h" void DropDownListItem::Draw(int x, int y, uint width, uint height, bool sel, int bg_colour) const diff --git a/src/window.cpp b/src/window.cpp index 5ee2e1bf3c..50d93117a5 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -5,7 +5,6 @@ #include "stdafx.h" #include #include "openttd.h" -#include "debug.h" #include "company_func.h" #include "gfx_func.h" #include "console_func.h" @@ -14,13 +13,11 @@ #include "variables.h" #include "genworld.h" #include "blitter/factory.hpp" -#include "window_gui.h" #include "zoom_func.h" -#include "core/alloc_func.hpp" #include "map_func.h" #include "vehicle_base.h" #include "settings_type.h" -#include "cheat_func.h" +#include "cheat_type.h" #include "window_func.h" #include "tilehighlight_func.h" #include "network/network.h" diff --git a/src/yapf/yapf_rail.cpp b/src/yapf/yapf_rail.cpp index f4988764c4..50a33b68b2 100644 --- a/src/yapf/yapf_rail.cpp +++ b/src/yapf/yapf_rail.cpp @@ -9,7 +9,6 @@ #include "yapf_costrail.hpp" #include "yapf_destrail.hpp" #include "../vehicle_func.h" -#include "../pbs.h" #include "../functions.h" #define DEBUG_YAPF_CACHE 0