diff --git a/irr/include/IrrCompileConfig.h b/irr/include/IrrCompileConfig.h index 3e248cbc0..42fc7fc2d 100644 --- a/irr/include/IrrCompileConfig.h +++ b/irr/include/IrrCompileConfig.h @@ -4,19 +4,6 @@ #pragma once -//! Identifies the IrrlichtMt fork customized for the Minetest engine -#define IRRLICHT_VERSION_MT_REVISION 15 -#define IRRLICHT_VERSION_MT "mt15" - -//! Irrlicht SDK Version -#define IRRLICHT_VERSION_MAJOR 1 -#define IRRLICHT_VERSION_MINOR 9 -#define IRRLICHT_VERSION_REVISION 0 -// This flag will be defined only in SVN, the official release code will have -// it undefined -#define IRRLICHT_VERSION_SVN alpha -#define IRRLICHT_SDK_VERSION "1.9.0" IRRLICHT_VERSION_MT - #ifdef _WIN32 #define IRRCALLCONV __stdcall #else diff --git a/irr/include/IrrlichtDevice.h b/irr/include/IrrlichtDevice.h index 8f4105a4f..f0ec9f005 100644 --- a/irr/include/IrrlichtDevice.h +++ b/irr/include/IrrlichtDevice.h @@ -194,12 +194,6 @@ public: /** IrrlichtDevice::run() will always return false after closeDevice() was called. */ virtual void closeDevice() = 0; - //! Get the version of the engine. - /** The returned string - will look like this: "1.2.3" or this: "1.2". - \return String which contains the version. */ - virtual const c8 *getVersion() const = 0; - //! Sets a new user event receiver which will receive events from the engine. /** Return true in IEventReceiver::OnEvent to prevent the event from continuing along the chain of event receivers. The path that an event takes through the system depends diff --git a/irr/include/SIrrCreationParameters.h b/irr/include/SIrrCreationParameters.h index 26e46e324..0cd1a9218 100644 --- a/irr/include/SIrrCreationParameters.h +++ b/irr/include/SIrrCreationParameters.h @@ -10,7 +10,6 @@ #include "ILogger.h" #include "position2d.h" #include "path.h" -#include "IrrCompileConfig.h" // for IRRLICHT_SDK_VERSION namespace irr { @@ -44,7 +43,6 @@ struct SIrrlichtCreationParameters #else LoggingLevel(ELL_INFORMATION), #endif - SDK_version_do_not_use(IRRLICHT_SDK_VERSION), PrivateData(0), #ifdef IRR_MOBILE_PATHS OGLES2ShaderPath("media/Shaders/") @@ -54,37 +52,6 @@ struct SIrrlichtCreationParameters { } - SIrrlichtCreationParameters(const SIrrlichtCreationParameters &other) : - SDK_version_do_not_use(IRRLICHT_SDK_VERSION) - { - *this = other; - } - - SIrrlichtCreationParameters &operator=(const SIrrlichtCreationParameters &other) - { - DeviceType = other.DeviceType; - DriverType = other.DriverType; - WindowSize = other.WindowSize; - WindowPosition = other.WindowPosition; - Bits = other.Bits; - ZBufferBits = other.ZBufferBits; - Fullscreen = other.Fullscreen; - WindowMaximized = other.WindowMaximized; - WindowResizable = other.WindowResizable; - Stencilbuffer = other.Stencilbuffer; - Vsync = other.Vsync; - AntiAlias = other.AntiAlias; - WithAlphaChannel = other.WithAlphaChannel; - Doublebuffer = other.Doublebuffer; - Stereobuffer = other.Stereobuffer; - EventReceiver = other.EventReceiver; - WindowId = other.WindowId; - LoggingLevel = other.LoggingLevel; - PrivateData = other.PrivateData; - OGLES2ShaderPath = other.OGLES2ShaderPath; - return *this; - } - //! Type of the device. /** This setting decides the windowing system used by the device, most device types are native to a specific operating system and so may not be available. @@ -247,11 +214,6 @@ struct SIrrlichtCreationParameters */ ELOG_LEVEL LoggingLevel; - //! Don't use or change this parameter. - /** Always set it to IRRLICHT_SDK_VERSION, which is done by default. - This is needed for sdk version checks. */ - const c8 *const SDK_version_do_not_use; - //! Define some private data storage. /** Used when platform devices need access to OS specific data structures etc. This is only used for Android at the moment in order to access the native diff --git a/irr/src/CIrrDeviceStub.cpp b/irr/src/CIrrDeviceStub.cpp index 2292db191..1ff120d10 100644 --- a/irr/src/CIrrDeviceStub.cpp +++ b/irr/src/CIrrDeviceStub.cpp @@ -38,12 +38,6 @@ CIrrDeviceStub::CIrrDeviceStub(const SIrrlichtCreationParameters ¶ms) : os::Printer::Logger = Logger; FileSystem = io::createFileSystem(); - - core::stringc s = "Irrlicht Engine version "; - s.append(getVersion()); - os::Printer::log(s.c_str(), ELL_INFORMATION); - - checkVersion(params.SDK_version_do_not_use); } CIrrDeviceStub::~CIrrDeviceStub() @@ -129,12 +123,6 @@ bool CIrrDeviceStub::setWindowIcon(const video::IImage *img) return false; } -//! Returns the version of the engine. -const char *CIrrDeviceStub::getVersion() const -{ - return IRRLICHT_SDK_VERSION; -} - //! \return Returns a pointer to the mouse cursor control interface. gui::ICursorControl *CIrrDeviceStub::getCursorControl() { @@ -147,24 +135,6 @@ video::IContextManager *CIrrDeviceStub::getContextManager() return ContextManager; } -//! checks version of sdk and prints warning if there might be a problem -bool CIrrDeviceStub::checkVersion(const char *version) -{ - if (strcmp(getVersion(), version)) { - core::stringc w; - w = "Warning: The library version of the Irrlicht Engine ("; - w += getVersion(); - w += ") does not match the version the application was compiled with ("; - w += version; - w += "). This may cause problems."; - os::Printer::log(w.c_str(), ELL_WARNING); - - return false; - } - - return true; -} - //! Compares to the last call of this function to return double and triple clicks. u32 CIrrDeviceStub::checkSuccessiveClicks(s32 mouseX, s32 mouseY, EMOUSE_INPUT_EVENT inputEvent) { diff --git a/irr/src/CIrrDeviceStub.h b/irr/src/CIrrDeviceStub.h index 163e44f39..9a1966f01 100644 --- a/irr/src/CIrrDeviceStub.h +++ b/irr/src/CIrrDeviceStub.h @@ -70,9 +70,6 @@ public: //! Sets the window icon. bool setWindowIcon(const video::IImage *img) override; - //! Returns the version of the engine. - const char *getVersion() const override; - //! send the event to the right receiver bool postEventFromUser(const SEvent &event) override; @@ -159,9 +156,6 @@ public: protected: void createGUIAndScene(); - //! checks version of SDK and prints warning if there might be a problem - bool checkVersion(const char *version); - //! Compares to the last call of this function to return double and triple clicks. /** Needed for win32 device event handling \return Returns only 1,2 or 3. A 4th click will start with 1 again. diff --git a/irr/src/CMakeLists.txt b/irr/src/CMakeLists.txt index 46eaf9cca..23944105f 100644 --- a/irr/src/CMakeLists.txt +++ b/irr/src/CMakeLists.txt @@ -56,20 +56,6 @@ elseif(MSVC) add_compile_options(/D_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING) endif() -# Sanity-check version - -include(CheckCXXSourceCompiles) -set(CMAKE_REQUIRED_INCLUDES ${PROJECT_SOURCE_DIR}/include) -unset(REVISION_SANITY_CHECK CACHE) -check_cxx_source_compiles("#include \n\ -#if IRRLICHT_VERSION_MT_REVISION != ${IRRLICHTMT_REVISION}\n\ -#error\n\ -#endif\n\ -int main() {}" REVISION_SANITY_CHECK) -if(NOT REVISION_SANITY_CHECK) - message(FATAL_ERROR "IrrlichtMt revision number mismatches between CMake and headers.") -endif() - # Platform-independent configuration (hard-coded currently) add_definitions( -DIRR_ENABLE_BUILTIN_FONT @@ -246,11 +232,12 @@ endif() # Required libs +include(CheckCXXSourceCompiles) + find_package(ZLIB REQUIRED) find_package(JPEG REQUIRED) find_package(PNG REQUIRED) - if(ENABLE_GLES1) # only tested on Android, probably works on Linux (is this needed anywhere else?) find_library(OPENGLES_LIBRARY NAMES GLESv1_CM REQUIRED) diff --git a/src/client/clientlauncher.cpp b/src/client/clientlauncher.cpp index 93ed392b9..56beba927 100644 --- a/src/client/clientlauncher.cpp +++ b/src/client/clientlauncher.cpp @@ -164,11 +164,7 @@ bool ClientLauncher::run(GameStartData &start_data, const Settings &cmd_args) while (m_rendering_engine->run() && !*kill && !g_gamecallback->shutdown_requested) { // Set the window caption -#if IRRLICHT_VERSION_MT_REVISION >= 15 auto driver_name = m_rendering_engine->getVideoDriver()->getName(); -#else - auto driver_name = wide_to_utf8(m_rendering_engine->getVideoDriver()->getName()); -#endif std::string caption = std::string(PROJECT_NAME_C) + " " + g_version_hash + " [" + gettext("Main Menu") + "]" + diff --git a/src/client/game.cpp b/src/client/game.cpp index 84b2815c8..849e7702a 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -1478,11 +1478,7 @@ bool Game::createClient(const GameStartData &start_data) /* Set window caption */ -#if IRRLICHT_VERSION_MT_REVISION >= 15 auto driver_name = driver->getName(); -#else - auto driver_name = wide_to_utf8(driver->getName()); -#endif std::string str = std::string(PROJECT_NAME_C) + " " + g_version_hash + " ["; str += simple_singleplayer_mode ? gettext("Singleplayer") diff --git a/src/client/shader.cpp b/src/client/shader.cpp index c6de1ee35..4f84ecbe7 100644 --- a/src/client/shader.cpp +++ b/src/client/shader.cpp @@ -368,7 +368,6 @@ ShaderSource::~ShaderSource() { MutexAutoLock lock(m_shaderinfo_cache_mutex); -#if IRRLICHT_VERSION_MT_REVISION >= 15 // Delete materials video::IGPUProgrammingServices *gpu = RenderingEngine::get_video_driver()-> getGPUProgrammingServices(); @@ -377,7 +376,6 @@ ShaderSource::~ShaderSource() gpu->deleteShaderMaterial(i.material); } m_shaderinfo_cache.clear(); -#endif } u32 ShaderSource::getShader(const std::string &name, @@ -501,7 +499,6 @@ void ShaderSource::rebuildShaders() { MutexAutoLock lock(m_shaderinfo_cache_mutex); -#if IRRLICHT_VERSION_MT_REVISION >= 15 // Delete materials video::IGPUProgrammingServices *gpu = RenderingEngine::get_video_driver()-> getGPUProgrammingServices(); @@ -511,7 +508,6 @@ void ShaderSource::rebuildShaders() i.material = video::EMT_SOLID; // invalidate } } -#endif // Recreate shaders for (ShaderInfo &i : m_shaderinfo_cache) { diff --git a/src/client/shadows/dynamicshadowsrender.cpp b/src/client/shadows/dynamicshadowsrender.cpp index ca61d8467..08cdca0ad 100644 --- a/src/client/shadows/dynamicshadowsrender.cpp +++ b/src/client/shadows/dynamicshadowsrender.cpp @@ -192,12 +192,7 @@ void ShadowRenderer::addNodeToShadowList( { m_shadow_node_array.emplace_back(node, shadowMode); // node should never be ClientMap -#if IRRLICHT_VERSION_MT_REVISION >= 15 assert(!node->getName().has_value() || *node->getName() != "ClientMap"); -#else - // TODO: Remove this as soon as we require 1.9.0mt15 - assert(strcmp(node->getName(), "ClientMap") != 0); -#endif node->forEachMaterial([this] (auto &mat) { mat.setTexture(TEXTURE_LAYER_SHADOW, shadowMapTextureFinal); }); diff --git a/src/main.cpp b/src/main.cpp index 763a8ae37..d693a6b5c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -425,9 +425,6 @@ static void print_version(std::ostream &os) { os << PROJECT_NAME_C " " << g_version_hash << " (" << porting::getPlatformName() << ")" << std::endl; -#ifndef SERVER - os << "Using Irrlicht " IRRLICHT_SDK_VERSION << std::endl; -#endif #if USE_LUAJIT os << "Using " << LUAJIT_VERSION << std::endl; #else diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp index 44b4b57e7..c98f974d2 100644 --- a/src/script/lua_api/l_mainmenu.cpp +++ b/src/script/lua_api/l_mainmenu.cpp @@ -996,12 +996,7 @@ int ModApiMainMenu::l_get_active_driver(lua_State *L) int ModApiMainMenu::l_get_active_renderer(lua_State *L) { -#if IRRLICHT_VERSION_MT_REVISION >= 15 lua_pushstring(L, RenderingEngine::get_video_driver()->getName()); -#else - auto tmp = wide_to_utf8(RenderingEngine::get_video_driver()->getName()); - lua_pushstring(L, tmp.c_str()); -#endif return 1; }