Batch #1449 by Yommy: 2 byte-identical, 0 confirmed by peer review. - fn_17872 CPathFinder::Height: byte-identical - fn_17873 CPathFinder::Width: byte-identical Merged automatically: every function is byte-identical to the original. Adds to the build: Source/Contents/MapSkyMgr.cpp, Source/Contents/EquipmentResources.cpp, Source/Contents/Pathfinding.cpp, Source/Resource/ImfResource.cpp
37 lines
976 B
C++
37 lines
976 B
C++
#ifndef RAGNAROK_SOURCE_SCRIPT_LUASCRIPT_H
|
|
#define RAGNAROK_SOURCE_SCRIPT_LUASCRIPT_H
|
|
|
|
extern "C" {
|
|
#include <lua.h>
|
|
}
|
|
|
|
#include <cstdarg>
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
#include <list>
|
|
#include <string>
|
|
|
|
class LuaScript {
|
|
public:
|
|
LuaScript();
|
|
~LuaScript();
|
|
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
|