Add static IrrlichtMT win64 build @ Git commit 393793f...

https://github.com/minetest/irrlicht/tree/393793f
This commit is contained in:
Jordan Irwin 2021-06-01 15:41:25 -07:00
parent 1ffac194fe
commit 23c28c2840
4 changed files with 34 additions and 206 deletions

View File

@ -1,20 +1,26 @@
The Irrlicht Engine License
===========================
Copyright (C) 2002-2012 Nikolaus Gebhardt Copyright (C) 2002-2012 Nikolaus Gebhardt
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
arising from the use of this software. arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions: freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not 1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software claim that you wrote the original software. If you use this software
in a product, an acknowledgement in the product documentation would be in a product, an acknowledgment in the product documentation would be
appreciated but is not required. appreciated but is not required.
2. Altered source versions must be clearly marked as such, and must not be 2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software. misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
Please note that the Irrlicht Engine is based in part on the work of the
Independent JPEG Group, the zlib, libPng and aesGladman. This means that if you use
the Irrlicht Engine in your product, you must acknowledge somewhere in your
documentation that you've used the IJPG code. It would also be nice to mention
that you use the Irrlicht Engine, the zlib, libPng and aesGladman. See the
corresponding license files for further informations. It is also possible to disable
usage of those additional libraries by defines in the IrrCompileConfig.h header and
recompiling the engine.

View File

@ -269,7 +269,11 @@ Depending on platform you may have to enable _IRR_OGLES1_USE_KHRONOS_API_HEADERS
//! Define _IRR_COMPILE_WITH_OGLES2_ to compile the Irrlicht engine with OpenGL ES 2.0. //! Define _IRR_COMPILE_WITH_OGLES2_ to compile the Irrlicht engine with OpenGL ES 2.0.
/** If you do not wish the engine to be compiled with OpenGL ES 2.0, comment this /** If you do not wish the engine to be compiled with OpenGL ES 2.0, comment this
define out. */ define out. */
#if defined(_IRR_ANDROID_PLATFORM_) || defined(_IRR_IOS_PLATFORM_)
#define _IRR_COMPILE_WITH_OGLES2_
#else
//#define _IRR_COMPILE_WITH_OGLES2_ //#define _IRR_COMPILE_WITH_OGLES2_
#endif
#ifdef NO_IRR_COMPILE_WITH_OGLES2_ #ifdef NO_IRR_COMPILE_WITH_OGLES2_
#undef _IRR_COMPILE_WITH_OGLES2_ #undef _IRR_COMPILE_WITH_OGLES2_
#endif #endif

View File

@ -30,13 +30,6 @@
#pragma once #pragma once
#if (__cplusplus > 199711L) || (_MSC_VER >= 1600) || defined(__GXX_EXPERIMENTAL_CXX0X__)
# define USTRING_CPP0X
# if defined(__GXX_EXPERIMENTAL_CXX0X__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)))
# define USTRING_CPP0X_NEWLITERALS
# endif
#endif
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
@ -54,15 +47,11 @@
#include <endian.h> #include <endian.h>
#endif #endif
#ifdef USTRING_CPP0X #include <utility>
# include <utility>
#endif
#ifndef USTRING_NO_STL #include <string>
# include <string> #include <iterator>
# include <iterator> #include <ostream>
# include <ostream>
#endif
#include "irrTypes.h" #include "irrTypes.h"
#include "irrAllocator.h" #include "irrAllocator.h"
@ -85,15 +74,9 @@ namespace irr
{ {
// Define our character types. // Define our character types.
#ifdef USTRING_CPP0X_NEWLITERALS // C++0x
typedef char32_t uchar32_t; typedef char32_t uchar32_t;
typedef char16_t uchar16_t; typedef char16_t uchar16_t;
typedef char uchar8_t; typedef char uchar8_t;
#else
typedef u32 uchar32_t;
typedef u16 uchar16_t;
typedef u8 uchar8_t;
#endif
namespace core namespace core
{ {
@ -448,7 +431,6 @@ public:
//! Iterator to iterate through a UTF-16 string. //! Iterator to iterate through a UTF-16 string.
#ifndef USTRING_NO_STL
class _ustring16_const_iterator : public std::iterator< class _ustring16_const_iterator : public std::iterator<
std::bidirectional_iterator_tag, // iterator_category std::bidirectional_iterator_tag, // iterator_category
access, // value_type access, // value_type
@ -456,9 +438,6 @@ public:
const access, // pointer const access, // pointer
const access // reference const access // reference
> >
#else
class _ustring16_const_iterator
#endif
{ {
public: public:
typedef _ustring16_const_iterator _Iter; typedef _ustring16_const_iterator _Iter;
@ -466,19 +445,11 @@ public:
typedef const access const_pointer; typedef const access const_pointer;
typedef const access const_reference; typedef const access const_reference;
#ifndef USTRING_NO_STL
typedef typename _Base::value_type value_type; typedef typename _Base::value_type value_type;
typedef typename _Base::difference_type difference_type; typedef typename _Base::difference_type difference_type;
typedef typename _Base::difference_type distance_type; typedef typename _Base::difference_type distance_type;
typedef typename _Base::pointer pointer; typedef typename _Base::pointer pointer;
typedef const_reference reference; typedef const_reference reference;
#else
typedef access value_type;
typedef u32 difference_type;
typedef u32 distance_type;
typedef const_pointer pointer;
typedef const_reference reference;
#endif
//! Constructors. //! Constructors.
_ustring16_const_iterator(const _Iter& i) : ref(i.ref), pos(i.pos) {} _ustring16_const_iterator(const _Iter& i) : ref(i.ref), pos(i.pos) {}
@ -854,8 +825,6 @@ public:
*this = other; *this = other;
} }
#ifndef USTRING_NO_STL
//! Constructor from std::string //! Constructor from std::string
template <class B, class A, typename Alloc> template <class B, class A, typename Alloc>
ustring16(const std::basic_string<B, A, Alloc>& other) ustring16(const std::basic_string<B, A, Alloc>& other)
@ -886,39 +855,6 @@ public:
for (; first != last; ++first) for (; first != last; ++first)
append((uchar32_t)*first); append((uchar32_t)*first);
} }
#endif
#ifndef USTRING_CPP0X_NEWLITERALS
//! Constructor for copying a character string from a pointer.
ustring16(const char* const c)
: array(0), allocated(0), used(0)
{
#if __BYTE_ORDER == __BIG_ENDIAN
encoding = unicode::EUTFE_UTF16_BE;
#else
encoding = unicode::EUTFE_UTF16_LE;
#endif
loadDataStream(c, strlen(c));
//append((uchar8_t*)c);
}
//! Constructor for copying a character string from a pointer with a given length.
ustring16(const char* const c, u32 length)
: array(0), allocated(0), used(0)
{
#if __BYTE_ORDER == __BIG_ENDIAN
encoding = unicode::EUTFE_UTF16_BE;
#else
encoding = unicode::EUTFE_UTF16_LE;
#endif
loadDataStream(c, length);
}
#endif
//! Constructor for copying a UTF-8 string from a pointer. //! Constructor for copying a UTF-8 string from a pointer.
ustring16(const uchar8_t* const c) ustring16(const uchar8_t* const c)
@ -1056,7 +992,6 @@ public:
} }
#ifdef USTRING_CPP0X
//! Constructor for moving a ustring16 //! Constructor for moving a ustring16
ustring16(ustring16<TAlloc>&& other) ustring16(ustring16<TAlloc>&& other)
: array(other.array), encoding(other.encoding), allocated(other.allocated), used(other.used) : array(other.array), encoding(other.encoding), allocated(other.allocated), used(other.used)
@ -1066,8 +1001,6 @@ public:
other.allocated = 0; other.allocated = 0;
other.used = 0; other.used = 0;
} }
#endif
//! Destructor //! Destructor
~ustring16() ~ustring16()
@ -1102,8 +1035,6 @@ public:
return *this; return *this;
} }
#ifdef USTRING_CPP0X
//! Move assignment operator //! Move assignment operator
ustring16& operator=(ustring16<TAlloc>&& other) ustring16& operator=(ustring16<TAlloc>&& other)
{ {
@ -1121,8 +1052,6 @@ public:
} }
return *this; return *this;
} }
#endif
//! Assignment operator for other string types //! Assignment operator for other string types
template <class B, class A> template <class B, class A>
@ -2091,7 +2020,6 @@ public:
} }
#ifdef USTRING_CPP0X_NEWLITERALS
//! Appends a number to this ustring16. //! Appends a number to this ustring16.
//! \param c Number to append. //! \param c Number to append.
//! \return A reference to our current string. //! \return A reference to our current string.
@ -2110,7 +2038,6 @@ public:
append(core::stringc(c)); append(core::stringc(c));
return *this; return *this;
} }
#endif
//! Appends a number to this ustring16. //! Appends a number to this ustring16.
@ -2899,47 +2826,6 @@ public:
} }
#ifdef USTRING_CPP0X_NEWLITERALS // C++0x
//! Converts the string to a UTF-16 encoded string.
//! \param endian The desired endianness of the string.
//! \param addBOM If true, the proper unicode byte-order mark will be prefixed to the string.
//! \return A string containing the UTF-16 encoded string.
core::string<char16_t> toUTF16_s(const unicode::EUTF_ENDIAN endian = unicode::EUTFEE_NATIVE, const bool addBOM = false) const
{
core::string<char16_t> ret;
ret.reserve(used + (addBOM ? unicode::BOM_UTF16_LEN : 0) + 1);
// Add the BOM if specified.
if (addBOM)
{
if (endian == unicode::EUTFEE_NATIVE)
ret[0] = unicode::BOM;
else if (endian == unicode::EUTFEE_LITTLE)
{
uchar8_t* ptr8 = reinterpret_cast<uchar8_t*>(&ret[0]);
*ptr8++ = unicode::BOM_ENCODE_UTF16_LE[0];
*ptr8 = unicode::BOM_ENCODE_UTF16_LE[1];
}
else
{
uchar8_t* ptr8 = reinterpret_cast<uchar8_t*>(&ret[0]);
*ptr8++ = unicode::BOM_ENCODE_UTF16_BE[0];
*ptr8 = unicode::BOM_ENCODE_UTF16_BE[1];
}
}
ret.append(array);
if (endian != unicode::EUTFEE_NATIVE && getEndianness() != endian)
{
char16_t* ptr = ret.c_str();
for (u32 i = 0; i < ret.size(); ++i)
*ptr++ = unicode::swapEndian16(*ptr);
}
return ret;
}
#endif
//! Converts the string to a UTF-16 encoded string array. //! Converts the string to a UTF-16 encoded string array.
//! Unfortunately, no toUTF16_s() version exists due to limitations with Irrlicht's string class. //! Unfortunately, no toUTF16_s() version exists due to limitations with Irrlicht's string class.
//! \param endian The desired endianness of the string. //! \param endian The desired endianness of the string.
@ -2982,61 +2868,6 @@ public:
} }
#ifdef USTRING_CPP0X_NEWLITERALS // C++0x
//! Converts the string to a UTF-32 encoded string.
//! \param endian The desired endianness of the string.
//! \param addBOM If true, the proper unicode byte-order mark will be prefixed to the string.
//! \return A string containing the UTF-32 encoded string.
core::string<char32_t> toUTF32_s(const unicode::EUTF_ENDIAN endian = unicode::EUTFEE_NATIVE, const bool addBOM = false) const
{
core::string<char32_t> ret;
ret.reserve(size() + 1 + (addBOM ? unicode::BOM_UTF32_LEN : 0));
const_iterator iter(*this, 0);
// Add the BOM if specified.
if (addBOM)
{
if (endian == unicode::EUTFEE_NATIVE)
ret.append(unicode::BOM);
else
{
union
{
uchar32_t full;
u8 chunk[4];
} t;
if (endian == unicode::EUTFEE_LITTLE)
{
t.chunk[0] = unicode::BOM_ENCODE_UTF32_LE[0];
t.chunk[1] = unicode::BOM_ENCODE_UTF32_LE[1];
t.chunk[2] = unicode::BOM_ENCODE_UTF32_LE[2];
t.chunk[3] = unicode::BOM_ENCODE_UTF32_LE[3];
}
else
{
t.chunk[0] = unicode::BOM_ENCODE_UTF32_BE[0];
t.chunk[1] = unicode::BOM_ENCODE_UTF32_BE[1];
t.chunk[2] = unicode::BOM_ENCODE_UTF32_BE[2];
t.chunk[3] = unicode::BOM_ENCODE_UTF32_BE[3];
}
ret.append(t.full);
}
}
while (!iter.atEnd())
{
uchar32_t c = *iter;
if (endian != unicode::EUTFEE_NATIVE && getEndianness() != endian)
c = unicode::swapEndian32(c);
ret.append(c);
++iter;
}
return ret;
}
#endif
//! Converts the string to a UTF-32 encoded string array. //! Converts the string to a UTF-32 encoded string array.
//! Unfortunately, no toUTF32_s() version exists due to limitations with Irrlicht's string class. //! Unfortunately, no toUTF32_s() version exists due to limitations with Irrlicht's string class.
//! \param endian The desired endianness of the string. //! \param endian The desired endianness of the string.
@ -3371,7 +3202,6 @@ inline ustring16<TAlloc> operator+(const char left, const ustring16<TAlloc>& rig
} }
#ifdef USTRING_CPP0X_NEWLITERALS
//! Appends a ustring16 and a uchar32_t. //! Appends a ustring16 and a uchar32_t.
template <typename TAlloc> template <typename TAlloc>
inline ustring16<TAlloc> operator+(const ustring16<TAlloc>& left, const uchar32_t right) inline ustring16<TAlloc> operator+(const ustring16<TAlloc>& left, const uchar32_t right)
@ -3390,7 +3220,6 @@ inline ustring16<TAlloc> operator+(const uchar32_t left, const ustring16<TAlloc>
ret += right; ret += right;
return ret; return ret;
} }
#endif
//! Appends a ustring16 and a short. //! Appends a ustring16 and a short.
@ -3553,7 +3382,6 @@ inline ustring16<TAlloc> operator+(const double left, const ustring16<TAlloc>& r
} }
#ifdef USTRING_CPP0X
//! Appends two ustring16s. //! Appends two ustring16s.
template <typename TAlloc> template <typename TAlloc>
inline ustring16<TAlloc>&& operator+(const ustring16<TAlloc>& left, ustring16<TAlloc>&& right) inline ustring16<TAlloc>&& operator+(const ustring16<TAlloc>& left, ustring16<TAlloc>&& right)
@ -3671,7 +3499,6 @@ inline ustring16<TAlloc> operator+(const char left, ustring16<TAlloc>&& right)
} }
#ifdef USTRING_CPP0X_NEWLITERALS
//! Appends a ustring16 and a uchar32_t. //! Appends a ustring16 and a uchar32_t.
template <typename TAlloc> template <typename TAlloc>
inline ustring16<TAlloc> operator+(ustring16<TAlloc>&& left, const uchar32_t right) inline ustring16<TAlloc> operator+(ustring16<TAlloc>&& left, const uchar32_t right)
@ -3688,7 +3515,6 @@ inline ustring16<TAlloc> operator+(const uchar32_t left, ustring16<TAlloc>&& rig
right.insert(left, 0); right.insert(left, 0);
return std::move(right); return std::move(right);
} }
#endif
//! Appends a ustring16 and a short. //! Appends a ustring16 and a short.
@ -3833,10 +3659,8 @@ inline ustring16<TAlloc> operator+(const double left, ustring16<TAlloc>&& right)
right.insert(core::stringc(left), 0); right.insert(core::stringc(left), 0);
return std::move(right); return std::move(right);
} }
#endif
#ifndef USTRING_NO_STL
//! Writes a ustring16 to an ostream. //! Writes a ustring16 to an ostream.
template <typename TAlloc> template <typename TAlloc>
inline std::ostream& operator<<(std::ostream& out, const ustring16<TAlloc>& in) inline std::ostream& operator<<(std::ostream& out, const ustring16<TAlloc>& in)
@ -3852,10 +3676,6 @@ inline std::wostream& operator<<(std::wostream& out, const ustring16<TAlloc>& in
out << in.toWCHAR_s().c_str(); out << in.toWCHAR_s().c_str();
return out; return out;
} }
#endif
#ifndef USTRING_NO_STL
namespace unicode namespace unicode
{ {
@ -3885,7 +3705,5 @@ class hash : public std::unary_function<core::ustring, size_t>
} // end namespace unicode } // end namespace unicode
#endif
} // end namespace core } // end namespace core
} // end namespace irr } // end namespace irr

Binary file not shown.