aboutsummaryrefslogtreecommitdiff
path: root/src/universe.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/universe.cpp')
-rw-r--r--src/universe.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/universe.cpp b/src/universe.cpp
index fb10067..4eca0c9 100644
--- a/src/universe.cpp
+++ b/src/universe.cpp
@@ -36,10 +36,10 @@ THE SOFTWARE.
36#include "macros_and_utils.h" 36#include "macros_and_utils.h"
37#include "uniquekey.h" 37#include "uniquekey.h"
38 38
39// xxh64 of string "UNIVERSE_FULL_REGKEY" generated at http://www.nitrxgen.net/hashgen/ 39// xxh64 of string "kUniverseFullRegKey" generated at https://www.pelock.com/products/hash-calculator
40static constexpr RegistryUniqueKey UNIVERSE_FULL_REGKEY{ 0x99CA130C09EDC074ull }; 40static constexpr RegistryUniqueKey kUniverseFullRegKey{ 0x1C2D76870DD9DD9Full };
41// xxh64 of string "UNIVERSE_LIGHT_REGKEY" generated at http://www.nitrxgen.net/hashgen/ 41// xxh64 of string "kUniverseLightRegKey" generated at https://www.pelock.com/products/hash-calculator
42static constexpr RegistryUniqueKey UNIVERSE_LIGHT_REGKEY{ 0x3663C07C742CEB81ull }; 42static constexpr RegistryUniqueKey kUniverseLightRegKey{ 0x48BBE9CEAB0BA04Full };
43 43
44// ################################################################################################# 44// #################################################################################################
45 45
@@ -79,8 +79,8 @@ Universe* universe_create(lua_State* L)
79 Universe* const U{ lua_newuserdatauv<Universe>(L, 0) }; // universe 79 Universe* const U{ lua_newuserdatauv<Universe>(L, 0) }; // universe
80 U->Universe::Universe(); 80 U->Universe::Universe();
81 STACK_CHECK_START_REL(L, 1); 81 STACK_CHECK_START_REL(L, 1);
82 UNIVERSE_FULL_REGKEY.setValue(L, [](lua_State* L) { lua_pushvalue(L, -2); }); 82 kUniverseFullRegKey.setValue(L, [](lua_State* L) { lua_pushvalue(L, -2); });
83 UNIVERSE_LIGHT_REGKEY.setValue(L, [U](lua_State* L) { lua_pushlightuserdata(L, U); }); 83 kUniverseLightRegKey.setValue(L, [U](lua_State* L) { lua_pushlightuserdata(L, U); });
84 STACK_CHECK(L, 1); 84 STACK_CHECK(L, 1);
85 return U; 85 return U;
86} 86}
@@ -91,7 +91,7 @@ void universe_store(lua_State* L, Universe* U)
91{ 91{
92 LUA_ASSERT(L, !U || universe_get(L) == nullptr); 92 LUA_ASSERT(L, !U || universe_get(L) == nullptr);
93 STACK_CHECK_START_REL(L, 0); 93 STACK_CHECK_START_REL(L, 0);
94 UNIVERSE_LIGHT_REGKEY.setValue(L, [U](lua_State* L) { U ? lua_pushlightuserdata(L, U) : lua_pushnil(L); }); 94 kUniverseLightRegKey.setValue(L, [U](lua_State* L) { U ? lua_pushlightuserdata(L, U) : lua_pushnil(L); });
95 STACK_CHECK(L, 0); 95 STACK_CHECK(L, 0);
96} 96}
97 97
@@ -100,7 +100,7 @@ void universe_store(lua_State* L, Universe* U)
100Universe* universe_get(lua_State* L) 100Universe* universe_get(lua_State* L)
101{ 101{
102 STACK_CHECK_START_REL(L, 0); 102 STACK_CHECK_START_REL(L, 0);
103 Universe* const universe{ UNIVERSE_LIGHT_REGKEY.readLightUserDataValue<Universe>(L) }; 103 Universe* const universe{ kUniverseLightRegKey.readLightUserDataValue<Universe>(L) };
104 STACK_CHECK(L, 0); 104 STACK_CHECK(L, 0);
105 return universe; 105 return universe;
106} 106}