mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-16 02:49:48 +12:00
[Lua] Add pand module
This commit is contained in:
parent
74026d2faa
commit
baa9cab051
1 changed files with 15 additions and 10 deletions
25
src/lua.cpp
25
src/lua.cpp
|
@ -62,15 +62,20 @@ MAKE_MEMORY_FUNCTIONS(32)
|
||||||
MAKE_MEMORY_FUNCTIONS(64)
|
MAKE_MEMORY_FUNCTIONS(64)
|
||||||
#undef MAKE_MEMORY_FUNCTIONS
|
#undef MAKE_MEMORY_FUNCTIONS
|
||||||
|
|
||||||
void LuaManager::initializeThunks() {
|
// clang-format off
|
||||||
lua_register(L, "read8", read8Thunk);
|
static constexpr luaL_Reg functions[] = {
|
||||||
lua_register(L, "read16", read16Thunk);
|
{ "read8", read8Thunk },
|
||||||
lua_register(L, "read32", read32Thunk);
|
{ "read16", read16Thunk },
|
||||||
lua_register(L, "read64", read64Thunk);
|
{ "read32", read32Thunk },
|
||||||
lua_register(L, "write8", write8Thunk);
|
{ "read64", read64Thunk },
|
||||||
lua_register(L, "write16", write16Thunk);
|
{ "write8", write8Thunk} ,
|
||||||
lua_register(L, "write32", write32Thunk);
|
{ "write16", write16Thunk },
|
||||||
lua_register(L, "write64", write64Thunk);
|
{ "write32", write32Thunk },
|
||||||
}
|
{ "write64", write64Thunk },
|
||||||
|
{ nullptr, nullptr },
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
void LuaManager::initializeThunks() { luaL_register(L, "pand", functions); }
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
Add table
Reference in a new issue