diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f21750..51098b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,11 @@ add_executable(game # Reference blah target_link_libraries(game blah) +if( ${CMAKE_SYSTEM_NAME} MATCHES "Emscripten") + set_target_properties(game PROPERTIES LINK_FLAGS "-s USE_SDL=2 -s USE_WEBGL2=1 --preload-file ${CMAKE_SOURCE_DIR}/content@/content") + set(CMAKE_EXECUTABLE_SUFFIX ".html") +endif() + # copy SDL2 to the build directory set(SDL2_DLL "" CACHE FILEPATH "SDL2 DLL Path") if (SDL2_ENABLED) diff --git a/src/components/mover.cpp b/src/components/mover.cpp index e3e74f1..18f022e 100644 --- a/src/components/mover.cpp +++ b/src/components/mover.cpp @@ -28,6 +28,7 @@ bool Mover::move_x(int amount) { entity()->position.x += amount; } + return false; } bool Mover::move_y(int amount) @@ -64,6 +65,7 @@ bool Mover::move_y(int amount) { entity()->position.y += amount; } + return false; } void Mover::stop_x()