mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Irrlicht support changes (#14383)
This commit is contained in:
parent
84dd812da4
commit
e3cc26cb7c
8 changed files with 49 additions and 85 deletions
|
@ -29,33 +29,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
using namespace irr;
|
||||
|
||||
namespace irr {
|
||||
#define S8_MIN INT8_MIN
|
||||
#define S16_MIN INT16_MIN
|
||||
#define S32_MIN INT32_MIN
|
||||
#define S64_MIN INT64_MIN
|
||||
|
||||
// Define missing constant for vector math with 16-bit numbers
|
||||
namespace core {
|
||||
template <typename T>
|
||||
inline T roundingError();
|
||||
#define S8_MAX INT8_MAX
|
||||
#define S16_MAX INT16_MAX
|
||||
#define S32_MAX INT32_MAX
|
||||
#define S64_MAX INT64_MAX
|
||||
|
||||
template <>
|
||||
inline s16 roundingError()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#define S8_MIN (-0x7F - 1)
|
||||
#define S16_MIN (-0x7FFF - 1)
|
||||
#define S32_MIN (-0x7FFFFFFF - 1)
|
||||
#define S64_MIN (-0x7FFFFFFFFFFFFFFF - 1)
|
||||
|
||||
#define S8_MAX 0x7F
|
||||
#define S16_MAX 0x7FFF
|
||||
#define S32_MAX 0x7FFFFFFF
|
||||
#define S64_MAX 0x7FFFFFFFFFFFFFFF
|
||||
|
||||
#define U8_MAX 0xFF
|
||||
#define U16_MAX 0xFFFF
|
||||
#define U32_MAX 0xFFFFFFFF
|
||||
#define U64_MAX 0xFFFFFFFFFFFFFFFF
|
||||
#define U8_MAX UINT8_MAX
|
||||
#define U16_MAX UINT16_MAX
|
||||
#define U32_MAX UINT32_MAX
|
||||
#define U64_MAX UINT64_MAX
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue