dfhack/plugins/Dfusion/include/luamain.h

41 lines
777 B
C

#ifndef LUAMAIN_H
#define LUAMAIN_H
#include <string>
using std::string;
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
#include "lune.h"
#include "luaxx.hpp"
namespace lua
{
2015-02-14 20:53:06 -07:00
//global lua state singleton
class glua
{
public:
static state &Get();
private:
glua();
static glua *ptr;
state mystate;
};
2015-02-14 20:53:06 -07:00
//registers basic lua commands
void RegBasics(lua::state &L);
2015-02-14 20:53:06 -07:00
//dumps lua function trace, useless unless called from lua.
string DebugDump(lua::state &L);
2015-02-14 20:53:06 -07:00
//register functions, first registers into global scope, second into current table
void RegFunctions(lua::state &L,luaL_Reg const *arr);
void RegFunctionsLocal(lua::state &L,luaL_Reg const *arr);
}
#endif // LUAMAIN_H