rodecomp/Source/Script/LuaScript.h
ragnarok-clanker bb67a439b5 Decompile 3 functions in Source/Contents/MapSkyMgr.cpp, Source/Contents/MapSkyMgr.h, ...
Batch #2793 by willerthal: 0 byte-identical, 3 confirmed by peer review.

- fn_03431 CMapSkyMgr::CMapSkyMgr: logic confirmed by peer review
- fn_03436 CMapSkyMgr::CreateClouds: logic confirmed by peer review
- fn_18325 LuaScriptBag::Add: logic confirmed by peer review

Peer-reviewed-by: ntrl, meitogi, youko
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-10-29 19:05:08 +00:00

36 lines
977 B
C++

#ifndef RAGNAROK_SOURCE_SCRIPT_LUASCRIPT_H
#define RAGNAROK_SOURCE_SCRIPT_LUASCRIPT_H
#include <cstdarg>
#include <cstddef>
#include <cstdint>
#include <list>
#include <string>
struct lua_State;
class LuaScript {
public:
LuaScript();
~LuaScript();
void Open();
bool Call(std::string function, const char* signature, ...);
bool CallTable(std::string table, std::string function, const char* signature, ...);
bool Execute(const void* bytes, std::size_t size);
bool Load(const char* name, bool resourcePath, bool looseOnly);
int GlobalInteger(const char* name);
std::string GlobalString(const char* name);
bool HasTable(const char* name);
std::list<int> TableKeys(const char* name, int unused);
int TableInteger(std::string table, int keyType, std::intptr_t key);
void Close();
protected:
/* 0000 */ lua_State* m_state;
private:
void Error(const char* caption, const char* format, ...);
bool TableField(const char* signature, ...);
};
#endif