diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d6397b..1e6f80a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ if(MSVC) endif() if (EMSCRIPTEN) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -fdebug-prefix-map=${CMAKE_SOURCE_DIR}=$ENV{ECO2D_SERVER_URL}") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -g -s USE_GLFW=3 --profiling -s ASSERTIONS=1 -s WASM=1 -s INITIAL_MEMORY=268435456 -s FORCE_FILESYSTEM=1 --preload-file ${CMAKE_SOURCE_DIR}/art@art/ --shell-file ${CMAKE_SOURCE_DIR}/web/eco2d.html") set(CMAKE_EXECUTABLE_SUFFIX ".html") # This line is used to set your executable to build with the emscripten html template so that you can directly open it. set(CMAKE_COMPILE_WARNING_AS_ERROR OFF) diff --git a/code/game/src/debug_ui.c b/code/game/src/debug_ui.c index 22b654d..4404c37 100644 --- a/code/game/src/debug_ui.c +++ b/code/game/src/debug_ui.c @@ -37,7 +37,7 @@ typedef struct { #define DBG_GAP_HEIGHT DBG_FONT_SPACING * 0.5f static uint8_t is_shadow_rendered; -static uint8_t is_debug_open = 1; +static uint8_t is_debug_open = 0; static uint8_t is_handle_ctrl_held; static float debug_xpos = DBG_START_XPOS; static float debug_ypos = DBG_START_YPOS; diff --git a/web/bind.sh b/web/bind.sh index 21dafe6..72c8f84 100755 --- a/web/bind.sh +++ b/web/bind.sh @@ -1,20 +1,10 @@ #!/bin/bash -# Run as "source web/host.sh" to set up environment variables - -# Prompt for URL -read -p "Enter URL: " URL - -# Expose URL to environment -export ECO2D_SERVER_URL=${URL/https:\/\//}build_web -echo ${ECO2D_SERVER_URL} # Symlink sources -if [ ! -d "build_web/${ECO2D_SERVER_URL}" ]; then - mkdir -p "build_web/${ECO2D_SERVER_URL}" +if [ ! -d "build_web/map" ]; then pushd build_web - ln -s "/workspaces/eco2d/code" "${ECO2D_SERVER_URL/build_web/}/code" - ln -s "/workspaces/eco2d/build_web/_deps" "${ECO2D_SERVER_URL/build_web/}build_web/_deps" + mkdir -p "map/build_web" + ln -s "/workspaces/eco2d/code" "map/code" + ln -s "/workspaces/eco2d/build_web/_deps" "map/build_web/_deps" popd fi - -web/build.sh diff --git a/web/build.sh b/web/build.sh index ff962fa..22d77f7 100755 --- a/web/build.sh +++ b/web/build.sh @@ -2,9 +2,8 @@ set -xe -cmake --build build_web --parallel - pushd build_web +BUILD_PATH_PREFIX_MAP=$(pwd)=. cmake --build . --parallel if [ -f "eco2d.html" ]; then mv eco2d.html index.html fi diff --git a/web/clean.sh b/web/clean.sh new file mode 100755 index 0000000..5acae9c --- /dev/null +++ b/web/clean.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -xe + +cmake --build build_web --target clean diff --git a/web/host.sh b/web/host.sh index 05c0248..d988bde 100755 --- a/web/host.sh +++ b/web/host.sh @@ -2,8 +2,4 @@ set -xe -if [ -d "build_web" ]; then - rm -rf build_web -fi - python -m http.server --directory build_web --bind 127.0.0.1 diff --git a/cmake_setup.bat b/win/cmake_setup.bat similarity index 100% rename from cmake_setup.bat rename to win/cmake_setup.bat diff --git a/package.bat b/win/package.bat similarity index 100% rename from package.bat rename to win/package.bat diff --git a/run_client.bat b/win/run_client.bat similarity index 100% rename from run_client.bat rename to win/run_client.bat diff --git a/run_client_release.bat b/win/run_client_release.bat similarity index 100% rename from run_client_release.bat rename to win/run_client_release.bat diff --git a/run_server.bat b/win/run_server.bat similarity index 100% rename from run_server.bat rename to win/run_server.bat