diff --git a/src/chat.cpp b/src/chat.cpp index f1d82d886..c62471e19 100644 --- a/src/chat.cpp +++ b/src/chat.cpp @@ -5,10 +5,7 @@ #include "chat.h" #include -#include -#include -#include "config.h" #include "debug.h" #include "settings.h" #include "util/strfnd.h" diff --git a/src/chat.h b/src/chat.h index 3624995c0..87a348a4a 100644 --- a/src/chat.h +++ b/src/chat.h @@ -7,7 +7,6 @@ #include #include #include -#include #include #include "irrlichttypes.h" diff --git a/src/client/camera.cpp b/src/client/camera.cpp index 40f06f3aa..8f5936a0f 100644 --- a/src/client/camera.cpp +++ b/src/client/camera.cpp @@ -3,10 +3,7 @@ // Copyright (C) 2010-2013 celeron55, Perttu Ahola #include "camera.h" -#include "debug.h" #include "client.h" -#include "config.h" -#include "map.h" #include "clientmap.h" // MapDrawControl #include "localplayer.h" #include "player.h" diff --git a/src/client/camera.h b/src/client/camera.h index cbdf49538..1aaa39c6e 100644 --- a/src/client/camera.h +++ b/src/client/camera.h @@ -6,6 +6,7 @@ #include "irrlichttypes.h" #include "inventory.h" // ItemStack +#include "util/basic_macros.h" #include "util/numeric.h" #include #include diff --git a/src/client/client.cpp b/src/client/client.cpp index b0a0f0db1..7f255a9fa 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -51,6 +51,7 @@ // Network #include "network/clientopcodes.h" #include "network/connection.h" +#include "network/networkexceptions.h" #include "network/networkpacket.h" #include "serialization.h" diff --git a/src/client/clientenvironment.cpp b/src/client/clientenvironment.cpp index 95eb3f0df..bcb3841ca 100644 --- a/src/client/clientenvironment.cpp +++ b/src/client/clientenvironment.cpp @@ -18,10 +18,8 @@ #include "raycast.h" #include "voxelalgorithms.h" #include "settings.h" -#include "shader.h" #include "content_cao.h" #include "porting.h" -#include #include "client/renderingengine.h" /* diff --git a/src/client/clientevent.h b/src/client/clientevent.h index 3d627c934..ca7e3efd1 100644 --- a/src/client/clientevent.h +++ b/src/client/clientevent.h @@ -6,7 +6,7 @@ #include #include "irrlichttypes.h" -#include "client/hud.h" // HudElementStat +#include "../hud.h" // HudElementStat struct ParticleParameters; struct ParticleSpawnerParameters; diff --git a/src/client/clientlauncher.cpp b/src/client/clientlauncher.cpp index be190b9e2..e01341be8 100644 --- a/src/client/clientlauncher.cpp +++ b/src/client/clientlauncher.cpp @@ -19,6 +19,7 @@ #include "version.h" #include "renderingengine.h" #include "settings.h" +#include "util/numeric.h" #include "util/tracy_wrapper.h" #include #include diff --git a/src/client/clientmap.h b/src/client/clientmap.h index 0e3ac9a2b..25f9a34bb 100644 --- a/src/client/clientmap.h +++ b/src/client/clientmap.h @@ -7,7 +7,6 @@ #include "irrlichttypes_bloated.h" #include "map.h" #include -#include #include #include diff --git a/src/client/clientobject.cpp b/src/client/clientobject.cpp index e2b505947..49db05007 100644 --- a/src/client/clientobject.cpp +++ b/src/client/clientobject.cpp @@ -4,7 +4,6 @@ #include "clientobject.h" #include "debug.h" -#include "porting.h" /* ClientActiveObject diff --git a/src/client/clouds.cpp b/src/client/clouds.cpp index de319f83e..c782b36dc 100644 --- a/src/client/clouds.cpp +++ b/src/client/clouds.cpp @@ -6,7 +6,7 @@ #include "client/shader.h" #include "clouds.h" #include "constants.h" -#include "debug.h" +#include "util/numeric.h" #include "irrlicht_changes/printing.h" #include "noise.h" #include "profiler.h" diff --git a/src/client/clouds.h b/src/client/clouds.h index 6326b15a0..fa786162c 100644 --- a/src/client/clouds.h +++ b/src/client/clouds.h @@ -8,7 +8,6 @@ #include "constants.h" #include "irr_ptr.h" #include "skyparams.h" -#include #include #include #include diff --git a/src/client/filecache.cpp b/src/client/filecache.cpp index dbf41d863..5691f170b 100644 --- a/src/client/filecache.cpp +++ b/src/client/filecache.cpp @@ -10,7 +10,6 @@ #include #include #include -#include void FileCache::createDir() { diff --git a/src/client/game.cpp b/src/client/game.cpp index a3f8054e2..025442e78 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -29,6 +29,7 @@ #include "gui/profilergraph.h" #include "localplayer.h" #include "minimap.h" +#include "network/networkexceptions.h" #include "nodedef.h" // Needed for determining pointing to nodes #include "nodemetadata.h" #include "particles.h" diff --git a/src/client/imagesource.cpp b/src/client/imagesource.cpp index 6403017e5..ef11500ab 100644 --- a/src/client/imagesource.cpp +++ b/src/client/imagesource.cpp @@ -6,7 +6,6 @@ #include #include "imagefilters.h" -#include "mesh.h" #include "renderingengine.h" #include "settings.h" #include "texturepaths.h" diff --git a/src/client/inputhandler.h b/src/client/inputhandler.h index ce2c41a63..dc401991a 100644 --- a/src/client/inputhandler.h +++ b/src/client/inputhandler.h @@ -8,7 +8,6 @@ #include "irr_v2d.h" #include "joystick_controller.h" #include -#include #include #include #include "keycode.h" diff --git a/src/client/item_visuals_manager.cpp b/src/client/item_visuals_manager.cpp index 6007910c7..f26ac56c4 100644 --- a/src/client/item_visuals_manager.cpp +++ b/src/client/item_visuals_manager.cpp @@ -4,7 +4,7 @@ #include "item_visuals_manager.h" -#include "mesh.h" +#include "wieldmesh.h" #include "client.h" #include "texturesource.h" #include "itemdef.h" diff --git a/src/client/item_visuals_manager.h b/src/client/item_visuals_manager.h index a13debe54..084b9bb8d 100644 --- a/src/client/item_visuals_manager.h +++ b/src/client/item_visuals_manager.h @@ -5,16 +5,16 @@ #pragma once #include -#include #include #include -#include "wieldmesh.h" // ItemMesh -#include "util/basic_macros.h" +#include +struct AnimationInfo; class Client; struct ItemStack; +struct ItemMesh; +namespace video { class ITexture; class SColor; } typedef std::vector Palette; // copied from src/client/texturesource.h -namespace video { class ITexture; } // Caches data needed to draw an itemstack diff --git a/src/client/joystick_controller.cpp b/src/client/joystick_controller.cpp index 3e0122d24..43b4909c2 100644 --- a/src/client/joystick_controller.cpp +++ b/src/client/joystick_controller.cpp @@ -5,7 +5,6 @@ #include "joystick_controller.h" #include "keys.h" #include "settings.h" -#include "gettime.h" #include "porting.h" #include "util/string.h" #include "util/numeric.h" diff --git a/src/client/keycode.cpp b/src/client/keycode.cpp index f2f0d7758..0ec4023b1 100644 --- a/src/client/keycode.cpp +++ b/src/client/keycode.cpp @@ -5,11 +5,8 @@ #include "keycode.h" #include "settings.h" #include "log.h" -#include "debug.h" #include "renderingengine.h" -#include "util/hex.h" #include "util/string.h" -#include "util/basic_macros.h" #include #include diff --git a/src/client/keys.h b/src/client/keys.h index 4bce131d4..b893839b5 100644 --- a/src/client/keys.h +++ b/src/client/keys.h @@ -4,8 +4,6 @@ #pragma once -#include - class KeyType { public: diff --git a/src/client/mapblock_mesh.cpp b/src/client/mapblock_mesh.cpp index b845f6f4b..e50a1f5b7 100644 --- a/src/client/mapblock_mesh.cpp +++ b/src/client/mapblock_mesh.cpp @@ -7,6 +7,7 @@ #include "client.h" #include "mapblock.h" #include "node_visuals.h" +#include "porting.h" #include "shader.h" #include "mesh.h" #include "minimap.h" diff --git a/src/client/mapblock_mesh.h b/src/client/mapblock_mesh.h index a4c7a4a79..b9b1f2570 100644 --- a/src/client/mapblock_mesh.h +++ b/src/client/mapblock_mesh.h @@ -12,9 +12,7 @@ #include "util/numeric.h" #include "client/tile.h" #include "voxel.h" -#include #include -#include namespace video { class IVideoDriver; diff --git a/src/client/mesh.h b/src/client/mesh.h index 218c4a5ad..210b0ea2b 100644 --- a/src/client/mesh.h +++ b/src/client/mesh.h @@ -5,8 +5,6 @@ #pragma once #include "irrlichttypes_bloated.h" -#include "SColor.h" -#include "SMaterialLayer.h" namespace scene { class IAnimatedMesh; @@ -15,6 +13,11 @@ namespace scene { struct SMesh; } +namespace video { + class SMaterialLayer; + class SColor; +} + /*! * Applies shading to a color based on the surface's diff --git a/src/client/mesh_generator_thread.cpp b/src/client/mesh_generator_thread.cpp index fe60fd105..ed7453321 100644 --- a/src/client/mesh_generator_thread.cpp +++ b/src/client/mesh_generator_thread.cpp @@ -7,6 +7,7 @@ #include "profiler.h" #include "client.h" #include "mapblock.h" +#include "mapblock_mesh.h" #include "map.h" #include "util/directiontables.h" #include "porting.h" diff --git a/src/client/mesh_generator_thread.h b/src/client/mesh_generator_thread.h index e016763a1..87e77610b 100644 --- a/src/client/mesh_generator_thread.h +++ b/src/client/mesh_generator_thread.h @@ -6,16 +6,18 @@ #include #include -#include #include -#include "mapblock_mesh.h" +#include "irrlichttypes_bloated.h" #include "threading/mutex_auto_lock.h" #include "util/thread.h" #include #include -#include +class Map; class MapBlock; +class MapBlockMesh; +class MeshMakeData; +class Client; struct QueuedMeshUpdate { diff --git a/src/client/meshgen/collector.cpp b/src/client/meshgen/collector.cpp index 9cf45fd5e..0c0c73c84 100644 --- a/src/client/meshgen/collector.cpp +++ b/src/client/meshgen/collector.cpp @@ -4,8 +4,6 @@ #include "collector.h" #include -#include "log.h" -#include "client/mesh.h" void MeshCollector::append(const TileSpec &tile, const video::S3DVertex *vertices, u32 numVertices, const u16 *indices, u32 numIndices) diff --git a/src/client/minimap.h b/src/client/minimap.h index d240f2332..58326e2a7 100644 --- a/src/client/minimap.h +++ b/src/client/minimap.h @@ -9,6 +9,7 @@ #include "rect.h" #include "CMeshBuffer.h" +#include "constants.h" #include "../hud.h" #include "mapnode.h" #include "util/thread.h" diff --git a/src/client/particles.h b/src/client/particles.h index f0b3b6a12..8a350b6bc 100644 --- a/src/client/particles.h +++ b/src/client/particles.h @@ -15,6 +15,7 @@ #include #include #include "../particles.h" +#include "util/numeric.h" namespace video { class ITexture; diff --git a/src/client/render/anaglyph.cpp b/src/client/render/anaglyph.cpp index 51e12d752..6e98e0e7a 100644 --- a/src/client/render/anaglyph.cpp +++ b/src/client/render/anaglyph.cpp @@ -5,6 +5,8 @@ #include "anaglyph.h" #include "client/camera.h" +#include "stereo.h" +#include "plain.h" #include #include diff --git a/src/client/render/anaglyph.h b/src/client/render/anaglyph.h index dff3d30d7..e1200f42c 100644 --- a/src/client/render/anaglyph.h +++ b/src/client/render/anaglyph.h @@ -4,7 +4,6 @@ // Copyright (C) 2017 numzero, Lobachevskiy Vitaliy #pragma once -#include "stereo.h" #include "pipeline.h" /** diff --git a/src/client/render/core.cpp b/src/client/render/core.cpp index a3a309b30..6bdf76c20 100644 --- a/src/client/render/core.cpp +++ b/src/client/render/core.cpp @@ -4,9 +4,9 @@ // Copyright (C) 2017 numzero, Lobachevskiy Vitaliy #include "core.h" -#include "plain.h" + +#include "pipeline.h" #include "client/shadows/dynamicshadowsrender.h" -#include "settings.h" RenderingCore::RenderingCore(IrrlichtDevice *_device, Client *_client, Hud *_hud, std::unique_ptr _shadow_renderer, diff --git a/src/client/render/factory.cpp b/src/client/render/factory.cpp index 99fe95507..8838584cd 100644 --- a/src/client/render/factory.cpp +++ b/src/client/render/factory.cpp @@ -9,7 +9,6 @@ #include "plain.h" #include "anaglyph.h" #include "sidebyside.h" -#include "secondstage.h" #include "client/shadows/dynamicshadowsrender.h" #include diff --git a/src/client/render/secondstage.cpp b/src/client/render/secondstage.cpp index a03e368dd..caea89d5b 100644 --- a/src/client/render/secondstage.cpp +++ b/src/client/render/secondstage.cpp @@ -7,9 +7,8 @@ #include "secondstage.h" #include "client/client.h" #include "client/shader.h" -#include "client/tile.h" #include "settings.h" -#include "mt_opengl.h" +#include "plain.h" #include PostProcessingStep::PostProcessingStep(u32 _shader_id, const std::vector &_texture_map) : diff --git a/src/client/render/secondstage.h b/src/client/render/secondstage.h index 1765a5ed8..e6163d0f3 100644 --- a/src/client/render/secondstage.h +++ b/src/client/render/secondstage.h @@ -4,7 +4,6 @@ // Copyright (C) 2017 numzero, Lobachevskiy Vitaliy #pragma once -#include "stereo.h" #include "pipeline.h" /** diff --git a/src/client/render/sidebyside.cpp b/src/client/render/sidebyside.cpp index a26dbfdde..4788d0884 100644 --- a/src/client/render/sidebyside.cpp +++ b/src/client/render/sidebyside.cpp @@ -7,6 +7,7 @@ #include "client/client.h" #include "client/hud.h" #include "client/camera.h" +#include "plain.h" #include DrawImageStep::DrawImageStep(u8 texture_index, v2f _offset) : diff --git a/src/client/render/stereo.h b/src/client/render/stereo.h index 567478cf5..3b997856e 100644 --- a/src/client/render/stereo.h +++ b/src/client/render/stereo.h @@ -4,8 +4,6 @@ // Copyright (C) 2017 numzero, Lobachevskiy Vitaliy #pragma once -#include "core.h" -#include "plain.h" #include "pipeline.h" diff --git a/src/client/renderingengine.cpp b/src/client/renderingengine.cpp index 3d58bab37..c0e8c05b1 100644 --- a/src/client/renderingengine.cpp +++ b/src/client/renderingengine.cpp @@ -16,6 +16,7 @@ #include "client/texturesource.h" #include "camera.h" #include "minimap.h" +#include "porting.h" #include "clientmap.h" #include "renderingengine.h" #include "render/core.h" diff --git a/src/client/shader.cpp b/src/client/shader.cpp index 6317d68e2..9a1cdc409 100644 --- a/src/client/shader.cpp +++ b/src/client/shader.cpp @@ -3,8 +3,6 @@ // Copyright (C) 2013 celeron55, Perttu Ahola // Copyright (C) 2013 Kahrl -#include -#include #include "shader.h" #include "irr_ptr.h" #include "debug.h" @@ -20,9 +18,7 @@ #include "client/renderingengine.h" #include "gettext.h" #include "log.h" -#include "gamedef.h" #include "client/tile.h" -#include "config.h" #include diff --git a/src/client/shadows/dynamicshadows.h b/src/client/shadows/dynamicshadows.h index 1d741b0a3..b2844a57c 100644 --- a/src/client/shadows/dynamicshadows.h +++ b/src/client/shadows/dynamicshadows.h @@ -6,7 +6,6 @@ #include "irrlichttypes_bloated.h" #include -#include "util/basic_macros.h" #include "constants.h" class Camera; diff --git a/src/client/sky.cpp b/src/client/sky.cpp index a1c6bb4a1..5c059a43d 100644 --- a/src/client/sky.cpp +++ b/src/client/sky.cpp @@ -6,10 +6,8 @@ #include "sky.h" #include "camera.h" -#include "client/mesh.h" #include "client/renderingengine.h" #include "client/texturesource.h" -#include "client/tile.h" #include "noise.h" // easeCurve #include "player.h" // CameraMode #include "profiler.h" diff --git a/src/client/sound/playing_sound.cpp b/src/client/sound/playing_sound.cpp index c19b359fc..07330e3ab 100644 --- a/src/client/sound/playing_sound.cpp +++ b/src/client/sound/playing_sound.cpp @@ -9,7 +9,6 @@ #include "playing_sound.h" #include "al_extensions.h" -#include "debug.h" #include "sound_constants.h" #include #include diff --git a/src/client/sound/sound_manager.cpp b/src/client/sound/sound_manager.cpp index b88bdfa98..f73195ebd 100644 --- a/src/client/sound/sound_manager.cpp +++ b/src/client/sound/sound_manager.cpp @@ -14,8 +14,6 @@ #include "filesys.h" #include "porting.h" -#include - namespace sound { void OpenALSoundManager::stepStreams(f32 dtime) diff --git a/src/client/texturesource.cpp b/src/client/texturesource.cpp index a8aded74a..79f03d072 100644 --- a/src/client/texturesource.cpp +++ b/src/client/texturesource.cpp @@ -9,6 +9,7 @@ #include "guiscalingfilter.h" #include "imagefilters.h" #include "imagesource.h" +#include "porting.h" #include "renderingengine.h" #include "settings.h" #include "texturepaths.h" diff --git a/src/content/content.cpp b/src/content/content.cpp index 37b67d4f0..552994e9a 100644 --- a/src/content/content.cpp +++ b/src/content/content.cpp @@ -2,10 +2,7 @@ // SPDX-License-Identifier: LGPL-2.1-or-later // Copyright (C) 2018 rubenwardy -#include #include "content/content.h" -#include "content/subgames.h" -#include "content/mods.h" #include "filesys.h" #include "settings.h" diff --git a/src/content/mod_configuration.cpp b/src/content/mod_configuration.cpp index bcbdd89ea..a2731d0f3 100644 --- a/src/content/mod_configuration.cpp +++ b/src/content/mod_configuration.cpp @@ -5,10 +5,12 @@ #include "mod_configuration.h" #include "log.h" #include "settings.h" +#include "subgames.h" #include "filesys.h" #include "gettext.h" #include "exceptions.h" #include "util/numeric.h" +#include #include #include diff --git a/src/content/mod_configuration.h b/src/content/mod_configuration.h index 17436ef9a..32f72998c 100644 --- a/src/content/mod_configuration.h +++ b/src/content/mod_configuration.h @@ -6,6 +6,7 @@ #include "mods.h" +struct SubgameSpec; /** * ModConfiguration is a subset of installed mods. This class diff --git a/src/content/mods.cpp b/src/content/mods.cpp index 333f1d24d..2fb92d6c8 100644 --- a/src/content/mods.cpp +++ b/src/content/mods.cpp @@ -10,10 +10,7 @@ #include "database/database.h" #include "filesys.h" #include "log.h" -#include "content/subgames.h" #include "settings.h" -#include "porting.h" -#include "convert_json.h" #include "script/common/c_internal.h" #include "exceptions.h" diff --git a/src/content/mods.h b/src/content/mods.h index fc98d9298..2e7c6621a 100644 --- a/src/content/mods.h +++ b/src/content/mods.h @@ -4,18 +4,11 @@ #pragma once -#include "irrlichttypes.h" -#include -#include #include #include #include -#include "json-forwards.h" #include -#include "util/basic_macros.h" -#include "config.h" #include "metadata.h" -#include "subgames.h" class ModStorageDatabase; diff --git a/src/content/subgames.cpp b/src/content/subgames.cpp index e9d2c1d69..d2b94a31e 100644 --- a/src/content/subgames.cpp +++ b/src/content/subgames.cpp @@ -4,12 +4,12 @@ #include #include "content/subgames.h" +#include "constants.h" #include "porting.h" #include "filesys.h" #include "settings.h" #include "log.h" #include "util/strfnd.h" -#include "defaultsettings.h" // for set_default_settings #include "map_settings_manager.h" #include "util/string.h" #include "exceptions.h" diff --git a/src/content_mapnode.cpp b/src/content_mapnode.cpp index a88e31b39..0f2ad07f9 100644 --- a/src/content_mapnode.cpp +++ b/src/content_mapnode.cpp @@ -8,7 +8,6 @@ #include "mapnode.h" #include "nodedef.h" #include "nameidmapping.h" -#include "util/string.h" /* Legacy node content type IDs diff --git a/src/content_nodemeta.cpp b/src/content_nodemeta.cpp index cf818dec9..f90ed4c23 100644 --- a/src/content_nodemeta.cpp +++ b/src/content_nodemeta.cpp @@ -8,7 +8,6 @@ #include "inventory.h" #include "log.h" #include "debug.h" -#include "serialization.h" #include "util/serialize.h" #include "util/string.h" #include "constants.h" // MAP_BLOCKSIZE diff --git a/src/convert_json.h b/src/convert_json.h index 6a523ffb2..31775b9cb 100644 --- a/src/convert_json.h +++ b/src/convert_json.h @@ -4,9 +4,10 @@ #pragma once -#include "json-forwards.h" #include +namespace Json { class Value; } + void fastWriteJson(const Json::Value &value, std::ostream &to); std::string fastWriteJson(const Json::Value &value); diff --git a/src/craftdef.cpp b/src/craftdef.cpp index 00a8c3406..28902b7ca 100644 --- a/src/craftdef.cpp +++ b/src/craftdef.cpp @@ -13,11 +13,9 @@ #include "gamedef.h" #include "inventory.h" #include "itemdef.h" -#include "util/serialize.h" #include "util/string.h" #include "util/numeric.h" #include "util/strfnd.h" -#include "exceptions.h" inline bool isGroupRecipeStr(const std::string &rec_name) { diff --git a/src/database/database-files.cpp b/src/database/database-files.cpp index 84684299d..52d6ab0e3 100644 --- a/src/database/database-files.cpp +++ b/src/database/database-files.cpp @@ -6,7 +6,8 @@ #include "convert_json.h" #include "remoteplayer.h" #include "settings.h" -#include "porting.h" +#include "exceptions.h" +#include "debug.h" #include "filesys.h" #include "server/player_sao.h" #include "util/string.h" diff --git a/src/database/database-leveldb.cpp b/src/database/database-leveldb.cpp index 8579ac65a..5b32817a3 100644 --- a/src/database/database-leveldb.cpp +++ b/src/database/database-leveldb.cpp @@ -8,6 +8,7 @@ #include "database-leveldb.h" +#include "debug.h" #include "log.h" #include "filesys.h" #include "exceptions.h" diff --git a/src/database/database-postgresql.cpp b/src/database/database-postgresql.cpp index 395ffe8d5..04a037110 100644 --- a/src/database/database-postgresql.cpp +++ b/src/database/database-postgresql.cpp @@ -17,7 +17,6 @@ #include "debug.h" #include "exceptions.h" -#include "settings.h" #include "remoteplayer.h" #include "server/player_sao.h" #include diff --git a/src/database/database-postgresql.h b/src/database/database-postgresql.h index eb73960f3..3c57d5ee7 100644 --- a/src/database/database-postgresql.h +++ b/src/database/database-postgresql.h @@ -7,7 +7,6 @@ #include #include #include "database.h" -#include "util/basic_macros.h" // Template class for PostgreSQL based data storage class Database_PostgreSQL : public Database diff --git a/src/emerge.cpp b/src/emerge.cpp index 3b7e205fe..d63915305 100644 --- a/src/emerge.cpp +++ b/src/emerge.cpp @@ -20,6 +20,7 @@ #include "mapgen/mg_ore.h" #include "mapgen/mg_decoration.h" #include "mapgen/mg_schematic.h" +#include "porting.h" #include "profiler.h" #include "scripting_server.h" #include "scripting_emerge.h" diff --git a/src/environment.cpp b/src/environment.cpp index 63b1d4e08..03d9e7823 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -2,11 +2,9 @@ // SPDX-License-Identifier: LGPL-2.1-or-later // Copyright (C) 2010-2013 celeron55, Perttu Ahola -#include #include "environment.h" #include "collision.h" #include "raycast.h" -#include "scripting_server.h" #include "server.h" #include "settings.h" #include "daynightratio.h" diff --git a/src/environment.h b/src/environment.h index c3031a070..e3dd94562 100644 --- a/src/environment.h +++ b/src/environment.h @@ -14,9 +14,6 @@ - etc. */ -#include -#include -#include #include #include #include diff --git a/src/face_position_cache.h b/src/face_position_cache.h index 8462ae4d4..7141206fe 100644 --- a/src/face_position_cache.h +++ b/src/face_position_cache.h @@ -6,7 +6,6 @@ #include "irr_v3d.h" -#include #include #include #include diff --git a/src/gui/guiAnimatedImage.cpp b/src/gui/guiAnimatedImage.cpp index 1c13531dc..f8b233c9d 100644 --- a/src/gui/guiAnimatedImage.cpp +++ b/src/gui/guiAnimatedImage.cpp @@ -1,11 +1,7 @@ #include "guiAnimatedImage.h" #include "client/guiscalingfilter.h" -#include "log.h" #include "porting.h" -#include "util/string.h" -#include -#include #include GUIAnimatedImage::GUIAnimatedImage(gui::IGUIEnvironment *env, gui::IGUIElement *parent, diff --git a/src/gui/guiButtonImage.cpp b/src/gui/guiButtonImage.cpp index eb3ee20fe..e92b949ab 100644 --- a/src/gui/guiButtonImage.cpp +++ b/src/gui/guiButtonImage.cpp @@ -5,7 +5,6 @@ #include "guiButtonImage.h" #include "client/guiscalingfilter.h" -#include "debug.h" #include "IGUIEnvironment.h" #include "IGUIImage.h" #include "IVideoDriver.h" diff --git a/src/gui/guiButtonItemImage.h b/src/gui/guiButtonItemImage.h index 872d93a22..858490cb9 100644 --- a/src/gui/guiButtonItemImage.h +++ b/src/gui/guiButtonItemImage.h @@ -5,8 +5,6 @@ #pragma once #include "guiButton.h" -#include "IGUIButton.h" - class Client; class GUIItemImage; diff --git a/src/gui/guiChatConsole.cpp b/src/gui/guiChatConsole.cpp index db90368cc..ab80873db 100644 --- a/src/gui/guiChatConsole.cpp +++ b/src/gui/guiChatConsole.cpp @@ -5,8 +5,6 @@ #include "guiChatConsole.h" #include "chat.h" #include "client/client.h" -#include "debug.h" -#include "gettime.h" #include "client/keycode.h" #include "settings.h" #include "porting.h" diff --git a/src/gui/guiEditBoxWithScrollbar.cpp b/src/gui/guiEditBoxWithScrollbar.cpp index b6b33b269..6e277a682 100644 --- a/src/gui/guiEditBoxWithScrollbar.cpp +++ b/src/gui/guiEditBoxWithScrollbar.cpp @@ -11,8 +11,6 @@ #include "rect.h" #include "guiScrollBar.h" -#include "porting.h" -#include "Keycodes.h" using namespace gui; diff --git a/src/gui/guiEngine.cpp b/src/gui/guiEngine.cpp index 99a755d41..c8129ec0a 100644 --- a/src/gui/guiEngine.cpp +++ b/src/gui/guiEngine.cpp @@ -7,8 +7,6 @@ #include "client/fontengine.h" #include "client/guiscalingfilter.h" #include "client/renderingengine.h" -#include "client/shader.h" -#include "client/tile.h" #include "clientdynamicinfo.h" #include "config.h" #include "content/content.h" @@ -21,8 +19,6 @@ #include "porting.h" #include "scripting_mainmenu.h" #include "settings.h" -#include "sound.h" -#include "version.h" #include #include #include "client/imagefilters.h" diff --git a/src/gui/guiFormSpecMenu.cpp b/src/gui/guiFormSpecMenu.cpp index 114c16b2e..66c228fd0 100644 --- a/src/gui/guiFormSpecMenu.cpp +++ b/src/gui/guiFormSpecMenu.cpp @@ -4,19 +4,15 @@ #include -#include #include #include #include -#include #include "guiFormSpecMenu.h" #include "EGUIElementTypes.h" -#include "constants.h" #include "itemdef.h" #include "gamedef.h" #include "client/keycode.h" #include "gui/guiTable.h" -#include "util/strfnd.h" #include #include #include @@ -29,17 +25,13 @@ #include "client/joystick_controller.h" #include "log.h" #include "drawItemStack.h" -#include "filesys.h" -#include "gettime.h" #include "gettext.h" -#include "scripting_server.h" #include "mainmenumanager.h" #include "porting.h" #include "settings.h" #include "client/client.h" #include "client/fontengine.h" #include "client/sound.h" -#include "util/hex.h" #include "util/numeric.h" #include "util/string.h" // for parseColorString() #include "irrlicht_changes/static_text.h" diff --git a/src/gui/guiFormSpecMenu.h b/src/gui/guiFormSpecMenu.h index cb0126c2a..02849262a 100644 --- a/src/gui/guiFormSpecMenu.h +++ b/src/gui/guiFormSpecMenu.h @@ -18,7 +18,6 @@ #include "guiScrollBar.h" #include "guiTable.h" #include "util/string.h" -#include "util/enriched_string.h" #include "StyleSpec.h" #include // gui::ECURSOR_ICON #include diff --git a/src/gui/guiHyperText.cpp b/src/gui/guiHyperText.cpp index 138c93e4c..74a3d10a5 100644 --- a/src/gui/guiHyperText.cpp +++ b/src/gui/guiHyperText.cpp @@ -10,7 +10,6 @@ #include "client/client.h" #include "client/renderingengine.h" #include "client/texturesource.h" -#include "hud.h" #include "inventory.h" #include "util/string.h" #include "irrlicht_changes/CGUITTFont.h" diff --git a/src/gui/guiPasswordChange.cpp b/src/gui/guiPasswordChange.cpp index 0439d3010..b354cdcaa 100644 --- a/src/gui/guiPasswordChange.cpp +++ b/src/gui/guiPasswordChange.cpp @@ -26,7 +26,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include -#include "porting.h" #include "gettext.h" const int ID_oldPassword = 256; diff --git a/src/gui/guiTable.cpp b/src/gui/guiTable.cpp index 3f2613510..7491c6828 100644 --- a/src/gui/guiTable.cpp +++ b/src/gui/guiTable.cpp @@ -4,22 +4,18 @@ #include "guiTable.h" -#include #include #include #include #include #include #include "client/renderingengine.h" -#include "debug.h" #include "irrlicht_changes/CGUITTFont.h" #include "log.h" #include "client/texturesource.h" -#include "gettime.h" #include "util/string.h" #include "util/numeric.h" #include "util/string.h" // for parseColorString() -#include "settings.h" // for settings #include "porting.h" // for dpi #include "client/guiscalingfilter.h" diff --git a/src/gui/guiVolumeChange.cpp b/src/gui/guiVolumeChange.cpp index 7546e8ccc..b90513f72 100644 --- a/src/gui/guiVolumeChange.cpp +++ b/src/gui/guiVolumeChange.cpp @@ -18,10 +18,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "guiVolumeChange.h" -#include "debug.h" #include "guiButton.h" #include "guiScrollBar.h" -#include "serialization.h" #include #include #include diff --git a/src/gui/modalMenu.cpp b/src/gui/modalMenu.cpp index 376d14771..c69a54cdf 100644 --- a/src/gui/modalMenu.cpp +++ b/src/gui/modalMenu.cpp @@ -3,13 +3,11 @@ // Copyright (C) 2013 celeron55, Perttu Ahola // Copyright (C) 2018 stujones11, Stuart Jones -#include #include #include #include #include "client/renderingengine.h" #include "modalMenu.h" -#include "gettext.h" #include "gui/guiInventoryList.h" #include "porting.h" #include "settings.h" diff --git a/src/gui/modalMenu.h b/src/gui/modalMenu.h index 81888e866..b44ed032e 100644 --- a/src/gui/modalMenu.h +++ b/src/gui/modalMenu.h @@ -8,7 +8,6 @@ #include "irrlichttypes_bloated.h" #include "irr_ptr.h" -#include "util/string.h" #ifdef __ANDROID__ #include #endif diff --git a/src/gui/touchcontrols.cpp b/src/gui/touchcontrols.cpp index 6a3aeb108..d783c1fb1 100644 --- a/src/gui/touchcontrols.cpp +++ b/src/gui/touchcontrols.cpp @@ -7,7 +7,6 @@ #include "touchcontrols.h" #include "touchscreenlayout.h" -#include "gettime.h" #include "irr_v2d.h" #include "log.h" #include "porting.h" @@ -16,11 +15,9 @@ #include "client/renderingengine.h" #include "client/texturesource.h" #include "util/enum_string.h" -#include "util/numeric.h" #include "irr_gui_ptr.h" #include "IGUIImage.h" #include "IGUIStaticText.h" -#include "IGUIFont.h" #include #include #include diff --git a/src/httpfetch.cpp b/src/httpfetch.cpp index 18a2a8ee2..4160a8a25 100644 --- a/src/httpfetch.cpp +++ b/src/httpfetch.cpp @@ -6,7 +6,6 @@ #include "porting.h" // for sleep_ms(), get_sysinfo(), secure_rand_fill_buf() #include #include -#include #include #include "threading/event.h" #include "config.h" diff --git a/src/httpfetch.h b/src/httpfetch.h index 99c382191..f54e155ce 100644 --- a/src/httpfetch.h +++ b/src/httpfetch.h @@ -6,7 +6,6 @@ #include #include "util/string.h" -#include "config.h" // These can be used in place of "caller" in to specify special handling. // Discard result (used as default value of "caller"). diff --git a/src/hud.cpp b/src/hud.cpp index 256567163..f7ea5077a 100644 --- a/src/hud.cpp +++ b/src/hud.cpp @@ -3,7 +3,6 @@ // Copyright (C) 2010-2018 celeron55, Perttu Ahola #include "hud.h" -#include const struct EnumString es_HudElementType[] = { diff --git a/src/inventory.cpp b/src/inventory.cpp index 6d7c6d626..edcacad3e 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -3,8 +3,6 @@ // Copyright (C) 2010-2013 celeron55, Perttu Ahola #include "inventory.h" -#include "serialization.h" -#include "debug.h" #include #include #include "log.h" diff --git a/src/inventory.h b/src/inventory.h index 6a5668be2..44c37b5b0 100644 --- a/src/inventory.h +++ b/src/inventory.h @@ -7,6 +7,7 @@ #include "irrlichttypes.h" #include "itemstackmetadata.h" #include +#include #include #include #include diff --git a/src/inventorymanager.cpp b/src/inventorymanager.cpp index 9704da7d0..cdc091bc7 100644 --- a/src/inventorymanager.cpp +++ b/src/inventorymanager.cpp @@ -8,11 +8,9 @@ #include "serverenvironment.h" #include "scripting_server.h" #include "server/serveractiveobject.h" -#include "settings.h" #include "craftdef.h" #include "rollback_interface.h" #include "util/strfnd.h" -#include "util/basic_macros.h" #include "inventory.h" #define PLAYER_TO_SA(p) p->getEnv()->getScriptIface() diff --git a/src/irrlicht_changes/CGUITTFont.cpp b/src/irrlicht_changes/CGUITTFont.cpp index 01303220f..c1c961cda 100644 --- a/src/irrlicht_changes/CGUITTFont.cpp +++ b/src/irrlicht_changes/CGUITTFont.cpp @@ -37,7 +37,6 @@ #include "log.h" #include "filesys.h" #include "debug.h" -#include "IFileSystem.h" #include "IGUIEnvironment.h" #include diff --git a/src/irrlicht_changes/static_text.cpp b/src/irrlicht_changes/static_text.cpp index f1ee734d0..13ab5a641 100644 --- a/src/irrlicht_changes/static_text.cpp +++ b/src/irrlicht_changes/static_text.cpp @@ -12,7 +12,6 @@ #include #include "CGUITTFont.h" -#include "util/string.h" namespace gui diff --git a/src/irrlicht_changes/static_text.h b/src/irrlicht_changes/static_text.h index 511356ebf..b60e33aac 100644 --- a/src/irrlicht_changes/static_text.h +++ b/src/irrlicht_changes/static_text.h @@ -7,14 +7,10 @@ #pragma once #include "IGUIStaticText.h" -#include "irrArray.h" - -#include "log.h" #include #include "util/enriched_string.h" -#include "config.h" #include diff --git a/src/itemdef.cpp b/src/itemdef.cpp index 27303d8e0..663469053 100644 --- a/src/itemdef.cpp +++ b/src/itemdef.cpp @@ -5,13 +5,11 @@ #include "itemdef.h" -#include "nodedef.h" +#include "debug.h" #include "tool.h" #include "log.h" #include "settings.h" #include "util/serialize.h" -#include "util/container.h" -#include "util/thread.h" #include "util/pointedthing.h" #include #include diff --git a/src/log.cpp b/src/log.cpp index 9a19acb3c..0b7461e34 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -5,13 +5,9 @@ #include "log_internal.h" #include "threading/mutex_auto_lock.h" -#include "debug.h" #include "gettime.h" #include "porting.h" -#include "settings.h" -#include "config.h" #include "exceptions.h" -#include "util/numeric.h" #include "filesys.h" #ifdef __ANDROID__ diff --git a/src/log_internal.h b/src/log_internal.h index 55c883aa2..48e41942c 100644 --- a/src/log_internal.h +++ b/src/log_internal.h @@ -4,16 +4,14 @@ #include #include -#include +#include #include #include #include #include #include "threading/mutex_auto_lock.h" #include "util/basic_macros.h" -#include "util/stream.h" #include "irrlichttypes.h" -#include "log.h" class ILogOutput; diff --git a/src/main.cpp b/src/main.cpp index fea58e2e9..dadc84bba 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,12 +3,7 @@ // Copyright (C) 2010-2013 celeron55, Perttu Ahola #include -#include - #include "irrlichttypes_bloated.h" -#include "irrlicht.h" // createDevice -#include "irrlicht_changes/printing.h" -#include "benchmark/benchmark.h" #include "chat_interface.h" #include "debug.h" #include "unittest/test.h" @@ -32,15 +27,16 @@ #include "servermap.h" #include "settings.h" #include "network/socket.h" +#include "network/networkexceptions.h" #include "mapblock.h" #if USE_CURSES #include "terminal_chat_console.h" #endif #if CHECK_CLIENT_BUILD() -#include "gui/guiMainMenu.h" #include "client/clientlauncher.h" -#include "gui/guiEngine.h" -#include "gui/mainmenumanager.h" +#endif +#if BUILD_BENCHMARKS +#include "benchmark/benchmark.h" #endif // for version information only diff --git a/src/map.cpp b/src/map.cpp index 03513e4f5..842b2e4bb 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -13,10 +13,9 @@ #include "profiler.h" #include "nodedef.h" #include "gamedef.h" -#include "util/directiontables.h" #include "rollback_interface.h" #include "environment.h" -#include "irrlicht_changes/printing.h" +#include /* Map diff --git a/src/map_settings_manager.cpp b/src/map_settings_manager.cpp index 2f2221f9b..7cdc5b60e 100644 --- a/src/map_settings_manager.cpp +++ b/src/map_settings_manager.cpp @@ -2,7 +2,6 @@ // SPDX-License-Identifier: LGPL-2.1-or-later // Copyright (C) 2010-2013 kwolekr, Ryan Kwolek -#include "debug.h" #include "filesys.h" #include "log.h" #include "mapgen/mapgen.h" diff --git a/src/mapblock.cpp b/src/mapblock.cpp index 9bff6b962..0af233839 100644 --- a/src/mapblock.cpp +++ b/src/mapblock.cpp @@ -7,11 +7,9 @@ #include #include #include "map.h" -#include "light.h" #include "nodedef.h" #include "nodemetadata.h" #include "gamedef.h" -#include "irrlicht_changes/printing.h" #include "log.h" #include "content_mapnode.h" // For legacy name-id mapping #include "content_nodemeta.h" // For legacy deserialization diff --git a/src/mapgen/cavegen.cpp b/src/mapgen/cavegen.cpp index f31ec21fb..7214cd83d 100644 --- a/src/mapgen/cavegen.cpp +++ b/src/mapgen/cavegen.cpp @@ -8,9 +8,6 @@ #include #include "map.h" #include "mapgen.h" -#include "mapgen_v5.h" -#include "mapgen_v6.h" -#include "mapgen_v7.h" #include "mg_biome.h" #include "cavegen.h" diff --git a/src/mapgen/dungeongen.cpp b/src/mapgen/dungeongen.cpp index f99ed8348..363aba5d3 100644 --- a/src/mapgen/dungeongen.cpp +++ b/src/mapgen/dungeongen.cpp @@ -8,7 +8,6 @@ #include "mapgen.h" #include "voxel.h" #include "noise.h" -#include "mapblock.h" #include "mapnode.h" #include "map.h" #include "nodedef.h" diff --git a/src/mapgen/mapgen.cpp b/src/mapgen/mapgen.cpp index 9d2d2b006..6bdac6667 100644 --- a/src/mapgen/mapgen.cpp +++ b/src/mapgen/mapgen.cpp @@ -10,21 +10,16 @@ #include "noise.h" #include "gamedef.h" #include "mg_biome.h" -#include "mapblock.h" #include "mapnode.h" #include "map.h" #include "nodedef.h" #include "emerge.h" #include "voxelalgorithms.h" -#include "porting.h" #include "profiler.h" #include "settings.h" #include "treegen.h" -#include "serialization.h" -#include "util/serialize.h" #include "util/numeric.h" #include "util/directiontables.h" -#include "filesys.h" #include "log.h" #include "mapgen_carpathian.h" #include "mapgen_flat.h" diff --git a/src/mapgen/mapgen_carpathian.cpp b/src/mapgen/mapgen_carpathian.cpp index 7d00b3d38..f68451e73 100644 --- a/src/mapgen/mapgen_carpathian.cpp +++ b/src/mapgen/mapgen_carpathian.cpp @@ -8,7 +8,6 @@ #include "mapgen.h" #include "voxel.h" #include "noise.h" -#include "mapblock.h" #include "mapnode.h" #include "map.h" #include "nodedef.h" diff --git a/src/mapgen/mapgen_flat.cpp b/src/mapgen/mapgen_flat.cpp index cbd5202d0..1bb0a0dbe 100644 --- a/src/mapgen/mapgen_flat.cpp +++ b/src/mapgen/mapgen_flat.cpp @@ -7,7 +7,6 @@ #include "mapgen.h" #include "voxel.h" #include "noise.h" -#include "mapblock.h" #include "mapnode.h" #include "map.h" #include "nodedef.h" diff --git a/src/mapgen/mapgen_fractal.cpp b/src/mapgen/mapgen_fractal.cpp index 71c49b035..9a8c5736f 100644 --- a/src/mapgen/mapgen_fractal.cpp +++ b/src/mapgen/mapgen_fractal.cpp @@ -8,7 +8,6 @@ #include #include "voxel.h" #include "noise.h" -#include "mapblock.h" #include "mapnode.h" #include "map.h" #include "nodedef.h" diff --git a/src/mapgen/mapgen_v5.cpp b/src/mapgen/mapgen_v5.cpp index 6d42f5833..409bec2a6 100644 --- a/src/mapgen/mapgen_v5.cpp +++ b/src/mapgen/mapgen_v5.cpp @@ -7,7 +7,6 @@ #include "mapgen.h" #include "voxel.h" #include "noise.h" -#include "mapblock.h" #include "mapnode.h" #include "map.h" #include "nodedef.h" diff --git a/src/mapgen/mapgen_v6.cpp b/src/mapgen/mapgen_v6.cpp index 415f1552e..155126e1e 100644 --- a/src/mapgen/mapgen_v6.cpp +++ b/src/mapgen/mapgen_v6.cpp @@ -9,7 +9,6 @@ #include "mapgen.h" #include "voxel.h" #include "noise.h" -#include "mapblock.h" #include "mapnode.h" #include "map.h" #include "nodedef.h" diff --git a/src/mapgen/mapgen_v7.cpp b/src/mapgen/mapgen_v7.cpp index fdd971d28..8e9aca011 100644 --- a/src/mapgen/mapgen_v7.cpp +++ b/src/mapgen/mapgen_v7.cpp @@ -8,7 +8,6 @@ #include #include "voxel.h" #include "noise.h" -#include "mapblock.h" #include "mapnode.h" #include "map.h" #include "nodedef.h" diff --git a/src/mapgen/mapgen_valleys.cpp b/src/mapgen/mapgen_valleys.cpp index 9d17e50e4..fd8a40e7e 100644 --- a/src/mapgen/mapgen_valleys.cpp +++ b/src/mapgen/mapgen_valleys.cpp @@ -15,7 +15,6 @@ Licensing changed by permission of Gael de Sailly. #include "mapgen.h" #include "voxel.h" #include "noise.h" -#include "mapblock.h" #include "mapnode.h" #include "map.h" #include "nodedef.h" diff --git a/src/mapgen/mg_biome.cpp b/src/mapgen/mg_biome.cpp index 42b4b0862..b1319fc90 100644 --- a/src/mapgen/mg_biome.cpp +++ b/src/mapgen/mg_biome.cpp @@ -8,9 +8,6 @@ #include "emerge.h" #include "server.h" #include "nodedef.h" -#include "map.h" //for MMVManip -#include "util/numeric.h" -#include "porting.h" #include "settings.h" #include diff --git a/src/mapgen/mg_decoration.cpp b/src/mapgen/mg_decoration.cpp index 600de1446..66060a616 100644 --- a/src/mapgen/mg_decoration.cpp +++ b/src/mapgen/mg_decoration.cpp @@ -8,8 +8,6 @@ #include "mapgen.h" #include "noise.h" #include "map.h" -#include "log.h" -#include "util/numeric.h" #include #include #include "mapgen/treegen.h" diff --git a/src/mapgen/mg_ore.cpp b/src/mapgen/mg_ore.cpp index d3b943f8a..41cf6e6da 100644 --- a/src/mapgen/mg_ore.cpp +++ b/src/mapgen/mg_ore.cpp @@ -7,8 +7,6 @@ #include "mapgen.h" #include "noise.h" #include "map.h" -#include "log.h" -#include "util/numeric.h" #include #include diff --git a/src/mapgen/mg_schematic.h b/src/mapgen/mg_schematic.h index dcb2db994..d44b2f4e7 100644 --- a/src/mapgen/mg_schematic.h +++ b/src/mapgen/mg_schematic.h @@ -5,7 +5,6 @@ #pragma once -#include #include "mg_decoration.h" #include "util/string.h" diff --git a/src/mapnode.cpp b/src/mapnode.cpp index d1dd4ac8c..32c3c4f93 100644 --- a/src/mapnode.cpp +++ b/src/mapnode.cpp @@ -4,17 +4,13 @@ #include "irrlichttypes_bloated.h" #include "mapnode.h" -#include "porting.h" #include "nodedef.h" #include "map.h" #include "content_mapnode.h" // For mapnode_translate_*_internal #include "serialization.h" // For ser_ver_supported_* #include "util/serialize.h" -#include "log.h" #include "util/directiontables.h" -#include "util/numeric.h" #include -#include static const Rotation wallmounted_to_rot[] = { ROTATE_0, ROTATE_180, ROTATE_90, ROTATE_270 diff --git a/src/mapnode.h b/src/mapnode.h index 32ddf183a..64ea12c07 100644 --- a/src/mapnode.h +++ b/src/mapnode.h @@ -7,7 +7,6 @@ #include "irrlichttypes_bloated.h" #include "light.h" #include "util/pointer.h" -#include #include class NodeDefManager; diff --git a/src/mapsector.cpp b/src/mapsector.cpp index 4d6d47268..7ebeb0bc2 100644 --- a/src/mapsector.cpp +++ b/src/mapsector.cpp @@ -5,7 +5,6 @@ #include "mapsector.h" #include "exceptions.h" #include "mapblock.h" -#include "serialization.h" MapSector::MapSector(Map *parent, v2s16 pos, IGameDef *gamedef): m_parent(parent), diff --git a/src/mapsector.h b/src/mapsector.h index fdc6af532..114cbd135 100644 --- a/src/mapsector.h +++ b/src/mapsector.h @@ -7,10 +7,7 @@ #include "irrlichttypes.h" #include "irr_v2d.h" #include "mapblock.h" -#include #include -#include -#include class Map; class IGameDef; diff --git a/src/metadata.h b/src/metadata.h index e97fb548a..d4db36d6b 100644 --- a/src/metadata.h +++ b/src/metadata.h @@ -4,8 +4,6 @@ #pragma once -#include "irr_v3d.h" -#include #include #include "util/string.h" diff --git a/src/network/address.cpp b/src/network/address.cpp index 95eb63fc1..3b03618ed 100644 --- a/src/network/address.cpp +++ b/src/network/address.cpp @@ -4,20 +4,11 @@ #include "address.h" -#include #include -#include #include #include -#include -#include #include "network/networkexceptions.h" -#include "util/string.h" -#include "util/numeric.h" -#include "constants.h" -#include "debug.h" #include "settings.h" -#include "log.h" #ifdef _WIN32 #include diff --git a/src/network/address.h b/src/network/address.h index 9a53e7f63..c352d4c78 100644 --- a/src/network/address.h +++ b/src/network/address.h @@ -16,7 +16,6 @@ #include #include #include "irrlichttypes.h" -#include "networkexceptions.h" struct IPv6AddressBytes { diff --git a/src/network/mtp/impl.cpp b/src/network/mtp/impl.cpp index d54c116a2..78b69254f 100644 --- a/src/network/mtp/impl.cpp +++ b/src/network/mtp/impl.cpp @@ -2,21 +2,18 @@ // SPDX-License-Identifier: LGPL-2.1-or-later // Copyright (C) 2013 celeron55, Perttu Ahola -#include -#include #include #include #include "network/mtp/internal.h" -#include "serialization.h" #include "log.h" #include "porting.h" #include "network/mtp/threads.h" #include "network/peerhandler.h" +#include "network/networkexceptions.h" #include "network/networkpacket.h" #include "util/serialize.h" #include "util/numeric.h" #include "util/string.h" -#include "settings.h" #include "profiler.h" namespace con diff --git a/src/network/mtp/impl.h b/src/network/mtp/impl.h index b8059f202..91dceb8e5 100644 --- a/src/network/mtp/impl.h +++ b/src/network/mtp/impl.h @@ -9,11 +9,11 @@ #include "constants.h" #include "util/pointer.h" #include "util/container.h" -#include "util/numeric.h" #include "porting.h" +#include "network/address.h" #include "network/networkprotocol.h" #include -#include +#include #include #include #include diff --git a/src/network/mtp/internal.h b/src/network/mtp/internal.h index dc3ad55d7..2c276c217 100644 --- a/src/network/mtp/internal.h +++ b/src/network/mtp/internal.h @@ -6,6 +6,8 @@ #include "network/mtp/impl.h" +#include "util/numeric.h" + // Constant that differentiates the protocol from random data and other protocols #define PROTOCOL_ID 0x4f457403 diff --git a/src/network/mtp/threads.cpp b/src/network/mtp/threads.cpp index 69853ad61..9162b8801 100644 --- a/src/network/mtp/threads.cpp +++ b/src/network/mtp/threads.cpp @@ -7,6 +7,7 @@ #include "log.h" #include "profiler.h" #include "settings.h" +#include "network/networkexceptions.h" #include "network/networkpacket.h" #include "util/serialize.h" diff --git a/src/network/networkpacket.cpp b/src/network/networkpacket.cpp index ca7c53f5f..00be56670 100644 --- a/src/network/networkpacket.cpp +++ b/src/network/networkpacket.cpp @@ -4,7 +4,6 @@ #include "networkpacket.h" #include -#include "networkexceptions.h" #include "util/serialize.h" #include "networkprotocol.h" diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp index e4d482e45..62ed782da 100644 --- a/src/network/serverpackethandler.cpp +++ b/src/network/serverpackethandler.cpp @@ -11,15 +11,15 @@ #include "mapblock.h" #include "modchannels.h" #include "nodedef.h" +#include "porting.h" // strcasecmp #include "remoteplayer.h" #include "rollback_interface.h" #include "scripting_server.h" #include "serialization.h" #include "settings.h" #include "tool.h" -#include "version.h" -#include "irrlicht_changes/printing.h" #include "network/connection.h" +#include "network/networkexceptions.h" #include "network/networkpacket.h" #include "network/networkprotocol.h" #include "network/serveropcodes.h" @@ -28,7 +28,6 @@ #include "util/auth.h" #include "util/base64.h" #include "util/pointedthing.h" -#include "util/serialize.h" #include "util/srp.h" #include "clientdynamicinfo.h" diff --git a/src/network/socket.cpp b/src/network/socket.cpp index 397b5ea51..69ab39024 100644 --- a/src/network/socket.cpp +++ b/src/network/socket.cpp @@ -4,21 +4,19 @@ #include "socket.h" -#include #include -#include #include -#include -#include "util/string.h" #include "util/numeric.h" +#include "address.h" #include "constants.h" -#include "debug.h" #include "log.h" +#include "networkexceptions.h" #ifdef _WIN32 #include #include #include +#include "util/string.h" #define LAST_SOCKET_ERR() WSAGetLastError() #define SOCKET_ERR_STR(e) itos(e) typedef int socklen_t; diff --git a/src/network/socket.h b/src/network/socket.h index 7934ffbc8..f56a6e113 100644 --- a/src/network/socket.h +++ b/src/network/socket.h @@ -4,11 +4,9 @@ #pragma once -#include -#include -#include "address.h" #include "irrlichttypes.h" -#include "networkexceptions.h" + +class Address; void sockets_init(); void sockets_cleanup(); diff --git a/src/nodemetadata.cpp b/src/nodemetadata.cpp index 77fc972b6..565992050 100644 --- a/src/nodemetadata.cpp +++ b/src/nodemetadata.cpp @@ -11,7 +11,6 @@ #include "debug.h" #include "util/serialize.h" #include "constants.h" // MAP_BLOCKSIZE -#include /* NodeMetadata diff --git a/src/nodetimer.cpp b/src/nodetimer.cpp index bdf842a26..7e7ca2e0b 100644 --- a/src/nodetimer.cpp +++ b/src/nodetimer.cpp @@ -4,7 +4,6 @@ #include "nodetimer.h" #include "log.h" -#include "serialization.h" #include "util/serialize.h" #include "constants.h" // MAP_BLOCKSIZE diff --git a/src/particles.cpp b/src/particles.cpp index 660ea8d2f..a7f6aef21 100644 --- a/src/particles.cpp +++ b/src/particles.cpp @@ -3,7 +3,9 @@ // Copyright (C) 2020 sfan5 #include "particles.h" -#include + +#include "util/numeric.h" +#include "util/serialize.h" using namespace ParticleParamTypes; diff --git a/src/particles.h b/src/particles.h index 81c8c4809..e7970f23b 100644 --- a/src/particles.h +++ b/src/particles.h @@ -8,12 +8,9 @@ #include #include #include -#include "irrlicht_changes/printing.h" #include "irrlichttypes_bloated.h" #include "tileanimation.h" #include "mapnode.h" -#include "util/serialize.h" -#include "util/numeric.h" // This file defines the particle-related structures that both the server and // client need. The ParticleManager and rendering is in client/particles.h diff --git a/src/pathfinder.cpp b/src/pathfinder.cpp index d6b72cfd4..9367c55a7 100644 --- a/src/pathfinder.cpp +++ b/src/pathfinder.cpp @@ -10,7 +10,6 @@ #include "pathfinder.h" #include "map.h" #include "nodedef.h" -#include "irrlicht_changes/printing.h" //#define PATHFINDER_DEBUG //#define PATHFINDER_CALC_TIME diff --git a/src/player.cpp b/src/player.cpp index 1f90e62ea..890a8c689 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -5,14 +5,9 @@ #include "player.h" #include -#include "threading/mutex_auto_lock.h" -#include "util/numeric.h" #include "hud.h" #include "constants.h" #include "gamedef.h" -#include "settings.h" -#include "log.h" -#include "porting.h" // strlcpy #include const struct EnumString es_CameraMode[] = { diff --git a/src/porting.h b/src/porting.h index 3f60a51bd..a8348b43b 100644 --- a/src/porting.h +++ b/src/porting.h @@ -18,7 +18,6 @@ #include "config.h" #include "irrlichttypes.h" // u64 #include "debug.h" -#include "constants.h" #include "util/timetaker.h" // TimePrecision #ifdef _MSC_VER diff --git a/src/profiler.cpp b/src/profiler.cpp index e965f530e..2f061cb97 100644 --- a/src/profiler.cpp +++ b/src/profiler.cpp @@ -3,6 +3,9 @@ // Copyright (C) 2015 celeron55, Perttu Ahola #include "profiler.h" + +#include +#include "util/numeric.h" #include "porting.h" static Profiler main_profiler; diff --git a/src/profiler.h b/src/profiler.h index 157d66ef7..18d714a84 100644 --- a/src/profiler.h +++ b/src/profiler.h @@ -12,8 +12,6 @@ #include "threading/mutex_auto_lock.h" #include "util/timetaker.h" -#include "util/numeric.h" // paging() -/* FIXME: ^ move this to the .cpp file, it's not needed here */ #include "util/basic_macros.h" // Global profiler diff --git a/src/raycast.h b/src/raycast.h index 5170ba3ee..5dcef8484 100644 --- a/src/raycast.h +++ b/src/raycast.h @@ -4,6 +4,7 @@ #pragma once +#include #include "voxelalgorithms.h" #include "util/pointedthing.h" diff --git a/src/reflowscan.cpp b/src/reflowscan.cpp index 2a4f67c78..4931b29f5 100644 --- a/src/reflowscan.cpp +++ b/src/reflowscan.cpp @@ -6,7 +6,6 @@ #include "map.h" #include "mapblock.h" #include "nodedef.h" -#include "util/timetaker.h" ReflowScan::ReflowScan(Map *map, const NodeDefManager *ndef) : diff --git a/src/remoteplayer.cpp b/src/remoteplayer.cpp index ca12a38e4..93adf7727 100644 --- a/src/remoteplayer.cpp +++ b/src/remoteplayer.cpp @@ -5,12 +5,9 @@ #include "remoteplayer.h" #include -#include "filesys.h" #include "gamedef.h" -#include "porting.h" // strlcpy #include "server.h" #include "settings.h" -#include "convert_json.h" #include "server/player_sao.h" /* diff --git a/src/rollback_interface.h b/src/rollback_interface.h index 123c3323a..5ea1ff950 100644 --- a/src/rollback_interface.h +++ b/src/rollback_interface.h @@ -6,9 +6,7 @@ #include "irr_v3d.h" #include -#include #include -#include "exceptions.h" #include "inventory.h" class Map; diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp index c04a54578..0a41ffcd8 100644 --- a/src/script/common/c_content.cpp +++ b/src/script/common/c_content.cpp @@ -17,6 +17,7 @@ #include "log.h" #include "tool.h" #include "noise.h" +#include "porting.h" // strlcpy #include "server/player_sao.h" #include "util/pointedthing.h" #include "debug.h" // For FATAL_ERROR diff --git a/src/script/common/c_converter.cpp b/src/script/common/c_converter.cpp index 12d8c5919..1a2a28d66 100644 --- a/src/script/common/c_converter.cpp +++ b/src/script/common/c_converter.cpp @@ -8,7 +8,6 @@ extern "C" { } #include "util/numeric.h" -#include "util/serialize.h" #include "util/string.h" #include "log.h" #include "common/c_converter.h" diff --git a/src/script/common/c_internal.h b/src/script/common/c_internal.h index 401b2115e..5414efae8 100644 --- a/src/script/common/c_internal.h +++ b/src/script/common/c_internal.h @@ -20,8 +20,6 @@ extern "C" { } #include "config.h" -#include "util/enum_string.h" - /* Define our custom indices into the Lua registry table. diff --git a/src/script/common/c_packer.cpp b/src/script/common/c_packer.cpp index 7083e3f4a..2492d54df 100644 --- a/src/script/common/c_packer.cpp +++ b/src/script/common/c_packer.cpp @@ -6,7 +6,6 @@ #include #include #include -#include #include #include "c_packer.h" #include "c_internal.h" diff --git a/src/script/common/c_types.h b/src/script/common/c_types.h index 160b29eb5..26fab5ba7 100644 --- a/src/script/common/c_types.h +++ b/src/script/common/c_types.h @@ -8,7 +8,6 @@ extern "C" { #include "lua.h" } -#include #include "exceptions.h" class StackUnroller diff --git a/src/script/cpp_api/s_base.cpp b/src/script/cpp_api/s_base.cpp index 6ed43a258..a6128ec92 100644 --- a/src/script/cpp_api/s_base.cpp +++ b/src/script/cpp_api/s_base.cpp @@ -10,9 +10,7 @@ #include "common/c_converter.h" #include "server/player_sao.h" #include "filesys.h" -#include "content/mods.h" #include "porting.h" -#include "util/string.h" #include "server.h" #if CHECK_CLIENT_BUILD() #include "client/client.h" @@ -31,8 +29,6 @@ extern "C" { #endif } -#include -#include #include "script/common/c_content.h" #include diff --git a/src/script/cpp_api/s_base.h b/src/script/cpp_api/s_base.h index b532e9cd9..20a23d4c3 100644 --- a/src/script/cpp_api/s_base.h +++ b/src/script/cpp_api/s_base.h @@ -8,7 +8,6 @@ #include #include #include -#include #include "common/helper.h" #include "util/basic_macros.h" diff --git a/src/script/cpp_api/s_client.h b/src/script/cpp_api/s_client.h index 2308e13f4..800ead040 100644 --- a/src/script/cpp_api/s_client.h +++ b/src/script/cpp_api/s_client.h @@ -7,7 +7,6 @@ #include "cpp_api/s_base.h" #include "mapnode.h" -#include "util/string.h" #include "util/pointedthing.h" #ifdef _CRT_MSVCP_CURRENT diff --git a/src/script/cpp_api/s_item.cpp b/src/script/cpp_api/s_item.cpp index 93f972b42..bcd5a3060 100644 --- a/src/script/cpp_api/s_item.cpp +++ b/src/script/cpp_api/s_item.cpp @@ -13,7 +13,6 @@ #include "util/pointedthing.h" #include "inventory.h" #include "inventorymanager.h" -#include "irrlicht_changes/printing.h" #define WRAP_LUAERROR(e, detail) \ LuaError(std::string(__FUNCTION__) + ": " + (e).what() + ". " detail) diff --git a/src/script/cpp_api/s_player.cpp b/src/script/cpp_api/s_player.cpp index 6cd46a3d9..bf75b0695 100644 --- a/src/script/cpp_api/s_player.cpp +++ b/src/script/cpp_api/s_player.cpp @@ -6,7 +6,6 @@ #include "cpp_api/s_internal.h" #include "common/c_converter.h" #include "common/c_content.h" -#include "debug.h" #include "inventorymanager.h" #include "lua_api/l_inventory.h" #include "lua_api/l_item.h" diff --git a/src/script/lua_api/l_areastore.cpp b/src/script/lua_api/l_areastore.cpp index fb5a52a5c..764e39399 100644 --- a/src/script/lua_api/l_areastore.cpp +++ b/src/script/lua_api/l_areastore.cpp @@ -10,7 +10,7 @@ #include "irr_v3d.h" #include "util/areastore.h" #include "filesys.h" -#include +#include static inline void get_data_and_corner_flags(lua_State *L, u8 start_i, bool *corners, bool *data) diff --git a/src/script/lua_api/l_base.cpp b/src/script/lua_api/l_base.cpp index c95acc733..a438fb984 100644 --- a/src/script/lua_api/l_base.cpp +++ b/src/script/lua_api/l_base.cpp @@ -3,13 +3,12 @@ // Copyright (C) 2013 celeron55, Perttu Ahola #include "lua_api/l_base.h" -#include "lua_api/l_internal.h" #include "cpp_api/s_base.h" #include "content/mods.h" #include "profiler.h" +#include "porting.h" #include "server.h" #include -#include #include ScriptApiBase *ModApiBase::getScriptApiBase(lua_State *L) diff --git a/src/script/lua_api/l_base.h b/src/script/lua_api/l_base.h index 138b4cf24..2e82e58cf 100644 --- a/src/script/lua_api/l_base.h +++ b/src/script/lua_api/l_base.h @@ -5,10 +5,9 @@ #pragma once #include "common/c_types.h" -#include "common/c_internal.h" #include "common/helper.h" +#include "config.h" #include "gamedef.h" -#include extern "C" { #include diff --git a/src/script/lua_api/l_camera.cpp b/src/script/lua_api/l_camera.cpp index a2a8ed7ca..813e7e9ea 100644 --- a/src/script/lua_api/l_camera.cpp +++ b/src/script/lua_api/l_camera.cpp @@ -3,7 +3,6 @@ // Copyright (C) 2010-2013 celeron55, Perttu Ahola #include "l_camera.h" -#include #include "script/common/c_converter.h" #include "l_internal.h" #include "client/content_cao.h" diff --git a/src/script/lua_api/l_client.cpp b/src/script/lua_api/l_client.cpp index 2aef6d470..584bd4f00 100644 --- a/src/script/lua_api/l_client.cpp +++ b/src/script/lua_api/l_client.cpp @@ -6,13 +6,13 @@ #include "l_client.h" #include "chatmessage.h" #include "client/client.h" -#include "client/clientevent.h" #include "client/sound.h" #include "client/clientenvironment.h" #include "common/c_content.h" #include "common/c_converter.h" #include "cpp_api/s_base.h" #include "gettext.h" +#include "itemdef.h" #include "l_internal.h" #include "lua_api/l_nodemeta.h" #include "gui/mainmenumanager.h" diff --git a/src/script/lua_api/l_client.h b/src/script/lua_api/l_client.h index 777b128cc..9fb4a4e17 100644 --- a/src/script/lua_api/l_client.h +++ b/src/script/lua_api/l_client.h @@ -6,8 +6,6 @@ #pragma once #include "lua_api/l_base.h" -#include "itemdef.h" -#include "tool.h" class ModApiClient : public ModApiBase { diff --git a/src/script/lua_api/l_env.h b/src/script/lua_api/l_env.h index e755166a7..58d90c647 100644 --- a/src/script/lua_api/l_env.h +++ b/src/script/lua_api/l_env.h @@ -6,6 +6,7 @@ #include "lua_api/l_base.h" #include "raycast.h" +#include "util/enum_string.h" class ServerScripting; diff --git a/src/script/lua_api/l_http.cpp b/src/script/lua_api/l_http.cpp index c570ae993..11f04b481 100644 --- a/src/script/lua_api/l_http.cpp +++ b/src/script/lua_api/l_http.cpp @@ -9,12 +9,8 @@ #include "cpp_api/s_security.h" #include "util/enum_string.h" #include "httpfetch.h" -#include "settings.h" -#include "debug.h" #include "log.h" -#include - #define HTTP_API(name) \ lua_pushstring(L, #name); \ lua_pushcfunction(L, l_http_##name); \ diff --git a/src/script/lua_api/l_inventory.cpp b/src/script/lua_api/l_inventory.cpp index 20f3bc470..0c8c5faf4 100644 --- a/src/script/lua_api/l_inventory.cpp +++ b/src/script/lua_api/l_inventory.cpp @@ -9,8 +9,6 @@ #include "common/c_content.h" #include "server.h" #include "server/serverinventorymgr.h" -#include "remoteplayer.h" - /* InvRef */ diff --git a/src/script/lua_api/l_item.cpp b/src/script/lua_api/l_item.cpp index bae8aa2d2..e98f87e39 100644 --- a/src/script/lua_api/l_item.cpp +++ b/src/script/lua_api/l_item.cpp @@ -5,14 +5,12 @@ #include "lua_api/l_item.h" #include "lua_api/l_itemstackmeta.h" #include "lua_api/l_internal.h" -#include "common/c_converter.h" #include "common/c_content.h" #include "common/c_packer.h" #include "itemdef.h" #include "nodedef.h" #include "server.h" #include "inventory.h" -#include "log.h" // garbage collector diff --git a/src/script/lua_api/l_itemstackmeta.cpp b/src/script/lua_api/l_itemstackmeta.cpp index 250c84b7f..7b7a57c0f 100644 --- a/src/script/lua_api/l_itemstackmeta.cpp +++ b/src/script/lua_api/l_itemstackmeta.cpp @@ -7,7 +7,6 @@ #include "lua_api/l_itemstackmeta.h" #include "lua_api/l_internal.h" #include "common/c_content.h" -#include "common/c_converter.h" #include "tool.h" /* diff --git a/src/script/lua_api/l_itemstackmeta.h b/src/script/lua_api/l_itemstackmeta.h index 85278fd98..735e41305 100644 --- a/src/script/lua_api/l_itemstackmeta.h +++ b/src/script/lua_api/l_itemstackmeta.h @@ -6,7 +6,6 @@ #pragma once -#include "lua_api/l_base.h" #include "lua_api/l_metadata.h" #include "lua_api/l_item.h" #include "irrlichttypes_bloated.h" diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp index 4b878ee1c..87155ed22 100644 --- a/src/script/lua_api/l_mainmenu.cpp +++ b/src/script/lua_api/l_mainmenu.cpp @@ -5,16 +5,13 @@ #include "lua_api/l_mainmenu.h" #include "lua_api/l_internal.h" #include "common/c_content.h" -#include "cpp_api/s_async.h" #include "scripting_mainmenu.h" #include "gui/guiEngine.h" #include "gui/guiMainMenu.h" #include "gui/guiPathSelectMenu.h" #include "gui/touchscreeneditor.h" -#include "version.h" #include "porting.h" #include "filesys.h" -#include "convert_json.h" #include "content/content.h" #include "content/subgames.h" #include "mapgen/mapgen.h" @@ -25,7 +22,6 @@ #include "client/texturepaths.h" #include "network/networkprotocol.h" #include "content/mod_configuration.h" -#include "threading/mutex_auto_lock.h" #include "common/c_converter.h" #include "gui/guiOpenURL.h" #include "gettext.h" diff --git a/src/script/lua_api/l_mapgen.cpp b/src/script/lua_api/l_mapgen.cpp index c2d2503f6..c7127108d 100644 --- a/src/script/lua_api/l_mapgen.cpp +++ b/src/script/lua_api/l_mapgen.cpp @@ -8,7 +8,6 @@ #include "common/c_converter.h" #include "common/c_content.h" #include "cpp_api/s_security.h" -#include "util/serialize.h" #include "server.h" #include "serverenvironment.h" #include "servermap.h" @@ -18,8 +17,6 @@ #include "mapgen/mg_ore.h" #include "mapgen/mg_decoration.h" #include "mapgen/mg_schematic.h" -#include "mapgen/mapgen_v5.h" -#include "mapgen/mapgen_v7.h" #include "mapgen/treegen.h" #include "filesys.h" #include "settings.h" diff --git a/src/script/lua_api/l_metadata.cpp b/src/script/lua_api/l_metadata.cpp index 1dc72484a..6bae07e7f 100644 --- a/src/script/lua_api/l_metadata.cpp +++ b/src/script/lua_api/l_metadata.cpp @@ -5,11 +5,7 @@ #include "lua_api/l_metadata.h" #include "lua_api/l_internal.h" -#include "common/c_content.h" -#include "serverenvironment.h" -#include "map.h" -#include "server.h" -#include "util/basic_macros.h" +#include "metadata.h" #include "util/string.h" MetaDataRef *MetaDataRef::checkAnyMetadata(lua_State *L, int narg) diff --git a/src/script/lua_api/l_modchannels.h b/src/script/lua_api/l_modchannels.h index 44b060278..8114450e5 100644 --- a/src/script/lua_api/l_modchannels.h +++ b/src/script/lua_api/l_modchannels.h @@ -5,7 +5,6 @@ #pragma once #include "lua_api/l_base.h" -#include "config.h" class ModChannel; diff --git a/src/script/lua_api/l_nodemeta.h b/src/script/lua_api/l_nodemeta.h index 58ad678ee..996f2802b 100644 --- a/src/script/lua_api/l_nodemeta.h +++ b/src/script/lua_api/l_nodemeta.h @@ -4,10 +4,7 @@ #pragma once -#include "lua_api/l_base.h" #include "lua_api/l_metadata.h" -#include "irrlichttypes_bloated.h" -#include "nodemetadata.h" class ServerEnvironment; class NodeMetadata; diff --git a/src/script/lua_api/l_noise.cpp b/src/script/lua_api/l_noise.cpp index 73cac5b38..3647747a5 100644 --- a/src/script/lua_api/l_noise.cpp +++ b/src/script/lua_api/l_noise.cpp @@ -7,9 +7,7 @@ #include "common/c_converter.h" #include "common/c_content.h" #include "common/c_packer.h" -#include "log.h" #include "porting.h" -#include "util/numeric.h" /////////////////////////////////////// /* diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp index a91fc8182..e8cffb872 100644 --- a/src/script/lua_api/l_object.cpp +++ b/src/script/lua_api/l_object.cpp @@ -11,6 +11,7 @@ #include "lua_api/l_playermeta.h" #include "common/c_converter.h" #include "common/c_content.h" +#include "cpp_api/s_base.h" #include "log.h" #include "player.h" #include "server/serveractiveobject.h" @@ -20,12 +21,9 @@ #include "serverenvironment.h" #include "settings.h" #include "hud.h" -#include "scripting_server.h" #include "server/luaentity_sao.h" #include "server/player_sao.h" #include "server/serverinventorymgr.h" -#include "server/unit_sao.h" -#include "util/string.h" using object_t = ServerActiveObject::object_t; diff --git a/src/script/lua_api/l_particleparams.h b/src/script/lua_api/l_particleparams.h index 642818b0d..280da07e2 100644 --- a/src/script/lua_api/l_particleparams.h +++ b/src/script/lua_api/l_particleparams.h @@ -3,9 +3,7 @@ // Copyright (C) 2021 velartrill, Lexi Hale #pragma once -#include "lua_api/l_particles.h" #include "lua_api/l_object.h" -#include "lua_api/l_internal.h" #include "common/c_converter.h" #include "common/c_content.h" #include "server.h" diff --git a/src/script/lua_api/l_particles_local.cpp b/src/script/lua_api/l_particles_local.cpp index 52f46ed4c..d4c5ecdf0 100644 --- a/src/script/lua_api/l_particles_local.cpp +++ b/src/script/lua_api/l_particles_local.cpp @@ -7,7 +7,6 @@ #include "common/c_content.h" #include "common/c_converter.h" #include "lua_api/l_internal.h" -#include "lua_api/l_object.h" #include "lua_api/l_particleparams.h" #include "client/particles.h" #include "client/client.h" diff --git a/src/script/lua_api/l_storage.cpp b/src/script/lua_api/l_storage.cpp index 96f346857..870df4c05 100644 --- a/src/script/lua_api/l_storage.cpp +++ b/src/script/lua_api/l_storage.cpp @@ -5,7 +5,6 @@ #include "lua_api/l_storage.h" #include "l_internal.h" -#include "server.h" int ModApiStorage::l_get_mod_storage(lua_State *L) { diff --git a/src/script/lua_api/l_util.cpp b/src/script/lua_api/l_util.cpp index 4b563fb09..b8d2dc9ec 100644 --- a/src/script/lua_api/l_util.cpp +++ b/src/script/lua_api/l_util.cpp @@ -7,7 +7,6 @@ #include "lua_api/l_settings.h" #include "common/c_converter.h" #include "common/c_content.h" -#include "cpp_api/s_async.h" #include "network/networkprotocol.h" #include "serialization.h" #include @@ -15,7 +14,6 @@ #include "cpp_api/s_security.h" #include "porting.h" #include "convert_json.h" -#include "debug.h" #include "log.h" #include "log_internal.h" #include "tool.h" diff --git a/src/script/scripting_mainmenu.cpp b/src/script/scripting_mainmenu.cpp index 18bcf5c81..c673a8db0 100644 --- a/src/script/scripting_mainmenu.cpp +++ b/src/script/scripting_mainmenu.cpp @@ -3,7 +3,6 @@ // Copyright (C) 2013 celeron55, Perttu Ahola #include "scripting_mainmenu.h" -#include "content/mods.h" #include "cpp_api/s_internal.h" #include "lua_api/l_base.h" #include "lua_api/l_http.h" diff --git a/src/script/scripting_pause_menu.cpp b/src/script/scripting_pause_menu.cpp index b86510bcd..4bc08964c 100644 --- a/src/script/scripting_pause_menu.cpp +++ b/src/script/scripting_pause_menu.cpp @@ -11,7 +11,6 @@ #include "lua_api/l_pause_menu.h" #include "lua_api/l_settings.h" #include "lua_api/l_util.h" -#include "porting.h" PauseMenuScripting::PauseMenuScripting(Client *client): ScriptApiBase(ScriptingType::PauseMenu) diff --git a/src/serialization.h b/src/serialization.h index 48c7464c1..881a5ef48 100644 --- a/src/serialization.h +++ b/src/serialization.h @@ -5,7 +5,6 @@ #pragma once #include "irrlichttypes.h" -#include "exceptions.h" #include #include diff --git a/src/server.cpp b/src/server.cpp index e3bb35f02..60ddb0672 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -54,6 +54,7 @@ // Network #include "network/connection.h" +#include "network/networkexceptions.h" #include "network/networkpacket.h" #include "network/networkprotocol.h" #include "network/serveropcodes.h" diff --git a/src/server/clientiface.cpp b/src/server/clientiface.cpp index 4fcc92071..09fb790b0 100644 --- a/src/server/clientiface.cpp +++ b/src/server/clientiface.cpp @@ -6,6 +6,7 @@ #include "clientiface.h" #include "debug.h" #include "network/connection.h" +#include "network/networkexceptions.h" #include "network/networkpacket.h" #include "network/serveropcodes.h" #include "porting.h" // porting::getTimeS diff --git a/src/server/mods.h b/src/server/mods.h index b10b232b2..3370dc94e 100644 --- a/src/server/mods.h +++ b/src/server/mods.h @@ -5,7 +5,6 @@ #pragma once #include "content/mod_configuration.h" -#include class ServerScripting; diff --git a/src/server/player_sao.h b/src/server/player_sao.h index fb4eb6932..acfe7d02d 100644 --- a/src/server/player_sao.h +++ b/src/server/player_sao.h @@ -11,6 +11,7 @@ #include "network/networkprotocol.h" #include "unit_sao.h" #include "util/numeric.h" +#include /* PlayerSAO needs some internals exposed. diff --git a/src/server/rollback.cpp b/src/server/rollback.cpp index 61830ee08..e3a0779a0 100644 --- a/src/server/rollback.cpp +++ b/src/server/rollback.cpp @@ -3,14 +3,10 @@ // Copyright (C) 2013 celeron55, Perttu Ahola #include "rollback.h" -#include #include -#include #include "log.h" -#include "mapnode.h" #include "gamedef.h" #include "nodedef.h" -#include "util/serialize.h" #include "util/string.h" #include "util/numeric.h" #include "inventorymanager.h" // deserializing InventoryLocations diff --git a/src/server/serveractiveobject.h b/src/server/serveractiveobject.h index 2f37b2666..15c888612 100644 --- a/src/server/serveractiveobject.h +++ b/src/server/serveractiveobject.h @@ -7,10 +7,10 @@ #include #include #include +#include #include "irrlichttypes_bloated.h" #include "activeobject.h" #include "itemgroup.h" -#include "util/container.h" /* diff --git a/src/server/serverlist.cpp b/src/server/serverlist.cpp index ca82bbc52..728955c48 100644 --- a/src/server/serverlist.cpp +++ b/src/server/serverlist.cpp @@ -6,9 +6,7 @@ #include "version.h" #include "settings.h" #include "serverlist.h" -#include "filesys.h" #include "log.h" -#include "network/networkprotocol.h" #include #include "convert_json.h" #include "httpfetch.h" diff --git a/src/server/serverlist.h b/src/server/serverlist.h index fd7551b69..897b88e83 100644 --- a/src/server/serverlist.h +++ b/src/server/serverlist.h @@ -4,8 +4,6 @@ #include "config.h" #include "content/mods.h" -#include "json-forwards.h" -#include #pragma once diff --git a/src/serverenvironment.cpp b/src/serverenvironment.cpp index e19838d5a..9a9c50fc9 100644 --- a/src/serverenvironment.cpp +++ b/src/serverenvironment.cpp @@ -20,11 +20,9 @@ #include "scripting_server.h" #include "server.h" #include "servermap.h" -#include "util/serialize.h" #include "util/numeric.h" #include "util/basic_macros.h" #include "util/pointedthing.h" -#include "threading/mutex_auto_lock.h" #include "filesys.h" #include "gameparams.h" #include "database/database-dummy.h" @@ -36,7 +34,6 @@ #if USE_LEVELDB #include "database/database-leveldb.h" #endif -#include "irrlicht_changes/printing.h" #include "server/luaentity_sao.h" #include "server/player_sao.h" diff --git a/src/servermap.cpp b/src/servermap.cpp index e88676bad..3be503af7 100644 --- a/src/servermap.cpp +++ b/src/servermap.cpp @@ -4,8 +4,6 @@ #include "servermap.h" -#include - #include "map.h" #include "mapsector.h" #include "filesys.h" @@ -21,7 +19,6 @@ #include "rollback_interface.h" #include "reflowscan.h" #include "emerge.h" -#include "mapgen/mapgen_v6.h" #include "mapgen/mg_biome.h" #include "config.h" #include "server.h" @@ -30,7 +27,6 @@ #include "database/database-dummy.h" #include "database/database-sqlite3.h" #include "script/scripting_server.h" -#include "irrlicht_changes/printing.h" #if USE_LEVELDB #include "database/database-leveldb.h" #endif diff --git a/src/settings.cpp b/src/settings.cpp index 2dccf45de..97b7ca4f6 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -13,7 +13,6 @@ #include #include "debug.h" #include "log.h" -#include "util/serialize.h" #include "filesys.h" #include "noise.h" #include diff --git a/src/settings.h b/src/settings.h index 95083058a..f3d84bae9 100644 --- a/src/settings.h +++ b/src/settings.h @@ -8,7 +8,6 @@ #include "util/string.h" #include "util/basic_macros.h" #include -#include #include #include diff --git a/src/sound.h b/src/sound.h index fa3135c03..90bfdae70 100644 --- a/src/sound.h +++ b/src/sound.h @@ -4,7 +4,6 @@ #pragma once -#include #include #include "util/serialize.h" #include "irrlichttypes_bloated.h" diff --git a/src/terminal_chat_console.cpp b/src/terminal_chat_console.cpp index 8c2967b01..66c08d850 100644 --- a/src/terminal_chat_console.cpp +++ b/src/terminal_chat_console.cpp @@ -7,9 +7,6 @@ #if USE_CURSES #include "version.h" #include "terminal_chat_console.h" -#include "porting.h" -#include "settings.h" -#include "util/numeric.h" #include "util/string.h" #include "chat_interface.h" diff --git a/src/terminal_chat_console.h b/src/terminal_chat_console.h index 3324656dc..fedc8d449 100644 --- a/src/terminal_chat_console.h +++ b/src/terminal_chat_console.h @@ -7,7 +7,6 @@ #include "chat.h" #include "threading/thread.h" #include "util/container.h" -#include "log.h" #include "log_internal.h" #include diff --git a/src/texture_override.cpp b/src/texture_override.cpp index 472dc78b6..df194e6eb 100644 --- a/src/texture_override.cpp +++ b/src/texture_override.cpp @@ -7,8 +7,6 @@ #include "log.h" #include "filesys.h" #include "util/string.h" -#include -#include #include #define override_cast static_cast diff --git a/src/threading/event.cpp b/src/threading/event.cpp index 1b0c5ac07..7e3c371ea 100644 --- a/src/threading/event.cpp +++ b/src/threading/event.cpp @@ -24,7 +24,6 @@ DEALINGS IN THE SOFTWARE. */ #include "threading/event.h" -#include "threading/mutex_auto_lock.h" void Event::wait() { diff --git a/src/tool.cpp b/src/tool.cpp index 7c942c0b4..77f7ffea2 100644 --- a/src/tool.cpp +++ b/src/tool.cpp @@ -5,13 +5,11 @@ #include "tool.h" #include "itemdef.h" #include "itemgroup.h" -#include "log.h" #include "inventory.h" #include "exceptions.h" #include "convert_json.h" #include "util/serialize.h" #include "util/numeric.h" -#include "util/hex.h" #include diff --git a/src/tool.h b/src/tool.h index 8151f009e..78c6e8908 100644 --- a/src/tool.h +++ b/src/tool.h @@ -6,7 +6,6 @@ #include "irrlichttypes.h" #include "itemgroup.h" -#include "json-forwards.h" #include "util/enum_string.h" #include @@ -16,6 +15,8 @@ #include #include +namespace Json { class Value; } + class IItemDefManager; /* diff --git a/src/translation.cpp b/src/translation.cpp index 71469507d..d347a0c52 100644 --- a/src/translation.cpp +++ b/src/translation.cpp @@ -6,7 +6,6 @@ #include "log.h" #include "util/hex.h" #include "util/string.h" -#include "gettext.h" #include diff --git a/src/translation.h b/src/translation.h index c5494dd78..311269bb1 100644 --- a/src/translation.h +++ b/src/translation.h @@ -10,7 +10,6 @@ #include #include #include -#include "config.h" class Translations; extern Translations *g_client_translations; diff --git a/src/unittest/test_address.cpp b/src/unittest/test_address.cpp index 364e82fad..e2a067caf 100644 --- a/src/unittest/test_address.cpp +++ b/src/unittest/test_address.cpp @@ -7,6 +7,7 @@ #include #include "log.h" #include "settings.h" +#include "network/address.h" #include "network/socket.h" class TestAddress : public TestBase diff --git a/src/unittest/test_connection.cpp b/src/unittest/test_connection.cpp index 298d259aa..f2e3e697b 100644 --- a/src/unittest/test_connection.cpp +++ b/src/unittest/test_connection.cpp @@ -10,8 +10,8 @@ #include "util/serialize.h" #include "network/peerhandler.h" #include "network/mtp/internal.h" +#include "network/networkexceptions.h" #include "network/networkpacket.h" -#include "network/socket.h" class TestConnection : public TestBase { public: diff --git a/src/unittest/test_servermodmanager.cpp b/src/unittest/test_servermodmanager.cpp index 01bb70c2f..b7e9be5f9 100644 --- a/src/unittest/test_servermodmanager.cpp +++ b/src/unittest/test_servermodmanager.cpp @@ -4,9 +4,9 @@ #include "test.h" #include +#include "content/subgames.h" #include "server/mods.h" #include "settings.h" -#include "util/string.h" #define SUBGAME_ID "devtest" diff --git a/src/unittest/test_socket.cpp b/src/unittest/test_socket.cpp index 2d5eb1d5b..587fe52c6 100644 --- a/src/unittest/test_socket.cpp +++ b/src/unittest/test_socket.cpp @@ -4,8 +4,11 @@ #include "test.h" +#include "constants.h" #include "log.h" #include "settings.h" +#include "network/address.h" +#include "network/networkexceptions.h" #include "network/socket.h" class TestSocket : public TestBase { diff --git a/src/util/areastore.h b/src/util/areastore.h index c377c2ec9..85c58c9ec 100644 --- a/src/util/areastore.h +++ b/src/util/areastore.h @@ -5,9 +5,7 @@ #pragma once #include "irr_v3d.h" -#include "noise.h" // for PcgRandom #include -#include #include #include #include "util/container.h" @@ -17,7 +15,6 @@ #endif #if USE_SPATIAL #include - #include "util/serialize.h" #endif diff --git a/src/util/auth.cpp b/src/util/auth.cpp index 5116e4be7..e106b23f8 100644 --- a/src/util/auth.cpp +++ b/src/util/auth.cpp @@ -2,7 +2,6 @@ // SPDX-License-Identifier: LGPL-2.1-or-later // Copyright (C) 2015, 2016 est31 -#include #include #include "auth.h" #include "base64.h" diff --git a/src/util/base64.cpp b/src/util/base64.cpp index 2acf78167..36394a291 100644 --- a/src/util/base64.cpp +++ b/src/util/base64.cpp @@ -27,7 +27,6 @@ René Nyffenegger rene.nyffenegger@adp-gmbh.ch */ #include "base64.h" -#include static const std::string base64_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" diff --git a/src/util/colorize.cpp b/src/util/colorize.cpp index 0814c2d34..8319060f9 100644 --- a/src/util/colorize.cpp +++ b/src/util/colorize.cpp @@ -20,7 +20,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifdef HAVE_COLORIZE_URL #include -#include "log.h" #include "string.h" #include #include diff --git a/src/util/enriched_string.cpp b/src/util/enriched_string.cpp index 0eff3ffea..4b9c492f0 100644 --- a/src/util/enriched_string.cpp +++ b/src/util/enriched_string.cpp @@ -20,7 +20,6 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "enriched_string.h" #include "util/string.h" #include "debug.h" -#include "log.h" using namespace video; diff --git a/src/util/guid.cpp b/src/util/guid.cpp index f66d1279c..f829e9034 100644 --- a/src/util/guid.cpp +++ b/src/util/guid.cpp @@ -4,12 +4,10 @@ #include "guid.h" #include -#include #include #include "exceptions.h" #include "util/base64.h" -#include "log.h" #include "porting.h" #include "util/numeric.h" diff --git a/src/util/numeric.cpp b/src/util/numeric.cpp index 37b41ace2..fca4b2bde 100644 --- a/src/util/numeric.cpp +++ b/src/util/numeric.cpp @@ -4,7 +4,6 @@ #include "numeric.h" -#include "log.h" #include "constants.h" // BS, MAP_BLOCKSIZE #include "noise.h" // PcgRandom #include diff --git a/src/util/numeric.h b/src/util/numeric.h index c3f02bc3a..858cc9ec0 100644 --- a/src/util/numeric.h +++ b/src/util/numeric.h @@ -4,7 +4,6 @@ #pragma once -#include "basic_macros.h" #include "constants.h" #include "irrlichttypes.h" #include "irr_v2d.h" diff --git a/src/util/pointabilities.cpp b/src/util/pointabilities.cpp index 716a19b28..b1e8b6ec5 100644 --- a/src/util/pointabilities.cpp +++ b/src/util/pointabilities.cpp @@ -6,7 +6,6 @@ #include "serialize.h" #include "exceptions.h" -#include PointabilityType Pointabilities::deSerializePointabilityType(std::istream &is) { diff --git a/src/util/quicktune.cpp b/src/util/quicktune.cpp index 343301f1b..3407d0930 100644 --- a/src/util/quicktune.cpp +++ b/src/util/quicktune.cpp @@ -3,6 +3,8 @@ // Copyright (C) 2013 celeron55, Perttu Ahola #include "quicktune.h" + +#include #include "threading/mutex_auto_lock.h" #include "util/string.h" diff --git a/src/util/quicktune.h b/src/util/quicktune.h index 263fdcee6..2a171cf15 100644 --- a/src/util/quicktune.h +++ b/src/util/quicktune.h @@ -34,7 +34,6 @@ #pragma once #include -#include #include enum QuicktuneValueType { diff --git a/src/util/sha1.cpp b/src/util/sha1.cpp index 850c7201d..ea10dfce3 100644 --- a/src/util/sha1.cpp +++ b/src/util/sha1.cpp @@ -24,9 +24,7 @@ SOFTWARE. */ -#include #include -#include #include #define IN_SHA1_CPP diff --git a/src/util/srp.cpp b/src/util/srp.cpp index b1dfa76a4..7ab31a85d 100644 --- a/src/util/srp.cpp +++ b/src/util/srp.cpp @@ -40,7 +40,6 @@ #include #include #include -#include #include diff --git a/src/util/string.cpp b/src/util/string.cpp index aeec51cb8..26e061fed 100644 --- a/src/util/string.cpp +++ b/src/util/string.cpp @@ -8,7 +8,7 @@ #include "log.h" #include "hex.h" -#include "porting.h" +#include "porting.h" // strtok_r, strtoull and strncasecmp #include "translation.h" #include "strfnd.h" diff --git a/src/util/thread.h b/src/util/thread.h index 5ca9461fb..778649d8d 100644 --- a/src/util/thread.h +++ b/src/util/thread.h @@ -8,8 +8,6 @@ #include "irrlichttypes.h" #include "threading/thread.h" #include "threading/mutex_auto_lock.h" -#include "porting.h" -#include "log.h" #include "container.h" template diff --git a/src/voxel.cpp b/src/voxel.cpp index 1c6e9bf4d..3d40ac75f 100644 --- a/src/voxel.cpp +++ b/src/voxel.cpp @@ -3,13 +3,12 @@ // Copyright (C) 2013 celeron55, Perttu Ahola #include "voxel.h" -#include "map.h" -#include "gettime.h" + +#include "constants.h" #include "nodedef.h" -#include "util/directiontables.h" -#include "util/timetaker.h" #include "porting.h" #include // memcpy, memset +#include /* Debug stuff diff --git a/src/voxel.h b/src/voxel.h index 2e66e6f8b..320d798c3 100644 --- a/src/voxel.h +++ b/src/voxel.h @@ -10,8 +10,6 @@ #include #include "exceptions.h" #include "mapnode.h" -#include -#include #include "irrlicht_changes/printing.h" class NodeDefManager; diff --git a/src/voxelalgorithms.h b/src/voxelalgorithms.h index f938053c2..304d3a683 100644 --- a/src/voxelalgorithms.h +++ b/src/voxelalgorithms.h @@ -4,9 +4,8 @@ #pragma once -#include "voxel.h" +#include #include "mapnode.h" -#include "util/container.h" class Map; class MapBlock;