Keep presentation alive across levels and scale UI for widescreen
This commit is contained in:
1 parent
113e9a41cc
commit
69d0187a21
26 files changed
+889
-70
No files matched your search
@@ -51,6 +51,8 @@ The menu pauses gameplay/audio and provides diagnostics, camera/cutscene control
|
||||
energy/jetpack/task changes, level/start selection, reset and Force Control toggle.
|
||||
F2 toggles compact live diagnostics without pausing; --debug-overlay enables it
|
||||
at startup. F1's Live Overlay toggle controls the same session preference.
|
||||
Level changes retain the window, fullscreen and size. HUD/debug UI scales uniformly
|
||||
on widescreen; --width 1920 --height 1080 sets initial window/offscreen dimensions.
|
||||
C pauses into inspection and resumes the chase camera. F11 fullscreen, Escape quit.
|
||||
Inspection: arrows/WASD orbit, +/- zoom, 1 idle, 2 run, 3 jump, 4 scratch preview.
|
||||
Append --inspect to start directly in the old scene inspector.
|
||||
|
||||
Executable
+63
@@ -0,0 +1,63 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build first with dotnet build, then run this local Linux fullscreen/scene check.
|
||||
# Requires the installed Xfwm window manager; never downloads dependencies.
|
||||
set -euo pipefail
|
||||
source "$(dirname "$0")/env.sh"
|
||||
|
||||
for task_tool in xfwm4 xprop dbus-run-session xvfb-run dotnet; do
|
||||
if ! command -v "$task_tool" >/dev/null 2>&1; then
|
||||
printf 'Missing window-test dependency: %s\n' "$task_tool" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
umask 077
|
||||
mkdir -p artifacts/window-test-environment
|
||||
NEUTRON_WINDOW_TEST_DIR="$(mktemp -d "$NEUTRON_ROOT/artifacts/window-test-environment/run.XXXXXX")"
|
||||
export NEUTRON_WINDOW_TEST_DIR
|
||||
export XDG_CONFIG_HOME="$NEUTRON_WINDOW_TEST_DIR/config"
|
||||
export XDG_CACHE_HOME="$NEUTRON_WINDOW_TEST_DIR/cache"
|
||||
export XDG_DATA_HOME="$NEUTRON_WINDOW_TEST_DIR/data"
|
||||
export XDG_STATE_HOME="$NEUTRON_WINDOW_TEST_DIR/state"
|
||||
export XDG_RUNTIME_DIR="$NEUTRON_WINDOW_TEST_DIR/runtime"
|
||||
mkdir -p "$XDG_CONFIG_HOME" "$XDG_CACHE_HOME" "$XDG_DATA_HOME" "$XDG_STATE_HOME" "$XDG_RUNTIME_DIR"
|
||||
export NO_AT_BRIDGE=1 GIO_USE_VFS=local
|
||||
export GDK_BACKEND=x11 SDL_VIDEODRIVER=x11
|
||||
unset SESSION_MANAGER
|
||||
export SDL_AUDIODRIVER="${SDL_AUDIODRIVER:-dummy}"
|
||||
|
||||
# A bare Xvfb server cannot honor asynchronous EWMH fullscreen requests. Give
|
||||
# this private display its own window manager and session bus. XDG paths keep
|
||||
# all generated preferences/cache under artifacts without changing HOME.
|
||||
exec xvfb-run -a -s '-screen 0 3440x1440x24' dbus-run-session -- bash -s -- "$@" <<'WINDOW_TEST'
|
||||
set -euo pipefail
|
||||
task_wm_log="$NEUTRON_WINDOW_TEST_DIR/xfwm4.log"
|
||||
xfwm4 --compositor=off > "$task_wm_log" 2>&1 &
|
||||
task_wm_pid=$!
|
||||
cleanup() {
|
||||
kill "$task_wm_pid" 2>/dev/null || true
|
||||
wait "$task_wm_pid" 2>/dev/null || true
|
||||
}
|
||||
trap cleanup EXIT
|
||||
trap 'exit 130' INT
|
||||
trap 'exit 143' TERM
|
||||
|
||||
task_wm_ready=false
|
||||
for ((task_try = 0; task_try < 50; task_try++)); do
|
||||
if ! kill -0 "$task_wm_pid" 2>/dev/null; then
|
||||
printf 'Window manager exited; see %s\n' "$task_wm_log" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ "$(xprop -root _NET_SUPPORTING_WM_CHECK 2>/dev/null)" == *"window id"* ]]; then
|
||||
task_wm_ready=true
|
||||
break
|
||||
fi
|
||||
sleep 0.1
|
||||
done
|
||||
if [[ "$task_wm_ready" != true ]]; then
|
||||
printf 'Window manager did not become ready; see %s\n' "$task_wm_log" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dotnet run --no-build -- --smoke-window-transitions "$@"
|
||||
WINDOW_TEST
|
||||
@@ -13,6 +13,7 @@ dotnet run --project tests/GamePort.InteractionTests -- ../Original
|
||||
dotnet run --project tests/GamePort.CheckpointTests -- ../Original
|
||||
dotnet run --project tests/GamePort.DebugMenuTests -- ../Original
|
||||
dotnet run --project tests/GamePort.DebugOverlayTests
|
||||
dotnet run --project tests/GamePort.UiViewportTests
|
||||
dotnet run --project tests/GamePort.DebugDiagnosticsTests
|
||||
SDL_AUDIODRIVER=dummy dotnet run --project tests/GamePort.AudioPauseTests
|
||||
dotnet run --project tests/GamePort.LabRouteTests -- ../Original
|
||||
@@ -56,6 +57,7 @@ SDL_AUDIODRIVER=dummy dotnet run --no-build -- --scene-audio-smoke artifacts/ext
|
||||
SDL_AUDIODRIVER=dummy dotnet run --no-build -- --cutscene-audio-smoke artifacts/extracted/level1b/entities/entities.json
|
||||
python3 tools/recon/inventory.py ../Original --verify docs/original-manifest.json
|
||||
if [[ "${NEUTRON_WINDOW_TEST:-0}" == 1 ]]; then
|
||||
dotnet run --no-build -- --smoke-window-transitions
|
||||
dotnet run --no-build -- --smoke-debug-overlay --screenshot artifacts/test-live-debug-window.ppm
|
||||
dotnet run --no-build -- --smoke-debug-menu --screenshot artifacts/test-debug-window.ppm
|
||||
dotnet run --no-build -- --smoke-objective-window --screenshot artifacts/test-objective-window.ppm
|
||||
|
||||
Reference in new issue
Block a user