rodecomp/Source/Script/LuaInstance.h
ragnarok-clanker ea2681102b Decompile fn_01133 (CLuaInstance::SetGlobal)
Batch #3967 by Yommy: 0 byte-identical, 1 confirmed by peer review.

- fn_01133 CLuaInstance::SetGlobal: logic confirmed by peer review

Peer-reviewed-by: youko, tayoba
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-10-30 00:23:30 +00:00

35 lines
886 B
C++

#ifndef RAGNAROK_SOURCE_SCRIPT_LUAINSTANCE_H
#define RAGNAROK_SOURCE_SCRIPT_LUAINSTANCE_H
extern "C" {
#include <lua.h>
}
#include <string>
#include <vector>
class CLuaInstance {
public:
CLuaInstance();
virtual ~CLuaInstance();
bool Execute(const std::string& name);
bool LoadFile(const std::string& path);
bool LoadFile(const std::string& path, bool showError);
void SetGlobal(const std::string& name, bool value);
void SetGlobal(const std::string& name, lua_CFunction function);
void SetGlobal(const std::string& name, double value);
int ReadStrings(std::vector<std::string>& values, const char* global);
lua_State* GetState() const { return this->m_state; }
protected:
/* 0004 */ lua_State* m_state;
private:
static int LuaMessageBox(lua_State* state);
};
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(CLuaInstance) == 8);
#endif
#endif