Skip to content

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
skhaz committed Nov 22, 2023
1 parent bb99400 commit a6ea17e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ endif()
if (${CMAKE_SYSTEM_NAME} MATCHES "Emscripten")
# target_link_libraries(${PROJECT_NAME} "--profiling")
# target_link_libraries(${PROJECT_NAME} "-s RUNTIME_DEBUG")
target_link_libraries(${PROJECT_NAME} "-s ASSERTIONS=1")
target_link_libraries(${PROJECT_NAME} "-s NO_DISABLE_EXCEPTION_CATCHING")
# target_link_libraries(${PROJECT_NAME} "-s ASSERTIONS=1")
# target_link_libraries(${PROJECT_NAME} "-s NO_DISABLE_EXCEPTION_CATCHING")

target_link_libraries(${PROJECT_NAME} "-s ALLOW_MEMORY_GROWTH=1")
target_link_libraries(${PROJECT_NAME} "-s INITIAL_MEMORY=134217728")
Expand Down
2 changes: 1 addition & 1 deletion src/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void engine::_loop() {
const auto now = SDL_GetTicks();

_resourcemanager->update();
// _eventmanager->update();
_eventmanager->update();
_entitymanager->update();
_renderer->begin();
_entitymanager->draw();
Expand Down
14 changes: 1 addition & 13 deletions src/scriptengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ using namespace framework;
void scriptengine::run() {
sol::state lua;

lua.open_libraries(sol::lib::base);
// lua.open_libraries();
lua.open_libraries();

lua.new_enum(
"KeyEvent",
Expand Down Expand Up @@ -81,15 +80,4 @@ void scriptengine::run() {

const auto script = storage::io::read("scripts/main.lua");
lua.script(std::string_view(reinterpret_cast<const char *>(script.data()), script.size()));

// lua.script("print('Hello, world!')");

// const auto e = enginefactory()
// .set_title("Snake")
// .set_width(640)
// .set_height(480)
// .set_fullscreen(false)
// .create();

// e->run();
}

0 comments on commit a6ea17e

Please sign in to comment.