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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -18,7 +18,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once #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 /* Manually insert an image into the cache, useful to avoid texture-to-image
* conversion whenever we can intercept it. * conversion whenever we can intercept it.

View File

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

View File

@ -18,7 +18,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once #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 /* Fill in RGB values for transparent pixels, to correct for odd colors
* appearing at borders when blending. This is because many PNG optimizers * appearing at borders when blending. This is because many PNG optimizers

View File

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

View File

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

View File

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

View File

@ -21,7 +21,20 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <string> #include <string>
#include <vector> #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; struct ItemStack;
class Client; class Client;

View File

@ -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. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#pragma once
#include "client/texturesource.h" #include "client/texturesource.h"
#include "client/fontengine.h" #include "client/fontengine.h"
#include "debug.h" #include "debug.h"
#include "irrlichttypes_extrabloated.h" #include "irrlichttypes_bloated.h"
#include "util/string.h" #include "util/string.h"
#include <algorithm> #include <algorithm>
#include <array> #include <array>
#include <vector> #include <vector>
#pragma once
class StyleSpec class StyleSpec
{ {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#include "irrlichttypes_extrabloated.h" #include "irrlichttypes_bloated.h"
#include "mapnode.h" #include "mapnode.h"
#include "porting.h" #include "porting.h"
#include "nodedef.h" #include "nodedef.h"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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