Browse Source

Add M_U32_MASK_ALL_BITS and M_I32_MASK_ALL_BITS consts

1vanK 3 years ago
parent
commit
dbee01a123

+ 6 - 0
Source/Urho3D/AngelScript/Generated_GlobalVariables.cpp

@@ -346,6 +346,9 @@ void ASRegisterGeneratedGlobalVariables(asIScriptEngine* engine)
     // constexpr float M_HALF_PI | File: ../Math/MathDefs.h
     engine->RegisterGlobalProperty("const float M_HALF_PI", (void*)&M_HALF_PI);
 
+    // constexpr i32 M_I32_MASK_ALL_BITS | File: ../Math/MathDefs.h
+    engine->RegisterGlobalProperty("const int M_I32_MASK_ALL_BITS", (void*)&M_I32_MASK_ALL_BITS);
+
     // constexpr float M_INFINITY | File: ../Math/MathDefs.h
     engine->RegisterGlobalProperty("const float M_INFINITY", (void*)&M_INFINITY);
 
@@ -379,6 +382,9 @@ void ASRegisterGeneratedGlobalVariables(asIScriptEngine* engine)
     // constexpr float M_RADTODEG | File: ../Math/MathDefs.h
     engine->RegisterGlobalProperty("const float M_RADTODEG", (void*)&M_RADTODEG);
 
+    // constexpr u32 M_U32_MASK_ALL_BITS | File: ../Math/MathDefs.h
+    engine->RegisterGlobalProperty("const uint M_U32_MASK_ALL_BITS", (void*)&M_U32_MASK_ALL_BITS);
+
     // constexpr i32 NINDEX | File: ../Container/Vector.h
     engine->RegisterGlobalProperty("const int NINDEX", (void*)&NINDEX);
 

+ 2 - 0
Source/Urho3D/Math/MathDefs.h

@@ -28,6 +28,8 @@ inline constexpr i32 M_MIN_INT = 0x80000000;
 inline constexpr i32 M_MAX_INT = 0x7fffffff;
 inline constexpr u32 M_MIN_UNSIGNED = 0x00000000;
 inline constexpr u32 M_MAX_UNSIGNED = 0xffffffff;
+inline constexpr u32 M_U32_MASK_ALL_BITS = M_MAX_UNSIGNED;
+inline constexpr i32 M_I32_MASK_ALL_BITS = -1;
 
 inline constexpr float M_EPSILON = 0.000001f;
 inline constexpr float M_LARGE_EPSILON = 0.00005f;