From d6be6682ec69706b765ab51863bcd5805a7cbd7d Mon Sep 17 00:00:00 2001 From: numzero Date: Wed, 22 Feb 2023 21:38:32 +0300 Subject: [PATCH] Drop dependency on IrrCompileConfig The only remaining thing is IRRLICHT_SDK_VERSION via irrlicht.h --- src/client/clientlauncher.cpp | 4 ---- src/client/game.cpp | 2 +- src/client/tile.cpp | 1 - src/defaultsettings.cpp | 5 ----- src/gui/guiButton.h | 2 -- src/gui/guiChatConsole.cpp | 1 - src/gui/guiEditBox.cpp | 1 - src/gui/guiSkin.cpp | 5 ----- src/gui/guiSkin.h | 6 ------ src/irrlicht_changes/static_text.cpp | 4 ---- src/irrlicht_changes/static_text.h | 5 ----- 11 files changed, 1 insertion(+), 35 deletions(-) diff --git a/src/client/clientlauncher.cpp b/src/client/clientlauncher.cpp index 843c7ad32..15263de9b 100644 --- a/src/client/clientlauncher.cpp +++ b/src/client/clientlauncher.cpp @@ -553,13 +553,9 @@ void ClientLauncher::main_menu(MainMenuData *menudata) m_rendering_engine->get_raw_device()->getCursorControl()->setVisible(true); // Set absolute mouse mode -#if IRRLICHT_VERSION_MT_REVISION >= 9 m_rendering_engine->get_raw_device()->getCursorControl()->setRelativeMode(false); #endif -#endif - - /* show main menu */ GUIEngine mymenu(&input->joystick, guiroot, m_rendering_engine, &g_menumgr, menudata, *kill); diff --git a/src/client/game.cpp b/src/client/game.cpp index c5dc8f6d9..edd0039e9 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -2549,7 +2549,7 @@ void Game::checkZoomEnabled() void Game::updateCameraDirection(CameraOrientation *cam, float dtime) { -#if !defined(__ANDROID__) && IRRLICHT_VERSION_MT_REVISION >= 9 +#ifndef __ANDROID__ if (isMenuActive()) device->getCursorControl()->setRelativeMode(false); else diff --git a/src/client/tile.cpp b/src/client/tile.cpp index 35e5585a0..a29a6611a 100644 --- a/src/client/tile.cpp +++ b/src/client/tile.cpp @@ -21,7 +21,6 @@ with this program; if not, write to the Free Software Foundation, Inc., #include #include -#include #include "util/string.h" #include "util/container.h" #include "util/thread.h" diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 659bb157e..62c5e3310 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -17,7 +17,6 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include #include "settings.h" #include "porting.h" #include "filesys.h" @@ -208,11 +207,7 @@ void set_default_settings() settings->setDefault("texture_path", ""); settings->setDefault("shader_path", ""); #if ENABLE_GLES -#ifdef _IRR_COMPILE_WITH_OGLES1_ - settings->setDefault("video_driver", "ogles1"); -#else settings->setDefault("video_driver", "ogles2"); -#endif #else settings->setDefault("video_driver", "opengl"); #endif diff --git a/src/gui/guiButton.h b/src/gui/guiButton.h index 5e379b28f..31105bcda 100644 --- a/src/gui/guiButton.h +++ b/src/gui/guiButton.h @@ -4,8 +4,6 @@ #pragma once -#include "IrrCompileConfig.h" - #include #include "irrlicht_changes/static_text.h" #include "IGUIButton.h" diff --git a/src/gui/guiChatConsole.cpp b/src/gui/guiChatConsole.cpp index df4fd466b..ce58289b2 100644 --- a/src/gui/guiChatConsole.cpp +++ b/src/gui/guiChatConsole.cpp @@ -17,7 +17,6 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "IrrCompileConfig.h" #include "guiChatConsole.h" #include "chat.h" #include "client/client.h" diff --git a/src/gui/guiEditBox.cpp b/src/gui/guiEditBox.cpp index e25c9ace3..b6ee71ce9 100644 --- a/src/gui/guiEditBox.cpp +++ b/src/gui/guiEditBox.cpp @@ -19,7 +19,6 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "guiEditBox.h" -#include "IrrCompileConfig.h" #include "IGUISkin.h" #include "IGUIEnvironment.h" #include "IGUIFont.h" diff --git a/src/gui/guiSkin.cpp b/src/gui/guiSkin.cpp index ca692f6cb..5462a2fec 100644 --- a/src/gui/guiSkin.cpp +++ b/src/gui/guiSkin.cpp @@ -5,7 +5,6 @@ // For conditions of distribution and use, see copyright notice in irrlicht.h #include "guiSkin.h" -#ifdef _IRR_COMPILE_WITH_GUI_ #include "IGUIFont.h" #include "IGUISpriteBank.h" @@ -1036,7 +1035,3 @@ void GUISkin::getColors(video::SColor* colors) } // end namespace gui } // end namespace irr - - -#endif // _IRR_COMPILE_WITH_GUI_ - diff --git a/src/gui/guiSkin.h b/src/gui/guiSkin.h index fa9b27bdd..e90a61290 100644 --- a/src/gui/guiSkin.h +++ b/src/gui/guiSkin.h @@ -5,9 +5,6 @@ #ifndef __GUI_SKIN_H_INCLUDED__ #define __GUI_SKIN_H_INCLUDED__ -#include "IrrCompileConfig.h" -#ifdef _IRR_COMPILE_WITH_GUI_ - #include "IGUISkin.h" #include "irrString.h" #include @@ -360,7 +357,4 @@ inline void setShading(video::SColor &color,f32 s) // :PATCH: } } // end namespace irr - -#endif // _IRR_COMPILE_WITH_GUI_ - #endif diff --git a/src/irrlicht_changes/static_text.cpp b/src/irrlicht_changes/static_text.cpp index 4dc452349..61f4da5e1 100644 --- a/src/irrlicht_changes/static_text.cpp +++ b/src/irrlicht_changes/static_text.cpp @@ -5,7 +5,6 @@ // For conditions of distribution and use, see copyright notice in irrlicht.h #include "static_text.h" -#ifdef _IRR_COMPILE_WITH_GUI_ #include #include @@ -582,6 +581,3 @@ s32 StaticText::getTextWidth() const } // end namespace gui } // end namespace irr - - -#endif // _IRR_COMPILE_WITH_GUI_ diff --git a/src/irrlicht_changes/static_text.h b/src/irrlicht_changes/static_text.h index 93a2d8643..3608b271c 100644 --- a/src/irrlicht_changes/static_text.h +++ b/src/irrlicht_changes/static_text.h @@ -6,9 +6,6 @@ #pragma once -#include "IrrCompileConfig.h" -#ifdef _IRR_COMPILE_WITH_GUI_ - #include "IGUIStaticText.h" #include "irrArray.h" @@ -231,5 +228,3 @@ inline void setStaticText(irr::gui::IGUIStaticText *static_text, const wchar_t * { setStaticText(static_text, EnrichedString(text, static_text->getOverrideColor())); } - -#endif // _IRR_COMPILE_WITH_GUI_