Reduce include count in headers

This commit is contained in:
SmallJoker 2024-09-02 16:09:32 +02:00 committed by GitHub
parent b8b99d5cf1
commit 0c4f03d9a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
39 changed files with 163 additions and 62 deletions

@ -19,7 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
#include "irrlichttypes_extrabloated.h"
#include "irrlichttypes.h"
#include "inventory.h"
#include "util/numeric.h"
#include "client/localplayer.h"

@ -52,6 +52,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "profiler.h"
#include "shader.h"
#include "gettext.h"
#include "clientdynamicinfo.h"
#include "clientmap.h"
#include "clientmedia.h"
#include "version.h"

@ -20,22 +20,20 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
#include "clientenvironment.h"
#include "irrlichttypes_extrabloated.h"
#include "irrlichttypes.h"
#include <ostream>
#include <map>
#include <memory>
#include <set>
#include <vector>
#include <unordered_set>
#include "clientobject.h"
#include "gamedef.h"
#include "inventorymanager.h"
#include "client/hud.h"
#include "tileanimation.h"
#include "network/address.h"
#include "network/networkprotocol.h" // multiple enums
#include "network/peerhandler.h"
#include "gameparams.h"
#include "clientdynamicinfo.h"
#include "script/common/c_types.h" // LuaError
#include "util/numeric.h"
#ifdef SERVER
@ -44,32 +42,33 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define CLIENT_CHAT_MESSAGE_LIMIT_PER_10S 10.0f
struct ClientEvent;
struct MeshMakeData;
struct ChatMessage;
class MapBlockMesh;
class RenderingEngine;
class IWritableTextureSource;
class IWritableShaderSource;
class IWritableItemDefManager;
class ISoundManager;
class NodeDefManager;
//class IWritableCraftDefManager;
class Camera;
class ClientMediaDownloader;
class SingleMediaDownloader;
struct MapDrawControl;
class ISoundManager;
class IWritableItemDefManager;
class IWritableShaderSource;
class IWritableTextureSource;
class MapBlockMesh;
class MapDatabase;
class MeshUpdateManager;
class Minimap;
class ModChannelMgr;
class MtEventManager;
struct PointedThing;
struct MapNode;
class MapDatabase;
class Minimap;
struct MinimapMapblock;
class MeshUpdateManager;
class ParticleManager;
class Camera;
struct PlayerControl;
class NetworkPacket;
class NodeDefManager;
class ParticleManager;
class RenderingEngine;
class SingleMediaDownloader;
struct ChatMessage;
struct ClientDynamicInfo;
struct ClientEvent;
struct MapDrawControl;
struct MapNode;
struct MeshMakeData;
struct MinimapMapblock;
struct PlayerControl;
struct PointedThing;
namespace con {
class IConnection;
}

@ -20,7 +20,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
#include <string>
#include "irrlichttypes_bloated.h"
#include "irrlichttypes.h"
#include "client/hud.h" // HudElementStat
struct ParticleParameters;
struct ParticleSpawnerParameters;

@ -27,6 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "player.h"
#include "chat.h"
#include "gettext.h"
#include "inputhandler.h"
#include "profiler.h"
#include "gui/guiEngine.h"
#include "fontengine.h"

@ -19,11 +19,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
#include "irrlichttypes_extrabloated.h"
#include "client/inputhandler.h"
#include "gameparams.h"
#include <string>
class RenderingEngine;
class Settings;
class MyEventReceiver;
class InputHandler;
struct GameStartData;
struct MainMenuData;
class ClientLauncher
{

@ -19,7 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
#include "irrlichttypes_extrabloated.h"
#include "irrlichttypes_bloated.h"
#include "map.h"
#include "camera.h"
#include <set>
@ -41,6 +41,16 @@ class Client;
class ITextureSource;
class PartialMeshBuffer;
namespace irr::scene
{
class IMeshBuffer;
}
namespace irr::video
{
class IVideoDriver;
}
/*
ClientMap

@ -19,7 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
#include "irrlichttypes_extrabloated.h"
#include "irrlichttypes_bloated.h"
#include "activeobject.h"
#include <memory>
#include <unordered_map>
@ -34,6 +34,13 @@ class LocalPlayer;
struct ItemStack;
class WieldMeshSceneNode;
namespace irr::scene
{
class IAnimatedMeshSceneNode;
class ISceneNode;
class ISceneManager;
}
class ClientActiveObject : public ActiveObject
{
public:

@ -19,14 +19,22 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
#include "irrlichttypes_bloated.h"
#include "constants.h"
#include "irr_ptr.h"
#include "irrlichttypes_extrabloated.h"
#include "skyparams.h"
#include <iostream>
#include <ISceneNode.h>
#include <SMaterial.h>
#include <SMeshBuffer.h>
class IShaderSource;
namespace irr::scene
{
class ISceneManager;
}
// Menu clouds
class Clouds;
extern Clouds *g_menuclouds;

@ -19,6 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "content_cso.h"
#include <IBillboardSceneNode.h>
#include <ISceneManager.h>
#include "client/texturesource.h"
#include "clientenvironment.h"
#include "client.h"

@ -19,8 +19,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
#include "irrlichttypes_extrabloated.h"
#include "irrlichttypes_bloated.h"
#include "clientsimpleobject.h"
namespace irr::scene
{
class ISceneManager;
}
ClientSimpleObject* createSmokePuff(scene::ISceneManager *smgr,
ClientEnvironment *env, v3f pos, v2f size);

@ -20,7 +20,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "filecache.h"
#include "network/networkprotocol.h"
#include "log.h"
#include "filesys.h"
#include <string>

@ -23,10 +23,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <gettext.h>
#include "gui/mainmenumanager.h"
#include "gui/guiChatConsole.h"
#include "gui/guiFormSpecMenu.h"
#include "util/enriched_string.h"
#include "util/pointedthing.h"
#include "client.h"
#include "clientmap.h"
#include "fontengine.h"
#include "hud.h" // HUD_FLAG_*
#include "nodedef.h"
#include "profiler.h"
#include "renderingengine.h"

@ -22,15 +22,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "irrlichttypes.h"
#include <IGUIEnvironment.h>
#include "gui/guiFormSpecMenu.h"
#include "util/enriched_string.h"
#include "util/pointedthing.h"
#include "game.h"
using namespace irr;
class Client;
class EnrichedString;
class GUIChatConsole;
class GUIFormSpecMenu;
struct MapDrawControl;
struct PointedThing;
/*
* This object intend to contain the core UI elements

@ -23,6 +23,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "util/numeric.h"
#include <cstdio>
#include "client/renderingengine.h"
#include <IImage.h>
#include <ITexture.h>
#include <IVideoDriver.h>
/* Maintain a static cache to store the images that correspond to textures
* in a format that's manipulable by code. Some platforms exhibit issues

@ -18,7 +18,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
#include "irrlichttypes_extrabloated.h"
#include "irrlichttypes.h"
#include <path.h>
#include <rect.h>
#include <SColor.h>
namespace irr::video
{
class IImage;
class ITexture;
class IVideoDriver;
}
/* Manually insert an image into the cache, useful to avoid texture-to-image
* conversion whenever we can intercept it.

@ -22,6 +22,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <vector>
#include <IGUIFont.h>
#include <SMaterial.h>
#include <SMeshBuffer.h>
#include "irr_aabb3d.h"
#include "../hud.h"
@ -32,6 +34,17 @@ class InventoryList;
class LocalPlayer;
struct ItemStack;
namespace irr::scene
{
class IMesh;
}
namespace irr::video
{
class ITexture;
class IVideoDriver;
}
class Hud
{
public:

@ -18,7 +18,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
#include "irrlichttypes_extrabloated.h"
#include "irrlichttypes.h"
#include <rect.h>
namespace irr::video
{
class IVideoDriver;
class IImage;
}
/* Fill in RGB values for transparent pixels, to correct for odd colors
* appearing at borders when blending. This is because many PNG optimizers

@ -19,7 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
#include "irrlichttypes_extrabloated.h"
#include "irrlichttypes.h"
#include "joystick_controller.h"
#include <list>
#include "keycode.h"

@ -19,16 +19,22 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
#include "irrlichttypes_extrabloated.h"
#include "irrlichttypes_bloated.h"
#include <ISceneNode.h>
#include <SMeshBuffer.h>
#include <array>
#include "camera.h"
#include "camera.h" // CameraMode
#include "irr_ptr.h"
#include "shader.h"
#include "skyparams.h"
#define SKY_MATERIAL_COUNT 12
namespace irr::video
{
class IVideoDriver;
}
class IShaderSource;
class ITextureSource;
// Skybox, rendered with zbuffer turned off, before all other nodes.

@ -20,10 +20,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
#include "irrlichttypes.h"
#include <ITexture.h>
#include <SColor.h>
#include <string>
#include <vector>
namespace irr::video
{
class IImage;
class ITexture;
}
typedef std::vector<video::SColor> Palette;
/*

@ -21,7 +21,20 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <string>
#include <vector>
#include "irrlichttypes_extrabloated.h"
#include "irr_aabb3d.h"
#include "irr_v3d.h"
#include <EMaterialTypes.h>
#include <IMeshSceneNode.h>
#include <SColor.h>
namespace irr::scene
{
class ISceneManager;
class IMesh;
struct SMesh;
}
using namespace irr;
struct ItemStack;
class Client;

@ -17,16 +17,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#pragma once
#include "client/texturesource.h"
#include "client/fontengine.h"
#include "debug.h"
#include "irrlichttypes_extrabloated.h"
#include "irrlichttypes_bloated.h"
#include "util/string.h"
#include <algorithm>
#include <array>
#include <vector>
#pragma once
class StyleSpec
{

@ -19,6 +19,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "client/guiscalingfilter.h"
#include "log.h"
#include "client/texturesource.h"
#include <ITexture.h>
GUIBackgroundImage::GUIBackgroundImage(gui::IGUIEnvironment *env,
gui::IGUIElement *parent, s32 id, const core::rect<s32> &rectangle,

@ -38,6 +38,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <IGUIImage.h>
#include <IAnimatedMeshSceneNode.h>
#include "client/renderingengine.h"
#include "client/joystick_controller.h"
#include "log.h"
#include "client/hud.h" // drawItemStack
#include "filesys.h"

@ -24,7 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <stack>
#include <unordered_set>
#include "irrlichttypes_extrabloated.h"
#include "irrlichttypes_bloated.h"
#include "irr_ptr.h"
#include "inventory.h"
#include "inventorymanager.h"
@ -32,8 +32,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "guiInventoryList.h"
#include "guiScrollBar.h"
#include "guiTable.h"
#include "network/networkprotocol.h"
#include "client/joystick_controller.h"
#include "util/string.h"
#include "util/enriched_string.h"
#include "StyleSpec.h"
@ -45,6 +43,7 @@ class ISimpleTextureSource;
class Client;
class GUIScrollContainer;
class ISoundManager;
class JoystickController;
enum FormspecFieldType {
f_Button,

@ -20,6 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "guiHyperText.h"
#include "guiScrollBar.h"
#include "client/fontengine.h"
#include "client/hud.h" // drawItemStack
#include "IVideoDriver.h"
#include "client/client.h"
#include "client/renderingengine.h"

@ -19,7 +19,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "guiItemImage.h"
#include "client/client.h"
#include "client/hud.h" // drawItemStack
#include "inventory.h"
#include <IGUIFont.h>
GUIItemImage::GUIItemImage(gui::IGUIEnvironment *env, gui::IGUIElement *parent,
s32 id, const core::rect<s32> &rectangle, const std::string &item_name,

@ -18,6 +18,7 @@
*/
#include "guiPathSelectMenu.h"
#include "guiFormSpecMenu.h" //required because of TextDest only !!!
GUIFileSelectMenu::GUIFileSelectMenu(gui::IGUIEnvironment* env,
gui::IGUIElement* parent, s32 id, IMenuManager *menumgr,

@ -23,7 +23,8 @@
#include "modalMenu.h"
#include "IGUIFileOpenDialog.h"
#include "guiFormSpecMenu.h" //required because of TextDest only !!!
struct TextDest;
class GUIFileSelectMenu : public GUIModalMenu
{

@ -20,7 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
#include "irrlichttypes_extrabloated.h"
#include "irrlichttypes_bloated.h"
#include <string>
#include "common/c_types.h"

@ -20,7 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
#include "irrlichttypes_extrabloated.h"
#include "irrlichttypes_bloated.h"
#include <string>
#include <iostream>
#include <optional>

@ -17,7 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "irrlichttypes_extrabloated.h"
#include "irrlichttypes_bloated.h"
#include "mapnode.h"
#include "porting.h"
#include "nodedef.h"

@ -23,7 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <iostream>
#include <unordered_map>
#include <cassert>
#include "irrlichttypes_bloated.h"
#include "irrlichttypes.h"
typedef std::unordered_map<u16, std::string> IdToNameMap;
typedef std::unordered_map<std::string, u16> NameToIdMap;

@ -19,8 +19,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
#include "networkprotocol.h"
namespace con
{

@ -21,7 +21,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
#include "server.h"
#include "networkprotocol.h"
class NetworkPacket;
// Note: don't forward-declare Server here (#14324)

@ -22,7 +22,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "irrlichttypes_bloated.h"
#include "inventory.h"
#include "constants.h"
#include "network/networkprotocol.h"
#include "util/basic_macros.h"
#include "util/string.h"
#include <list>

@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "player.h"
#include "skyparams.h"
#include "lighting.h"
#include "network/networkprotocol.h" // session_t
class PlayerSAO;

@ -34,6 +34,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "content/subgames.h"
#include "mapgen/mapgen.h"
#include "settings.h"
#include "clientdynamicinfo.h"
#include "client/client.h"
#include "client/renderingengine.h"
#include "network/networkprotocol.h"