summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ai/ai.hpp1
-rw-r--r--src/ai/ai_config.hpp1
-rw-r--r--src/ai/ai_info.hpp1
-rw-r--r--src/ai/ai_instance.hpp1
-rw-r--r--src/autoreplace_func.h2
-rw-r--r--src/autoslope.h1
-rw-r--r--src/cmd_helper.h1
-rw-r--r--src/company_base.h3
-rw-r--r--src/company_func.h1
-rw-r--r--src/depot_func.h4
-rw-r--r--src/effectvehicle_base.h1
-rw-r--r--src/engine_base.h2
-rw-r--r--src/engine_gui.h1
-rw-r--r--src/game/game_info.hpp1
-rw-r--r--src/goal_base.h1
-rw-r--r--src/goal_type.h2
-rw-r--r--src/ground_vehicle.hpp1
-rw-r--r--src/gui.h1
-rw-r--r--src/house.h2
-rw-r--r--src/industry.h1
-rw-r--r--src/industrytype.h2
-rw-r--r--src/landscape.h1
-rw-r--r--src/newgrf_airport.h2
-rw-r--r--src/newgrf_animation_base.h1
-rw-r--r--src/newgrf_canal.h3
-rw-r--r--src/newgrf_commons.h1
-rw-r--r--src/newgrf_generic.h1
-rw-r--r--src/newgrf_industries.h2
-rw-r--r--src/newgrf_industrytiles.h1
-rw-r--r--src/newgrf_object.cpp1
-rw-r--r--src/newgrf_object.h2
-rw-r--r--src/newgrf_spritegroup.h2
-rw-r--r--src/newgrf_station.h1
-rw-r--r--src/newgrf_storage.h1
-rw-r--r--src/newgrf_town.h4
-rw-r--r--src/object_base.h1
-rw-r--r--src/rail.h1
-rw-r--r--src/road_func.h3
-rw-r--r--src/script/api/script_basestation.cpp1
-rw-r--r--src/script/api/script_basestation.hpp1
-rw-r--r--src/script/api/script_cargo.hpp1
-rw-r--r--src/script/api/script_company.hpp1
-rw-r--r--src/script/api/script_controller.hpp2
-rw-r--r--src/script/api/script_event_types.hpp1
-rw-r--r--src/script/api/script_gamesettings.cpp1
-rw-r--r--src/script/api/script_goal.hpp1
-rw-r--r--src/script/api/script_infrastructure.hpp1
-rw-r--r--src/script/api/script_news.hpp1
-rw-r--r--src/script/api/script_order.hpp1
-rw-r--r--src/script/api/script_town.hpp1
-rw-r--r--src/script/api/script_viewport.hpp1
-rw-r--r--src/script/api/script_waypoint.hpp1
-rw-r--r--src/script/script_config.hpp1
-rw-r--r--src/script/script_instance.hpp1
-rw-r--r--src/script/squirrel_helper.hpp1
-rw-r--r--src/settings_internal.h2
-rw-r--r--src/station_base.h1
-rw-r--r--src/station_cmd.cpp1
-rw-r--r--src/station_func.h3
-rw-r--r--src/station_gui.h1
-rw-r--r--src/strgen/strgen.h2
-rw-r--r--src/tar_type.h2
-rw-r--r--src/textbuf_gui.h1
-rw-r--r--src/tilematrix_type.hpp2
-rw-r--r--src/town.h2
-rw-r--r--src/vehicle_func.h1
-rw-r--r--src/vehicle_gui.h1
-rw-r--r--src/water.h4
-rw-r--r--src/water_cmd.cpp1
-rw-r--r--src/widgets/ai_widget.h2
-rw-r--r--src/widgets/graph_widget.h1
71 files changed, 28 insertions, 76 deletions
diff --git a/src/ai/ai.hpp b/src/ai/ai.hpp
index f0a5eb67b..967210f4f 100644
--- 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>
diff --git a/src/ai/ai_config.hpp b/src/ai/ai_config.hpp
index 1e738d14b..b02935902 100644
--- 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:
diff --git a/src/ai/ai_info.hpp b/src/ai/ai_info.hpp
index c582e70c2..51cfb7d8a 100644
--- 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 {
diff --git a/src/ai/ai_instance.hpp b/src/ai/ai_instance.hpp
index d2642219b..d9bd33640 100644
--- 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. */
diff --git a/src/autoreplace_func.h b/src/autoreplace_func.h
index fdb889840..7f2c96bf6 100644
--- 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);
diff --git a/src/autoslope.h b/src/autoslope.h
index 4ff48e796..e504610c3 100644
--- 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"
/**
diff --git a/src/cmd_helper.h b/src/cmd_helper.h
index 569708dfc..9396dd414 100644
--- 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.
diff --git a/src/company_base.h b/src/company_base.h
index a5e89e1c8..b8fb7c8e0 100644
--- 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"
diff --git a/src/company_func.h b/src/company_func.h
index d612f2873..394bf44a3 100644
--- 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);
diff --git a/src/depot_func.h b/src/depot_func.h
index cb48e3a4d..f0d65e764 100644
--- 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);
diff --git a/src/effectvehicle_base.h b/src/effectvehicle_base.h
index e3403b851..27da42001 100644
--- 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:
diff --git a/src/engine_base.h b/src/engine_base.h
index b512d4c1b..af57d3717 100644
--- 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;
diff --git a/src/engine_gui.h b/src/engine_gui.h
index 14fe0f9d7..f426413d9 100644
--- 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;
diff --git a/src/game/game_info.hpp b/src/game/game_info.hpp
index 3d42d3379..f4fc5ed86 100644
--- 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 {
diff --git a/src/goal_base.h b/src/goal_base.h
index 7cdd0aab2..6afbbd28b 100644
--- 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"
diff --git a/src/goal_type.h b/src/goal_type.h
index e9436e620..223cf2c79 100644
--- 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.
};
diff --git a/src/ground_vehicle.hpp b/src/ground_vehicle.hpp
index 4ff0c09bf..a06d6c71b 100644
--- 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 {
diff --git a/src/gui.h b/src/gui.h
index 68e1abd2b..0346dc3bd 100644
--- 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;
diff --git a/src/house.h b/src/house.h
index 7cb2d291b..9d5d5529d 100644
--- 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"
diff --git a/src/industry.h b/src/industry.h
index 92ec7c47c..f6e32b27b 100644
--- 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"
diff --git a/src/industrytype.h b/src/industrytype.h
index b56534304..8aa566e7a 100644
--- 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"
diff --git a/src/landscape.h b/src/landscape.h
index 7a3dc03a8..cb08d9d9e 100644
--- 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.
diff --git a/src/newgrf_airport.h b/src/newgrf_airport.h
index 87f921105..a981bea6b 100644
--- 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 */
diff --git a/src/newgrf_animation_base.h b/src/newgrf_animation_base.h
index 695831faa..2eced3224 100644
--- 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.
diff --git a/src/newgrf_canal.h b/src/newgrf_canal.h
index e3a971caf..5ae273bf1 100644
--- 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 {
diff --git a/src/newgrf_commons.h b/src/newgrf_commons.h
index 51667c216..b352d1126 100644
--- 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"
diff --git a/src/newgrf_generic.h b/src/newgrf_generic.h
index c047a7b8b..6251b9ffb 100644
--- 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"
diff --git a/src/newgrf_industries.h b/src/newgrf_industries.h
index 7f04a48a8..dc9b2e8ea 100644
--- 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? */
diff --git a/src/newgrf_industrytiles.h b/src/newgrf_industrytiles.h
index 9cf008685..3cb1ca828 100644
--- 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"
diff --git a/src/newgrf_object.cpp b/src/newgrf_object.cpp
index 991580acd..a2453dce7 100644
--- 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"
diff --git a/src/newgrf_object.h b/src/newgrf_object.h
index 2065b49d8..a01fdee2b 100644
--- 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"
diff --git a/src/newgrf_spritegroup.h b/src/newgrf_spritegroup.h
index 637e76eef..12b51c05d 100644
--- 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"
diff --git a/src/newgrf_station.h b/src/newgrf_station.h
index 7c9f80694..b05706c53 100644
--- 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"
diff --git a/src/newgrf_storage.h b/src/newgrf_storage.h
index fda3b3b1a..f5044b05d 100644
--- 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"
/**
diff --git a/src/newgrf_town.h b/src/newgrf_town.h
index 55fefdef7..659de7691 100644
--- 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 */
diff --git a/src/object_base.h b/src/object_base.h
index 5516d85cc..8f3ddb1b4 100644
--- 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;
diff --git a/src/rail.h b/src/rail.h
index 43672d058..be7a030c5 100644
--- 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 {
diff --git a/src/road_func.h b/src/road_func.h
index 3951f3c05..27622f443 100644
--- 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"
/**
diff --git a/src/script/api/script_basestation.cpp b/src/script/api/script_basestation.cpp
index ff4de1cff..bb77f05e1 100644
--- 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"
diff --git a/src/script/api/script_basestation.hpp b/src/script/api/script_basestation.hpp
index 02ad4b716..e61028079 100644
--- 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"
/**
diff --git a/src/script/api/script_cargo.hpp b/src/script/api/script_cargo.hpp
index 1c669191f..f4e430362 100644
--- 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.
diff --git a/src/script/api/script_company.hpp b/src/script/api/script_company.hpp
index 04c3a5abc..e9a0b768c 100644
--- 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"
/**
diff --git a/src/script/api/script_controller.hpp b/src/script/api/script_controller.hpp
index 9ab73ae0f..f087c0ef7 100644
--- 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>
diff --git a/src/script/api/script_event_types.hpp b/src/script/api/script_event_types.hpp
index 9bce59318..d5a97bbdd 100644
--- 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"
diff --git a/src/script/api/script_gamesettings.cpp b/src/script/api/script_gamesettings.cpp
index 928ec9a96..ed284ae59 100644
--- 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)
diff --git a/src/script/api/script_goal.hpp b/src/script/api/script_goal.hpp
index ee0077663..781b9bc07 100644
--- 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"
diff --git a/src/script/api/script_infrastructure.hpp b/src/script/api/script_infrastructure.hpp
index e4219a678..f2ef641ee 100644
--- 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"
diff --git a/src/script/api/script_news.hpp b/src/script/api/script_news.hpp
index 8edd80df6..49e72f912 100644
--- 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"
/**
diff --git a/src/script/api/script_order.hpp b/src/script/api/script_order.hpp
index ba1b2f3e9..017ee3c91 100644
--- 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"
diff --git a/src/script/api/script_town.hpp b/src/script/api/script_town.hpp
index 749bf807e..c10e1f642 100644
--- 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"
/**
diff --git a/src/script/api/script_viewport.hpp b/src/script/api/script_viewport.hpp
index 1d66c09b3..a3b82a78a 100644
--- 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"
/**
diff --git a/src/script/api/script_waypoint.hpp b/src/script/api/script_waypoint.hpp
index 5151e2ad3..afbc435f6 100644
--- 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"
/**
diff --git a/src/script/script_config.hpp b/src/script/script_config.hpp
index e16f8999a..b6c7a8fa6 100644
--- 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 {
diff --git a/src/script/script_instance.hpp b/src/script/script_instance.hpp
index ed83ec4ff..7a02237b8 100644
--- 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.
diff --git a/src/script/squirrel_helper.hpp b/src/script/squirrel_helper.hpp
index 6314d3bc2..3e3764384 100644
--- 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"
diff --git a/src/settings_internal.h b/src/settings_internal.h
index 5c1d4adef..b6465bd3c 100644
--- 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
diff --git a/src/station_base.h b/src/station_base.h
index d49c6491d..af403e11a 100644
--- 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;
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 80cbaad03..c224863ad 100644
--- 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"
diff --git a/src/station_func.h b/src/station_func.h
index 8f2901745..3b33002b9 100644
--- 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);
diff --git a/src/station_gui.h b/src/station_gui.h
index b088f559f..155dccfee 100644
--- 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 {
diff --git a/src/strgen/strgen.h b/src/strgen/strgen.h
index e44c5be42..badfb06f7 100644
--- 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.
diff --git a/src/tar_type.h b/src/tar_type.h
index 50c238f77..6306fb650 100644
--- 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;
diff --git a/src/textbuf_gui.h b/src/textbuf_gui.h
index 1e8319472..45ed0fed9 100644
--- 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 {
diff --git a/src/tilematrix_type.hpp b/src/tilematrix_type.hpp
index 79f24aa7e..56f254143 100644
--- 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"
/**
diff --git a/src/town.h b/src/town.h
index f91f6b9af..ad299c859 100644
--- 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"
diff --git a/src/vehicle_func.h b/src/vehicle_func.h
index 8a3eb2fee..758ad8305 100644
--- 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)
diff --git a/src/vehicle_gui.h b/src/vehicle_gui.h
index 249019262..846a86490 100644
--- 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);
diff --git a/src/water.h b/src/water.h
index bf26cf90d..1e8152f73 100644
--- 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.
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index 943de3881..edaa30132 100644
--- 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"
diff --git a/src/widgets/ai_widget.h b/src/widgets/ai_widget.h
index 1a4fcc4ee..4261478f5 100644
--- a/src/widgets/ai_widget.h
+++ b/src/widgets/ai_widget.h
@@ -12,6 +12,8 @@
#ifndef WIDGETS_AI_WIDGET_H
#define WIDGETS_AI_WIDGET_H
+#include "../company_type.h"
+
/** Widgets of the #AIListWindow class. */
enum AIListWidgets {
WID_AIL_CAPTION, ///< Caption of the window.
diff --git a/src/widgets/graph_widget.h b/src/widgets/graph_widget.h
index c924dc4bb..840a6c866 100644
--- a/src/widgets/graph_widget.h
+++ b/src/widgets/graph_widget.h
@@ -13,6 +13,7 @@
#define WIDGETS_GRAPH_WIDGET_H
#include "../economy_type.h"
+#include "../company_type.h"
/** Widgets of the #GraphLegendWindow class. */
enum GraphLegendWidgets {