diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index f3457b046..6f9e4428a 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -81,7 +81,7 @@ elseif(${PLATFORM} MATCHES "Web") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os -s USE_GLFW=3 -s ASSERTIONS=1 -s WASM=1 -s EMTERPRETIFY=1 -s EMTERPRETIFY_ASYNC=1") # Since WASM is used, ALLOW_MEMORY_GROWTH has no extra overheads set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s ALLOW_MEMORY_GROWTH=1 --no-heap-copy") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --shell-file ${CMAKE_SOURCE_DIR}/templates/web_shell/shell.html") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --shell-file ${CMAKE_SOURCE_DIR}/src/shell.html") set(OUTPUT_EXT ".html") diff --git a/examples/Makefile b/examples/Makefile index cb015fa73..e79bc3645 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -240,7 +240,7 @@ ifeq ($(PLATFORM),PLATFORM_WEB) # logic to a self contained function: UpdateDrawFrame(), check core_basic_window_web.c for reference. # Define a custom shell .html and output extension - CFLAGS += --shell-file $(RAYLIB_PATH)\templates\web_shell\shell.html + CFLAGS += --shell-file $(RAYLIB_PATH)\src\shell.html EXT = .html endif diff --git a/games/CMakeLists.txt b/games/CMakeLists.txt index d3f9d9fcf..3ec6cb29f 100644 --- a/games/CMakeLists.txt +++ b/games/CMakeLists.txt @@ -8,7 +8,7 @@ set(OUTPUT_EXT) if(${PLATFORM} MATCHES "Web") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os -s USE_GLFW=3 -s ASSERTIONS=1 -s WASM=1 -s EMTERPRETIFY=1 -s EMTERPRETIFY_ASYNC=1") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --shell-file ${CMAKE_SOURCE_DIR}/templates/web_shell/shell.html") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --shell-file ${CMAKE_SOURCE_DIR}/src/shell.html") set(OUTPUT_EXT ".html") endif() diff --git a/games/cat_vs_roomba/Makefile b/games/cat_vs_roomba/Makefile index 620df80f9..87b052d26 100644 --- a/games/cat_vs_roomba/Makefile +++ b/games/cat_vs_roomba/Makefile @@ -236,7 +236,7 @@ ifeq ($(PLATFORM),PLATFORM_WEB) endif # Define a custom shell .html and output extension - CFLAGS += --shell-file $(RAYLIB_PATH)\templates\web_shell\shell.html + CFLAGS += --shell-file $(RAYLIB_PATH)\src\shell.html EXT = .html endif diff --git a/games/drturtle/Makefile b/games/drturtle/Makefile index 4bab3e36e..8a7c67323 100644 --- a/games/drturtle/Makefile +++ b/games/drturtle/Makefile @@ -236,7 +236,7 @@ ifeq ($(PLATFORM),PLATFORM_WEB) endif # Define a custom shell .html and output extension - CFLAGS += --shell-file $(RAYLIB_PATH)\templates\web_shell\shell.html + CFLAGS += --shell-file $(RAYLIB_PATH)\src\shell.html EXT = .html endif diff --git a/games/just_do/Makefile b/games/just_do/Makefile index 9bd09dd48..7b2d4d5fa 100644 --- a/games/just_do/Makefile +++ b/games/just_do/Makefile @@ -236,7 +236,7 @@ ifeq ($(PLATFORM),PLATFORM_WEB) endif # Define a custom shell .html and output extension - CFLAGS += --shell-file $(RAYLIB_PATH)\templates\web_shell\shell.html + CFLAGS += --shell-file $(RAYLIB_PATH)\src\shell.html EXT = .html endif diff --git a/games/koala_seasons/Makefile b/games/koala_seasons/Makefile index 4688f3acf..5f3493e3c 100644 --- a/games/koala_seasons/Makefile +++ b/games/koala_seasons/Makefile @@ -236,7 +236,7 @@ ifeq ($(PLATFORM),PLATFORM_WEB) endif # Define a custom shell .html and output extension - CFLAGS += --shell-file $(RAYLIB_PATH)\templates\web_shell\shell.html + CFLAGS += --shell-file $(RAYLIB_PATH)\src\shell.html EXT = .html endif diff --git a/games/light_my_ritual/Makefile b/games/light_my_ritual/Makefile index 1a90642e8..b14468318 100644 --- a/games/light_my_ritual/Makefile +++ b/games/light_my_ritual/Makefile @@ -236,7 +236,7 @@ ifeq ($(PLATFORM),PLATFORM_WEB) endif # Define a custom shell .html and output extension - CFLAGS += --shell-file $(RAYLIB_PATH)\templates\web_shell\shell.html + CFLAGS += --shell-file $(RAYLIB_PATH)\src\shell.html EXT = .html endif diff --git a/games/skully_escape/Makefile b/games/skully_escape/Makefile index d57075da1..aa21763a5 100644 --- a/games/skully_escape/Makefile +++ b/games/skully_escape/Makefile @@ -236,7 +236,7 @@ ifeq ($(PLATFORM),PLATFORM_WEB) endif # Define a custom shell .html and output extension - CFLAGS += --shell-file $(RAYLIB_PATH)\templates\web_shell\shell.html + CFLAGS += --shell-file $(RAYLIB_PATH)\src\shell.html EXT = .html endif diff --git a/games/transmission/Makefile b/games/transmission/Makefile index c78d7ef57..f4b303314 100644 --- a/games/transmission/Makefile +++ b/games/transmission/Makefile @@ -236,7 +236,7 @@ ifeq ($(PLATFORM),PLATFORM_WEB) endif # Define a custom shell .html and output extension - CFLAGS += --shell-file $(RAYLIB_PATH)\templates\web_shell\shell.html + CFLAGS += --shell-file $(RAYLIB_PATH)\src\shell.html EXT = .html endif diff --git a/games/wave_collector/Makefile b/games/wave_collector/Makefile index 7f9b94e64..e2c039b61 100644 --- a/games/wave_collector/Makefile +++ b/games/wave_collector/Makefile @@ -236,7 +236,7 @@ ifeq ($(PLATFORM),PLATFORM_WEB) endif # Define a custom shell .html and output extension - CFLAGS += --shell-file $(RAYLIB_PATH)\templates\web_shell\shell.html + CFLAGS += --shell-file $(RAYLIB_PATH)\src\shell.html EXT = .html endif diff --git a/projects/4coder/Makefile b/projects/4coder/Makefile index c7b9162aa..63d093a27 100644 --- a/projects/4coder/Makefile +++ b/projects/4coder/Makefile @@ -236,7 +236,7 @@ ifeq ($(PLATFORM),PLATFORM_WEB) endif # Define a custom shell .html and output extension - CFLAGS += --shell-file $(RAYLIB_PATH)\templates\web_shell\shell.html + CFLAGS += --shell-file $(RAYLIB_PATH)\src\shell.html EXT = .html endif diff --git a/projects/VSCode/Makefile b/projects/VSCode/Makefile index c7b9162aa..63d093a27 100644 --- a/projects/VSCode/Makefile +++ b/projects/VSCode/Makefile @@ -236,7 +236,7 @@ ifeq ($(PLATFORM),PLATFORM_WEB) endif # Define a custom shell .html and output extension - CFLAGS += --shell-file $(RAYLIB_PATH)\templates\web_shell\shell.html + CFLAGS += --shell-file $(RAYLIB_PATH)\src\shell.html EXT = .html endif diff --git a/src/core.c b/src/core.c index d8d851442..8dd1090b1 100644 --- a/src/core.c +++ b/src/core.c @@ -1640,7 +1640,7 @@ void TakeScreenshot(const char *fileName) #if defined(PLATFORM_WEB) // Download file from MEMFS (emscripten memory filesystem) - // SaveFileFromMEMFSToDisk() function is defined in raylib/templates/web_shel/shell.html + // SaveFileFromMEMFSToDisk() function is defined in raylib/src/shell.html emscripten_run_script(TextFormat("SaveFileFromMEMFSToDisk('%s','%s')", GetFileName(path), GetFileName(path))); #endif diff --git a/templates/web_shell/shell.html b/src/shell.html similarity index 75% rename from templates/web_shell/shell.html rename to src/shell.html index 641cfc02b..5d8e7e91c 100644 --- a/templates/web_shell/shell.html +++ b/src/shell.html @@ -27,51 +27,65 @@ - +
-