Remove IrrlichtDevice.h and IVideoDriver.h in header files

This commit is contained in:
Benau 2022-11-17 11:09:56 +08:00
parent d170f0f445
commit a688912872
70 changed files with 152 additions and 18 deletions

View File

@ -24,6 +24,7 @@
#include "utils/log.hpp"
#include "utils/string_utils.hpp"
#include <IrrlichtDevice.h>
#include <IWriteFile.h>
using namespace irr;
using namespace io;

View File

@ -25,7 +25,9 @@
#include "graphics/glwrap.hpp"
#include "graphics/texture_shader.hpp"
#include <IVideoDriver.h>
#include <S3DVertex.h>
#include <SMaterial.h>
#include <irrArray.h>
#include <map>
#include <memory>

View File

@ -33,6 +33,7 @@
#include "utils/utf8.h"
#include "GlyphLayout.h"
#include "IVideoDriver.h"
#include <array>
#ifndef SERVER_ONLY
#include <ge_texture.hpp>

View File

@ -26,6 +26,8 @@
#include "graphics/texture_shader.hpp"
#include "utils/cpp2011.hpp"
#include <IVideoDriver.h>
// ============================================================================
class Primitive2DList : public TextureShader<Primitive2DList, 1, core::vector2df>
{

View File

@ -27,6 +27,7 @@ using namespace irr;
#include <ISceneCollisionManager.h>
#include <ISceneManager.h>
#include <ISkinnedMesh.h>
#include <IVideoDriver.h>
void AbstractRenderer::drawDebugMeshes() const
{

View File

@ -40,6 +40,7 @@
#include "utils/vs.hpp"
#include "ISceneManager.h"
#include "IVideoDriver.h"
#include <algorithm>
#include <cmath>

View File

@ -29,6 +29,7 @@
#ifndef SERVER_ONLY
#include <ICameraSceneNode.h>
#include <ISceneManager.h>
#include <ITexture.h>
#include "graphics/texture_shader.hpp"

View File

@ -26,6 +26,7 @@
#include "utils/profiler.hpp"
#include <ISceneManager.h>
#include <IVideoDriver.h>
void FixedPipelineRenderer::onLoadWorld()
{

View File

@ -34,6 +34,8 @@
#include <sstream>
#include <ge_gl_utils.hpp>
#include <IVideoDriver.h>
#ifdef DEBUG
#if !defined(__APPLE__) && !defined(ANDROID)
#define ARB_DEBUG_OUTPUT

View File

@ -2494,3 +2494,21 @@ void IrrDriver::resizeWindow()
#endif
#endif
}
// ----------------------------------------------------------------------------
const core::dimension2d<u32>& IrrDriver::getFrameSize() const
{
return m_video_driver->getCurrentRenderTargetSize();
}
// ----------------------------------------------------------------------------
unsigned int IrrDriver::getRealTime()
{
return m_device->getTimer()->getRealTime();
}
// ----------------------------------------------------------------------------
u32 IrrDriver::getDefaultFramebuffer() const
{
return m_video_driver->getDefaultFramebuffer();
}

View File

@ -27,12 +27,6 @@
* management, etc...)
*/
#include <IVideoDriver.h>
#include <vector2d.h>
#include <dimension2d.h>
#include <SColor.h>
#include "IrrlichtDevice.h"
#include "ISkinnedMesh.h"
#include "graphics/abstract_renderer.hpp"
#include "graphics/gl_headers.hpp"
#include "graphics/wind.hpp"
@ -45,6 +39,13 @@
#include <string>
#include <vector>
#include <irrArray.h>
#include <dimension2d.h>
#include <position2d.h>
#include <matrix4.h>
#include <vector2d.h>
#include <IEventReceiver.h>
#include <SColor.h>
namespace SP
{
@ -58,6 +59,9 @@ namespace irr
class IMeshSceneNode; class IParticleSystemSceneNode; class ICameraSceneNode; class ILightSceneNode;
class CLensFlareSceneNode; }
namespace gui { class IGUIEnvironment; class IGUIFont; }
namespace video { struct IRenderTarget; class ITexture; class IVideoDriver;
class SMaterial; }
class IrrlichtDevice;
}
using namespace irr;
@ -299,8 +303,7 @@ public:
const std::vector<VideoMode>& getVideoModes() const { return m_modes; }
// ------------------------------------------------------------------------
/** Returns the frame size. */
const core::dimension2d<u32>& getFrameSize() const
{ return m_video_driver->getCurrentRenderTargetSize(); }
const core::dimension2d<u32>& getFrameSize() const;
// ------------------------------------------------------------------------
/** Returns the irrlicht device. */
IrrlichtDevice *getDevice() const { return m_device; }
@ -316,7 +319,7 @@ public:
// ------------------------------------------------------------------------
/** Returns the current real time, which might not be 0 at start of the
* application. Value in msec. */
unsigned int getRealTime() {return m_device->getTimer()->getRealTime(); }
unsigned int getRealTime();
// ------------------------------------------------------------------------
/** Use motion blur for a short time */
void giveBoost(unsigned int cam_index) { m_renderer->giveBoost(cam_index);}
@ -521,8 +524,7 @@ public:
void uploadLightingData();
void sameRestart() { m_resolution_changing = RES_CHANGE_SAME; }
// ------------------------------------------------------------------------
u32 getDefaultFramebuffer() const
{ return m_video_driver->getDefaultFramebuffer(); }
u32 getDefaultFramebuffer() const;
// ------------------------------------------------------------------------
void handleWindowResize();
}; // IrrDriver

View File

@ -43,6 +43,7 @@
#include <IMaterialRendererServices.h>
#include <ISceneNode.h>
#include <IVideoDriver.h>
#include <mini_glm.hpp>
#ifndef SERVER_ONLY

View File

@ -33,6 +33,8 @@
#include <algorithm>
#include <ITexture.h>
//-----------------------------------------------------------------------------
ParticleEmitter::ParticleEmitter(const ParticleKind* type,
const Vec3 &position,

View File

@ -46,6 +46,7 @@
#include "utils/profiler.hpp"
#include "utils/cpp2011.hpp"
#include <IrrlichtDevice.h>
#include <ISceneManager.h>
#include <SViewFrustum.h>
#include <ge_texture.hpp>

View File

@ -33,6 +33,8 @@
#include "utils/log.hpp"
#include "utils/string_utils.hpp"
#include <ITexture.h>
int Referee::m_st_first_start_frame = 1;
int Referee::m_st_last_start_frame = 1;
int Referee::m_st_first_rescue_frame = 1;

View File

@ -25,6 +25,7 @@
#include "graphics/shader_based_renderer.hpp"
#include <ISceneManager.h>
#include <IVideoDriver.h>
//-----------------------------------------------------------------------------
GL1RenderTarget::GL1RenderTarget(const irr::core::dimension2du &dimension,

View File

@ -48,6 +48,7 @@
#include "../../lib/irrlicht/source/Irrlicht/CSceneManager.h"
#include "../../lib/irrlicht/source/Irrlicht/os.h"
#include <IVideoDriver.h>
#include <algorithm>
// ----------------------------------------------------------------------------

View File

@ -25,6 +25,8 @@
#include <algorithm>
#include <cassert>
#include <IImage.h>
using namespace irr;

View File

@ -20,11 +20,20 @@
#define HEADER_SKYBOX_HPP
#include "graphics/gl_headers.hpp"
#include <ICameraSceneNode.h>
#include <ITexture.h>
#include <IVideoDriver.h>
#include <vector>
namespace irr
{
namespace scene
{
class ISceneNode; class ICameraSceneNode;
}
namespace video
{
class IImage; class ITexture;
}
}
class Skybox
{
private:

View File

@ -58,6 +58,9 @@
#include <vector>
#include <ge_main.hpp>
#include <IrrlichtDevice.h>
using namespace GE;
namespace SP

View File

@ -30,6 +30,7 @@
#include "utils/string_utils.hpp"
#include <IImageLoader.h>
#include <IVideoDriver.h>
#include <IWriteFile.h>
#if !(defined(SERVER_ONLY) || defined(MOBILE_STK))

View File

@ -26,6 +26,7 @@
#include <cmath>
#include "../../lib/irrlicht/source/Irrlicht/os.h"
#include <ISceneManager.h>
#include <IVideoDriver.h>
// ----------------------------------------------------------------------------
std::vector<float> STKParticle::m_flips_data;

View File

@ -31,6 +31,7 @@
#include <IMeshSceneNode.h>
#include <ISceneManager.h>
#include <ITexture.h>
#include <IVideoDriver.h>
#include <SMeshBuffer.h>
// ----------------------------------------------------------------------------

View File

@ -19,6 +19,8 @@
#include "graphics/wind.hpp"
#include "utils/helpers.hpp"
#include <IrrlichtDevice.h>
Wind::Wind()
{
m_seed = (float)((rand() % 1000) - 500);

View File

@ -703,7 +703,9 @@ namespace GUIEngine
#include <assert.h>
#include <mutex>
#include <IrrlichtDevice.h>
#include <IGUIEnvironment.h>
#include <IVideoDriver.h>
using namespace irr::gui;
using namespace irr::video;

View File

@ -19,6 +19,7 @@
#include <iostream>
#include <IrrlichtDevice.h>
#include <IGUIFont.h>
#include <ITexture.h>

View File

@ -24,6 +24,7 @@
#include "utils/synchronised.hpp"
#include "GlyphLayout.h"
#include <IrrlichtDevice.h>
#include <atomic>
#include <memory>

View File

@ -26,8 +26,10 @@
#include "io/file_manager.hpp"
#include "utils/log.hpp"
#include <IrrlichtDevice.h>
#include <IGUIEnvironment.h>
#include <IGUIButton.h>
#include <IVideoDriver.h>
using namespace irr;
using namespace core;

View File

@ -31,6 +31,7 @@
#include <algorithm>
#include <string>
#include <IrrlichtDevice.h>
#include <IGUIEnvironment.h>
using namespace GUIEngine;

View File

@ -36,6 +36,9 @@
#include "utils/log.hpp"
#include "utils/string_utils.hpp"
#include <IrrlichtDevice.h>
#include <IVideoDriver.h>
using namespace GUIEngine;
using namespace irr;
using namespace core;

View File

@ -24,6 +24,7 @@
#include "../../../lib/irrlicht/include/IrrCompileConfig.h"
#include "../../../lib/irrlicht/source/Irrlicht/CIrrDeviceLinux.h"
#include <IrrlichtDevice.h>
#include <algorithm>
#include <cstdlib>

View File

@ -26,6 +26,7 @@
#include "states_screens/state_manager.hpp"
#include "utils/vs.hpp"
#include <IrrlichtDevice.h>
#include <IGUIEnvironment.h>
#include <iostream>
#include <algorithm>

View File

@ -30,6 +30,7 @@
#include <IGUIEnvironment.h>
#include <IGUIButton.h>
#include <IGUIStaticText.h>
#include <IVideoDriver.h>
#include <algorithm>
#ifndef SERVER_ONLY
#include <ge_texture.hpp>

View File

@ -34,6 +34,7 @@
#include <IGUIElement.h>
#include <IGUIEnvironment.h>
#include <IGUIButton.h>
#include <ITexture.h>
using namespace GUIEngine;
using namespace irr::core;

View File

@ -32,6 +32,7 @@
#include "../../../lib/irrlicht/source/Irrlicht/CGUIButton.h"
#include <IGUIStaticText.h>
#include <ITexture.h>
using namespace GUIEngine;
using namespace irr::core;

View File

@ -35,6 +35,8 @@
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <IrrlichtDevice.h>
#define INPUT_MODE_DEBUG 0
static const char INPUT_FILE_NAME[] = "input.xml";

View File

@ -57,9 +57,11 @@
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <IrrlichtDevice.h>
#include <ISceneManager.h>
#include <ICameraSceneNode.h>
#include <ISceneNode.h>
#include <ITexture.h>
#include <map>
#include <vector>

View File

@ -27,6 +27,8 @@
#include "guiengine/modaldialog.hpp"
#include "guiengine/screen_keyboard.hpp"
#include <IrrlichtDevice.h>
// ----------------------------------------------------------------------------
/** The multitouch device constructor
*/

View File

@ -26,6 +26,8 @@
#include "guiengine/skin.hpp"
#include "io/file_manager.hpp"
#include <IAnimatedMesh.h>
AttachmentManager *attachment_manager = 0;
struct initAttachmentType {Attachment::AttachmentType attachment;

View File

@ -39,6 +39,8 @@
#include "utils/constants.hpp"
#include "utils/string_utils.hpp"
#include <IMesh.h>
PowerupManager* powerup_manager=0;
//-----------------------------------------------------------------------------

View File

@ -293,6 +293,8 @@ extern "C" {
#include "utils/translation.hpp"
#include "io/rich_presence.hpp"
#include <IrrlichtDevice.h>
static void cleanSuperTuxKart();
static void cleanUserConfig();
void runUnitTests();

View File

@ -60,6 +60,8 @@
#include <thread>
#include <IrrlichtDevice.h>
#ifndef WIN32
#include <unistd.h>
#endif

View File

@ -26,6 +26,7 @@
#include "tracks/track.hpp"
#include <ISceneManager.h>
#include <IVideoDriver.h>
#include <iomanip>
#include <iostream>

View File

@ -88,6 +88,7 @@
#include <sstream>
#include <stdexcept>
#include <IrrlichtDevice.h>
#include <ISceneManager.h>
World* World::m_world[PT_COUNT];

View File

@ -35,6 +35,8 @@
#include "tracks/track.hpp"
#include "utils/stk_process.hpp"
#include <IrrlichtDevice.h>
//-----------------------------------------------------------------------------
WorldStatus::WorldStatus() : m_process_type(STKProcess::getType()), m_started_at(StkTime::getMonoTimeMs())
{

View File

@ -42,6 +42,7 @@
#include <IMeshManipulator.h>
#include <IMeshSceneNode.h>
#include <ITexture.h>
#include <IVideoDriver.h>
using namespace irr;
#include <algorithm>

View File

@ -45,6 +45,8 @@
#include "utils/profiler.hpp"
#include "utils/stk_process.hpp"
#include <IVideoDriver.h>
//=============================================================================
Physics* g_physics[PT_COUNT];
// ----------------------------------------------------------------------------

View File

@ -66,6 +66,8 @@
#include "utils/translation.hpp"
#include "io/rich_presence.hpp"
#include <IrrlichtDevice.h>
#ifdef __SWITCH__
extern "C" {
#define u64 uint64_t

View File

@ -39,6 +39,8 @@
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <ITexture.h>
using namespace GUIEngine;
using namespace Online;
using namespace irr::gui;

View File

@ -27,9 +27,9 @@
#include "input/multitouch_device.hpp"
#include "utils/translation.hpp"
#include <IrrlichtDevice.h>
#include <IGUIEnvironment.h>
using namespace GUIEngine;
using namespace irr;
using namespace irr::core;

View File

@ -28,9 +28,9 @@
#include "states_screens/race_gui_multitouch.hpp"
#include "utils/translation.hpp"
#include <IrrlichtDevice.h>
#include <IGUIEnvironment.h>
using namespace GUIEngine;
using namespace irr;
using namespace irr::core;

View File

@ -51,6 +51,8 @@
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <IrrlichtDevice.h>
using namespace GUIEngine;
using namespace irr::core;
using namespace irr::gui;

View File

@ -25,7 +25,6 @@
#include "config/stk_config.hpp"
#include "graphics/irr_driver.hpp"
#include "graphics/lod_node.hpp"
#include <ge_render_info.hpp>
#include "guiengine/engine.hpp"
#include "guiengine/scalable_font.hpp"
#include "guiengine/widgets/button_widget.hpp"
@ -45,12 +44,15 @@
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <ge_render_info.hpp>
#include <ICameraSceneNode.h>
#include <IGUIEnvironment.h>
#include <IGUIImage.h>
#include <ILightSceneNode.h>
#include <IMeshSceneNode.h>
#include <ISceneManager.h>
#include <IVideoDriver.h>
#include <SColor.h>
#include <iostream>

View File

@ -45,6 +45,7 @@
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <IrrlichtDevice.h>
#include <IGUIEnvironment.h>
#include <IGUIButton.h>

View File

@ -68,6 +68,7 @@
#include <string>
#include <IrrlichtDevice.h>
using namespace GUIEngine;
using namespace Online;

View File

@ -57,6 +57,8 @@
#include <iostream>
#include <sstream>
#include <IrrlichtDevice.h>
using namespace GUIEngine;
using namespace Online;

View File

@ -47,6 +47,8 @@
#include <set>
#include <algorithm>
#include <IrrlichtDevice.h>
using namespace GUIEngine;
// -----------------------------------------------------------------------------

View File

@ -62,6 +62,8 @@
#include <iostream>
#include <sstream>
#include <IrrlichtDevice.h>
using namespace GUIEngine;
using namespace Online;

View File

@ -49,6 +49,8 @@
#include "../../lib/irrlicht/source/Irrlicht/CIrrDeviceSDL.h"
#endif
#include <IrrlichtDevice.h>
#include <functional>
#include <iostream>
#include <iterator>

View File

@ -64,6 +64,8 @@ using namespace irr;
#include <algorithm>
#include <IrrlichtDevice.h>
/** The constructor is called before anything is attached to the scene node.
* So rendering to a texture can be done here. But world is not yet fully
* created, so only the race manager can be accessed safely.

View File

@ -53,6 +53,7 @@
#include "utils/translation.hpp"
#include <GlyphLayout.h>
#include <IrrlichtDevice.h>
#include <ICameraSceneNode.h>
namespace irr

View File

@ -37,6 +37,7 @@ using namespace irr;
#include "network/protocols/client_lobby.hpp"
#include "states_screens/race_gui_base.hpp"
#include <IrrlichtDevice.h>
//-----------------------------------------------------------------------------
/** The multitouch GUI constructor

View File

@ -21,8 +21,14 @@
#include <irrString.h>
#include <rect.h>
#include <vector2d.h>
#include <IVideoDriver.h>
namespace irr
{
namespace video
{
class ITexture;
}
}
using namespace irr;
class AbstractKart;

View File

@ -55,6 +55,7 @@
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <IrrlichtDevice.h>
#include <ISceneCollisionManager.h>
#include <ISceneManager.h>
using namespace irr;

View File

@ -37,6 +37,8 @@
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <IrrlichtDevice.h>
using namespace GUIEngine;
#define KART_CONTINUOUS_ROTATION_SPEED 35.f

View File

@ -89,6 +89,7 @@
#include <IMeshManipulator.h>
#include <IMeshSceneNode.h>
#include <ISceneManager.h>
#include <IVideoDriver.h>
#include <SMeshBuffer.h>
#include <algorithm>

View File

@ -29,6 +29,9 @@
#include <stdexcept>
#include <stdio.h>
#include <ITexture.h>
#include <IVideoDriver.h>
TrackManager* track_manager = 0;
std::vector<std::string> TrackManager::m_track_search_path;

View File

@ -66,6 +66,7 @@
#include "utils/profiler.hpp"
#include "utils/string_utils.hpp"
#include <IrrlichtDevice.h>
#include <IGUIEnvironment.h>
#include <IGUIContextMenu.h>

View File

@ -37,6 +37,8 @@
#include <stack>
#include <sstream>
#include <IVideoDriver.h>
Profiler profiler;
// Unit is in pencentage of the screen dimensions

View File

@ -23,6 +23,7 @@
#include "utils/translation.hpp"
#include <ctime>
#include <IrrlichtDevice.h>
irr::ITimer *StkTime::m_timer = NULL;
std::chrono::steady_clock::time_point