Mercurial > hg > openttd
changeset 18886:8d78f45313bf draft
(svn r23735) -Codechange: remove ~50 includes from headers that weren't needed
line wrap: on
line diff
--- a/src/ai/ai.hpp +++ b/src/ai/ai.hpp @@ -13,7 +13,6 @@ #define AI_HPP #include "../script/api/script_event_types.hpp" -#include "../date_type.h" #include "../core/string_compare_type.hpp" #include <map>
--- a/src/ai/ai_config.hpp +++ b/src/ai/ai_config.hpp @@ -13,6 +13,7 @@ #define AI_CONFIG_HPP #include "../script/script_config.hpp" +#include "../company_type.h" class AIConfig : public ScriptConfig { public:
--- a/src/ai/ai_info.hpp +++ b/src/ai/ai_info.hpp @@ -13,7 +13,6 @@ #define AI_INFO_HPP #include "../script/script_info.hpp" -#include "../script/script_config.hpp" /** All static information from an AI like name, version, etc. */ class AIInfo : public ScriptInfo {
--- a/src/ai/ai_instance.hpp +++ b/src/ai/ai_instance.hpp @@ -12,7 +12,6 @@ #ifndef AI_INSTANCE_HPP #define AI_INSTANCE_HPP -#include <squirrel.h> #include "../script/script_instance.hpp" /** Runtime information about an AI like a pointer to the squirrel vm and the current state. */
--- a/src/autoreplace_func.h +++ b/src/autoreplace_func.h @@ -14,8 +14,6 @@ #include "command_type.h" #include "company_base.h" -#include "engine_type.h" -#include "group_type.h" void RemoveAllEngineReplacement(EngineRenewList *erl); EngineID EngineReplacement(EngineRenewList erl, EngineID engine, GroupID group);
--- a/src/autoslope.h +++ b/src/autoslope.h @@ -14,7 +14,6 @@ #include "company_func.h" #include "depot_func.h" -#include "slope_func.h" #include "tile_map.h" /**
--- a/src/cmd_helper.h +++ b/src/cmd_helper.h @@ -13,7 +13,6 @@ #define CMD_HELPER_H #include "core/enum_type.hpp" -#include "core/bitmath_func.hpp" /** * Extracts a given type from a value.
--- a/src/company_base.h +++ b/src/company_base.h @@ -12,12 +12,9 @@ #ifndef COMPANY_BASE_H #define COMPANY_BASE_H -#include "core/pool_type.hpp" #include "road_type.h" -#include "rail_type.h" #include "livery.h" #include "autoreplace_type.h" -#include "economy_type.h" #include "tile_type.h" #include "settings_type.h" #include "group.h"
--- a/src/company_func.h +++ b/src/company_func.h @@ -14,7 +14,6 @@ #include "command_type.h" #include "company_type.h" -#include "tile_type.h" #include "gfx_type.h" bool MayCompanyTakeOver(CompanyID cbig, CompanyID small);
--- a/src/depot_func.h +++ b/src/depot_func.h @@ -12,10 +12,8 @@ #ifndef DEPOT_FUNC_H #define DEPOT_FUNC_H -#include "tile_type.h" #include "vehicle_type.h" -#include "direction_type.h" -#include "slope_type.h" +#include "slope_func.h" void ShowDepotWindow(TileIndex tile, VehicleType type);
--- a/src/effectvehicle_base.h +++ b/src/effectvehicle_base.h @@ -13,6 +13,7 @@ #define EFFECTVEHICLE_BASE_H #include "vehicle_base.h" +#include "transparency.h" /** * A special vehicle is one of the following:
--- a/src/engine_base.h +++ b/src/engine_base.h @@ -12,11 +12,9 @@ #ifndef ENGINE_BASE_H #define ENGINE_BASE_H -#include "company_type.h" #include "engine_type.h" #include "vehicle_type.h" #include "core/pool_type.hpp" -#include "core/smallvec_type.hpp" #include "newgrf_commons.h" typedef Pool<Engine, EngineID, 64, 64000> EnginePool;
--- a/src/engine_gui.h +++ b/src/engine_gui.h @@ -15,6 +15,7 @@ #include "engine_type.h" #include "sortlist_type.h" #include "gfx_type.h" +#include "vehicle_type.h" typedef GUIList<EngineID, CargoID> GUIEngineList;
--- a/src/game/game_info.hpp +++ b/src/game/game_info.hpp @@ -13,7 +13,6 @@ #define GAME_INFO_HPP #include "../script/script_info.hpp" -#include "../script/script_config.hpp" /** All static information from an Game like name, version, etc. */ class GameInfo : public ScriptInfo {
--- a/src/goal_base.h +++ b/src/goal_base.h @@ -12,7 +12,6 @@ #ifndef GOAL_BASE_H #define GOAL_BASE_H -#include "cargo_type.h" #include "company_type.h" #include "goal_type.h" #include "core/pool_type.hpp"
--- a/src/goal_type.h +++ b/src/goal_type.h @@ -12,6 +12,8 @@ #ifndef GOAL_TYPE_H #define GOAL_TYPE_H +#include "core/enum_type.hpp" + enum { GOAL_QUESTION_BUTTON_COUNT = 18, ///< Amount of buttons available. };
--- a/src/ground_vehicle.hpp +++ b/src/ground_vehicle.hpp @@ -16,6 +16,7 @@ #include "vehicle_gui.h" #include "landscape.h" #include "window_func.h" +#include "widgets/vehicle_widget.h" /** What is the status of our acceleration? */ enum AccelStatus {
--- a/src/gui.h +++ b/src/gui.h @@ -16,7 +16,6 @@ #include "gfx_type.h" #include "economy_type.h" #include "tile_type.h" -#include "strings_type.h" #include "transport_type.h" struct Window;
--- a/src/house.h +++ b/src/house.h @@ -12,9 +12,7 @@ #ifndef HOUSE_H #define HOUSE_H -#include "strings_type.h" #include "cargo_type.h" -#include "economy_type.h" #include "date_type.h" #include "house_type.h" #include "newgrf_animation_type.h"
--- a/src/industry.h +++ b/src/industry.h @@ -12,7 +12,6 @@ #ifndef INDUSTRY_H #define INDUSTRY_H -#include "core/pool_type.hpp" #include "newgrf_storage.h" #include "subsidy_type.h" #include "industry_map.h"
--- a/src/industrytype.h +++ b/src/industrytype.h @@ -12,12 +12,10 @@ #ifndef INDUSTRYTYPE_H #define INDUSTRYTYPE_H -#include "economy_type.h" #include "map_type.h" #include "slope_type.h" #include "industry_type.h" #include "landscape_type.h" -#include "strings_type.h" #include "cargo_type.h" #include "newgrf_animation_type.h" #include "newgrf_commons.h"
--- a/src/landscape.h +++ b/src/landscape.h @@ -14,7 +14,6 @@ #include "core/geometry_type.hpp" #include "tile_cmd.h" -#include "zoom_type.h" static const uint SNOW_LINE_MONTHS = 12; ///< Number of months in the snow line table. static const uint SNOW_LINE_DAYS = 32; ///< Number of days in each month in the snow line table.
--- a/src/newgrf_airport.h +++ b/src/newgrf_airport.h @@ -14,10 +14,8 @@ #include "airport.h" #include "date_type.h" -#include "map_type.h" #include "newgrf_class.h" #include "newgrf_commons.h" -#include "gfx_type.h" #include "tilearea_type.h" /** Copy from station_map.h */
--- a/src/newgrf_animation_base.h +++ b/src/newgrf_animation_base.h @@ -17,6 +17,7 @@ #include "viewport_func.h" #include "newgrf_animation_type.h" #include "newgrf_callbacks.h" +#include "tile_map.h" /** * Helper class for a unified approach to NewGRF animation.
--- a/src/newgrf_canal.h +++ b/src/newgrf_canal.h @@ -12,9 +12,8 @@ #ifndef NEWGRF_CANAL_H #define NEWGRF_CANAL_H -#include "gfx_type.h" +#include "newgrf.h" #include "tile_type.h" -#include "newgrf_generic.h" /** Flags controlling the display of canals. */ enum CanalFeatureFlag {
--- a/src/newgrf_commons.h +++ b/src/newgrf_commons.h @@ -15,7 +15,6 @@ #ifndef NEWGRF_COMMONS_H #define NEWGRF_COMMONS_H -#include "tile_type.h" #include "sprite.h" #include "core/alloc_type.hpp" #include "core/smallvec_type.hpp"
--- a/src/newgrf_generic.h +++ b/src/newgrf_generic.h @@ -12,7 +12,6 @@ #ifndef NEWGRF_GENERIC_H #define NEWGRF_GENERIC_H -#include "cargo_type.h" #include "industry_type.h" #include "newgrf.h" #include "tile_type.h"
--- a/src/newgrf_industries.h +++ b/src/newgrf_industries.h @@ -12,8 +12,6 @@ #ifndef NEWGRF_INDUSTRIES_H #define NEWGRF_INDUSTRIES_H -#include "command_type.h" -#include "company_type.h" #include "newgrf_spritegroup.h" /** When should the industry(tile) be triggered for random bits? */
--- a/src/newgrf_industrytiles.h +++ b/src/newgrf_industrytiles.h @@ -12,7 +12,6 @@ #ifndef NEWGRF_INDUSTRYTILES_H #define NEWGRF_INDUSTRYTILES_H -#include "tile_cmd.h" #include "newgrf_animation_type.h" #include "newgrf_industries.h" #include "core/random_func.hpp"
--- a/src/newgrf_object.cpp +++ b/src/newgrf_object.cpp @@ -22,6 +22,7 @@ #include "object_base.h" #include "object_map.h" #include "sprite.h" +#include "tile_cmd.h" #include "town.h" #include "viewport_func.h" #include "water.h"
--- a/src/newgrf_object.h +++ b/src/newgrf_object.h @@ -14,7 +14,7 @@ #include "newgrf_callbacks.h" #include "economy_func.h" -#include "tile_cmd.h" +#include "date_type.h" #include "object_type.h" #include "newgrf_animation_type.h" #include "newgrf_class.h"
--- a/src/newgrf_spritegroup.h +++ b/src/newgrf_spritegroup.h @@ -13,9 +13,7 @@ #define NEWGRF_SPRITEGROUP_H #include "town_type.h" -#include "gfx_type.h" #include "engine_type.h" -#include "core/pool_type.hpp" #include "house_type.h" #include "newgrf_callbacks.h"
--- a/src/newgrf_station.h +++ b/src/newgrf_station.h @@ -16,7 +16,6 @@ #include "newgrf_callbacks.h" #include "newgrf_class.h" #include "newgrf_commons.h" -#include "sprite.h" #include "cargo_type.h" #include "station_type.h" #include "rail_type.h"
--- a/src/newgrf_storage.h +++ b/src/newgrf_storage.h @@ -12,7 +12,6 @@ #ifndef NEWGRF_STORAGE_H #define NEWGRF_STORAGE_H -#include "core/alloc_func.hpp" #include "core/pool_type.hpp" /**
--- a/src/newgrf_town.h +++ b/src/newgrf_town.h @@ -17,7 +17,7 @@ /* Currently there is no direct town resolver; we only need to get town * variable results from inside stations, house tiles and industries, * and to check the town's persistent storage. */ -uint32 TownGetVariable(byte variable, uint32 parameter, bool *available, Town *t, const GRFFile *caller_grffile); -void TownStorePSA(Town *t, const GRFFile *caller_grffile, uint pos, int32 value); +uint32 TownGetVariable(byte variable, uint32 parameter, bool *available, Town *t, const struct GRFFile *caller_grffile); +void TownStorePSA(Town *t, const struct GRFFile *caller_grffile, uint pos, int32 value); #endif /* NEWGRF_TOWN_H */
--- a/src/object_base.h +++ b/src/object_base.h @@ -17,7 +17,6 @@ #include "tilearea_type.h" #include "town_type.h" #include "date_type.h" -#include "core/smallvec_type.hpp" typedef Pool<Object, ObjectID, 64, 64000> ObjectPool; extern ObjectPool _object_pool;
--- a/src/rail.h +++ b/src/rail.h @@ -20,7 +20,6 @@ #include "slope_type.h" #include "strings_type.h" #include "date_type.h" -#include "core/math_func.hpp" /** Railtype flags. */ enum RailTypeFlags {
--- a/src/road_func.h +++ b/src/road_func.h @@ -14,9 +14,6 @@ #include "core/bitmath_func.hpp" #include "road_type.h" -#include "direction_type.h" -#include "company_type.h" -#include "tile_type.h" #include "economy_func.h" /**
--- a/src/script/api/script_basestation.cpp +++ b/src/script/api/script_basestation.cpp @@ -11,6 +11,7 @@ #include "../../stdafx.h" #include "script_basestation.hpp" +#include "script_error.hpp" #include "../../station_base.h" #include "../../string_func.h" #include "../../strings_func.h"
--- a/src/script/api/script_basestation.hpp +++ b/src/script/api/script_basestation.hpp @@ -12,7 +12,6 @@ #ifndef SCRIPT_BASESTATION_HPP #define SCRIPT_BASESTATION_HPP -#include "script_error.hpp" #include "script_text.hpp" /**
--- a/src/script/api/script_cargo.hpp +++ b/src/script/api/script_cargo.hpp @@ -14,7 +14,6 @@ #include "script_object.hpp" #include "../../cargotype.h" -#include "../../cargo_type.h" /** * Class that handles all cargo related functions.
--- a/src/script/api/script_company.hpp +++ b/src/script/api/script_company.hpp @@ -12,7 +12,6 @@ #ifndef SCRIPT_COMPANY_HPP #define SCRIPT_COMPANY_HPP -#include "script_object.hpp" #include "script_text.hpp" /**
--- a/src/script/api/script_controller.hpp +++ b/src/script/api/script_controller.hpp @@ -12,7 +12,7 @@ #ifndef SCRIPT_CONTROLLER_HPP #define SCRIPT_CONTROLLER_HPP -#include "../../company_type.h" +#include "script_types.hpp" #include "../../core/string_compare_type.hpp" #include <map>
--- a/src/script/api/script_event_types.hpp +++ b/src/script/api/script_event_types.hpp @@ -13,7 +13,6 @@ #define SCRIPT_EVENT_TYPES_HPP #include "script_event.hpp" -#include "script_company.hpp" #include "script_goal.hpp" #include "script_window.hpp"
--- a/src/script/api/script_gamesettings.cpp +++ b/src/script/api/script_gamesettings.cpp @@ -12,6 +12,7 @@ #include "../../stdafx.h" #include "script_gamesettings.hpp" #include "../../settings_internal.h" +#include "../../settings_type.h" #include "../../command_type.h" /* static */ bool ScriptGameSettings::IsValid(const char *setting)
--- a/src/script/api/script_goal.hpp +++ b/src/script/api/script_goal.hpp @@ -12,7 +12,6 @@ #ifndef SCRIPT_GOAL_HPP #define SCRIPT_GOAL_HPP -#include "script_object.hpp" #include "script_company.hpp" #include "../../goal_type.h"
--- a/src/script/api/script_infrastructure.hpp +++ b/src/script/api/script_infrastructure.hpp @@ -12,7 +12,6 @@ #ifndef SCRIPT_INFRASTRUCTURE_HPP #define SCRIPT_INFRASTRUCTURE_HPP -#include "script_object.hpp" #include "script_road.hpp" #include "script_rail.hpp"
--- a/src/script/api/script_news.hpp +++ b/src/script/api/script_news.hpp @@ -13,7 +13,6 @@ #define SCRIPT_NEWS_HPP #include "script_company.hpp" -#include "script_text.hpp" #include "../../news_type.h" /**
--- a/src/script/api/script_order.hpp +++ b/src/script/api/script_order.hpp @@ -12,7 +12,6 @@ #ifndef SCRIPT_ORDER_HPP #define SCRIPT_ORDER_HPP -#include "script_error.hpp" #include "script_vehicle.hpp" #include "../../order_type.h"
--- a/src/script/api/script_town.hpp +++ b/src/script/api/script_town.hpp @@ -14,7 +14,6 @@ #include "script_cargo.hpp" #include "script_company.hpp" -#include "script_text.hpp" #include "../../town_type.h" /**
--- a/src/script/api/script_viewport.hpp +++ b/src/script/api/script_viewport.hpp @@ -12,7 +12,6 @@ #ifndef SCRIPT_VIEWPORT_HPP #define SCRIPT_VIEWPORT_HPP -#include <string> #include "script_object.hpp" /**
--- a/src/script/api/script_waypoint.hpp +++ b/src/script/api/script_waypoint.hpp @@ -13,6 +13,7 @@ #define SCRIPT_WAYPOINT_HPP #include "script_basestation.hpp" +#include "script_error.hpp" #include "../../station_type.h" /**
--- a/src/script/script_config.hpp +++ b/src/script/script_config.hpp @@ -16,7 +16,6 @@ #include <list> #include "../core/smallmap_type.hpp" #include "../core/string_compare_type.hpp" -#include "../company_type.h" /** Bitmask of flags for Script settings. */ enum ScriptConfigFlags {
--- a/src/script/script_instance.hpp +++ b/src/script/script_instance.hpp @@ -16,6 +16,7 @@ #include "script_suspend.hpp" #include "../command_type.h" +#include "../company_type.h" static const uint SQUIRREL_MAX_DEPTH = 25; ///< The maximum recursive depth for items stored in the savegame.
--- a/src/script/squirrel_helper.hpp +++ b/src/script/squirrel_helper.hpp @@ -13,7 +13,6 @@ #define SQUIRREL_HELPER_HPP #include "squirrel.hpp" -#include "../core/math_func.hpp" #include "../core/smallvec_type.hpp" #include "../economy_type.h" #include "../string_func.h"
--- a/src/settings_internal.h +++ b/src/settings_internal.h @@ -13,8 +13,6 @@ #define SETTINGS_INTERNAL_H #include "saveload/saveload.h" -#include "settings_type.h" -#include "strings_type.h" /** * Convention/Type of settings. This is then further specified if necessary
--- a/src/station_base.h +++ b/src/station_base.h @@ -17,7 +17,6 @@ #include "cargopacket.h" #include "industry_type.h" #include "newgrf_storage.h" -#include "town.h" typedef Pool<BaseStation, StationID, 32, 64000> StationPool; extern StationPool _station_pool;
--- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -52,6 +52,7 @@ #include "order_backup.h" #include "newgrf_house.h" #include "company_gui.h" +#include "widgets/station_widget.h" #include "table/strings.h"
--- a/src/station_func.h +++ b/src/station_func.h @@ -12,12 +12,9 @@ #ifndef STATION_FUNC_H #define STATION_FUNC_H -#include "station_type.h" #include "sprite.h" #include "rail_type.h" #include "road_type.h" -#include "cargo_type.h" -#include "company_type.h" #include "economy_func.h" void ModifyStationRatingAround(TileIndex tile, Owner owner, int amount, uint radius);
--- a/src/station_gui.h +++ b/src/station_gui.h @@ -16,7 +16,6 @@ #include "tilearea_type.h" #include "window_type.h" -#include "widgets/station_widget.h" /** Types of cargo to display for station coverage. */ enum StationCoverageType {
--- a/src/strgen/strgen.h +++ b/src/strgen/strgen.h @@ -12,6 +12,8 @@ #ifndef STRGEN_H #define STRGEN_H +#include "../language.h" + /** Container for the different cases of a string. */ struct Case { int caseidx; ///< The index of the case.
--- a/src/tar_type.h +++ b/src/tar_type.h @@ -15,6 +15,8 @@ #include <map> #include <string> +#include "fileio_type.h" + /** The define of a TarList. */ struct TarListEntry { const char *filename;
--- a/src/textbuf_gui.h +++ b/src/textbuf_gui.h @@ -15,7 +15,6 @@ #include "window_type.h" #include "string_type.h" #include "strings_type.h" -#include "core/enum_type.hpp" /** Helper/buffer for input fields. */ struct Textbuf {
--- a/src/tilematrix_type.hpp +++ b/src/tilematrix_type.hpp @@ -12,7 +12,7 @@ #ifndef TILEMATRIX_TYPE_HPP #define TILEMATRIX_TYPE_HPP -#include "core/mem_func.hpp" +#include "core/alloc_func.hpp" #include "tilearea_type.h" /**
--- a/src/town.h +++ b/src/town.h @@ -12,9 +12,7 @@ #ifndef TOWN_H #define TOWN_H -#include "core/pool_type.hpp" #include "viewport_type.h" -#include "command_type.h" #include "town_map.h" #include "subsidy_type.h" #include "newgrf_storage.h"
--- a/src/vehicle_func.h +++ b/src/vehicle_func.h @@ -21,7 +21,6 @@ #include "newgrf_config.h" #include "track_type.h" #include "livery.h" -#include "cargotype.h" #define is_custom_sprite(x) (x >= 0xFD) #define IS_CUSTOM_FIRSTHEAD_SPRITE(x) (x == 0xFD)
--- a/src/vehicle_gui.h +++ b/src/vehicle_gui.h @@ -18,7 +18,6 @@ #include "station_type.h" #include "engine_type.h" #include "company_type.h" -#include "widgets/vehicle_widget.h" void ShowVehicleRefitWindow(const Vehicle *v, VehicleOrderID order, Window *parent, bool auto_refit = false);
--- a/src/water.h +++ b/src/water.h @@ -12,12 +12,8 @@ #ifndef WATER_H #define WATER_H -#include "tile_type.h" -#include "company_type.h" -#include "slope_type.h" #include "water_map.h" #include "economy_func.h" -#include "core/math_func.hpp" /** * Describes the behaviour of a tile during flooding.
--- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -38,6 +38,7 @@ #include "date_func.h" #include "company_base.h" #include "company_gui.h" +#include "newgrf_generic.h" #include "table/strings.h"