diff --git a/Makefile b/Makefile index 1dcd99f..5c76511 100644 --- a/Makefile +++ b/Makefile @@ -21,8 +21,8 @@ SDLGFX2_DIR := $(SB_LIB_DIR)/sdl2-gfx GLEW_DIR := $(SB_LIB_DIR)/glew # C and C++ compiler commands -CC := clang -CXX := clang++ +CC := gcc-12 +CXX := g++-12 # Location of SDL config program. See README.md for how to compile the SDL library and this utility. SDLCONFIG := $(HOME)/local/sdl/bin/sdl2-config @@ -48,15 +48,17 @@ SRC_O_FILES := $(notdir $(patsubst %.cpp, %.o, $(wildcard $(addprefix $(SRC_DIR) ########################################################## BUILD_ROOT := build -X86_64_DEBUG_BUILD_DIR := $(BUILD_ROOT)/x86_64_debug -X86_64_BUILD_DIR := $(BUILD_ROOT)/x86_64 +X64_DEBUG_BUILD_DIR := $(BUILD_ROOT)/x64_debug +X64_BUILD_DIR := $(BUILD_ROOT)/x64 WASM_BUILD_DIR := $(BUILD_ROOT)/wasm WASM_DEBUG_BUILD_DIR := $(BUILD_ROOT)/wasm_debug WASM_COOLMATH_BUILD_DIR := $(BUILD_ROOT)/wasm_coolmath WINDOWS_BUILD_DIR := $(BUILD_ROOT)/win32 ARCADE_BUILD_DIR := $(BUILD_ROOT)/win32_arcade -BUILD_DIRS := $(X86_64_BUILD_DIR) $(X86_64_DEBUG_BUILD_DIR) $(WASM_BUILD_DIR) $(WASM_DEBUG_BUILD_DIR) $(WASM_COOLMATH_BUILD_DIR) \ - $(WINDOWS_BUILD_DIR) $(ARCADE_BUILD_DIR) +DEMO_BUILD_DIR := $(BUILD_ROOT)/win32_demo +WIN64_BUILD_DIR := $(BUILD_ROOT)/win64 +BUILD_DIRS := $(X64_BUILD_DIR) $(X64_DEBUG_BUILD_DIR) $(WASM_BUILD_DIR) $(WASM_DEBUG_BUILD_DIR) $(WASM_COOLMATH_BUILD_DIR) \ + $(WINDOWS_BUILD_DIR) $(ARCADE_BUILD_DIR) $(DEMO_BUILD_DIR) $(WIN64_BUILD_DIR) $(BUILD_DIRS): mkdir -p $@ @@ -185,21 +187,40 @@ $(addsuffix /Cakefoot.o, $(BUILD_DIRS)): $(SRC_DIR)/Cakefoot.cpp $(SRC_H_FILES) LINUX_CFLAGS = -c -I$(SB_LIB_DIR) -I$(SB_SRC_DIR) $(SDL_CFLAGS) -DGLEW_STATIC LINUX_CXXFLAGS = $(CFLAGS) --std=c++17 -LINUX_LFLAGS = $(SDL_LFLAGS) -Wl/,--enable-new-dtags -lpthread -lGL -lGLESv2 -lSDL2_image -lSDL2_ttf -lSDL2_mixer -lstdc++fs -LINUX_OBJ = $(addprefix $(X86_64_BUILD_DIR)/, glew.o SDL2_rotozoom.o SDL2_gfxPrimitives.o $(SB_O_FILES) $(SRC_O_FILES)) -LINUX_DEBUG_OBJ = $(addprefix $(X86_64_DEBUG_BUILD_DIR)/, glew.o SDL2_rotozoom.o SDL2_gfxPrimitives.o $(SB_O_FILES) $(SRC_O_FILES)) +# LINUX_LFLAGS = $(SDL_LFLAGS) -Wl/,--enable-new-dtags -lpthread -lGL -lGLESv2 -lSDL2_image -lSDL2_ttf -lSDL2_mixer -lstdc++fs +# LINUX_LFLAGS = $(SDL_LFLAGS) -lpthread -lGL -lGLESv2 -lSDL2_image -lSDL2_ttf -lSDL2_mixer -lstdc++fs +LINUX_LFLAGS = $(SDL_LFLAGS) -lpthread -lGL -lGLESv2 -lSDL2_image -lSDL2_ttf -lSDL2_mixer -lstdc++fs -static-libstdc++ -static-libgcc +LINUX_OBJ = $(addprefix $(X64_BUILD_DIR)/, glew.o SDL2_rotozoom.o SDL2_gfxPrimitives.o $(SB_O_FILES) $(SRC_O_FILES)) +LINUX_DEBUG_OBJ = $(addprefix $(X64_DEBUG_BUILD_DIR)/, glew.o SDL2_rotozoom.o SDL2_gfxPrimitives.o $(SB_O_FILES) $(SRC_O_FILES)) +X64_BUILD_LIB_DIR = lib/ -Cakefoot-linux.x86_64 : CFLAGS = $(LINUX_CFLAGS) -O3 -Cakefoot-linux.x86_64 : CXXFLAGS = $(LINUX_CXXFLAGS) -Cakefoot-linux.x86_64 : LFLAGS = $(LINUX_LFLAGS) -Cakefoot-linux.x86_64 : $(LINUX_OBJ) - $(CXX) $^ $(LFLAGS) -D__LINUX__ -o $(X86_64_BUILD_DIR)/$@ +Cakefoot-linux.x64 : CC = $(HOME)/ext/software/zig-linux-x86_64-0.12.0-dev.3644+05d975576/zig cc +Cakefoot-linux.x64 : CXX = $(HOME)/ext/software/zig-linux-x86_64-0.12.0-dev.3644+05d975576/zig c++ +Cakefoot-linux.x64 : CFLAGS = $(LINUX_CFLAGS) -O3 +Cakefoot-linux.x64 : CXXFLAGS = $(LINUX_CXXFLAGS) +Cakefoot-linux.x64 : LFLAGS = $(LINUX_LFLAGS) -Wl,-rpath $(X64_BUILD_LIB_DIR) +Cakefoot-linux.x64 : $(LINUX_OBJ) + $(CXX) $^ $(LFLAGS) -D__LINUX__ -o $(X64_BUILD_DIR)/$@ -Cakefoot-linux_debug.x86_64 : CFLAGS = $(LINUX_CFLAGS) -g -Wall -Wextra -O0 -fsanitize=undefined -Cakefoot-linux_debug.x86_64 : CXXFLAGS = $(LINUX_CXXFLAGS) -Cakefoot-linux_debug.x86_64 : LFLAGS = $(LINUX_LFLAGS) -fsanitize=undefined -Cakefoot-linux_debug.x86_64 : $(LINUX_DEBUG_OBJ) - $(CXX) $^ $(LFLAGS) -D__LINUX__ -o $(X86_64_DEBUG_BUILD_DIR)/$@ +# Build a distributable archive + + mkdir -p ${basename $@}/$(X64_BUILD_LIB_DIR) + cp $$(ldd $(X64_BUILD_DIR)/$@ | grep libSDL2-2.0 | cut -d" " -f3) \ + $$(ldd $(X64_BUILD_DIR)/$@ | grep libSDL2_image | cut -d" " -f3) \ + $$(ldd $(X64_BUILD_DIR)/$@ | grep libSDL2_ttf | cut -d" " -f3) \ + $$(ldd $(X64_BUILD_DIR)/$@ | grep libSDL2_mixer | cut -d" " -f3) ${basename $@}/$(X64_BUILD_LIB_DIR) + rsync -arRL resource/ src/shaders/ config.json ${basename $@} + cp $(X64_BUILD_DIR)/$@ ${basename $@} + zip -r ${@:x64=zip} ${basename $@} + mv ${@:x64=zip} $(X64_BUILD_DIR) + mv ${basename $@} /tmp + rm -rf /tmp/${basename $@} + +Cakefoot-linux_debug.x64 : CFLAGS = $(LINUX_CFLAGS) -g -Wall -Wextra -O0 -fsanitize=undefined +Cakefoot-linux_debug.x64 : CXXFLAGS = $(LINUX_CXXFLAGS) +Cakefoot-linux_debug.x64 : LFLAGS = $(LINUX_LFLAGS) -fsanitize=undefined +Cakefoot-linux_debug.x64 : $(LINUX_DEBUG_OBJ) + $(CXX) $^ $(LFLAGS) -D__LINUX__ -o $(X64_DEBUG_BUILD_DIR)/$@ ############# # Web build # @@ -316,20 +337,21 @@ $(ANDROID_BUILD_DIR)/app-debug.apk: $(ANDROID_BUILD_DIR) $(ANDROID_BUILD_DIR)/$( # Set the paths to the directories for the SDL MinGW libraries +WIN_ARCH := i686 SDL_MINGW_ROOT := $(HOME)/ext/software/SDL2-mingw -SDL_MINGW := $(SDL_MINGW_ROOT)/SDL2-2.24.2/i686-w64-mingw32 -SDL_IMG_MINGW := $(SDL_MINGW_ROOT)/SDL2_image-2.5.2/i686-w64-mingw32 -SDL_TTF_MINGW := $(SDL_MINGW_ROOT)/SDL2_ttf-2.0.15/i686-w64-mingw32 -SDL_MIXER_MINGW := $(SDL_MINGW_ROOT)/SDL2_mixer-2.5.2/i686-w64-mingw32 -WINDOWS_CFLAGS := -Wall -Wextra -O3 -c -I$(SB_LIB_DIR) -I$(SB_SRC_DIR) -DGLEW_STATIC -I$(SDL_MINGW)/include/SDL2 \ +SDL_MINGW = $(SDL_MINGW_ROOT)/SDL2-2.24.2/$(WIN_ARCH)-w64-mingw32 +SDL_IMG_MINGW = $(SDL_MINGW_ROOT)/SDL2_image-2.5.2/$(WIN_ARCH)-w64-mingw32 +SDL_TTF_MINGW = $(SDL_MINGW_ROOT)/SDL2_ttf-2.0.15/$(WIN_ARCH)-w64-mingw32 +SDL_MIXER_MINGW = $(SDL_MINGW_ROOT)/SDL2_mixer-2.5.2/$(WIN_ARCH)-w64-mingw32 +WINDOWS_CFLAGS = -Wall -Wextra -O3 -c -I$(SB_LIB_DIR) -I$(SB_SRC_DIR) -DGLEW_STATIC -I$(SDL_MINGW)/include/SDL2 \ -I$(SDL_IMG_MINGW)/include/SDL2 -I$(SDL_TTF_MINGW)/include/SDL2 -I$(SDL_MIXER_MINGW)/include/SDL2 -WINDOWS_LFLAGS := -lpthread -lstdc++fs -L$(SDL_MINGW)/lib -L$(SDL_IMG_MINGW)/lib -L$(SDL_TTF_MINGW)/lib -L$(SDL_MIXER_MINGW)/lib \ - -lmingw32 -lSDL2_image -lSDL2_ttf -lSDL2_mixer -lSDL2main -lSDL2 -lopengl32 -static-libstdc++ -static-libgcc +WINDOWS_LFLAGS = -lpthread -lstdc++fs -L$(SDL_MINGW)/lib -L$(SDL_IMG_MINGW)/lib -L$(SDL_TTF_MINGW)/lib -L$(SDL_MIXER_MINGW)/lib \ + -lmingw32 -lSDL2_image -lSDL2_ttf -lSDL2_mixer -lSDL2main -lSDL2 -lopengl32 -static-libstdc++ -static-libgcc -mwindows # Set the compiler to the MinGW compilers -Cakefoot-win32.exe: CC = i686-w64-mingw32-gcc-posix -Cakefoot-win32.exe: CXX = i686-w64-mingw32-g++-posix +Cakefoot-win32.exe: CC = $(WIN_ARCH)-w64-mingw32-gcc-posix +Cakefoot-win32.exe: CXX = $(WIN_ARCH)-w64-mingw32-g++-posix Cakefoot-win32.exe: CFLAGS = $(WINDOWS_CFLAGS) Cakefoot-win32.exe: CXXFLAGS = $(CFLAGS) --std=c++17 Cakefoot-win32.exe: LFLAGS = $(WINDOWS_LFLAGS) @@ -338,7 +360,7 @@ Cakefoot-win32.exe: $(addprefix $(WINDOWS_BUILD_DIR)/, glew.o SDL2_rotozoom.o SD $(CXX) $(filter-out config.json, $^) $(LFLAGS) -o $(WINDOWS_BUILD_DIR)/$@ mkdir ${basename $@} cp $(SDL_MINGW)/bin/*.dll $(SDL_IMG_MINGW)/bin/*.dll $(SDL_TTF_MINGW)/bin/*.dll $(SDL_MIXER_MINGW)/bin/*.dll ${basename $@} - cp /usr/i686-w64-mingw32/lib/libwinpthread-1.dll ${basename $@} + cp /usr/$(WIN_ARCH)-w64-mingw32/lib/libwinpthread-1.dll ${basename $@} rsync -arRL resource/ src/shaders/ config.json ${basename $@} cp $(WINDOWS_BUILD_DIR)/$@ ${basename $@} zip -r ${@:exe=zip} ${basename $@} @@ -346,8 +368,27 @@ Cakefoot-win32.exe: $(addprefix $(WINDOWS_BUILD_DIR)/, glew.o SDL2_rotozoom.o SD rm -rf /tmp/${basename $@} mv ${@:exe=zip} $(WINDOWS_BUILD_DIR) -Cakefoot-win32-ARCADE_ONLY.exe: CC = i686-w64-mingw32-gcc-posix -Cakefoot-win32-ARCADE_ONLY.exe: CXX = i686-w64-mingw32-g++-posix +Cakefoot-win64.exe: WIN_ARCH = x86_64 +Cakefoot-win64.exe: CC = $(WIN_ARCH)-w64-mingw32-gcc-posix +Cakefoot-win64.exe: CXX = $(WIN_ARCH)-w64-mingw32-g++-posix +Cakefoot-win64.exe: CFLAGS = $(WINDOWS_CFLAGS) +Cakefoot-win64.exe: CXXFLAGS = $(CFLAGS) --std=c++17 +Cakefoot-win64.exe: LFLAGS = $(WINDOWS_LFLAGS) +Cakefoot-win64.exe: $(addprefix $(WIN64_BUILD_DIR)/, glew.o SDL2_rotozoom.o SDL2_gfxPrimitives.o $(SB_O_FILES) $(SRC_O_FILES)) \ + config.json + $(CXX) $(filter-out config.json, $^) $(LFLAGS) -o $(WIN64_BUILD_DIR)/$@ + mkdir ${basename $@} + cp $(SDL_MINGW)/bin/*.dll $(SDL_IMG_MINGW)/bin/*.dll $(SDL_TTF_MINGW)/bin/*.dll $(SDL_MIXER_MINGW)/bin/*.dll ${basename $@} + cp /usr/$(WIN_ARCH)-w64-mingw32/lib/libwinpthread-1.dll ${basename $@} + rsync -arRL resource/ src/shaders/ config.json ${basename $@} + cp $(WIN64_BUILD_DIR)/$@ ${basename $@} + zip -r ${@:exe=zip} ${basename $@} + mv ${basename $@} /tmp + rm -rf /tmp/${basename $@} + mv ${@:exe=zip} $(WIN64_BUILD_DIR) + +Cakefoot-win32-ARCADE_ONLY.exe: CC = $(WIN_ARCH)-w64-mingw32-gcc-posix +Cakefoot-win32-ARCADE_ONLY.exe: CXX = $(WIN_ARCH)-w64-mingw32-g++-posix Cakefoot-win32-ARCADE_ONLY.exe: CFLAGS = $(WINDOWS_CFLAGS) -D__ARCADE_ONLY__ Cakefoot-win32-ARCADE_ONLY.exe: CXXFLAGS = $(CFLAGS) --std=c++17 Cakefoot-win32-ARCADE_ONLY.exe: LFLAGS = $(WINDOWS_LFLAGS) -D__ARCADE_ONLY__ @@ -356,7 +397,7 @@ Cakefoot-win32-ARCADE_ONLY.exe: $(addprefix $(ARCADE_BUILD_DIR)/, glew.o SDL2_ro $(CXX) $(filter-out config.json src/config_arcade.json, $^) $(LFLAGS) -o $(ARCADE_BUILD_DIR)/$@ mkdir ${basename $@} cp $(SDL_MINGW)/bin/*.dll $(SDL_IMG_MINGW)/bin/*.dll $(SDL_TTF_MINGW)/bin/*.dll $(SDL_MIXER_MINGW)/bin/*.dll ${basename $@} - cp /usr/i686-w64-mingw32/lib/libwinpthread-1.dll ${basename $@} + cp /usr/$(WIN_ARCH)-w64-mingw32/lib/libwinpthread-1.dll ${basename $@} rsync -arRL resource/ src/shaders/ src/config_arcade.json config.json ${basename $@} mv $(ARCADE_BUILD_DIR)/$@ ${basename $@} zip -r ${@:exe=zip} ${basename $@} @@ -364,6 +405,24 @@ Cakefoot-win32-ARCADE_ONLY.exe: $(addprefix $(ARCADE_BUILD_DIR)/, glew.o SDL2_ro rm -rf /tmp/${basename $@} mv ${@:exe=zip} $(ARCADE_BUILD_DIR) +Cakefoot-win32-DEMO.exe: CC = $(WIN_ARCH)-w64-mingw32-gcc-posix +Cakefoot-win32-DEMO.exe: CXX = $(WIN_ARCH)-w64-mingw32-g++-posix +Cakefoot-win32-DEMO.exe: CFLAGS = $(WINDOWS_CFLAGS) -D__DEMO__ +Cakefoot-win32-DEMO.exe: CXXFLAGS = $(CFLAGS) --std=c++17 +Cakefoot-win32-DEMO.exe: LFLAGS = $(WINDOWS_LFLAGS) -D__DEMO__ +Cakefoot-win32-DEMO.exe: $(addprefix $(DEMO_BUILD_DIR)/, glew.o SDL2_rotozoom.o SDL2_gfxPrimitives.o $(SB_O_FILES) \ + $(SRC_O_FILES)) config.json src/config_demo.json + $(CXX) $(filter-out config.json src/config_demo.json, $^) $(LFLAGS) -o $(DEMO_BUILD_DIR)/$@ + mkdir ${basename $@} + cp $(SDL_MINGW)/bin/*.dll $(SDL_IMG_MINGW)/bin/*.dll $(SDL_TTF_MINGW)/bin/*.dll $(SDL_MIXER_MINGW)/bin/*.dll ${basename $@} + cp /usr/$(WIN_ARCH)-w64-mingw32/lib/libwinpthread-1.dll ${basename $@} + rsync -arRL resource/ src/shaders/ src/config_demo.json config.json ${basename $@} + mv $(DEMO_BUILD_DIR)/$@ ${basename $@} + zip -r ${@:exe=zip} ${basename $@} + mv ${basename $@} /tmp + rm -rf /tmp/${basename $@} + mv ${@:exe=zip} $(DEMO_BUILD_DIR) + ############# # Press kit # ############# @@ -378,8 +437,8 @@ press : # Make all builds # ################### -all : Cakefoot-linux.x86_64 Cakefoot-linux_debug.x86_64 cakefoot.js cakefoot_debug.html cakefoot_coolmath.js Cakefoot-win32.exe \ - Cakefoot-win32-ARCADE_ONLY.exe press +all : Cakefoot-linux.x64 Cakefoot-linux_debug.x64 cakefoot.js cakefoot_debug.html cakefoot_coolmath.js Cakefoot-win32.exe \ + Cakefoot-win64.exe Cakefoot-win32-ARCADE_ONLY.exe Cakefoot-win32-DEMO.exe press ######################### # Clean up object files # @@ -397,5 +456,7 @@ clean : # renamed, or the compilation flags change. The generated database is based on the Linux build. PATH_TO_COMPILEDB = $(HOME)/ext/software/compiledb/bin/compiledb +compiledb: CC = clang-16 +compiledb: CXX = clang++-16 compiledb : - -$(PATH_TO_COMPILEDB) -n make Cakefoot-linux_debug.x86_64 -k + -$(PATH_TO_COMPILEDB) -n make Cakefoot-linux_debug.x64 -k diff --git a/Press_Kit.md b/Press_Kit.md index 313f343..e3265a6 100644 --- a/Press_Kit.md +++ b/Press_Kit.md @@ -20,7 +20,7 @@ | | $2.99 (Downloadable) | | E-mail | 📧 cocktail.frank at dank.game | -_Cakefoot_ is a challenging, single-button dodge 'em up on rails. Pilot a walking cake -- hold to accelerate, let go to drift back, and avoid enemy patterns. Featuring an epic 22-level quest, arcade mode, unlockables, and high scores, _Cakefoot_ is endlessly replayable, and impossible to defeat. +Fork it up! _Cakefoot_ is a challenging, single-button dodge 'em up on rails. Pilot a walking cake -- hold to accelerate, let go to drift back -- and survive against all odds. Featuring 22 epic levels, arcade mode, unlockables, and high scores, _Cakefoot_ is endlessly replayable, and impossible to defeat. Features ======== @@ -35,7 +35,7 @@ Features * Supports mouse, keyboard, and gamepad * Can run fullscreen, and can be displayed on any monitor in a multi-monitor setup * Dynamically resize the window to any dimension -* Simple JSON syntax for creating and sharing new levels and skins +* Simple JSON syntax for creating and sharing custom levels and skins * Modifiable [source code](https://open.shampoo.ooo/shampoo/cakefoot) Trailer @@ -131,7 +131,6 @@ Upcoming conventions, festivals, and events Weekly livestreams of Cakefoot, played by the developer, occasionally featuring guest players -* [Fork it up: Cakefoot Live on Twitch](https://twitch.tv/dankd0tgame) (Wed. 4/10 @ 8-11pm EST) * [Fork it up: Cakefoot Live on Twitch](https://twitch.tv/dankd0tgame) (Wed. 4/17 @ 8-11pm EST) * [Fork it up: Cakefoot Live on Twitch](https://twitch.tv/dankd0tgame) (Wed. 4/24 @ 8-11pm EST) * [Fork it up: Cakefoot Live on Twitch](https://twitch.tv/dankd0tgame) (Wed. 5/1 @ 8-11pm EST) diff --git a/config.json b/config.json index 717afaa..e01da82 100644 --- a/config.json +++ b/config.json @@ -143,8 +143,8 @@ "log": { - "enabled": true, - "output-directory": "/var/log/sb/", + "enabled": false, + "output-directory": "log", "debug-to-stdout": false, "debug-to-file": true, "info-file-name": "cakefoot_info.log", @@ -451,8 +451,8 @@ "demo": { "active": false, - "idle timeout": 20.0, - "countdown display timeout": 11.0, + "idle timeout": 25.0, + "countdown display timeout": 5.0, "countdown message": "IDLE RESET IN ", "message translation": [0.0, 0.83], "message scale": [1.05, 0.14] diff --git a/index.html b/index.html index be8252f..aced47f 100644 --- a/index.html +++ b/index.html @@ -193,23 +193,6 @@ - -
✨️  @@ -362,7 +345,7 @@ * https://emscripten.org/docs/api_reference/module.html#Module.locateFile */ if (path.endsWith(".data")) { - return "build/wasm/" + path; + return "dist/wasm/" + path; } else { @@ -373,6 +356,6 @@ - + diff --git a/lib/sb b/lib/sb index 5fa063a..6fdfa67 160000 --- a/lib/sb +++ b/lib/sb @@ -1 +1 @@ -Subproject commit 5fa063ac6ffdff9b8de5e42ee115ad8dc99e4ef1 +Subproject commit 6fdfa67c4181b023925b6a1e86950b6fb1378959 diff --git a/resource/Demo_message.png b/resource/Demo_message.png index 890787b..16e4979 100644 Binary files a/resource/Demo_message.png and b/resource/Demo_message.png differ diff --git a/src/Cakefoot.cpp b/src/Cakefoot.cpp index bbcf676..0a3ea4a 100644 --- a/src/Cakefoot.cpp +++ b/src/Cakefoot.cpp @@ -430,8 +430,8 @@ void Cakefoot::set_up_buttons() button.at(name) = sb::Pad<>{text, configuration()("button", name + " translation"), scale, dimensions.y / dimensions.x}; } - /* Replace start text texture with arcade prompt image in arcade-only mode */ - if (configuration()("display", "arcade only")) + /* Replace start text texture with arcade prompt image if requested in config */ + if (configuration()("display", "use arcade prompt")) { sb::Texture arcade_prompt_texture {configuration()("button", "start alt texture").get()}; arcade_prompt_texture.load(); @@ -2848,7 +2848,7 @@ void Cakefoot::update(float timestamp) if (level_index == 0) { /* Flash play button */ - if (!configuration()("display", "arcade only")) + if (!configuration()("display", "use arcade prompt")) { glUniform4fv(uniform.at("color addition"), 1, &rotating_hue.normal()[0]); } @@ -2861,8 +2861,8 @@ void Cakefoot::update(float timestamp) glUniform4fv(uniform.at("color addition"), 1, &glm::vec4(0)[0]); } - /* Disable spinners in arcade-only mode */ - if (!configuration()("display", "arcade only")) + /* Disable spinners if arcade prompt displayed */ + if (!configuration()("display", "use arcade prompt")) { /* Draw spinner buttons */ for (const std::string& name : { @@ -3175,6 +3175,9 @@ int main() #if defined(__ARCADE_ONLY__) /* Merge the arcade-only configuration */ Cakefoot game = Cakefoot({"src/config_arcade.json"}); +#elif defined(__DEMO__) + /* Merge the demo configuration */ + Cakefoot game = Cakefoot({"src/config_demo.json"}); #elif defined(__COOLMATH__) /* Merge config specific to the coolmath WASM build */ Cakefoot game = Cakefoot({"src/config_coolmath.json"}); diff --git a/src/config_demo.json b/src/config_demo.json index 83abea4..f237ff6 100644 --- a/src/config_demo.json +++ b/src/config_demo.json @@ -1,7 +1,10 @@ { "display": { - "qr display": true + "dimensions": [1920, 1080], + "fullscreen": true, + "qr display": true, + "use arcade prompt": true }, "demo": { diff --git a/src/steam_app_build.vdf b/src/steam_app_build.vdf new file mode 100644 index 0000000..bf06cf9 --- /dev/null +++ b/src/steam_app_build.vdf @@ -0,0 +1,41 @@ +"AppBuild" +{ + "AppID" "2869020" // your AppID + "Desc" "Cakefoot on Windows, MacOS, and Linux for Steam" // internal description for this build + + "ContentRoot" "../dist/" // root content folder, relative to location of this file + "BuildOutput" "../local/steam-sdk-output/" // build output folder for build logs and build cache files + + "Depots" + { + "2869022" // your DepotID + { + "FileMapping" + { + "LocalPath" "Cakefoot-linux/*" // all files from contentroot folder + "DepotPath" "." // mapped into the root of the depot + "recursive" "1" // include all subfolders + } + } + + "2869023" // your DepotID + { + "FileMapping" + { + "LocalPath" "Cakefoot-win64/*" // all files from contentroot folder + "DepotPath" "." // mapped into the root of the depot + "recursive" "1" // include all subfolders + } + } + + "2869024" // your DepotID + { + "FileMapping" + { + "LocalPath" "Cakefoot-win32/*" // all files from contentroot folder + "DepotPath" "." // mapped into the root of the depot + "recursive" "1" // include all subfolders + } + } + } +} diff --git a/src/steam_build.sh b/src/steam_build.sh new file mode 100644 index 0000000..67847c6 --- /dev/null +++ b/src/steam_build.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +unzip -d dist/ dist/Cakefoot-linux.zip +unzip -d dist/ dist/Cakefoot-win32.zip +unzip -d dist/ dist/Cakefoot-win64.zip +bash $HOME/ext/software/steamworks/sdk/tools/ContentBuilder/builder_linux/steamcmd.sh +login tarecontrol +run_app_build \ + $(pwd)/src/steam_app_build.vdf +quit +mv dist/Cakefoot-linux /tmp && rm -rf /tmp/Cakefoot-linux +mv dist/Cakefoot-win32 /tmp && rm -rf /tmp/Cakefoot-win32 +mv dist/Cakefoot-win64 /tmp && rm -rf /tmp/Cakefoot-win64