#!/usr/bin/env bash # Converts every raw frame dump written by the debug dump hotkey (press # K in-game - see root README.md's "Debugging" section) into a viewable # PNG under dumps-png/, using dump2png (only present in a `make dist_debug` # build, alongside this script). set -euo pipefail cd "$(dirname "${BASH_SOURCE[0]}")" if [ ! -x ./dump2png ]; then echo "dump2png not found next to this script - this needs a debug build" >&2 echo "(see root README.md's \"Debugging\" section: make dist_debug)" >&2 exit 1 fi if [ ! -d dumps ]; then echo "No dumps/ directory here yet - press K in-game first to write some frame dumps" >&2 exit 1 fi ./dump2png res/data dumps dumps-png