aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 5e5e278..0597d48 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -18,7 +18,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+#include <lua.hpp>
#include <entityx/entityx.h>
+#include <Script/entityx/entity_lua.hpp>
#include <SDL2/SDL.h>
@@ -79,6 +81,7 @@ std::atomic_bool shouldRun;
static void renderLoop(void);
static void logicLoop(void);
+static void LuaTest(void);
int main([[maybe_unused]] int argc, [[maybe_unused]] char *argv[])
{
@@ -91,6 +94,8 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char *argv[])
atexit(SDL_Quit);
}
+ LuaTest();
+
// Create our window
Window::init();
@@ -134,3 +139,15 @@ void logicLoop(void)
}
}
+
+void LuaTest(void)
+{
+ using namespace entityx;
+ using namespace entityx::lua;
+
+ lua_State* L = luaL_newstate();
+ luaL_openlibs(L);
+ setup_entityx_api(L);
+
+ lua_close(L);
+}