diff --git a/Source/Script/LuaScript.cpp b/Source/Script/LuaScript.cpp index c2e3bcf2..93f1f529 100644 --- a/Source/Script/LuaScript.cpp +++ b/Source/Script/LuaScript.cpp @@ -738,3 +738,9 @@ int LuaScript::TableInteger(std::string table, int keyType, std::intptr_t key) { return value; } + +// OFFSET: 0x0059CD60 +// FUNCTION: fn_02980 +void LuaScript::Register(std::string name, int (*function)(lua_State*)) { + lua_register(this->m_state, name.c_str(), function); +} diff --git a/Source/Script/LuaScript.h b/Source/Script/LuaScript.h index 4ec79f2b..63d52935 100644 --- a/Source/Script/LuaScript.h +++ b/Source/Script/LuaScript.h @@ -24,6 +24,7 @@ public: std::list TableKeys(const char* name, int unused); int TableInteger(std::string table, int keyType, std::intptr_t key); void Close(); + void Register(std::string name, int (*function)(lua_State*)); protected: /* 0000 */ lua_State* m_state;