# HG changeset patch # User rubidium # Date 1263573675 0 # Node ID a899d4e5ee1a01a2d8269a9f05724dac75bec608 # Parent 40b920f51dd756f57247492247884b666d2ead0d (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header diff --git a/src/ai/ai_config.hpp b/src/ai/ai_config.hpp --- a/src/ai/ai_config.hpp +++ b/src/ai/ai_config.hpp @@ -15,6 +15,7 @@ #include #include "ai_info.hpp" #include "../core/string_compare_type.hpp" +#include "../company_type.h" class AIConfig { private: diff --git a/src/ai/ai_core.cpp b/src/ai/ai_core.cpp --- a/src/ai/ai_core.cpp +++ b/src/ai/ai_core.cpp @@ -17,7 +17,6 @@ #include "../network/network.h" #include "../window_func.h" #include "../command_func.h" -#include "ai.hpp" #include "ai_scanner.hpp" #include "ai_instance.hpp" #include "ai_config.hpp" diff --git a/src/ai/ai_gui.hpp b/src/ai/ai_gui.hpp --- a/src/ai/ai_gui.hpp +++ b/src/ai/ai_gui.hpp @@ -12,6 +12,8 @@ #ifndef AI_GUI_HPP #define AI_GUI_HPP +#include "../company_type.h" + void ShowAIDebugWindow(CompanyID show_company = INVALID_COMPANY); void ShowAIConfigWindow(); diff --git a/src/ai/ai_info.cpp b/src/ai/ai_info.cpp --- a/src/ai/ai_info.cpp +++ b/src/ai/ai_info.cpp @@ -14,7 +14,6 @@ #include #include "../script/squirrel.hpp" #include "../script/squirrel_helper.hpp" -#include "ai.hpp" #include "ai_info.hpp" #include "ai_scanner.hpp" #include "../settings_type.h" diff --git a/src/ai/ai_instance.cpp b/src/ai/ai_instance.cpp --- a/src/ai/ai_instance.cpp +++ b/src/ai/ai_instance.cpp @@ -11,10 +11,8 @@ #include "../stdafx.h" #include "../debug.h" -#include "../vehicle_base.h" #include "../saveload/saveload.h" #include "../gui.h" -#include "table/strings.h" #include #include "../script/squirrel.hpp" @@ -79,6 +77,7 @@ #include "api/ai_waypoint.hpp.sq" #include "api/ai_waypointlist.hpp.sq" +#include "../company_base.h" #include "../fileio_func.h" AIStorage::~AIStorage() diff --git a/src/ai/ai_instance.hpp b/src/ai/ai_instance.hpp --- a/src/ai/ai_instance.hpp +++ b/src/ai/ai_instance.hpp @@ -12,6 +12,8 @@ #ifndef AI_INSTANCE_HPP #define AI_INSTANCE_HPP +#include + /** * The callback function when an AI suspends. */ diff --git a/src/ai/ai_scanner.cpp b/src/ai/ai_scanner.cpp --- a/src/ai/ai_scanner.cpp +++ b/src/ai/ai_scanner.cpp @@ -19,7 +19,6 @@ #include "../script/squirrel.hpp" #include "../script/squirrel_helper.hpp" #include "../script/squirrel_class.hpp" -#include "ai.hpp" #include "ai_info.hpp" #include "ai_scanner.hpp" #include "api/ai_controller.hpp" diff --git a/src/ai/ai_scanner.hpp b/src/ai/ai_scanner.hpp --- a/src/ai/ai_scanner.hpp +++ b/src/ai/ai_scanner.hpp @@ -12,8 +12,10 @@ #ifndef AI_SCANNER_HPP #define AI_SCANNER_HPP +#include #include "../script/script_scanner.hpp" #include "../core/string_compare_type.hpp" +#include "ai.hpp" #include class AIScanner : public ScriptScanner { diff --git a/src/ai/ai_storage.hpp b/src/ai/ai_storage.hpp --- a/src/ai/ai_storage.hpp +++ b/src/ai/ai_storage.hpp @@ -19,8 +19,10 @@ #include "../signs_func.h" #include "../tunnelbridge.h" #include "../vehicle_func.h" +#include "../road_type.h" #include "../group.h" +#include "table/strings.h" #include /** diff --git a/src/ai/api/ai_abstractlist.cpp b/src/ai/api/ai_abstractlist.cpp --- a/src/ai/api/ai_abstractlist.cpp +++ b/src/ai/api/ai_abstractlist.cpp @@ -9,7 +9,6 @@ /** @file ai_abstractlist.cpp Implementation of AIAbstractList. */ -#include #include "ai_abstractlist.hpp" #include "../../debug.h" #include "../../script/squirrel.hpp" diff --git a/src/ai/api/ai_controller.cpp b/src/ai/api/ai_controller.cpp --- a/src/ai/api/ai_controller.cpp +++ b/src/ai/api/ai_controller.cpp @@ -13,9 +13,7 @@ #include "../../string_func.h" #include "../../company_base.h" #include "../../rev.h" -#include "table/strings.h" -#include "../ai.hpp" #include "ai_controller.hpp" #include "../ai_storage.hpp" #include "../ai_instance.hpp" diff --git a/src/ai/api/ai_engine.cpp b/src/ai/api/ai_engine.cpp --- a/src/ai/api/ai_engine.cpp +++ b/src/ai/api/ai_engine.cpp @@ -14,7 +14,6 @@ #include "../../company_func.h" #include "../../company_base.h" #include "../../strings_func.h" -#include "../../settings_type.h" #include "../../rail.h" #include "../../engine_base.h" #include "../../articulated_vehicles.h" diff --git a/src/ai/api/ai_execmode.cpp b/src/ai/api/ai_execmode.cpp --- a/src/ai/api/ai_execmode.cpp +++ b/src/ai/api/ai_execmode.cpp @@ -10,7 +10,6 @@ /** @file ai_execmode.cpp Implementation of AIExecMode. */ #include "ai_execmode.hpp" -#include "../../command_type.h" #include "../../company_base.h" #include "../../company_func.h" #include "../ai_instance.hpp" diff --git a/src/ai/api/ai_group.cpp b/src/ai/api/ai_group.cpp --- a/src/ai/api/ai_group.cpp +++ b/src/ai/api/ai_group.cpp @@ -16,7 +16,6 @@ #include "../../group.h" #include "../../string_func.h" #include "../../strings_func.h" -#include "../../command_func.h" #include "../../autoreplace_func.h" #include "../../settings_func.h" #include "table/strings.h" diff --git a/src/ai/api/ai_industrytype.cpp b/src/ai/api/ai_industrytype.cpp --- a/src/ai/api/ai_industrytype.cpp +++ b/src/ai/api/ai_industrytype.cpp @@ -14,6 +14,7 @@ #include "../../command_type.h" #include "../../strings_func.h" #include "../../industry.h" +#include "../../core/random_func.hpp" /* static */ bool AIIndustryType::IsValidIndustryType(IndustryType industry_type) { diff --git a/src/ai/api/ai_list.cpp b/src/ai/api/ai_list.cpp --- a/src/ai/api/ai_list.cpp +++ b/src/ai/api/ai_list.cpp @@ -9,7 +9,6 @@ /** @file ai_list.cpp Implementation of AIList. */ -#include #include "ai_list.hpp" void AIList::AddItem(int32 item, int32 value) diff --git a/src/ai/api/ai_map.cpp b/src/ai/api/ai_map.cpp --- a/src/ai/api/ai_map.cpp +++ b/src/ai/api/ai_map.cpp @@ -9,7 +9,6 @@ /** @file ai_map.cpp Implementation of AIMap. */ -#include "../../stdafx.h" #include "ai_map.hpp" #include "../../tile_map.h" diff --git a/src/ai/api/ai_object.cpp b/src/ai/api/ai_object.cpp --- a/src/ai/api/ai_object.cpp +++ b/src/ai/api/ai_object.cpp @@ -14,8 +14,6 @@ #include "../../script/squirrel.hpp" #include "../../company_base.h" -#include "table/strings.h" -#include "../ai.hpp" #include "../ai_storage.hpp" #include "../ai_instance.hpp" #include "ai_error.hpp" diff --git a/src/ai/api/ai_rail.cpp b/src/ai/api/ai_rail.cpp --- a/src/ai/api/ai_rail.cpp +++ b/src/ai/api/ai_rail.cpp @@ -16,6 +16,7 @@ #include "../../debug.h" #include "../../station_base.h" #include "../../company_func.h" +#include "../../newgrf.h" #include "../../newgrf_generic.h" #include "../../newgrf_station.h" diff --git a/src/ai/api/ai_road.cpp b/src/ai/api/ai_road.cpp --- a/src/ai/api/ai_road.cpp +++ b/src/ai/api/ai_road.cpp @@ -9,7 +9,6 @@ /** @file ai_road.cpp Implementation of AIRoad. */ -#include "../../stdafx.h" #include "ai_map.hpp" #include "ai_station.hpp" #include "ai_cargo.hpp" diff --git a/src/ai/api/ai_station.cpp b/src/ai/api/ai_station.cpp --- a/src/ai/api/ai_station.cpp +++ b/src/ai/api/ai_station.cpp @@ -9,7 +9,6 @@ /** @file ai_station.cpp Implementation of AIStation. */ -#include "../../stdafx.h" #include "ai_station.hpp" #include "ai_cargo.hpp" #include "ai_map.hpp" diff --git a/src/ai/api/ai_testmode.cpp b/src/ai/api/ai_testmode.cpp --- a/src/ai/api/ai_testmode.cpp +++ b/src/ai/api/ai_testmode.cpp @@ -10,7 +10,6 @@ /** @file ai_testmode.cpp Implementation of AITestMode. */ #include "ai_testmode.hpp" -#include "../../command_type.h" #include "../../company_base.h" #include "../../company_func.h" #include "../ai_instance.hpp" diff --git a/src/ai/api/ai_tile.cpp b/src/ai/api/ai_tile.cpp --- a/src/ai/api/ai_tile.cpp +++ b/src/ai/api/ai_tile.cpp @@ -14,7 +14,6 @@ #include "ai_town.hpp" #include "../../station_func.h" #include "../../company_func.h" -#include "../../road_map.h" #include "../../water_map.h" #include "../../clear_map.h" #include "../../tree_map.h" diff --git a/src/ai/api/ai_vehicle.cpp b/src/ai/api/ai_vehicle.cpp --- a/src/ai/api/ai_vehicle.cpp +++ b/src/ai/api/ai_vehicle.cpp @@ -22,6 +22,7 @@ #include "../../roadveh.h" #include "../../train.h" #include "../../vehicle_func.h" +#include "../../engine_base.h" #include "table/strings.h" /* static */ bool AIVehicle::IsValidVehicle(VehicleID vehicle_id) diff --git a/src/aircraft.h b/src/aircraft.h --- a/src/aircraft.h +++ b/src/aircraft.h @@ -14,8 +14,6 @@ #include "station_map.h" #include "vehicle_base.h" -#include "engine_func.h" -#include "engine_base.h" struct Aircraft; diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -27,14 +27,15 @@ #include "sound_func.h" #include "functions.h" #include "cheat_type.h" -#include "autoreplace_func.h" +#include "company_base.h" #include "autoreplace_gui.h" -#include "gfx_func.h" #include "ai/ai.hpp" #include "company_func.h" #include "effectvehicle_func.h" #include "station_base.h" -#include "cargotype.h" +#include "engine_base.h" +#include "engine_func.h" +#include "core/random_func.hpp" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/aircraft_gui.cpp b/src/aircraft_gui.cpp --- a/src/aircraft_gui.cpp +++ b/src/aircraft_gui.cpp @@ -15,7 +15,6 @@ #include "newgrf_engine.h" #include "strings_func.h" #include "vehicle_func.h" -#include "gfx_func.h" #include "window_gui.h" #include "spritecache.h" diff --git a/src/airport.h b/src/airport.h --- a/src/airport.h +++ b/src/airport.h @@ -14,7 +14,6 @@ #include "direction_type.h" #include "map_type.h" -#include "tile_type.h" #include "date_type.h" /** Current limits for airports */ diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp --- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -22,6 +22,7 @@ #include "company_func.h" #include "tilehighlight_func.h" #include "company_base.h" +#include "station_type.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/articulated_vehicles.cpp b/src/articulated_vehicles.cpp --- a/src/articulated_vehicles.cpp +++ b/src/articulated_vehicles.cpp @@ -14,6 +14,8 @@ #include "roadveh.h" #include "newgrf_engine.h" #include "vehicle_func.h" +#include "engine_base.h" +#include "engine_func.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/autoreplace_base.h b/src/autoreplace_base.h --- a/src/autoreplace_base.h +++ b/src/autoreplace_base.h @@ -14,6 +14,8 @@ #include "core/pool_type.hpp" #include "autoreplace_type.h" +#include "engine_type.h" +#include "group_type.h" typedef uint16 EngineRenewID; diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -20,6 +20,7 @@ #include "functions.h" #include "autoreplace_func.h" #include "articulated_vehicles.h" +#include "core/random_func.hpp" #include "table/strings.h" diff --git a/src/autoreplace_func.h b/src/autoreplace_func.h --- a/src/autoreplace_func.h +++ b/src/autoreplace_func.h @@ -12,8 +12,10 @@ #ifndef AUTOREPLACE_FUNC_H #define AUTOREPLACE_FUNC_H -#include "autoreplace_type.h" +#include "command_type.h" #include "company_base.h" +#include "engine_type.h" +#include "group_type.h" /** * Remove all engine replacement settings for the company. diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -18,13 +18,13 @@ #include "strings_func.h" #include "window_func.h" #include "autoreplace_func.h" -#include "gfx_func.h" #include "company_func.h" #include "widgets/dropdown_type.h" #include "engine_base.h" #include "window_gui.h" #include "engine_gui.h" #include "settings_func.h" +#include "core/geometry_func.hpp" #include "table/strings.h" diff --git a/src/autoreplace_gui.h b/src/autoreplace_gui.h --- a/src/autoreplace_gui.h +++ b/src/autoreplace_gui.h @@ -12,6 +12,8 @@ #ifndef AUTOREPLACE_GUI_H #define AUTOREPLACE_GUI_H +#include "engine_type.h" +#include "group_type.h" #include "vehicle_type.h" /** diff --git a/src/autoslope.h b/src/autoslope.h --- a/src/autoslope.h +++ b/src/autoslope.h @@ -12,10 +12,11 @@ #ifndef AUTOSLOPE_H #define AUTOSLOPE_H -#include "settings_type.h" #include "company_func.h" #include "depot_func.h" #include "slope_func.h" +#include "tile_map.h" +#include "openttd.h" /** * Autoslope check for tiles with an entrance on an edge. diff --git a/src/base_media_func.h b/src/base_media_func.h --- a/src/base_media_func.h +++ b/src/base_media_func.h @@ -10,8 +10,9 @@ /** @file base_media_func.h Generic function implementations for base data (graphics, sounds). */ #include "base_media_base.h" +#include "debug.h" +#include "ini_type.h" #include "string_func.h" -#include "ini_type.h" template /* static */ const char *BaseMedia::ini_set; template /* static */ const Tbase_set *BaseMedia::used_set; diff --git a/src/base_station_base.h b/src/base_station_base.h --- a/src/base_station_base.h +++ b/src/base_station_base.h @@ -12,12 +12,7 @@ #ifndef BASE_STATION_BASE_H #define BASE_STATION_BASE_H -#include "station_type.h" #include "core/pool_type.hpp" -#include "town_type.h" -#include "strings_type.h" -#include "date_type.h" -#include "company_type.h" #include "viewport_type.h" #include "station_map.h" diff --git a/src/blitter/32bpp_anim.cpp b/src/blitter/32bpp_anim.cpp --- a/src/blitter/32bpp_anim.cpp +++ b/src/blitter/32bpp_anim.cpp @@ -11,7 +11,6 @@ #include "../stdafx.h" #include "../core/math_func.hpp" -#include "../gfx_func.h" #include "../video/video_driver.hpp" #include "32bpp_anim.hpp" diff --git a/src/blitter/32bpp_anim.hpp b/src/blitter/32bpp_anim.hpp --- a/src/blitter/32bpp_anim.hpp +++ b/src/blitter/32bpp_anim.hpp @@ -13,7 +13,6 @@ #define BLITTER_32BPP_ANIM_HPP #include "32bpp_optimized.hpp" -#include "factory.hpp" class Blitter_32bppAnim : public Blitter_32bppOptimized { private: diff --git a/src/blitter/32bpp_base.cpp b/src/blitter/32bpp_base.cpp --- a/src/blitter/32bpp_base.cpp +++ b/src/blitter/32bpp_base.cpp @@ -10,7 +10,6 @@ /** @file 32bpp_base.cpp Implementation of base for 32 bpp blitters. */ #include "../stdafx.h" -#include "../gfx_func.h" #include "32bpp_base.hpp" void *Blitter_32bppBase::MoveTo(const void *video, int x, int y) diff --git a/src/blitter/32bpp_base.hpp b/src/blitter/32bpp_base.hpp --- a/src/blitter/32bpp_base.hpp +++ b/src/blitter/32bpp_base.hpp @@ -14,6 +14,7 @@ #include "base.hpp" #include "../core/bitmath_func.hpp" +#include "../gfx_func.h" class Blitter_32bppBase : public Blitter { public: diff --git a/src/blitter/32bpp_optimized.cpp b/src/blitter/32bpp_optimized.cpp --- a/src/blitter/32bpp_optimized.cpp +++ b/src/blitter/32bpp_optimized.cpp @@ -11,7 +11,6 @@ #include "../stdafx.h" #include "../zoom_func.h" -#include "../gfx_func.h" #include "../core/math_func.hpp" #include "32bpp_optimized.hpp" diff --git a/src/blitter/32bpp_simple.cpp b/src/blitter/32bpp_simple.cpp --- a/src/blitter/32bpp_simple.cpp +++ b/src/blitter/32bpp_simple.cpp @@ -10,7 +10,6 @@ /** @file 32bpp_simple.cpp Implementation of the simple 32 bpp blitter. */ #include "../stdafx.h" -#include "../gfx_func.h" #include "../zoom_func.h" #include "32bpp_simple.hpp" diff --git a/src/blitter/base.hpp b/src/blitter/base.hpp --- a/src/blitter/base.hpp +++ b/src/blitter/base.hpp @@ -14,7 +14,6 @@ #include "../spritecache.h" #include "../spriteloader/spriteloader.hpp" -#include "../zoom_type.h" enum BlitterMode { BM_NORMAL, diff --git a/src/bridge.h b/src/bridge.h --- a/src/bridge.h +++ b/src/bridge.h @@ -13,7 +13,6 @@ #define BRIDGE_H #include "gfx_type.h" -#include "direction_type.h" #include "tile_cmd.h" /** This enum is related to the definition of bridge pieces, diff --git a/src/bridge_gui.cpp b/src/bridge_gui.cpp --- a/src/bridge_gui.cpp +++ b/src/bridge_gui.cpp @@ -11,7 +11,6 @@ #include "stdafx.h" #include "gui.h" -#include "window_gui.h" #include "command_func.h" #include "economy_func.h" #include "bridge.h" @@ -22,6 +21,7 @@ #include "tunnelbridge.h" #include "sortlist_type.h" #include "widgets/dropdown_func.h" +#include "core/geometry_func.hpp" #include "table/strings.h" diff --git a/src/bridge_map.h b/src/bridge_map.h --- a/src/bridge_map.h +++ b/src/bridge_map.h @@ -12,9 +12,6 @@ #ifndef BRIDGE_MAP_H #define BRIDGE_MAP_H -#include "direction_func.h" -#include "rail_type.h" -#include "transport_type.h" #include "road_map.h" #include "bridge.h" diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -9,10 +9,9 @@ /** @file build_vehicle_gui.cpp GUI for building vehicles. */ -#include "train.h" -#include "roadveh.h" -#include "ship.h" -#include "aircraft.h" +#include "stdafx.h" +#include "engine_base.h" +#include "engine_func.h" #include "station_base.h" #include "articulated_vehicles.h" #include "textbuf_gui.h" @@ -26,9 +25,7 @@ #include "window_func.h" #include "date_func.h" #include "vehicle_func.h" -#include "gfx_func.h" #include "widgets/dropdown_func.h" -#include "window_gui.h" #include "engine_gui.h" #include "cargotype.h" diff --git a/src/cargopacket.h b/src/cargopacket.h --- a/src/cargopacket.h +++ b/src/cargopacket.h @@ -14,7 +14,6 @@ #include "core/pool_type.hpp" #include "economy_type.h" -#include "tile_type.h" #include "station_type.h" #include "cargo_type.h" #include "vehicle_type.h" diff --git a/src/clear_cmd.cpp b/src/clear_cmd.cpp --- a/src/clear_cmd.cpp +++ b/src/clear_cmd.cpp @@ -21,6 +21,7 @@ #include "economy_func.h" #include "viewport_func.h" #include "water.h" +#include "core/random_func.hpp" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/company_base.h b/src/company_base.h --- a/src/company_base.h +++ b/src/company_base.h @@ -12,12 +12,9 @@ #ifndef COMPANY_BASE_H #define COMPANY_BASE_H -#include "company_type.h" #include "core/pool_type.hpp" #include "road_type.h" #include "rail_type.h" -#include "date_type.h" -#include "engine_type.h" #include "livery.h" #include "autoreplace_type.h" #include "economy_type.h" diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -34,6 +34,7 @@ #include "settings_func.h" #include "vehicle_base.h" #include "vehicle_func.h" +#include "sprite.h" #include "table/strings.h" diff --git a/src/company_func.h b/src/company_func.h --- a/src/company_func.h +++ b/src/company_func.h @@ -12,10 +12,8 @@ #ifndef COMPANY_FUNC_H #define COMPANY_FUNC_H -#include "core/math_func.hpp" #include "company_type.h" #include "tile_type.h" -#include "strings_type.h" #include "gfx_type.h" void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner); diff --git a/src/company_gui.cpp b/src/company_gui.cpp --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -14,7 +14,6 @@ #include "window_gui.h" #include "textbuf_gui.h" #include "viewport_func.h" -#include "gfx_func.h" #include "company_func.h" #include "command_func.h" #include "network/network.h" @@ -28,6 +27,9 @@ #include "date_func.h" #include "widgets/dropdown_type.h" #include "tilehighlight_func.h" +#include "sprite.h" +#include "company_base.h" +#include "core/geometry_func.hpp" #include "table/strings.h" diff --git a/src/console.cpp b/src/console.cpp --- a/src/console.cpp +++ b/src/console.cpp @@ -14,6 +14,7 @@ #include "network/network.h" #include "network/network_func.h" #include "debug.h" +#include "console_func.h" #include diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -34,6 +34,7 @@ #include "gamelog.h" #include "ai/ai.hpp" #include "ai/ai_config.hpp" +#include "console_func.h" #ifdef ENABLE_NETWORK #include "table/strings.h" diff --git a/src/console_gui.cpp b/src/console_gui.cpp --- a/src/console_gui.cpp +++ b/src/console_gui.cpp @@ -18,6 +18,7 @@ #include "string_func.h" #include "gfx_func.h" #include "settings_type.h" +#include "console_func.h" #include "rev.h" diff --git a/src/console_internal.h b/src/console_internal.h --- a/src/console_internal.h +++ b/src/console_internal.h @@ -12,7 +12,7 @@ #ifndef CONSOLE_INTERNAL_H #define CONSOLE_INTERNAL_H -#include "console_func.h" +#include "console_type.h" enum { ICON_CMDLN_SIZE = 1024, ///< maximum length of a typed in command diff --git a/src/core/mem_func.hpp b/src/core/mem_func.hpp --- a/src/core/mem_func.hpp +++ b/src/core/mem_func.hpp @@ -12,7 +12,6 @@ #ifndef MEM_FUNC_HPP #define MEM_FUNC_HPP -#include #include "math_func.hpp" /** diff --git a/src/core/sort_func.hpp b/src/core/sort_func.hpp --- a/src/core/sort_func.hpp +++ b/src/core/sort_func.hpp @@ -12,8 +12,6 @@ #ifndef SORT_FUNC_HPP #define SORT_FUNC_HPP -#include -#include "math_func.hpp" #include "mem_func.hpp" /** diff --git a/src/crashlog.cpp b/src/crashlog.cpp --- a/src/crashlog.cpp +++ b/src/crashlog.cpp @@ -26,12 +26,10 @@ #include "gfx_func.h" #include "network/network.h" -#include #include "ai/ai_info.hpp" #include "company_base.h" #include "company_func.h" -#include /* static */ const char *CrashLog::message = NULL; /* static */ char *CrashLog::gamelog_buffer = NULL; diff --git a/src/date_gui.cpp b/src/date_gui.cpp --- a/src/date_gui.cpp +++ b/src/date_gui.cpp @@ -12,10 +12,10 @@ #include "stdafx.h" #include "strings_func.h" #include "date_func.h" -#include "gfx_func.h" #include "window_func.h" #include "window_gui.h" #include "date_gui.h" +#include "core/geometry_func.hpp" #include "widgets/dropdown_type.h" diff --git a/src/date_gui.h b/src/date_gui.h --- a/src/date_gui.h +++ b/src/date_gui.h @@ -12,6 +12,9 @@ #ifndef DATE_GUI_H #define DATE_GUI_H +#include "date_type.h" +#include "window_type.h" + /** * Callback for when a date has been chosen * @param w the window that sends the callback diff --git a/src/debug.cpp b/src/debug.cpp --- a/src/debug.cpp +++ b/src/debug.cpp @@ -14,13 +14,13 @@ #include "console_func.h" #include "debug.h" #include "string_func.h" -#include "network/core/core.h" #include "fileio_func.h" #include "settings_type.h" #include #if defined(ENABLE_NETWORK) +#include "network/core/os_abstraction.h" SOCKET _debug_socket = INVALID_SOCKET; #endif /* ENABLE_NETWORK */ diff --git a/src/depot_base.h b/src/depot_base.h --- a/src/depot_base.h +++ b/src/depot_base.h @@ -12,10 +12,8 @@ #ifndef DEPOT_BASE_H #define DEPOT_BASE_H -#include "tile_type.h" #include "depot_map.h" #include "core/pool_type.hpp" -#include "town_type.h" typedef Pool DepotPool; extern DepotPool _depot_pool; diff --git a/src/depot_func.h b/src/depot_func.h --- a/src/depot_func.h +++ b/src/depot_func.h @@ -12,7 +12,6 @@ #ifndef DEPOT_FUNC_H #define DEPOT_FUNC_H -#include "depot_type.h" #include "tile_type.h" #include "vehicle_type.h" #include "direction_type.h" diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp --- a/src/depot_gui.cpp +++ b/src/depot_gui.cpp @@ -9,6 +9,8 @@ /** @file depot_gui.cpp The GUI for depots. */ +#include "stdafx.h" +#include "engine_base.h" #include "train.h" #include "ship.h" #include "aircraft.h" @@ -16,7 +18,6 @@ #include "gui.h" #include "textbuf_gui.h" #include "viewport_func.h" -#include "gfx_func.h" #include "command_func.h" #include "depot_base.h" #include "vehicle_gui.h" diff --git a/src/depot_map.h b/src/depot_map.h --- a/src/depot_map.h +++ b/src/depot_map.h @@ -12,9 +12,6 @@ #ifndef DEPOT_MAP_H #define DEPOT_MAP_H -#include "road_map.h" -#include "rail_map.h" -#include "water_map.h" #include "station_map.h" /** diff --git a/src/disaster_cmd.cpp b/src/disaster_cmd.cpp --- a/src/disaster_cmd.cpp +++ b/src/disaster_cmd.cpp @@ -41,6 +41,8 @@ #include "effectvehicle_func.h" #include "roadveh.h" #include "ai/ai.hpp" +#include "company_base.h" +#include "core/random_func.hpp" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp --- a/src/dock_gui.cpp +++ b/src/dock_gui.cpp @@ -26,6 +26,7 @@ #include "slope_func.h" #include "tilehighlight_func.h" #include "company_base.h" +#include "station_type.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/driver.cpp b/src/driver.cpp --- a/src/driver.cpp +++ b/src/driver.cpp @@ -14,6 +14,7 @@ #include "sound/sound_driver.hpp" #include "music/music_driver.hpp" #include "video/video_driver.hpp" +#include "string_func.h" VideoDriver *_video_driver; char *_ini_videodriver; diff --git a/src/driver.h b/src/driver.h --- a/src/driver.h +++ b/src/driver.h @@ -14,7 +14,6 @@ #include "core/enum_type.hpp" #include "core/string_compare_type.hpp" -#include "string_func.h" #include const char *GetDriverParam(const char * const *parm, const char *name); diff --git a/src/economy.cpp b/src/economy.cpp --- a/src/economy.cpp +++ b/src/economy.cpp @@ -10,7 +10,6 @@ /** @file economy.cpp Handling of the economy. */ #include "stdafx.h" -#include "tile_cmd.h" #include "company_func.h" #include "command_func.h" #include "industry.h" @@ -36,7 +35,6 @@ #include "date_func.h" #include "vehicle_func.h" #include "sound_func.h" -#include "gfx_func.h" #include "autoreplace_func.h" #include "company_gui.h" #include "signs_base.h" @@ -46,6 +44,8 @@ #include "waypoint_base.h" #include "economy_base.h" #include "core/pool_func.hpp" +#include "newgrf.h" +#include "engine_base.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/economy_func.h b/src/economy_func.h --- a/src/economy_func.h +++ b/src/economy_func.h @@ -12,16 +12,11 @@ #ifndef ECONOMY_FUNC_H #define ECONOMY_FUNC_H -#include "core/geometry_type.hpp" #include "economy_type.h" +#include "station_type.h" #include "cargo_type.h" #include "vehicle_type.h" -#include "tile_type.h" -#include "town_type.h" -#include "industry_type.h" #include "company_type.h" -#include "station_type.h" -#include "station_func.h" void ResetPriceBaseMultipliers(); void SetPriceBaseMultiplier(Price price, int factor); diff --git a/src/economy_type.h b/src/economy_type.h --- a/src/economy_type.h +++ b/src/economy_type.h @@ -14,7 +14,6 @@ #include "core/overflowsafe_type.hpp" #include "core/enum_type.hpp" -#include "cargo_type.h" typedef OverflowSafeInt64 Money; diff --git a/src/effectvehicle.cpp b/src/effectvehicle.cpp --- a/src/effectvehicle.cpp +++ b/src/effectvehicle.cpp @@ -17,6 +17,7 @@ #include "sound_func.h" #include "animated_tile_func.h" #include "effectvehicle_func.h" +#include "effectvehicle_base.h" #include "table/sprites.h" diff --git a/src/effectvehicle_func.h b/src/effectvehicle_func.h --- a/src/effectvehicle_func.h +++ b/src/effectvehicle_func.h @@ -12,7 +12,7 @@ #ifndef EFFECTVEHICLE_FUNC_H #define EFFECTVEHICLE_FUNC_H -#include "effectvehicle_base.h" +#include "vehicle_type.h" /** Effect vehicle types */ enum EffectVehicleType { diff --git a/src/elrail.cpp b/src/elrail.cpp --- a/src/elrail.cpp +++ b/src/elrail.cpp @@ -54,7 +54,6 @@ */ #include "stdafx.h" -#include "openttd.h" #include "station_map.h" #include "viewport_func.h" #include "landscape.h" @@ -64,6 +63,7 @@ #include "tunnelbridge.h" #include "elrail_func.h" #include "engine_base.h" +#include "company_base.h" #include "table/sprites.h" #include "table/elrail_data.h" diff --git a/src/elrail_func.h b/src/elrail_func.h --- a/src/elrail_func.h +++ b/src/elrail_func.h @@ -13,9 +13,8 @@ #define ELRAIL_FUNC_H #include "rail.h" +#include "tile_cmd.h" #include "transparency.h" -#include "tile_cmd.h" -#include "settings_type.h" /** * Test if a rail type has catenary diff --git a/src/engine.cpp b/src/engine.cpp --- a/src/engine.cpp +++ b/src/engine.cpp @@ -18,7 +18,6 @@ #include "newgrf_engine.h" #include "group.h" #include "strings_func.h" -#include "gfx_func.h" #include "core/random_func.hpp" #include "window_func.h" #include "date_func.h" @@ -27,6 +26,9 @@ #include "ai/ai.hpp" #include "core/pool_func.hpp" #include "engine_gui.h" +#include "engine_func.h" +#include "engine_base.h" +#include "company_base.h" #include "table/strings.h" #include "table/engines.h" diff --git a/src/engine_base.h b/src/engine_base.h --- a/src/engine_base.h +++ b/src/engine_base.h @@ -12,8 +12,9 @@ #ifndef ENGINE_BASE_H #define ENGINE_BASE_H +#include "company_type.h" #include "engine_type.h" -#include "economy_type.h" +#include "vehicle_type.h" #include "core/pool_type.hpp" #include "core/smallvec_type.hpp" diff --git a/src/engine_func.h b/src/engine_func.h --- a/src/engine_func.h +++ b/src/engine_func.h @@ -13,6 +13,8 @@ #define ENGINE_H #include "engine_type.h" +#include "vehicle_type.h" +#include "company_type.h" void SetupEngines(); void StartupEngines(); diff --git a/src/engine_gui.h b/src/engine_gui.h --- a/src/engine_gui.h +++ b/src/engine_gui.h @@ -12,7 +12,9 @@ #ifndef ENGINE_GUI_H #define ENGINE_GUI_H +#include "engine_type.h" #include "sortlist_type.h" +#include "gfx_type.h" typedef GUIList GUIEngineList; diff --git a/src/engine_type.h b/src/engine_type.h --- a/src/engine_type.h +++ b/src/engine_type.h @@ -15,11 +15,8 @@ #include "economy_type.h" #include "rail_type.h" #include "cargo_type.h" -#include "vehicle_type.h" -#include "gfx_type.h" #include "date_type.h" #include "sound_type.h" -#include "company_type.h" #include "strings_type.h" typedef uint16 EngineID; diff --git a/src/fontcache.h b/src/fontcache.h --- a/src/fontcache.h +++ b/src/fontcache.h @@ -12,7 +12,6 @@ #ifndef FONTCACHE_H #define FONTCACHE_H -#include "gfx_type.h" #include "spritecache.h" /** Get the SpriteID mapped to the given font size and key */ diff --git a/src/functions.h b/src/functions.h --- a/src/functions.h +++ b/src/functions.h @@ -12,8 +12,6 @@ #ifndef FUNCTIONS_H #define FUNCTIONS_H -#include "core/random_func.hpp" -#include "command_type.h" #include "tile_cmd.h" /* clear_land.cpp */ diff --git a/src/gamelog.cpp b/src/gamelog.cpp --- a/src/gamelog.cpp +++ b/src/gamelog.cpp @@ -16,7 +16,6 @@ #include "variables.h" #include "string_func.h" #include "settings_type.h" -#include "gamelog.h" #include "gamelog_internal.h" #include "console_func.h" #include "debug.h" diff --git a/src/gamelog_internal.h b/src/gamelog_internal.h --- a/src/gamelog_internal.h +++ b/src/gamelog_internal.h @@ -13,6 +13,7 @@ #define GAMELOG_INTERNAL_H #include "network/core/config.h" +#include "gamelog.h" /** Type of logged change */ enum GamelogChangeType { diff --git a/src/genworld.cpp b/src/genworld.cpp --- a/src/genworld.cpp +++ b/src/genworld.cpp @@ -33,6 +33,7 @@ #include "void_map.h" #include "town.h" #include "newgrf.h" +#include "core/random_func.hpp" #include "table/sprites.h" diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -23,7 +23,6 @@ #include "sound_func.h" #include "fios.h" #include "string_func.h" -#include "gfx_func.h" #include "widgets/dropdown_type.h" #include "widgets/dropdown_func.h" #include "landscape_type.h" @@ -31,6 +30,8 @@ #include "town.h" #include "thread/thread.h" #include "settings_func.h" +#include "core/geometry_func.hpp" +#include "core/random_func.hpp" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/gfx_type.h b/src/gfx_type.h --- a/src/gfx_type.h +++ b/src/gfx_type.h @@ -13,7 +13,6 @@ #define GFX_TYPE_H #include "core/endian_type.hpp" -#include "core/enum_type.hpp" #include "core/geometry_type.hpp" #include "zoom_type.h" diff --git a/src/gfxinit.cpp b/src/gfxinit.cpp --- a/src/gfxinit.cpp +++ b/src/gfxinit.cpp @@ -10,7 +10,6 @@ /** @file gfxinit.cpp Initializing of the (GRF) graphics. */ #include "stdafx.h" -#include "debug.h" #include "fios.h" #include "newgrf.h" #include "3rdparty/md5/md5.h" diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -22,6 +22,7 @@ #include "date_func.h" #include "gfx_func.h" #include "sortlist_type.h" +#include "core/geometry_func.hpp" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/group_gui.cpp b/src/group_gui.cpp --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -11,7 +11,6 @@ #include "stdafx.h" #include "openttd.h" -#include "window_gui.h" #include "textbuf_gui.h" #include "command_func.h" #include "vehicle_gui.h" @@ -21,12 +20,13 @@ #include "window_func.h" #include "vehicle_func.h" #include "autoreplace_gui.h" -#include "gfx_func.h" #include "company_func.h" #include "widgets/dropdown_type.h" #include "widgets/dropdown_func.h" #include "tilehighlight_func.h" #include "vehicle_gui_base.h" +#include "core/geometry_func.hpp" +#include "company_base.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/group_gui.h b/src/group_gui.h --- a/src/group_gui.h +++ b/src/group_gui.h @@ -12,6 +12,7 @@ #ifndef GROUP_GUI_H #define GROUP_GUI_H +#include "company_type.h" #include "vehicle_type.h" void ShowCompanyGroup(CompanyID company, VehicleType veh); diff --git a/src/gui.h b/src/gui.h --- a/src/gui.h +++ b/src/gui.h @@ -12,7 +12,6 @@ #ifndef GUI_H #define GUI_H -#include "window_type.h" #include "vehicle_type.h" #include "gfx_type.h" #include "economy_type.h" diff --git a/src/highscore.cpp b/src/highscore.cpp --- a/src/highscore.cpp +++ b/src/highscore.cpp @@ -9,6 +9,7 @@ /** @file highscore.cpp Definition of functions used for highscore handling */ +#include "stdafx.h" #include "highscore.h" #include "company_base.h" #include "company_func.h" diff --git a/src/highscore.h b/src/highscore.h --- a/src/highscore.h +++ b/src/highscore.h @@ -12,9 +12,7 @@ #ifndef HIGHSCORE_H #define HIGHSCORE_H -#include "stdafx.h" #include "strings_type.h" -#include "core/math_func.hpp" #include "company_type.h" struct HighScore { diff --git a/src/highscore_gui.cpp b/src/highscore_gui.cpp --- a/src/highscore_gui.cpp +++ b/src/highscore_gui.cpp @@ -9,6 +9,7 @@ /** @file highscore_gui.cpp Definition of the HighScore and EndGame windows */ +#include "stdafx.h" #include "highscore.h" #include "table/strings.h" #include "gfx_func.h" diff --git a/src/industry.h b/src/industry.h --- a/src/industry.h +++ b/src/industry.h @@ -13,13 +13,7 @@ #define INDUSTRY_H #include "core/pool_type.hpp" -#include "core/random_func.hpp" #include "newgrf_storage.h" -#include "cargo_type.h" -#include "economy_type.h" -#include "map_type.h" -#include "industry_type.h" -#include "tile_type.h" #include "subsidy_type.h" #include "industry_map.h" #include "tilearea_type.h" diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -10,7 +10,6 @@ /** @file industry_cmd.cpp Handling of industry tiles. */ #include "stdafx.h" -#include "openttd.h" #include "clear_map.h" #include "industry.h" #include "station_base.h" @@ -30,7 +29,6 @@ #include "newgrf_industries.h" #include "newgrf_industrytiles.h" #include "autoslope.h" -#include "transparency.h" #include "water.h" #include "strings_func.h" #include "functions.h" @@ -40,6 +38,7 @@ #include "sound_func.h" #include "animated_tile_func.h" #include "effectvehicle_func.h" +#include "effectvehicle_base.h" #include "ai/ai.hpp" #include "core/pool_func.hpp" #include "subsidy_func.h" diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -12,7 +12,6 @@ #include "stdafx.h" #include "openttd.h" #include "gui.h" -#include "window_gui.h" #include "textbuf_gui.h" #include "command_func.h" #include "viewport_func.h" @@ -31,6 +30,8 @@ #include "sortlist_type.h" #include "widgets/dropdown_func.h" #include "company_base.h" +#include "core/geometry_func.hpp" +#include "core/random_func.hpp" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/industry_map.h b/src/industry_map.h --- a/src/industry_map.h +++ b/src/industry_map.h @@ -13,7 +13,6 @@ #define INDUSTRY_MAP_H #include "industrytype.h" -#include "tile_map.h" #include "water_map.h" diff --git a/src/industrytype.h b/src/industrytype.h --- a/src/industrytype.h +++ b/src/industrytype.h @@ -12,13 +12,13 @@ #ifndef INDUSTRYTYPE_H #define INDUSTRYTYPE_H -#include "core/enum_type.hpp" #include "economy_type.h" #include "map_type.h" #include "slope_type.h" #include "industry_type.h" #include "landscape_type.h" -#include "tile_type.h" +#include "strings_type.h" +#include "cargo_type.h" enum { CLEAN_RANDOMSOUNDS, ///< Free the dynamically allocated sounds table diff --git a/src/intro_gui.cpp b/src/intro_gui.cpp --- a/src/intro_gui.cpp +++ b/src/intro_gui.cpp @@ -25,6 +25,7 @@ #include "functions.h" #include "ai/ai_gui.hpp" #include "gfx_func.h" +#include "core/geometry_func.hpp" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/landscape.cpp b/src/landscape.cpp --- a/src/landscape.cpp +++ b/src/landscape.cpp @@ -29,6 +29,7 @@ #include "effectvehicle_func.h" #include "landscape_type.h" #include "animated_tile_func.h" +#include "core/random_func.hpp" #include "table/sprites.h" diff --git a/src/landscape.h b/src/landscape.h --- a/src/landscape.h +++ b/src/landscape.h @@ -14,8 +14,6 @@ #include "core/geometry_type.hpp" #include "tile_cmd.h" -#include "slope_type.h" -#include "direction_type.h" enum { SNOW_LINE_MONTHS = 12, ///< Number of months in the snow line table. diff --git a/src/main_gui.cpp b/src/main_gui.cpp --- a/src/main_gui.cpp +++ b/src/main_gui.cpp @@ -10,7 +10,6 @@ /** @file main_gui.cpp Handling of the main viewport. */ #include "stdafx.h" -#include "openttd.h" #include "currency.h" #include "spritecache.h" #include "window_gui.h" diff --git a/src/misc/array.hpp b/src/misc/array.hpp --- a/src/misc/array.hpp +++ b/src/misc/array.hpp @@ -13,6 +13,7 @@ #define ARRAY_HPP #include "fixedsizearray.hpp" +#include "str.hpp" /** Flexible array with size limit. Implemented as fixed size * array of fixed size arrays */ diff --git a/src/misc/blob.hpp b/src/misc/blob.hpp --- a/src/misc/blob.hpp +++ b/src/misc/blob.hpp @@ -14,6 +14,7 @@ #include "../core/alloc_func.hpp" #include "../core/mem_func.hpp" +#include /** Base class for simple binary blobs. * Item is byte. diff --git a/src/misc/dbg_helpers.h b/src/misc/dbg_helpers.h --- a/src/misc/dbg_helpers.h +++ b/src/misc/dbg_helpers.h @@ -12,13 +12,16 @@ #ifndef DBG_HELPERS_H #define DBG_HELPERS_H -#include #include #include -#include "blob.hpp" #include "str.hpp" +#include "../direction_type.h" +#include "../signal_type.h" +#include "../tile_type.h" +#include "../track_type.h" + /** Helper template class that provides C array length and item type */ template struct ArrayT; diff --git a/src/misc/fixedsizearray.hpp b/src/misc/fixedsizearray.hpp --- a/src/misc/fixedsizearray.hpp +++ b/src/misc/fixedsizearray.hpp @@ -12,6 +12,7 @@ #ifndef FIXEDSIZEARRAY_HPP #define FIXEDSIZEARRAY_HPP +#include "../core/alloc_func.hpp" /** fixed size array * Upon construction it preallocates fixed size block of memory diff --git a/src/misc/str.hpp b/src/misc/str.hpp --- a/src/misc/str.hpp +++ b/src/misc/str.hpp @@ -14,6 +14,7 @@ #include #include +#include "blob.hpp" #include "../string_func.h" /** Blob based case sensitive ANSI/UTF-8 string */ diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -33,6 +33,7 @@ #include "window_func.h" #include "tilehighlight_func.h" #include "querystring_gui.h" +#include "core/geometry_func.hpp" #include "table/strings.h" diff --git a/src/music.cpp b/src/music.cpp --- a/src/music.cpp +++ b/src/music.cpp @@ -10,7 +10,6 @@ /** @file music.cpp The songs that OpenTTD knows. */ #include "stdafx.h" -#include "debug.h" /* The type of set we're replacing */ #define SET_TYPE "music" diff --git a/src/music/extmidi.cpp b/src/music/extmidi.cpp --- a/src/music/extmidi.cpp +++ b/src/music/extmidi.cpp @@ -12,6 +12,7 @@ #ifndef __MORPHOS__ #include "../stdafx.h" #include "../debug.h" +#include "../string_func.h" #include "../sound/sound_driver.hpp" #include "../video/video_driver.hpp" #include "extmidi.h" diff --git a/src/music/win32_m.cpp b/src/music/win32_m.cpp --- a/src/music/win32_m.cpp +++ b/src/music/win32_m.cpp @@ -10,6 +10,7 @@ /** @file win32_m.cpp Music playback for Windows. */ #include "../stdafx.h" +#include "../string_func.h" #include "win32_m.h" #include #include diff --git a/src/music_gui.cpp b/src/music_gui.cpp --- a/src/music_gui.cpp +++ b/src/music_gui.cpp @@ -11,7 +11,6 @@ #include "stdafx.h" #include "openttd.h" -#include "fileio_func.h" #include "base_media_base.h" #include "music/music_driver.hpp" #include "window_gui.h" @@ -21,6 +20,8 @@ #include "gfx_func.h" #include "core/random_func.hpp" #include "gui.h" +#include "core/geometry_func.hpp" +#include "string_func.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/network/core/core.cpp b/src/network/core/core.cpp --- a/src/network/core/core.cpp +++ b/src/network/core/core.cpp @@ -15,6 +15,7 @@ #include "../../stdafx.h" #include "../../debug.h" +#include "os_abstraction.h" #include "packet.h" diff --git a/src/network/core/core.h b/src/network/core/core.h --- a/src/network/core/core.h +++ b/src/network/core/core.h @@ -14,7 +14,6 @@ #ifndef NETWORK_CORE_H #define NETWORK_CORE_H -#include "os_abstraction.h" #include "../../newgrf_config.h" #ifdef ENABLE_NETWORK diff --git a/src/network/core/host.h b/src/network/core/host.h --- a/src/network/core/host.h +++ b/src/network/core/host.h @@ -14,6 +14,8 @@ #ifndef NETWORK_CORE_HOST_H #define NETWORK_CORE_HOST_H +#include "address.h" + void NetworkFindBroadcastIPs(NetworkAddressList *broadcast); #endif /* NETWORK_CORE_HOST_H */ diff --git a/src/network/core/tcp.h b/src/network/core/tcp.h --- a/src/network/core/tcp.h +++ b/src/network/core/tcp.h @@ -14,9 +14,7 @@ #ifndef NETWORK_CORE_TCP_H #define NETWORK_CORE_TCP_H -#include "os_abstraction.h" #include "address.h" -#include "core.h" #include "packet.h" #ifdef ENABLE_NETWORK diff --git a/src/network/core/tcp_game.cpp b/src/network/core/tcp_game.cpp --- a/src/network/core/tcp_game.cpp +++ b/src/network/core/tcp_game.cpp @@ -15,6 +15,7 @@ #include "../../stdafx.h" +#include "../network.h" #include "../network_internal.h" #include "../../core/pool_func.hpp" diff --git a/src/network/core/tcp_game.h b/src/network/core/tcp_game.h --- a/src/network/core/tcp_game.h +++ b/src/network/core/tcp_game.h @@ -16,7 +16,7 @@ #include "os_abstraction.h" #include "tcp.h" -#include "packet.h" +#include "../network_type.h" #include "../../core/pool_type.hpp" #ifdef ENABLE_NETWORK diff --git a/src/network/core/udp.cpp b/src/network/core/udp.cpp --- a/src/network/core/udp.cpp +++ b/src/network/core/udp.cpp @@ -15,6 +15,7 @@ #include "../../stdafx.h" #include "../../date_func.h" +#include "../../debug.h" #include "udp.h" /** diff --git a/src/network/core/udp.h b/src/network/core/udp.h --- a/src/network/core/udp.h +++ b/src/network/core/udp.h @@ -71,12 +71,9 @@ #ifndef NETWORK_CORE_UDP_H #define NETWORK_CORE_UDP_H -#include "os_abstraction.h" #include "address.h" -#include "core.h" #include "game.h" #include "packet.h" -#include "../../debug.h" #ifdef ENABLE_NETWORK diff --git a/src/network/network.cpp b/src/network/network.cpp --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -16,12 +16,12 @@ #include "../strings_func.h" #include "../command_func.h" #include "../date_func.h" -#include "network_internal.h" #include "network_client.h" #include "network_server.h" #include "network_content.h" #include "network_udp.h" #include "network_gamelist.h" +#include "network_base.h" #include "core/udp.h" #include "core/host.h" #include "network_gui.h" diff --git a/src/network/network.h b/src/network/network.h --- a/src/network/network.h +++ b/src/network/network.h @@ -12,7 +12,6 @@ #ifndef NETWORK_H #define NETWORK_H -#include "../company_type.h" #ifdef ENABLE_NETWORK diff --git a/src/network/network_base.h b/src/network/network_base.h --- a/src/network/network_base.h +++ b/src/network/network_base.h @@ -15,7 +15,9 @@ #ifdef ENABLE_NETWORK #include "network_type.h" +#include "core/address.h" #include "../core/pool_type.hpp" +#include "../company_type.h" typedef Pool NetworkClientInfoPool; extern NetworkClientInfoPool _networkclientinfo_pool; diff --git a/src/network/network_chat_gui.cpp b/src/network/network_chat_gui.cpp --- a/src/network/network_chat_gui.cpp +++ b/src/network/network_chat_gui.cpp @@ -24,8 +24,10 @@ #include "../querystring_gui.h" #include "../town.h" #include "../window_func.h" -#include "network_internal.h" +#include "../core/geometry_func.hpp" +#include "network.h" #include "network_client.h" +#include "network_base.h" #include "table/strings.h" diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp --- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -26,6 +26,8 @@ #include "../company_base.h" #include "../company_gui.h" #include "../rev.h" +#include "network.h" +#include "network_base.h" #include "table/strings.h" diff --git a/src/network/network_client.h b/src/network/network_client.h --- a/src/network/network_client.h +++ b/src/network/network_client.h @@ -14,6 +14,8 @@ #ifdef ENABLE_NETWORK +#include "network_internal.h" + DEF_CLIENT_SEND_COMMAND(PACKET_CLIENT_GAME_INFO); DEF_CLIENT_SEND_COMMAND(PACKET_CLIENT_COMPANY_INFO); DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_COMMAND)(const CommandPacket *cp); diff --git a/src/network/network_command.cpp b/src/network/network_command.cpp --- a/src/network/network_command.cpp +++ b/src/network/network_command.cpp @@ -13,13 +13,13 @@ #include "../stdafx.h" #include "../debug.h" -#include "network_internal.h" #include "network_client.h" +#include "network.h" #include "../command_func.h" #include "../company_func.h" /** Table with all the callbacks we'll use for conversion*/ -static const CommandCallback * const _callback_table[] = { +static CommandCallback * const _callback_table[] = { /* 0x00 */ NULL, /* 0x01 */ CcBuildPrimaryVehicle, /* 0x02 */ CcBuildAirport, diff --git a/src/network/network_content.h b/src/network/network_content.h --- a/src/network/network_content.h +++ b/src/network/network_content.h @@ -13,7 +13,6 @@ #define NETWORK_CONTENT_H #include "core/tcp_content.h" -#include "../core/smallvec_type.hpp" #if defined(ENABLE_NETWORK) diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp --- a/src/network/network_content_gui.cpp +++ b/src/network/network_content_gui.cpp @@ -19,6 +19,7 @@ #include "../base_media_base.h" #include "../sortlist_type.h" #include "../querystring_gui.h" +#include "../core/geometry_func.hpp" #include "network_content.h" #include "table/strings.h" diff --git a/src/network/network_func.h b/src/network/network_func.h --- a/src/network/network_func.h +++ b/src/network/network_func.h @@ -16,8 +16,8 @@ #include "network_type.h" #include "../console_type.h" #include "../gfx_type.h" -#include "../core/smallvec_type.hpp" #include "../openttd.h" +#include "../company_type.h" #ifdef ENABLE_NETWORK diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -14,10 +14,11 @@ #include "../strings_func.h" #include "../date_func.h" #include "../fios.h" -#include "network_internal.h" #include "network_client.h" #include "network_gui.h" #include "network_gamelist.h" +#include "network.h" +#include "network_base.h" #include "../gui.h" #include "network_udp.h" #include "../window_func.h" @@ -27,6 +28,7 @@ #include "../sortlist_type.h" #include "../company_base.h" #include "../company_func.h" +#include "../core/geometry_func.hpp" #include "table/strings.h" #include "../table/sprites.h" diff --git a/src/network/network_gui.h b/src/network/network_gui.h --- a/src/network/network_gui.h +++ b/src/network/network_gui.h @@ -12,6 +12,8 @@ #ifndef NETWORK_GUI_H #define NETWORK_GUI_H +#include "../company_type.h" +#include "../economy_type.h" #include "../window_type.h" #include "network_type.h" diff --git a/src/network/network_internal.h b/src/network/network_internal.h --- a/src/network/network_internal.h +++ b/src/network/network_internal.h @@ -12,13 +12,7 @@ #ifndef NETWORK_INTERNAL_H #define NETWORK_INTERNAL_H -#include "network.h" #include "network_func.h" -#include "network_base.h" -#include "core/os_abstraction.h" -#include "core/core.h" -#include "core/config.h" -#include "core/packet.h" #include "core/tcp_game.h" #include "../command_type.h" diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -14,12 +14,13 @@ #include "../stdafx.h" #include "../debug.h" #include "../strings_func.h" -#include "network_internal.h" -#include "../vehicle_base.h" #include "../date_func.h" #include "network_server.h" #include "network_udp.h" +#include "network.h" +#include "network_base.h" #include "../console_func.h" +#include "../company_base.h" #include "../command_func.h" #include "../saveload/saveload.h" #include "../station_base.h" diff --git a/src/network/network_server.h b/src/network/network_server.h --- a/src/network/network_server.h +++ b/src/network/network_server.h @@ -14,6 +14,8 @@ #ifdef ENABLE_NETWORK +#include "network_internal.h" + DEF_SERVER_SEND_COMMAND(PACKET_SERVER_MAP); DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_ERROR_QUIT)(NetworkClientSocket *cs, ClientID client_id, NetworkErrorCode errorno); DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_ERROR)(NetworkClientSocket *cs, NetworkErrorCode error); diff --git a/src/network/network_type.h b/src/network/network_type.h --- a/src/network/network_type.h +++ b/src/network/network_type.h @@ -12,9 +12,6 @@ #ifndef NETWORK_TYPE_H #define NETWORK_TYPE_H -#include "../company_type.h" -#include "../economy_type.h" -#include "core/config.h" #include "core/game.h" #ifdef ENABLE_NETWORK diff --git a/src/network/network_udp.cpp b/src/network/network_udp.cpp --- a/src/network/network_udp.cpp +++ b/src/network/network_udp.cpp @@ -19,9 +19,11 @@ #include "../stdafx.h" #include "../date_func.h" #include "../map_func.h" +#include "../debug.h" #include "network_gamelist.h" #include "network_internal.h" #include "network_udp.h" +#include "network.h" #include "../core/endian_func.hpp" #include "../company_base.h" #include "../thread/thread.h" diff --git a/src/network/network_udp.h b/src/network/network_udp.h --- a/src/network/network_udp.h +++ b/src/network/network_udp.h @@ -14,6 +14,8 @@ #ifdef ENABLE_NETWORK +#include "core/address.h" + void NetworkUDPInitialize(); void NetworkUDPSearchGame(); void NetworkUDPQueryMasterServer(); diff --git a/src/newgrf.cpp b/src/newgrf.cpp --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -13,7 +13,6 @@ #include -#include "openttd.h" #include "debug.h" #include "fileio_func.h" #include "engine_func.h" @@ -26,6 +25,7 @@ #include "fontcache.h" #include "currency.h" #include "landscape.h" +#include "newgrf.h" #include "newgrf_cargo.h" #include "newgrf_house.h" #include "newgrf_sound.h" @@ -39,7 +39,6 @@ #include "fios.h" #include "rail.h" #include "strings_func.h" -#include "gfx_func.h" #include "date_func.h" #include "string_func.h" #include "network/network.h" diff --git a/src/newgrf.h b/src/newgrf.h --- a/src/newgrf.h +++ b/src/newgrf.h @@ -12,7 +12,6 @@ #ifndef NEWGRF_H #define NEWGRF_H -#include "town_type.h" #include "newgrf_config.h" #include "cargotype.h" #include "industry_type.h" diff --git a/src/newgrf_canal.cpp b/src/newgrf_canal.cpp --- a/src/newgrf_canal.cpp +++ b/src/newgrf_canal.cpp @@ -10,12 +10,10 @@ /** @file newgrf_canal.cpp Implementation of NewGRF canals. */ #include "stdafx.h" -#include "tile_type.h" #include "debug.h" #include "newgrf_commons.h" #include "newgrf_spritegroup.h" #include "newgrf_canal.h" -#include "tile_map.h" #include "water_map.h" diff --git a/src/newgrf_canal.h b/src/newgrf_canal.h --- a/src/newgrf_canal.h +++ b/src/newgrf_canal.h @@ -12,6 +12,10 @@ #ifndef NEWGRF_CANAL_H #define NEWGRF_CANAL_H +#include "gfx_type.h" +#include "tile_type.h" +#include "newgrf_generic.h" + /** List of different canal 'features'. * Each feature gets an entry in the canal spritegroup table */ enum CanalFeature { diff --git a/src/newgrf_cargo.cpp b/src/newgrf_cargo.cpp --- a/src/newgrf_cargo.cpp +++ b/src/newgrf_cargo.cpp @@ -13,6 +13,7 @@ #include "debug.h" #include "newgrf.h" #include "newgrf_spritegroup.h" +#include "core/bitmath_func.hpp" static uint32 CargoGetRandomBits(const ResolverObject *object) { diff --git a/src/newgrf_commons.h b/src/newgrf_commons.h --- a/src/newgrf_commons.h +++ b/src/newgrf_commons.h @@ -14,7 +14,6 @@ #ifndef NEWGRF_COMMONS_H #define NEWGRF_COMMONS_H -#include "core/bitmath_func.hpp" #include "tile_cmd.h" #include "transparency.h" #include "sprite.h" diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp --- a/src/newgrf_engine.cpp +++ b/src/newgrf_engine.cpp @@ -24,6 +24,8 @@ #include "aircraft.h" #include "core/smallmap_type.hpp" #include "station_base.h" +#include "engine_base.h" +#include "company_base.h" struct WagonOverride { EngineID *train_id; diff --git a/src/newgrf_engine.h b/src/newgrf_engine.h --- a/src/newgrf_engine.h +++ b/src/newgrf_engine.h @@ -15,6 +15,9 @@ #include "direction_type.h" #include "newgrf_callbacks.h" #include "newgrf_properties.h" +#include "vehicle_type.h" +#include "engine_type.h" +#include "gfx_type.h" enum { TRAININFO_DEFAULT_VEHICLE_WIDTH = 29, diff --git a/src/newgrf_generic.cpp b/src/newgrf_generic.cpp --- a/src/newgrf_generic.cpp +++ b/src/newgrf_generic.cpp @@ -13,6 +13,7 @@ #include "debug.h" #include "newgrf.h" #include "newgrf_spritegroup.h" +#include "core/bitmath_func.hpp" #include diff --git a/src/newgrf_generic.h b/src/newgrf_generic.h --- a/src/newgrf_generic.h +++ b/src/newgrf_generic.h @@ -12,6 +12,9 @@ #ifndef NEWGRF_GENERIC_H #define NEWGRF_GENERIC_H +#include "cargo_type.h" +#include "industry_type.h" + enum AIConstructionEvent { AICE_TRAIN_CHECK_RAIL_ENGINE = 0x00, ///< Check if we should build an engine AICE_TRAIN_CHECK_ELRAIL_ENGINE = 0x01, diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -14,7 +14,6 @@ #include "newgrf.h" #include "strings_func.h" #include "window_func.h" -#include "gfx_func.h" #include "gamelog.h" #include "settings_func.h" #include "widgets/dropdown_type.h" @@ -22,6 +21,7 @@ #include "network/network_content.h" #include "sortlist_type.h" #include "querystring_gui.h" +#include "core/geometry_func.hpp" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp --- a/src/newgrf_house.cpp +++ b/src/newgrf_house.cpp @@ -10,24 +10,22 @@ /** @file newgrf_house.cpp Implementation of NewGRF houses. */ #include "stdafx.h" -#include "openttd.h" #include "variables.h" #include "debug.h" #include "viewport_func.h" #include "landscape.h" -#include "sprite.h" #include "newgrf.h" #include "newgrf_house.h" #include "newgrf_spritegroup.h" #include "newgrf_town.h" #include "newgrf_sound.h" #include "newgrf_commons.h" -#include "transparency.h" #include "functions.h" #include "company_func.h" #include "animated_tile_func.h" #include "company_base.h" #include "town.h" +#include "core/random_func.hpp" static BuildingCounts _building_counts; static HouseClassMapping _class_mapping[HOUSE_CLASS_MAX]; diff --git a/src/newgrf_house.h b/src/newgrf_house.h --- a/src/newgrf_house.h +++ b/src/newgrf_house.h @@ -12,7 +12,6 @@ #ifndef NEWGRF_HOUSE_H #define NEWGRF_HOUSE_H -#include "town_type.h" #include "newgrf_callbacks.h" #include "tile_cmd.h" #include "house_type.h" diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp --- a/src/newgrf_industries.cpp +++ b/src/newgrf_industries.cpp @@ -11,7 +11,6 @@ #include "stdafx.h" #include "debug.h" -#include "strings_type.h" #include "industry.h" #include "newgrf.h" #include "newgrf_industries.h" @@ -24,6 +23,7 @@ #include "command_func.h" #include "gui.h" #include "strings_func.h" +#include "core/random_func.hpp" #include "table/strings.h" diff --git a/src/newgrf_industries.h b/src/newgrf_industries.h --- a/src/newgrf_industries.h +++ b/src/newgrf_industries.h @@ -12,7 +12,6 @@ #ifndef NEWGRF_INDUSTRIES_H #define NEWGRF_INDUSTRIES_H -#include "industry_type.h" #include "newgrf_spritegroup.h" /** When should the industry(tile) be triggered for random bits? */ diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp --- a/src/newgrf_industrytiles.cpp +++ b/src/newgrf_industrytiles.cpp @@ -10,21 +10,17 @@ /** @file newgrf_industrytiles.cpp NewGRF handling of industry tiles. */ #include "stdafx.h" -#include "openttd.h" #include "variables.h" #include "debug.h" #include "viewport_func.h" #include "landscape.h" #include "newgrf.h" -#include "core/random_func.hpp" #include "newgrf_commons.h" #include "newgrf_industries.h" #include "newgrf_industrytiles.h" #include "newgrf_sound.h" #include "newgrf_text.h" #include "industry.h" -#include "sprite.h" -#include "transparency.h" #include "functions.h" #include "town.h" #include "command_func.h" diff --git a/src/newgrf_industrytiles.h b/src/newgrf_industrytiles.h --- a/src/newgrf_industrytiles.h +++ b/src/newgrf_industrytiles.h @@ -12,6 +12,11 @@ #ifndef NEWGRF_INDUSTRYTILES_H #define NEWGRF_INDUSTRYTILES_H +#include "tile_cmd.h" +#include "industry_type.h" +#include "newgrf_callbacks.h" +#include "core/random_func.hpp" + enum IndustryAnimationTrigger { IAT_CONSTRUCTION_STATE_CHANGE, IAT_TILELOOP, diff --git a/src/newgrf_sound.h b/src/newgrf_sound.h --- a/src/newgrf_sound.h +++ b/src/newgrf_sound.h @@ -14,6 +14,7 @@ #include "sound_type.h" #include "tile_type.h" +#include "vehicle_type.h" enum VehicleSoundEvent { VSE_START = 1, diff --git a/src/newgrf_spritegroup.cpp b/src/newgrf_spritegroup.cpp --- a/src/newgrf_spritegroup.cpp +++ b/src/newgrf_spritegroup.cpp @@ -13,6 +13,7 @@ #include "newgrf.h" #include "newgrf_spritegroup.h" #include "sprite.h" +#include "core/bitmath_func.hpp" #include "core/pool_func.hpp" SpriteGroupPool _spritegroup_pool("SpriteGroup"); diff --git a/src/newgrf_spritegroup.h b/src/newgrf_spritegroup.h --- a/src/newgrf_spritegroup.h +++ b/src/newgrf_spritegroup.h @@ -13,8 +13,6 @@ #define NEWGRF_SPRITEGROUP_H #include "town_type.h" -#include "industry_type.h" -#include "core/bitmath_func.hpp" #include "gfx_type.h" #include "engine_type.h" #include "tile_type.h" diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -23,13 +23,14 @@ #include "newgrf_sound.h" #include "town.h" #include "newgrf_town.h" -#include "gfx_func.h" #include "date_func.h" #include "company_func.h" #include "animated_tile_func.h" #include "functions.h" #include "tunnelbridge_map.h" #include "spritecache.h" +#include "newgrf.h" +#include "core/random_func.hpp" #include "table/strings.h" diff --git a/src/newgrf_station.h b/src/newgrf_station.h --- a/src/newgrf_station.h +++ b/src/newgrf_station.h @@ -12,14 +12,13 @@ #ifndef NEWGRF_STATION_H #define NEWGRF_STATION_H -#include "engine_type.h" #include "newgrf_callbacks.h" -#include "tile_type.h" -#include "station_type.h" -#include "strings_type.h" #include "sprite.h" #include "direction_type.h" -#include "newgrf.h" +#include "cargo_type.h" +#include "strings_type.h" +#include "station_type.h" +#include "rail_type.h" enum StationClassID { STAT_CLASS_BEGIN = 0, ///< the lowest valid value diff --git a/src/newgrf_text.h b/src/newgrf_text.h --- a/src/newgrf_text.h +++ b/src/newgrf_text.h @@ -12,6 +12,8 @@ #ifndef NEWGRF_TEXT_H #define NEWGRF_TEXT_H +#include "strings_type.h" + StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid, bool new_scheme, const char *text_to_add, StringID def_string); StringID GetGRFStringID(uint32 grfid, uint16 stringid); const char *GetGRFStringPtr(uint16 stringid); diff --git a/src/newgrf_town.h b/src/newgrf_town.h --- a/src/newgrf_town.h +++ b/src/newgrf_town.h @@ -12,6 +12,8 @@ #ifndef NEWGRF_TOWN_H #define NEWGRF_TOWN_H +#include "town_type.h" + /* Currently there is no direct town resolver; we only need to get town * variable results from inside stations, house tiles and industry tiles. */ diff --git a/src/news_gui.cpp b/src/news_gui.cpp --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -10,12 +10,9 @@ /** @file news_gui.cpp GUI functions related to news messages. */ #include "stdafx.h" -#include "openttd.h" #include "gui.h" -#include "window_gui.h" #include "viewport_func.h" #include "news_type.h" -#include "gfx_func.h" #include "strings_func.h" #include "window_func.h" #include "date_func.h" @@ -31,6 +28,7 @@ #include "company_manager_face.h" #include "company_func.h" #include "engine_gui.h" +#include "core/geometry_func.hpp" #include "table/strings.h" diff --git a/src/openttd.cpp b/src/openttd.cpp --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -60,6 +60,10 @@ #include "thread/thread.h" #include "station_base.h" #include "crashlog.h" +#include "company_base.h" +#include "engine_base.h" +#include "engine_func.h" +#include "core/random_func.hpp" #include "newgrf_commons.h" diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -26,7 +26,7 @@ #include "roadveh.h" #include "station_base.h" #include "waypoint_base.h" -#include "roadstop_base.h" +#include "company_base.h" #include "table/strings.h" diff --git a/src/order_func.h b/src/order_func.h --- a/src/order_func.h +++ b/src/order_func.h @@ -16,7 +16,6 @@ #include "vehicle_type.h" #include "tile_type.h" #include "group_type.h" -#include "date_type.h" #include "company_type.h" struct BackuppedOrders { diff --git a/src/order_gui.cpp b/src/order_gui.cpp --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -10,12 +10,9 @@ /** @file order_gui.cpp GUI related to orders. */ #include "stdafx.h" -#include "window_gui.h" #include "command_func.h" #include "viewport_func.h" -#include "gfx_func.h" #include "depot_base.h" -#include "vehicle_base.h" #include "vehicle_gui.h" #include "roadveh.h" #include "timetable.h" @@ -31,6 +28,7 @@ #include "network/network.h" #include "station_base.h" #include "waypoint_base.h" +#include "core/geometry_func.hpp" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/os/unix/unix.cpp b/src/os/unix/unix.cpp --- a/src/os/unix/unix.cpp +++ b/src/os/unix/unix.cpp @@ -13,6 +13,7 @@ #include "../../textbuf_gui.h" #include "../../functions.h" #include "../../crashlog.h" +#include "../../core/random_func.hpp" #include diff --git a/src/pathfinder/follow_track.hpp b/src/pathfinder/follow_track.hpp --- a/src/pathfinder/follow_track.hpp +++ b/src/pathfinder/follow_track.hpp @@ -12,13 +12,13 @@ #ifndef FOLLOW_TRACK_HPP #define FOLLOW_TRACK_HPP -#include "../depot_map.h" #include "../pbs.h" #include "../roadveh.h" #include "../station_base.h" #include "../train.h" #include "../tunnelbridge.h" #include "../tunnelbridge_map.h" +#include "../depot_map.h" #include "pf_performance_timer.hpp" /** Track follower helper template class (can serve pathfinders and vehicle diff --git a/src/pathfinder/npf/npf.cpp b/src/pathfinder/npf/npf.cpp --- a/src/pathfinder/npf/npf.cpp +++ b/src/pathfinder/npf/npf.cpp @@ -12,15 +12,9 @@ #include "../../stdafx.h" #include "../../debug.h" #include "../../landscape.h" -#include "../../depot_base.h" #include "../../network/network.h" -#include "../../tunnelbridge_map.h" #include "../../functions.h" -#include "../../tunnelbridge.h" -#include "../../pbs.h" -#include "../../roadveh.h" #include "../../ship.h" -#include "../../train.h" #include "../../roadstop_base.h" #include "../pathfinder_func.h" #include "../pathfinder_type.h" diff --git a/src/pathfinder/npf/npf_func.h b/src/pathfinder/npf/npf_func.h --- a/src/pathfinder/npf/npf_func.h +++ b/src/pathfinder/npf/npf_func.h @@ -14,6 +14,7 @@ #include "../../track_type.h" #include "../../direction_type.h" +#include "../../vehicle_type.h" #include "../pathfinder_type.h" /** diff --git a/src/pathfinder/opf/opf_ship.cpp b/src/pathfinder/opf/opf_ship.cpp --- a/src/pathfinder/opf/opf_ship.cpp +++ b/src/pathfinder/opf/opf_ship.cpp @@ -10,12 +10,10 @@ /** @file pathfind.cpp Implementation of the oldest supported pathfinder. */ #include "../../stdafx.h" -#include "../../debug.h" #include "../../tunnelbridge_map.h" #include "../../tunnelbridge.h" #include "../../ship.h" #include "../../core/random_func.hpp" -#include "opf_ship.h" struct RememberData { uint16 cur_length; diff --git a/src/pathfinder/opf/opf_ship.h b/src/pathfinder/opf/opf_ship.h --- a/src/pathfinder/opf/opf_ship.h +++ b/src/pathfinder/opf/opf_ship.h @@ -12,6 +12,11 @@ #ifndef OPF_SHIP_H #define OPF_SHIP_H +#include "../../direction_type.h" +#include "../../tile_type.h" +#include "../../track_type.h" +#include "../../vehicle_type.h" + /** * Finds the best path for given ship using OPF. * @param v the ship that needs to find a path diff --git a/src/pathfinder/pathfinder_func.h b/src/pathfinder/pathfinder_func.h --- a/src/pathfinder/pathfinder_func.h +++ b/src/pathfinder/pathfinder_func.h @@ -12,7 +12,6 @@ #ifndef PATHFINDER_FUNC_H #define PATHFINDER_FUNC_H -#include "../station_base.h" #include "../waypoint_base.h" /** diff --git a/src/pathfinder/pathfinder_type.h b/src/pathfinder/pathfinder_type.h --- a/src/pathfinder/pathfinder_type.h +++ b/src/pathfinder/pathfinder_type.h @@ -12,6 +12,8 @@ #ifndef PATHFINDER_TYPE_H #define PATHFINDER_TYPE_H +#include "../tile_type.h" + /** Length (penalty) of one tile with NPF */ static const int NPF_TILE_LENGTH = 100; diff --git a/src/pathfinder/yapf/yapf.h b/src/pathfinder/yapf/yapf.h --- a/src/pathfinder/yapf/yapf.h +++ b/src/pathfinder/yapf/yapf.h @@ -14,6 +14,8 @@ #include "../../direction_type.h" #include "../../station_type.h" +#include "../../track_type.h" +#include "../../vehicle_type.h" #include "../pathfinder_type.h" /** diff --git a/src/pbs.cpp b/src/pbs.cpp --- a/src/pbs.cpp +++ b/src/pbs.cpp @@ -13,7 +13,6 @@ #include "functions.h" #include "vehicle_func.h" #include "pathfinder/follow_track.hpp" -//#include "depot_map.h" /** * Get the reserved trackbits for any tile, regardless of type. diff --git a/src/rail.h b/src/rail.h --- a/src/rail.h +++ b/src/rail.h @@ -14,7 +14,6 @@ #include "rail_type.h" #include "track_type.h" -#include "vehicle_type.h" #include "gfx_type.h" #include "core/bitmath_func.hpp" #include "economy_func.h" diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -10,7 +10,6 @@ /** @file rail_cmd.cpp Handling of rail tiles. */ #include "stdafx.h" -#include "openttd.h" #include "cmd_helper.h" #include "landscape.h" #include "viewport_func.h" @@ -34,6 +33,7 @@ #include "elrail_func.h" #include "town.h" #include "pbs.h" +#include "company_base.h" #include "table/strings.h" #include "table/railtypes.h" diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -15,7 +15,6 @@ #include "station_gui.h" #include "terraform_gui.h" #include "viewport_func.h" -#include "gfx_func.h" #include "command_func.h" #include "waypoint_func.h" #include "newgrf_station.h" @@ -30,6 +29,7 @@ #include "tunnelbridge.h" #include "tilehighlight_func.h" #include "spritecache.h" +#include "core/geometry_func.hpp" #include "station_map.h" #include "tunnelbridge_map.h" diff --git a/src/rail_map.h b/src/rail_map.h --- a/src/rail_map.h +++ b/src/rail_map.h @@ -15,7 +15,6 @@ #include "rail_type.h" #include "depot_type.h" #include "signal_func.h" -#include "direction_func.h" #include "track_func.h" #include "tile_map.h" #include "signal_type.h" diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -10,7 +10,6 @@ /** @file road_cmd.cpp Commands related to road tiles. */ #include "stdafx.h" -#include "openttd.h" #include "cmd_helper.h" #include "road_internal.h" #include "landscape.h" @@ -30,9 +29,12 @@ #include "cheat_type.h" #include "functions.h" #include "effectvehicle_func.h" +#include "effectvehicle_base.h" #include "elrail_func.h" #include "roadveh.h" #include "town.h" +#include "company_base.h" +#include "core/random_func.hpp" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/road_cmd.h b/src/road_cmd.h --- a/src/road_cmd.h +++ b/src/road_cmd.h @@ -13,6 +13,7 @@ #define ROAD_CMD_H #include "direction_type.h" +#include "road_type.h" void DrawRoadDepotSprite(int x, int y, DiagDirection dir, RoadType rt); void UpdateNearestTownForRoadTiles(bool invalidate); diff --git a/src/road_func.h b/src/road_func.h --- a/src/road_func.h +++ b/src/road_func.h @@ -14,8 +14,9 @@ #include "core/bitmath_func.hpp" #include "road_type.h" -#include "direction_func.h" +#include "direction_type.h" #include "company_type.h" +#include "tile_type.h" /** * Whether the given roadtype is valid. diff --git a/src/road_gui.cpp b/src/road_gui.cpp --- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -10,15 +10,12 @@ /** @file road_gui.cpp GUI for building roads. */ #include "stdafx.h" -#include "openttd.h" #include "gui.h" #include "window_gui.h" #include "station_gui.h" #include "terraform_gui.h" #include "viewport_func.h" -#include "gfx_func.h" #include "command_func.h" -#include "road_type.h" #include "road_cmd.h" #include "road_map.h" #include "station_func.h" diff --git a/src/road_internal.h b/src/road_internal.h --- a/src/road_internal.h +++ b/src/road_internal.h @@ -13,6 +13,7 @@ #define ROAD_INTERNAL_H #include "tile_cmd.h" +#include "road_type.h" /** * Clean up unneccesary RoadBits of a planed tile. diff --git a/src/road_map.h b/src/road_map.h --- a/src/road_map.h +++ b/src/road_map.h @@ -15,7 +15,6 @@ #include "track_func.h" #include "depot_type.h" #include "rail_type.h" -#include "town_type.h" #include "road_func.h" #include "tile_map.h" diff --git a/src/roadstop_base.h b/src/roadstop_base.h --- a/src/roadstop_base.h +++ b/src/roadstop_base.h @@ -15,6 +15,8 @@ #include "station_type.h" #include "core/pool_type.hpp" #include "core/bitmath_func.hpp" +#include "direction_type.h" +#include "vehicle_type.h" typedef Pool RoadStopPool; extern RoadStopPool _roadstop_pool; diff --git a/src/roadveh.h b/src/roadveh.h --- a/src/roadveh.h +++ b/src/roadveh.h @@ -13,9 +13,7 @@ #define ROADVEH_H #include "vehicle_base.h" -#include "engine_func.h" -#include "engine_base.h" -#include "economy_func.h" +#include "road_type.h" struct RoadVehicle; diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -30,14 +30,17 @@ #include "vehicle_func.h" #include "sound_func.h" #include "autoreplace_gui.h" -#include "gfx_func.h" #include "ai/ai.hpp" #include "depot_map.h" #include "effectvehicle_func.h" +#include "effectvehicle_base.h" #include "roadstop_base.h" #include "cargotype.h" #include "spritecache.h" -#include "debug.h" +#include "core/random_func.hpp" +#include "engine_base.h" +#include "company_base.h" +#include "engine_func.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -15,7 +15,6 @@ #include "../depot_base.h" #include "../window_func.h" #include "../fios.h" -#include "../gamelog.h" #include "../gamelog_internal.h" #include "../network/network.h" #include "../gfxinit.h" @@ -23,8 +22,6 @@ #include "../industry.h" #include "../clear_map.h" #include "../vehicle_func.h" -#include "../newgrf_station.h" -#include "../openttd.h" #include "../debug.h" #include "../string_func.h" #include "../date_func.h" @@ -49,6 +46,10 @@ #include "../animated_tile_func.h" #include "../subsidy_base.h" #include "../subsidy_func.h" +#include "../company_base.h" +#include "../newgrf.h" +#include "../engine_base.h" +#include "../engine_func.h" #include "table/strings.h" diff --git a/src/saveload/autoreplace_sl.cpp b/src/saveload/autoreplace_sl.cpp --- a/src/saveload/autoreplace_sl.cpp +++ b/src/saveload/autoreplace_sl.cpp @@ -10,8 +10,6 @@ /** @file autoreplace_sl.cpp Code handling saving and loading of autoreplace rules */ #include "../stdafx.h" -#include "../engine_type.h" -#include "../group_type.h" #include "../autoreplace_base.h" #include "saveload.h" diff --git a/src/saveload/gamelog_sl.cpp b/src/saveload/gamelog_sl.cpp --- a/src/saveload/gamelog_sl.cpp +++ b/src/saveload/gamelog_sl.cpp @@ -10,7 +10,6 @@ /** @file gamelog_sl.cpp Code handling saving and loading of gamelog data */ #include "../stdafx.h" -#include "../gamelog.h" #include "../gamelog_internal.h" #include "../core/alloc_func.hpp" diff --git a/src/saveload/industry_sl.cpp b/src/saveload/industry_sl.cpp --- a/src/saveload/industry_sl.cpp +++ b/src/saveload/industry_sl.cpp @@ -10,7 +10,6 @@ /** @file industry_sl.cpp Code handling saving and loading of industries */ #include "../stdafx.h" -#include "../strings_type.h" #include "../industry.h" #include "../newgrf_commons.h" diff --git a/src/saveload/misc_sl.cpp b/src/saveload/misc_sl.cpp --- a/src/saveload/misc_sl.cpp +++ b/src/saveload/misc_sl.cpp @@ -20,7 +20,7 @@ #include "../viewport_func.h" #include "../gfx_func.h" #include "../company_base.h" -#include "../town.h" +#include "../core/random_func.hpp" #include "saveload.h" diff --git a/src/saveload/oldloader.h b/src/saveload/oldloader.h --- a/src/saveload/oldloader.h +++ b/src/saveload/oldloader.h @@ -13,6 +13,7 @@ #define OLDLOADER_H #include "saveload.h" +#include "../tile_type.h" enum { BUFFER_SIZE = 4096, diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -22,13 +22,15 @@ #include "../subsidy_base.h" #include "../debug.h" #include "../depot_base.h" -#include "../zoom_func.h" #include "../date_func.h" #include "../vehicle_func.h" #include "../variables.h" #include "../effectvehicle_base.h" #include "../core/mem_func.hpp" #include "../core/alloc_type.hpp" +#include "../engine_base.h" +#include "../engine_func.h" +#include "../company_base.h" #include "saveload_internal.h" #include "oldloader.h" diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -21,7 +21,6 @@ * */ #include "../stdafx.h" -#include "../openttd.h" #include "../debug.h" #include "../station_base.h" #include "../thread/thread.h" @@ -30,7 +29,6 @@ #include "../variables.h" #include "../window_func.h" #include "../strings_func.h" -#include "../gfx_func.h" #include "../core/endian_func.hpp" #include "../vehicle_base.h" #include "../company_func.h" @@ -42,6 +40,7 @@ #include "../gamelog.h" #include "../string_func.h" #include "../engine_base.h" +#include "../company_base.h" #include "table/strings.h" diff --git a/src/saveload/saveload_internal.h b/src/saveload/saveload_internal.h --- a/src/saveload/saveload_internal.h +++ b/src/saveload/saveload_internal.h @@ -12,7 +12,6 @@ #ifndef SAVELOAD_INTERNAL_H #define SAVELOAD_INTERNAL_H -#include "../strings_type.h" #include "../company_manager_face.h" #include "../order_base.h" #include "../engine_type.h" diff --git a/src/saveload/signs_sl.cpp b/src/saveload/signs_sl.cpp --- a/src/saveload/signs_sl.cpp +++ b/src/saveload/signs_sl.cpp @@ -10,7 +10,6 @@ /** @file signs_sl.cpp Code handling saving and loading of economy data */ #include "../stdafx.h" -#include "../company_func.h" #include "../signs_base.h" #include "saveload.h" diff --git a/src/saveload/station_sl.cpp b/src/saveload/station_sl.cpp --- a/src/saveload/station_sl.cpp +++ b/src/saveload/station_sl.cpp @@ -15,7 +15,6 @@ #include "../roadstop_base.h" #include "../vehicle_base.h" #include "../newgrf_station.h" -#include "../station_map.h" #include "saveload.h" #include "table/strings.h" diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp --- a/src/saveload/vehicle_sl.cpp +++ b/src/saveload/vehicle_sl.cpp @@ -17,6 +17,7 @@ #include "../aircraft.h" #include "../station_base.h" #include "../effectvehicle_base.h" +#include "../engine_base.h" #include "saveload.h" diff --git a/src/saveload/waypoint_sl.cpp b/src/saveload/waypoint_sl.cpp --- a/src/saveload/waypoint_sl.cpp +++ b/src/saveload/waypoint_sl.cpp @@ -14,6 +14,7 @@ #include "../newgrf_station.h" #include "../vehicle_base.h" #include "../town.h" +#include "../newgrf.h" #include "table/strings.h" diff --git a/src/script/script_info.hpp b/src/script/script_info.hpp --- a/src/script/script_info.hpp +++ b/src/script/script_info.hpp @@ -12,6 +12,7 @@ #ifndef SCRIPT_INFO #define SCRIPT_INFO +#include #include "../misc/countedptr.hpp" class ScriptFileInfo : public SimpleCountedObject { diff --git a/src/sdl.h b/src/sdl.h --- a/src/sdl.h +++ b/src/sdl.h @@ -20,7 +20,6 @@ #endif #ifdef DYNAMICALLY_LOADED_SDL - #include struct SDLProcs { int (SDLCALL *SDL_Init)(Uint32); diff --git a/src/settings.cpp b/src/settings.cpp --- a/src/settings.cpp +++ b/src/settings.cpp @@ -57,10 +57,11 @@ #include "gamelog.h" #include "settings_func.h" #include "ini_type.h" -#include "ai/ai.hpp" #include "ai/ai_config.hpp" #include "newgrf.h" #include "ship.h" +#include "company_base.h" +#include "engine_base.h" #include "void_map.h" #include "station_base.h" diff --git a/src/settings_func.h b/src/settings_func.h --- a/src/settings_func.h +++ b/src/settings_func.h @@ -13,6 +13,7 @@ #define SETTINGS_FUNC_H #include "core/smallvec_type.hpp" +#include "company_type.h" void IConsoleSetSetting(const char *name, const char *value); void IConsoleSetSetting(const char *name, int32 value); diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -10,10 +10,8 @@ /** @file settings_gui.cpp GUI for settings. */ #include "stdafx.h" -#include "openttd.h" #include "currency.h" #include "gui.h" -#include "window_gui.h" #include "textbuf_gui.h" #include "command_func.h" #include "screenshot.h" @@ -24,15 +22,15 @@ #include "strings_func.h" #include "window_func.h" #include "string_func.h" -#include "gfx_func.h" #include "widgets/dropdown_type.h" #include "widgets/dropdown_func.h" -#include "station_func.h" +#include "openttd.h" #include "highscore.h" #include "base_media_base.h" #include "company_base.h" #include "company_func.h" #include "viewport_func.h" +#include "core/geometry_func.hpp" #include #include "table/sprites.h" diff --git a/src/settings_internal.h b/src/settings_internal.h --- a/src/settings_internal.h +++ b/src/settings_internal.h @@ -14,6 +14,7 @@ #include "saveload/saveload.h" #include "settings_type.h" +#include "strings_type.h" /** Convention/Type of settings. This is then further specified if necessary * with the SLE_ (SLE_VAR/SLE_FILE) enums in saveload.h diff --git a/src/ship.h b/src/ship.h --- a/src/ship.h +++ b/src/ship.h @@ -13,9 +13,6 @@ #define SHIP_H #include "vehicle_base.h" -#include "engine_func.h" -#include "engine_base.h" -#include "economy_func.h" void RecalcShipStuff(Vehicle *v); void GetShipSpriteSize(EngineID engine, uint &width, uint &height); diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -31,11 +31,14 @@ #include "vehicle_func.h" #include "sound_func.h" #include "autoreplace_gui.h" -#include "gfx_func.h" #include "effectvehicle_func.h" +#include "effectvehicle_base.h" #include "ai/ai.hpp" #include "pathfinder/opf/opf_ship.h" #include "landscape_type.h" +#include "engine_base.h" +#include "engine_func.h" +#include "company_base.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/signal.cpp b/src/signal.cpp --- a/src/signal.cpp +++ b/src/signal.cpp @@ -16,6 +16,7 @@ #include "vehicle_func.h" #include "functions.h" #include "train.h" +#include "company_base.h" /** these are the maximums used for updating signal blocks */ diff --git a/src/signs_base.h b/src/signs_base.h --- a/src/signs_base.h +++ b/src/signs_base.h @@ -14,8 +14,8 @@ #include "signs_type.h" #include "viewport_type.h" -#include "tile_type.h" #include "core/pool_type.hpp" +#include "company_type.h" typedef Pool SignPool; extern SignPool _sign_pool; diff --git a/src/signs_func.h b/src/signs_func.h --- a/src/signs_func.h +++ b/src/signs_func.h @@ -13,6 +13,7 @@ #define SIGNS_FUNC_H #include "signs_type.h" +#include "tile_type.h" extern SignID _new_sign_id; diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp --- a/src/signs_gui.cpp +++ b/src/signs_gui.cpp @@ -24,6 +24,7 @@ #include "querystring_gui.h" #include "sortlist_type.h" #include "string_func.h" +#include "core/geometry_func.hpp" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -17,7 +17,6 @@ #include "window_gui.h" #include "tree_map.h" #include "viewport_func.h" -#include "gfx_func.h" #include "town.h" #include "blitter/factory.hpp" #include "tunnelbridge_map.h" @@ -26,6 +25,7 @@ #include "vehicle_base.h" #include "sound_func.h" #include "window_func.h" +#include "company_base.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/sound.cpp b/src/sound.cpp --- a/src/sound.cpp +++ b/src/sound.cpp @@ -16,7 +16,6 @@ #include "fios.h" #include "window_gui.h" #include "vehicle_base.h" -#include "debug.h" /* The type of set we're replacing */ #define SET_TYPE "sounds" diff --git a/src/sound/allegro_s.cpp b/src/sound/allegro_s.cpp --- a/src/sound/allegro_s.cpp +++ b/src/sound/allegro_s.cpp @@ -13,7 +13,6 @@ #include "../stdafx.h" -#include "../driver.h" #include "../mixer.h" #include "../debug.h" #include "allegro_s.h" diff --git a/src/sound/win32_s.cpp b/src/sound/win32_s.cpp --- a/src/sound/win32_s.cpp +++ b/src/sound/win32_s.cpp @@ -14,6 +14,7 @@ #include "../driver.h" #include "../mixer.h" #include "../core/alloc_func.hpp" +#include "../core/bitmath_func.hpp" #include "win32_s.h" #include #include diff --git a/src/spritecache.cpp b/src/spritecache.cpp --- a/src/spritecache.cpp +++ b/src/spritecache.cpp @@ -10,7 +10,6 @@ /** @file spritecache.cpp Caching of sprites. */ #include "stdafx.h" -#include "gfx_type.h" #include "fileio_func.h" #include "spriteloader/grf.hpp" #include "gfx_func.h" diff --git a/src/spriteloader/png.cpp b/src/spriteloader/png.cpp --- a/src/spriteloader/png.cpp +++ b/src/spriteloader/png.cpp @@ -12,7 +12,6 @@ #ifdef WITH_PNG #include "../stdafx.h" -#include "../gfx_func.h" #include "../fileio_func.h" #include "../debug.h" #include "png.hpp" diff --git a/src/spriteloader/spriteloader.hpp b/src/spriteloader/spriteloader.hpp --- a/src/spriteloader/spriteloader.hpp +++ b/src/spriteloader/spriteloader.hpp @@ -13,6 +13,7 @@ #define SPRITELOADER_HPP #include "../core/alloc_type.hpp" +#include "../gfx_type.h" class SpriteLoader { public: diff --git a/src/station.cpp b/src/station.cpp --- a/src/station.cpp +++ b/src/station.cpp @@ -23,6 +23,7 @@ #include "station_base.h" #include "roadstop_base.h" #include "industry.h" +#include "core/random_func.hpp" #include "table/strings.h" diff --git a/src/station_base.h b/src/station_base.h --- a/src/station_base.h +++ b/src/station_base.h @@ -15,10 +15,7 @@ #include "base_station_base.h" #include "airport.h" #include "cargopacket.h" -#include "cargo_type.h" #include "industry_type.h" -#include "core/geometry_type.hpp" -#include typedef Pool StationPool; extern StationPool _station_pool; diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -10,7 +10,6 @@ /** @file station_cmd.cpp Handling of station tiles. */ #include "stdafx.h" -#include "openttd.h" #include "aircraft.h" #include "bridge_map.h" #include "cmd_helper.h" @@ -45,6 +44,9 @@ #include "waypoint_func.h" #include "pbs.h" #include "debug.h" +#include "core/random_func.hpp" +#include "company_base.h" +#include "newgrf.h" #include "table/strings.h" diff --git a/src/station_func.h b/src/station_func.h --- a/src/station_func.h +++ b/src/station_func.h @@ -16,10 +16,9 @@ #include "sprite.h" #include "rail_type.h" #include "road_type.h" -#include "tile_type.h" #include "cargo_type.h" -#include "vehicle_type.h" #include "transparency.h" +#include "company_type.h" void ModifyStationRatingAround(TileIndex tile, Owner owner, int amount, uint radius); diff --git a/src/station_gui.cpp b/src/station_gui.cpp --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -10,10 +10,8 @@ /** @file station_gui.cpp The GUI for stations. */ #include "stdafx.h" -#include "openttd.h" #include "debug.h" #include "gui.h" -#include "window_gui.h" #include "textbuf_gui.h" #include "company_func.h" #include "command_func.h" @@ -23,13 +21,13 @@ #include "strings_func.h" #include "window_func.h" #include "viewport_func.h" -#include "gfx_func.h" #include "widgets/dropdown_func.h" #include "station_base.h" #include "waypoint_base.h" #include "tilehighlight_func.h" #include "company_base.h" #include "sortlist_type.h" +#include "core/geometry_func.hpp" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/station_gui.h b/src/station_gui.h --- a/src/station_gui.h +++ b/src/station_gui.h @@ -13,7 +13,8 @@ #define STATION_GUI_H #include "command_type.h" -#include "station_type.h" +#include "tilearea_type.h" +#include "window_type.h" /** Enum for StationView, referring to _station_view_widgets and _station_view_expanded_widgets */ enum StationViewWidgets { diff --git a/src/station_type.h b/src/station_type.h --- a/src/station_type.h +++ b/src/station_type.h @@ -14,7 +14,6 @@ #include "core/enum_type.hpp" #include "core/smallvec_type.hpp" -#include "tile_type.h" #include "tilearea_type.h" typedef uint16 StationID; diff --git a/src/statusbar_gui.cpp b/src/statusbar_gui.cpp --- a/src/statusbar_gui.cpp +++ b/src/statusbar_gui.cpp @@ -25,6 +25,7 @@ #include "variables.h" #include "window_func.h" #include "statusbar_gui.h" +#include "core/geometry_func.hpp" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/strings.cpp b/src/strings.cpp --- a/src/strings.cpp +++ b/src/strings.cpp @@ -10,7 +10,6 @@ /** @file strings.cpp Handling of translated strings. */ #include "stdafx.h" -#include "openttd.h" #include "currency.h" #include "station_base.h" #include "town.h" @@ -29,11 +28,11 @@ #include "core/endian_func.hpp" #include "date_func.h" #include "vehicle_base.h" -#include "video/video_driver.hpp" #include "engine_base.h" #include "strgen/strgen.h" -#include "gfx_func.h" #include "townname_func.h" +#include "string_func.h" +#include "company_base.h" #include "table/strings.h" #include "table/control_codes.h" diff --git a/src/subsidy.cpp b/src/subsidy.cpp --- a/src/subsidy.cpp +++ b/src/subsidy.cpp @@ -22,6 +22,7 @@ #include "subsidy_base.h" #include "subsidy_func.h" #include "core/pool_func.hpp" +#include "core/random_func.hpp" #include "table/strings.h" diff --git a/src/subsidy_func.h b/src/subsidy_func.h --- a/src/subsidy_func.h +++ b/src/subsidy_func.h @@ -14,9 +14,8 @@ #include "core/geometry_type.hpp" #include "station_type.h" -#include "town_type.h" -#include "industry_type.h" #include "company_type.h" +#include "cargo_type.h" Pair SetupSubsidyDecodeParam(const struct Subsidy *s, bool mode); void DeleteSubsidyWith(SourceType type, SourceID index); diff --git a/src/subsidy_gui.cpp b/src/subsidy_gui.cpp --- a/src/subsidy_gui.cpp +++ b/src/subsidy_gui.cpp @@ -10,7 +10,6 @@ /** @file subsidy_gui.cpp GUI for subsidies. */ #include "stdafx.h" -#include "strings_type.h" #include "industry.h" #include "town.h" #include "window_gui.h" @@ -21,6 +20,7 @@ #include "gui.h" #include "subsidy_func.h" #include "subsidy_base.h" +#include "core/geometry_func.hpp" #include "table/strings.h" diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp --- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -10,7 +10,6 @@ /** @file terraform_gui.cpp GUI related to terraforming the map. */ #include "stdafx.h" -#include "openttd.h" #include "clear_map.h" #include "company_func.h" #include "company_base.h" @@ -18,7 +17,6 @@ #include "window_gui.h" #include "window_func.h" #include "viewport_func.h" -#include "gfx_func.h" #include "command_func.h" #include "signs_func.h" #include "variables.h" diff --git a/src/texteff.cpp b/src/texteff.cpp --- a/src/texteff.cpp +++ b/src/texteff.cpp @@ -10,13 +10,9 @@ /** @file texteff.cpp Handling of text effects. */ #include "stdafx.h" -#include "openttd.h" -#include "strings_type.h" #include "texteff.hpp" -#include "core/bitmath_func.hpp" #include "transparency.h" #include "strings_func.h" -#include "core/alloc_func.hpp" #include "core/smallvec_type.hpp" #include "viewport_func.h" #include "settings_type.h" diff --git a/src/texteff.hpp b/src/texteff.hpp --- a/src/texteff.hpp +++ b/src/texteff.hpp @@ -13,6 +13,7 @@ #define TEXTEFF_HPP #include "gfx_type.h" +#include "strings_type.h" /** * Text effect modes. diff --git a/src/tile_cmd.h b/src/tile_cmd.h --- a/src/tile_cmd.h +++ b/src/tile_cmd.h @@ -12,17 +12,10 @@ #ifndef TILE_CMD_H #define TILE_CMD_H -#include "slope_type.h" -#include "tile_type.h" #include "command_type.h" #include "vehicle_type.h" #include "cargo_type.h" -#include "strings_type.h" -#include "date_type.h" -#include "company_type.h" -#include "direction_type.h" #include "track_type.h" -#include "transport_type.h" #include "tile_map.h" /** The returned bits of VehicleEnterTile. */ diff --git a/src/tile_map.h b/src/tile_map.h --- a/src/tile_map.h +++ b/src/tile_map.h @@ -12,9 +12,7 @@ #ifndef TILE_MAP_H #define TILE_MAP_H -#include "tile_type.h" #include "slope_type.h" -#include "company_type.h" #include "map_func.h" #include "core/bitmath_func.hpp" #include "settings_type.h" diff --git a/src/tile_type.h b/src/tile_type.h --- a/src/tile_type.h +++ b/src/tile_type.h @@ -12,7 +12,6 @@ #ifndef TILE_TYPE_H #define TILE_TYPE_H -#include "core/enum_type.hpp" enum { TILE_SIZE = 16, ///< Tiles are 16x16 "units" in size diff --git a/src/tilehighlight_func.h b/src/tilehighlight_func.h --- a/src/tilehighlight_func.h +++ b/src/tilehighlight_func.h @@ -13,8 +13,6 @@ #define TILEHIGHLIGHT_FUNC_H #include "gfx_type.h" -#include "window_type.h" -#include "viewport_type.h" #include "tilehighlight_type.h" typedef void PlaceProc(TileIndex tile); diff --git a/src/tilehighlight_type.h b/src/tilehighlight_type.h --- a/src/tilehighlight_type.h +++ b/src/tilehighlight_type.h @@ -13,9 +13,9 @@ #define TILEHIGHLIGHT_TYPE_H #include "core/geometry_type.hpp" -#include "zoom_type.h" #include "window_type.h" #include "tile_type.h" +#include "viewport_type.h" /** Highlighting draw styles */ enum HighLightStyle { diff --git a/src/timetable.h b/src/timetable.h --- a/src/timetable.h +++ b/src/timetable.h @@ -13,6 +13,7 @@ #define TIMETABLE_H #include "date_type.h" +#include "vehicle_type.h" void ShowTimetableWindow(const Vehicle *v); void UpdateVehicleTimetable(Vehicle *v, bool travelling); diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -23,6 +23,7 @@ #include "date_func.h" #include "date_gui.h" #include "vehicle_gui.h" +#include "settings_type.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -10,7 +10,6 @@ /** @file toolbar_gui.cpp Code related to the (main) toolbar. */ #include "stdafx.h" -#include "openttd.h" #include "gui.h" #include "window_gui.h" #include "window_func.h" @@ -41,6 +40,7 @@ #include "tilehighlight_func.h" #include "rail.h" #include "widgets/dropdown_type.h" +#include "company_base.h" #include "network/network.h" #include "network/network_gui.h" diff --git a/src/town.h b/src/town.h --- a/src/town.h +++ b/src/town.h @@ -13,18 +13,7 @@ #define TOWN_H #include "core/pool_type.hpp" -#include "core/bitmath_func.hpp" -#include "core/random_func.hpp" -#include "cargo_type.h" -#include "tile_type.h" -#include "date_type.h" -#include "town_type.h" -#include "company_type.h" -#include "settings_type.h" -#include "strings_type.h" #include "viewport_type.h" -#include "economy_type.h" -#include "map_type.h" #include "command_type.h" #include "town_map.h" #include "subsidy_type.h" diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -10,8 +10,6 @@ /** @file town_cmd.cpp Handling of town tiles. */ #include "stdafx.h" -#include "openttd.h" -#include "road_type.h" #include "road_internal.h" /* Cleaning up road bits */ #include "road_cmd.h" #include "landscape.h" @@ -30,7 +28,6 @@ #include "newgrf_commons.h" #include "newgrf_text.h" #include "autoslope.h" -#include "transparency.h" #include "tunnelbridge_map.h" #include "strings_func.h" #include "window_func.h" @@ -46,6 +43,7 @@ #include "town.h" #include "townname_func.h" #include "townname_type.h" +#include "core/random_func.hpp" #include "table/strings.h" #include "table/town_land.h" diff --git a/src/town_gui.cpp b/src/town_gui.cpp --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -33,6 +33,7 @@ #include "window_func.h" #include "townname_func.h" #include "townname_type.h" +#include "core/geometry_func.hpp" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/town_map.h b/src/town_map.h --- a/src/town_map.h +++ b/src/town_map.h @@ -13,7 +13,6 @@ #define TOWN_MAP_H #include "road_map.h" -#include "town_type.h" #include "house.h" /** diff --git a/src/townname.cpp b/src/townname.cpp --- a/src/townname.cpp +++ b/src/townname.cpp @@ -15,6 +15,7 @@ #include "town.h" #include "core/alloc_func.hpp" #include "strings_func.h" +#include "core/random_func.hpp" #include "table/townname.h" diff --git a/src/track_func.h b/src/track_func.h --- a/src/track_func.h +++ b/src/track_func.h @@ -14,7 +14,6 @@ #include "core/bitmath_func.hpp" #include "track_type.h" -#include "direction_type.h" #include "slope_func.h" /** diff --git a/src/train.h b/src/train.h --- a/src/train.h +++ b/src/train.h @@ -12,8 +12,6 @@ #ifndef TRAIN_H #define TRAIN_H -#include "stdafx.h" -#include "core/bitmath_func.hpp" #include "vehicle_base.h" struct Train; diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -15,8 +15,6 @@ #include "command_func.h" #include "pathfinder/npf/npf_func.h" #include "pathfinder/yapf/yapf.hpp" -#include "pathfinder/follow_track.hpp" -#include "openttd.h" #include "news_func.h" #include "company_func.h" #include "vehicle_gui.h" @@ -31,13 +29,18 @@ #include "vehicle_func.h" #include "sound_func.h" #include "autoreplace_gui.h" -#include "gfx_func.h" #include "ai/ai.hpp" #include "newgrf_station.h" #include "effectvehicle_func.h" +#include "effectvehicle_base.h" #include "gamelog.h" #include "network/network.h" #include "spritecache.h" +#include "core/random_func.hpp" +#include "company_base.h" +#include "engine_base.h" +#include "engine_func.h" +#include "newgrf.h" #include "table/strings.h" #include "table/train_cmd.h" diff --git a/src/train_gui.cpp b/src/train_gui.cpp --- a/src/train_gui.cpp +++ b/src/train_gui.cpp @@ -19,6 +19,7 @@ #include "vehicle_func.h" #include "engine_base.h" #include "window_func.h" +#include "settings_type.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/transparency_gui.cpp b/src/transparency_gui.cpp --- a/src/transparency_gui.cpp +++ b/src/transparency_gui.cpp @@ -10,7 +10,6 @@ /** @file transparency_gui.cpp The transparency GUI. */ #include "stdafx.h" -#include "openttd.h" #include "window_gui.h" #include "transparency.h" #include "sound_func.h" diff --git a/src/tree_cmd.cpp b/src/tree_cmd.cpp --- a/src/tree_cmd.cpp +++ b/src/tree_cmd.cpp @@ -10,7 +10,6 @@ /** @file tree_cmd.cpp Handling of tree tiles. */ #include "stdafx.h" -#include "openttd.h" #include "clear_map.h" #include "landscape.h" #include "tree_map.h" @@ -28,6 +27,7 @@ #include "water.h" #include "landscape_type.h" #include "company_base.h" +#include "core/random_func.hpp" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/tree_map.h b/src/tree_map.h --- a/src/tree_map.h +++ b/src/tree_map.h @@ -12,6 +12,8 @@ #ifndef TREE_MAP_H #define TREE_MAP_H +#include "tile_map.h" + /** * List of tree types along all landscape types. * diff --git a/src/tunnel_map.h b/src/tunnel_map.h --- a/src/tunnel_map.h +++ b/src/tunnel_map.h @@ -12,10 +12,6 @@ #ifndef TUNNEL_MAP_H #define TUNNEL_MAP_H -#include "direction_func.h" -#include "rail_type.h" -#include "road_type.h" -#include "transport_type.h" #include "road_map.h" diff --git a/src/tunnelbridge.h b/src/tunnelbridge.h --- a/src/tunnelbridge.h +++ b/src/tunnelbridge.h @@ -12,7 +12,7 @@ #ifndef TUNNELBRIDGE_H #define TUNNELBRIDGE_H -#include "tile_type.h" +#include "map_func.h" /** * Calculates the length of a tunnel or a bridge (without end tiles) diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -13,7 +13,6 @@ */ #include "stdafx.h" -#include "openttd.h" #include "rail_map.h" #include "landscape.h" #include "unmovable_map.h" @@ -39,6 +38,8 @@ #include "elrail_func.h" #include "landscape_type.h" #include "pbs.h" +#include "company_base.h" +#include "engine_base.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/tunnelbridge_map.h b/src/tunnelbridge_map.h --- a/src/tunnelbridge_map.h +++ b/src/tunnelbridge_map.h @@ -12,13 +12,8 @@ #ifndef TUNNELBRIDGE_MAP_H #define TUNNELBRIDGE_MAP_H -#include "direction_func.h" -#include "core/bitmath_func.hpp" -#include "tile_map.h" #include "bridge_map.h" #include "tunnel_map.h" -#include "transport_type.h" -#include "track_func.h" /** diff --git a/src/unmovable.h b/src/unmovable.h --- a/src/unmovable.h +++ b/src/unmovable.h @@ -12,9 +12,8 @@ #ifndef UNMOVABLE_H #define UNMOVABLE_H -#include "unmovable_map.h" -#include "economy_type.h" #include "economy_func.h" +#include "strings_type.h" void UpdateCompanyHQ(Company *c, uint score); diff --git a/src/unmovable_cmd.cpp b/src/unmovable_cmd.cpp --- a/src/unmovable_cmd.cpp +++ b/src/unmovable_cmd.cpp @@ -10,7 +10,6 @@ /** @file unmovable_cmd.cpp Handling of unmovable tiles. */ #include "stdafx.h" -#include "openttd.h" #include "landscape.h" #include "command_func.h" #include "viewport_func.h" @@ -28,6 +27,9 @@ #include "landscape_type.h" #include "unmovable.h" #include "cargopacket.h" +#include "sprite.h" +#include "core/random_func.hpp" +#include "unmovable_map.h" #include "table/strings.h" #include "table/sprites.h" diff --git a/src/unmovable_map.h b/src/unmovable_map.h --- a/src/unmovable_map.h +++ b/src/unmovable_map.h @@ -12,7 +12,6 @@ #ifndef UNMOVABLE_MAP_H #define UNMOVABLE_MAP_H -#include "core/bitmath_func.hpp" #include "tile_map.h" /** Types of unmovable structure */ diff --git a/src/vehicle.cpp b/src/vehicle.cpp --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -11,7 +11,6 @@ #include "stdafx.h" #include "gui.h" -#include "openttd.h" #include "debug.h" #include "roadveh.h" #include "ship.h" @@ -47,6 +46,9 @@ #include "economy_base.h" #include "articulated_vehicles.h" #include "roadstop_base.h" +#include "core/random_func.hpp" +#include "engine_base.h" +#include "newgrf.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/vehicle_base.h b/src/vehicle_base.h --- a/src/vehicle_base.h +++ b/src/vehicle_base.h @@ -12,20 +12,12 @@ #ifndef VEHICLE_BASE_H #define VEHICLE_BASE_H -#include "vehicle_type.h" #include "track_type.h" -#include "cargo_type.h" #include "direction_type.h" -#include "gfx_type.h" #include "command_type.h" -#include "date_type.h" -#include "company_base.h" -#include "company_type.h" -#include "core/pool_type.hpp" #include "order_base.h" #include "cargopacket.h" #include "texteff.hpp" -#include "group_type.h" #include "engine_type.h" #include "order_func.h" #include "transport_type.h" diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp --- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -11,7 +11,6 @@ #include "stdafx.h" #include "roadveh.h" -#include "gfx_func.h" #include "news_func.h" #include "airport.h" #include "command_func.h" @@ -27,6 +26,7 @@ #include "string_func.h" #include "depot_map.h" #include "vehiclelist.h" +#include "engine_base.h" #include "table/strings.h" diff --git a/src/vehicle_func.h b/src/vehicle_func.h --- a/src/vehicle_func.h +++ b/src/vehicle_func.h @@ -12,16 +12,14 @@ #ifndef VEHICLE_FUNC_H #define VEHICLE_FUNC_H -#include "tile_type.h" -#include "strings_type.h" #include "gfx_type.h" #include "direction_type.h" -#include "cargo_type.h" #include "command_type.h" #include "vehicle_type.h" #include "engine_type.h" #include "transport_type.h" #include "newgrf_config.h" +#include "company_type.h" #define is_custom_sprite(x) (x >= 0xFD) #define IS_CUSTOM_FIRSTHEAD_SPRITE(x) (x == 0xFD) diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -10,17 +10,14 @@ /** @file vehicle_gui.cpp The base GUI for all vehicles. */ #include "stdafx.h" -#include "openttd.h" #include "debug.h" #include "company_func.h" #include "gui.h" -#include "window_gui.h" #include "textbuf_gui.h" #include "command_func.h" #include "vehicle_gui.h" #include "vehicle_gui_base.h" #include "viewport_func.h" -#include "gfx_func.h" #include "newgrf_engine.h" #include "newgrf_text.h" #include "waypoint_base.h" @@ -40,6 +37,10 @@ #include "articulated_vehicles.h" #include "cargotype.h" #include "spritecache.h" +#include "core/geometry_func.hpp" +#include "company_base.h" +#include "engine_base.h" +#include "engine_func.h" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/vehicle_gui.h b/src/vehicle_gui.h --- a/src/vehicle_gui.h +++ b/src/vehicle_gui.h @@ -17,7 +17,7 @@ #include "order_type.h" #include "station_type.h" #include "engine_type.h" -#include "tile_type.h" +#include "company_type.h" void ShowVehicleRefitWindow(const Vehicle *v, VehicleOrderID order, Window *parent); diff --git a/src/vehicle_gui_base.h b/src/vehicle_gui_base.h --- a/src/vehicle_gui_base.h +++ b/src/vehicle_gui_base.h @@ -13,6 +13,7 @@ #define VEHICLE_GUI_BASE_H #include "sortlist_type.h" +#include "window_gui.h" typedef GUIList GUIVehicleList; diff --git a/src/vehiclelist.h b/src/vehiclelist.h --- a/src/vehiclelist.h +++ b/src/vehiclelist.h @@ -13,6 +13,9 @@ #define VEHICLELIST_H #include "core/smallvec_type.hpp" +#include "vehicle_type.h" +#include "company_type.h" +#include "tile_type.h" typedef SmallVector VehicleList; diff --git a/src/video/allegro_v.cpp b/src/video/allegro_v.cpp --- a/src/video/allegro_v.cpp +++ b/src/video/allegro_v.cpp @@ -18,16 +18,13 @@ #include "../stdafx.h" #include "../openttd.h" -#include "../debug.h" #include "../gfx_func.h" #include "../variables.h" #include "../rev.h" #include "../blitter/factory.hpp" #include "../network/network.h" -#include "../core/math_func.hpp" #include "../core/random_func.hpp" #include "../functions.h" -#include "../texteff.hpp" #include "allegro_v.h" #include diff --git a/src/video/dedicated_v.cpp b/src/video/dedicated_v.cpp --- a/src/video/dedicated_v.cpp +++ b/src/video/dedicated_v.cpp @@ -13,8 +13,8 @@ #ifdef ENABLE_NETWORK -#include "../openttd.h" #include "../gfx_func.h" +#include "../network/network.h" #include "../network/network_internal.h" #include "../console_func.h" #include "../variables.h" diff --git a/src/video/sdl_v.cpp b/src/video/sdl_v.cpp --- a/src/video/sdl_v.cpp +++ b/src/video/sdl_v.cpp @@ -22,6 +22,7 @@ #include "../functions.h" #include "../thread/thread.h" #include "../genworld.h" +#include "../core/random_func.hpp" #include "sdl_v.h" #include diff --git a/src/viewport.cpp b/src/viewport.cpp --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -26,7 +26,6 @@ */ #include "stdafx.h" -#include "openttd.h" #include "landscape.h" #include "viewport_func.h" #include "station_base.h" @@ -38,7 +37,6 @@ #include "vehicle_base.h" #include "vehicle_gui.h" #include "blitter/factory.hpp" -#include "transparency.h" #include "strings_func.h" #include "zoom_func.h" #include "vehicle_func.h" diff --git a/src/water.h b/src/water.h --- a/src/water.h +++ b/src/water.h @@ -12,6 +12,10 @@ #ifndef WATER_H #define WATER_H +#include "tile_type.h" +#include "company_type.h" +#include "slope_type.h" + void TileLoop_Water(TileIndex tile); bool FloodHalftile(TileIndex t); void DoFloodTile(TileIndex target); diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -10,7 +10,6 @@ /** @file water_cmd.cpp Handling of water tiles. */ #include "stdafx.h" -#include "openttd.h" #include "cmd_helper.h" #include "landscape.h" #include "viewport_func.h" @@ -19,17 +18,11 @@ #include "news_func.h" #include "depot_base.h" #include "depot_func.h" -#include "vehicle_gui.h" -#include "train.h" -#include "roadveh.h" #include "water.h" #include "industry_map.h" -#include "cargotype.h" #include "newgrf_canal.h" -#include "transparency.h" #include "strings_func.h" #include "functions.h" -#include "window_func.h" #include "vehicle_func.h" #include "sound_func.h" #include "company_func.h" @@ -40,6 +33,7 @@ #include "tunnelbridge_map.h" #include "station_base.h" #include "ai/ai.hpp" +#include "core/random_func.hpp" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/water_map.h b/src/water_map.h --- a/src/water_map.h +++ b/src/water_map.h @@ -14,6 +14,7 @@ #include "core/math_func.hpp" #include "depot_type.h" +#include "tile_map.h" enum WaterTileType { WATER_TILE_CLEAR, diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp --- a/src/waypoint_gui.cpp +++ b/src/waypoint_gui.cpp @@ -16,7 +16,6 @@ #include "vehicle_gui.h" #include "viewport_func.h" #include "strings_func.h" -#include "gfx_func.h" #include "command_func.h" #include "company_func.h" #include "window_func.h" diff --git a/src/widget.cpp b/src/widget.cpp --- a/src/widget.cpp +++ b/src/widget.cpp @@ -10,13 +10,13 @@ /** @file widget.cpp Handling of the default/simple widgets. */ #include "stdafx.h" -#include "openttd.h" #include "company_func.h" #include "window_gui.h" #include "viewport_func.h" #include "zoom_func.h" #include "strings_func.h" #include "transparency.h" +#include "core/geometry_func.hpp" #include "table/sprites.h" #include "table/strings.h" diff --git a/src/widget_type.h b/src/widget_type.h --- a/src/widget_type.h +++ b/src/widget_type.h @@ -12,9 +12,11 @@ #ifndef WIDGET_TYPE_H #define WIDGET_TYPE_H +#include "core/alloc_type.hpp" #include "core/bitmath_func.hpp" #include "strings_type.h" #include "gfx_type.h" +#include "window_type.h" enum { WIDGET_LIST_END = -1, ///< indicate the end of widgets' list for vararg functions diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp --- a/src/widgets/dropdown.cpp +++ b/src/widgets/dropdown.cpp @@ -12,7 +12,6 @@ #include "../stdafx.h" #include "../window_gui.h" #include "../strings_func.h" -#include "../gfx_func.h" #include "../window_func.h" #include "dropdown_type.h" diff --git a/src/widgets/dropdown_func.h b/src/widgets/dropdown_func.h --- a/src/widgets/dropdown_func.h +++ b/src/widgets/dropdown_func.h @@ -12,6 +12,8 @@ #ifndef WIDGETS_DROPDOWN_FUNC_H #define WIDGETS_DROPDOWN_FUNC_H +#include "../window_gui.h" + /* Show drop down menu containing a fixed list of strings */ void ShowDropDownMenu(Window *w, const StringID *strings, int selected, int button, uint32 disabled_mask, uint32 hidden_mask, uint width = 0); diff --git a/src/widgets/dropdown_type.h b/src/widgets/dropdown_type.h --- a/src/widgets/dropdown_type.h +++ b/src/widgets/dropdown_type.h @@ -13,6 +13,7 @@ #define WIDGETS_DROPDOWN_TYPE_H #include "../window_type.h" +#include "../gfx_func.h" #include /** diff --git a/src/window.cpp b/src/window.cpp --- a/src/window.cpp +++ b/src/window.cpp @@ -30,6 +30,7 @@ #include "querystring_gui.h" #include "widgets/dropdown_func.h" #include "strings_func.h" +#include "settings_type.h" #include "table/sprites.h" diff --git a/src/window_gui.h b/src/window_gui.h --- a/src/window_gui.h +++ b/src/window_gui.h @@ -12,13 +12,10 @@ #ifndef WINDOW_GUI_H #define WINDOW_GUI_H -#include "core/geometry_func.hpp" #include "core/math_func.hpp" #include "vehicle_type.h" #include "viewport_type.h" #include "company_type.h" -#include "core/alloc_type.hpp" -#include "window_type.h" #include "tile_type.h" #include "widget_type.h" diff --git a/src/window_type.h b/src/window_type.h --- a/src/window_type.h +++ b/src/window_type.h @@ -12,7 +12,6 @@ #ifndef WINDOW_TYPE_H #define WINDOW_TYPE_H -#include "core/enum_type.hpp" /** * Window classes