Embed LuaJIT part 1
This commit is contained in:
32
include/lua.hpp
Normal file
32
include/lua.hpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
#include "helpers.hpp"
|
||||
|
||||
#ifdef PANDA3DS_ENABLE_LUA
|
||||
extern "C" {
|
||||
#include <lauxlib.h>
|
||||
#include <lua.h>
|
||||
#include <lualib.h>
|
||||
|
||||
#include "luajit.h"
|
||||
}
|
||||
|
||||
class LuaManager {
|
||||
lua_State* L = nullptr;
|
||||
bool initialized = false;
|
||||
|
||||
public:
|
||||
void close();
|
||||
void initialize();
|
||||
void loadFile(const char* path);
|
||||
void reset();
|
||||
};
|
||||
|
||||
#elif // Lua not enabled, Lua manager does nothing
|
||||
class LuaManager {
|
||||
public:
|
||||
void close() {}
|
||||
void initialize() {}
|
||||
void loadFile(const char* path) {}
|
||||
void reset() {}
|
||||
};
|
||||
#endif
|
||||
Reference in New Issue
Block a user