#!/usr/bin/env bash
# Plan 11: the screens between plays of recorder v5's recordings against our
# ports, pass for pass (game/test/sim/screen_check.gd). Default: MW_REC_SCREENS.
# -j N: N recordings at once (the output as one at a time).
source "$(dirname "${BASH_SOURCE[0]}")/_common.sh"
source "$(dirname "${BASH_SOURCE[0]}")/_recordings.sh"
here="$(dirname "${BASH_SOURCE[0]}")"
names=(); opts=()
while (( $# )); do
  case "$1" in
    -j) export MW_JOBS="$2"; shift 2 ;;
    --only|--show|--detail) opts+=("$1" "$2"); shift 2 ;;
    --*) opts+=("$1"); shift ;;
    *) names+=("$1"); shift ;;
  esac
done
(( ${#names[@]} )) || names=("${MW_REC_SCREENS[@]}")
mw_each_recording res://test/sim/screen_check.gd "${names[@]}" -- "${opts[@]}"
