singe/testScripts/ports/shots.sh
2026-09-22 18:32:07 -05:00

22 lines
990 B
Bash
Executable file

#!/bin/bash
# Runs an original and its port through compare.sh with the drive's screenshots and service walk
# on, and gathers the pictures side by side under screenshots/ports/<game>/ in the repository:
# original-shot-<moment>.png beside port-shot-<moment>.png for the attract loop, the service
# screen, a level just after a shot, the continue, and the board (FORGE.md section 14.15).
#
# testScripts/ports/shots.sh <family> <game> [frames]
#
# The comparison's own verdict (the traces agreeing, service walk included) is printed as well.
set -u
family=${1:?usage: shots.sh <family> <game> [frames]}
game=${2:?usage: shots.sh <family> <game> [frames]}
frames=${3:-8000}
repo=$(cd "$(dirname "$0")/../.." && pwd)
name=${game##*/}
name=${name%.singe}
out=$repo/screenshots/ports/$name
rm -rf "$out"
SINGE_SHOTS=$out PORT_SHOTS=1 PORT_SERVICE=1 PORT_FRAMES=$frames "$repo/testScripts/ports/compare.sh" "$family" "$game"
status=$?
ls "$out" 2>/dev/null | sed "s|^|$out/|"
exit $status