summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorSteph Enders <smenders@gmail.com>2022-06-16 00:17:21 -0400
committerSteph Enders <smenders@gmail.com>2022-06-16 00:17:21 -0400
commit750b308d70cf1c903812316deeb0a8c4befa37ce (patch)
tree21093d7a8629f38ccbb32a9873239ebd5a0c62b3 /src/main.cpp
parenteaaf57114cfb74c29f1b0c4e9786bed6d225225c (diff)
Fixup warning from IntelliJ
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index fb61369..6f649cd 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4,10 +4,9 @@
#include <filesystem>
#include <iostream>
#include <lua.hpp>
-#include <memory>
const char* DEFAULT_PROC = "include/default_proc.lua";
-std::shared_ptr<Level> lvl = std::make_shared<Level>();
+std::shared_ptr<Level> lvl;
bool
call_onkeypress(lua_State* L, char pressedKey);
@@ -25,6 +24,8 @@ main(int argc, char** argv)
std::filesystem::path mapFile{ lvl_pfx + "/dng.map" };
std::filesystem::path luaFile{ lvl_pfx + "/proc.lua" };
+ lvl = std::make_shared<Level>();
+
lvl->loadLevelFromFile(mapFile.c_str());
lua_State* L_lvl = luaL_newstate();