#!/usr/bin/env bash # #98 PIXEL PROOF: does a leaking condenser's cooling-loop button visibly FLASH? # # The log proves the lamp RESOLVES and SetAlertState(True) is called. It does # not prove a pilot sees anything. A flash is a lamp alternating between two # appearances, so it shows up as TEMPORAL VARIANCE in that button's pixels -- # and nowhere else on a static cockpit. # # Two legs, identical except for the damage: # leak -- condenser 6 leaking (dz_rarm) # ctl -- no self-damage at all # Frames are captured from the cockpit view (the player's actual view) and # compared by per-pixel variance across frames in leaklamp_pixel.py. # # PASS = a variance hotspot in the coolant panel on the leak leg that is absent # on the control leg. set -x . /c/git/bt411/scratchpad/night6/bench_common.sh cd /c/git/bt411/content || exit 1 taskkill //F //IM btl4.exe > /dev/null 2>&1 sleep 2 sed "s/^map=.*/map=grass/; s/^time=.*/time=day/" MP.EGG > LEAK.EGG LEG="${1:-leak}" rm -f lamp_${LEG}_*.png "leakpix_${LEG}.log" # (bt_launch is a shell FUNCTION -- export into the environment, do not `env`.) if [ "$LEG" = "leak" ]; then export BT_SELF_DAMAGE=4 BT_SELF_DAMAGE_ZONE=dz_rarm else unset BT_SELF_DAMAGE BT_SELF_DAMAGE_ZONE fi # Stand still and do nothing but leak: no autofire, no enemy, no motion, so the # ONLY thing changing in the cockpit is the lamp we are testing. export BT_LAMP_LOG=1 export BT_SHOT_EVERY=12 BT_SHOT_PREFIX=lamp_${LEG} bt_launch "leakpix_${LEG}.log" LEAK.EGG 0x03 sleep 100 taskkill //F //IM btl4.exe > /dev/null 2>&1 sleep 2 echo "=== lamp resolution ===" grep -E "^\[galarm\] condition 2" "leakpix_${LEG}.log" | sort -u echo "=== frames ===" ls lamp_${LEG}_*.png 2>/dev/null | wc -l