]> git.lizzy.rs Git - irrlicht.git/commitdiff
Merge branch 'master' into drop-irr-compile-config
authornumzero <numzer0@yandex.ru>
Mon, 13 Mar 2023 15:05:36 +0000 (18:05 +0300)
committernumzero <numzer0@yandex.ru>
Mon, 13 Mar 2023 15:05:36 +0000 (18:05 +0300)
CMakeLists.txt
include/IrrCompileConfig.h
include/irrUString.h
source/Irrlicht/CIrrDeviceLinux.h
source/Irrlicht/CIrrDeviceSDL.cpp
source/Irrlicht/CWriteFile.cpp

index b7b244a9afac0792cad78b59c9c7e609ce857f6f..c289434f1fb258a6b6f4836c8bf0fba03e36b351 100644 (file)
@@ -7,7 +7,7 @@ else()
        cmake_policy(VERSION 3.9)
 endif()
 
-set(IRRLICHTMT_REVISION 9)
+set(IRRLICHTMT_REVISION 11)
 
 project(Irrlicht
        VERSION 1.9.0.${IRRLICHTMT_REVISION}
index 027128947658f41da2a77c09b5d40bc94550aebc..da3a6024e887f494b19c2366103df305862d371b 100644 (file)
@@ -6,8 +6,8 @@
 #define __IRR_COMPILE_CONFIG_H_INCLUDED__\r
 \r
 //! Identifies the IrrlichtMt fork customized for the Minetest engine\r
-#define IRRLICHT_VERSION_MT_REVISION 9\r
-#define IRRLICHT_VERSION_MT "mt9"\r
+#define IRRLICHT_VERSION_MT_REVISION 11\r
+#define IRRLICHT_VERSION_MT "mt11"\r
 \r
 //! Irrlicht SDK Version\r
 #define IRRLICHT_VERSION_MAJOR 1\r
index 61c36b85586f3a4f5bad3c675b625325b7331d3c..b0b730f0d82eefe91c103216883e04edf95e8603 100644 (file)
@@ -963,11 +963,11 @@ public:
 #endif
 
                if (sizeof(wchar_t) == 4)
-                       append(reinterpret_cast<const uchar32_t* const>(c));
+                       append(reinterpret_cast<const uchar32_t*>(c));
                else if (sizeof(wchar_t) == 2)
-                       append(reinterpret_cast<const uchar16_t* const>(c));
+                       append(reinterpret_cast<const uchar16_t*>(c));
                else if (sizeof(wchar_t) == 1)
-                       append(reinterpret_cast<const uchar8_t* const>(c));
+                       append(reinterpret_cast<const uchar8_t*>(c));
        }
 
 
@@ -982,11 +982,11 @@ public:
 #endif
 
                if (sizeof(wchar_t) == 4)
-                       append(reinterpret_cast<const uchar32_t* const>(c), length);
+                       append(reinterpret_cast<const uchar32_t*>(c), length);
                else if (sizeof(wchar_t) == 2)
-                       append(reinterpret_cast<const uchar16_t* const>(c), length);
+                       append(reinterpret_cast<const uchar16_t*>(c), length);
                else if (sizeof(wchar_t) == 1)
-                       append(reinterpret_cast<const uchar8_t* const>(c), length);
+                       append(reinterpret_cast<const uchar8_t*>(c), length);
        }
 
 
@@ -1116,11 +1116,11 @@ public:
        ustring16& operator=(const wchar_t* const c)
        {
                if (sizeof(wchar_t) == 4)
-                       *this = reinterpret_cast<const uchar32_t* const>(c);
+                       *this = reinterpret_cast<const uchar32_t*>(c);
                else if (sizeof(wchar_t) == 2)
-                       *this = reinterpret_cast<const uchar16_t* const>(c);
+                       *this = reinterpret_cast<const uchar16_t*>(c);
                else if (sizeof(wchar_t) == 1)
-                       *this = reinterpret_cast<const uchar8_t* const>(c);
+                       *this = reinterpret_cast<const uchar8_t*>(c);
 
                return *this;
        }
@@ -3049,14 +3049,14 @@ public:
 
        //! Gets the encoding of the Unicode string this class contains.
        //! \return An enum describing the current encoding of this string.
-       const unicode::EUTF_ENCODE getEncoding() const
+       unicode::EUTF_ENCODE getEncoding() const
        {
                return encoding;
        }
 
        //! Gets the endianness of the Unicode string this class contains.
        //! \return An enum describing the endianness of this string.
-       const unicode::EUTF_ENDIAN getEndianness() const
+       unicode::EUTF_ENDIAN getEndianness() const
        {
                if (encoding == unicode::EUTFE_UTF16_LE ||
                        encoding == unicode::EUTFE_UTF32_LE)
@@ -3612,33 +3612,5 @@ inline std::wostream& operator<<(std::wostream& out, const ustring16& in)
        return out;
 }
 
-namespace unicode
-{
-
-//! Hashing algorithm for hashing a ustring.  Used for things like unordered_maps.
-//! Algorithm taken from std::hash<std::string>.
-class hash : public std::unary_function<core::ustring, size_t>
-{
-       public:
-               size_t operator()(const core::ustring& s) const
-               {
-                       size_t ret = 2166136261U;
-                       size_t index = 0;
-                       size_t stride = 1 + s.size_raw() / 10;
-
-                       core::ustring::const_iterator i = s.begin();
-                       while (i != s.end())
-                       {
-                               // TODO: Don't force u32 on an x64 OS.  Make it agnostic.
-                               ret = 16777619U * ret ^ (size_t)s[(u32)index];
-                               index += stride;
-                               i += stride;
-                       }
-                       return (ret);
-               }
-};
-
-} // end namespace unicode
-
 } // end namespace core
 } // end namespace irr
index 45d3f10ccea12136aad55655d3903872d66e6633..2d8945c9b5d907911bde4fc9836fb8da8c3a4090 100644 (file)
@@ -413,6 +413,9 @@ namespace irr
                bool HasNetWM;\r
                // text is utf-8\r
                mutable core::stringc Clipboard;\r
+#endif\r
+#if defined(_IRR_LINUX_X11_XINPUT2_)\r
+               int currentTouchedCount;\r
 #endif\r
                u32 Width, Height;\r
                bool WindowHasFocus;\r
@@ -453,10 +456,6 @@ namespace irr
                };\r
                core::array<JoystickInfo> ActiveJoysticks;\r
 #endif\r
-\r
-#if defined(_IRR_LINUX_X11_XINPUT2_)\r
-               int currentTouchedCount;\r
-#endif\r
        };\r
 \r
 \r
index 8dee4d1facfc7417db43e86702c3f7e76b9415fe..711cb564cd0fd731ebb65f58f49e8db7bc02994f 100644 (file)
@@ -233,13 +233,17 @@ CIrrDeviceSDL::CIrrDeviceSDL(const SIrrlichtCreationParameters& param)
        createKeyMap();\r
 \r
        if (CreationParams.Fullscreen) {\r
+#ifdef _IRR_EMSCRIPTEN_PLATFORM_\r
                SDL_Flags |= SDL_WINDOW_FULLSCREEN;\r
-       } else  {\r
-               if (Resizable)\r
-                       SDL_Flags |= SDL_WINDOW_RESIZABLE;\r
-               if (CreationParams.WindowMaximized)\r
-                       SDL_Flags |= SDL_WINDOW_MAXIMIZED;\r
+#else\r
+               SDL_Flags |= SDL_WINDOW_FULLSCREEN_DESKTOP;\r
+#endif\r
        }\r
+       if (Resizable)\r
+               SDL_Flags |= SDL_WINDOW_RESIZABLE;\r
+       if (CreationParams.WindowMaximized)\r
+               SDL_Flags |= SDL_WINDOW_MAXIMIZED;\r
+\r
        if (CreationParams.DriverType == video::EDT_OPENGL)\r
        {\r
                SDL_Flags |= SDL_WINDOW_OPENGL;\r
index aa07b49e7c14ba583a345ac9978843a5bc2ab656..2af6936ab9d5fc0ec44149994efff5ae2f8c8145 100644 (file)
@@ -12,7 +12,7 @@ namespace io
 \r
 \r
 CWriteFile::CWriteFile(const io::path& fileName, bool append)\r
-: FileSize(0), Filename(fileName)\r
+: Filename(fileName), FileSize(0)\r
 {\r
        #ifdef _DEBUG\r
        setDebugName("CWriteFile");\r