# Orbits the test critter (assoc-table type 26, CR32PAGE.N00, tile
# (17,7) on the chargen-spawn level) through the 4 cardinal camera
# positions, screenshotting from each so the critter's displayed
# sprite/direction can be checked by eye across viewing angles. See
# ad18e2a (DAT_00086cc0 octant table fix) and the model-heading revert
# this file was built to re-verify.
#
# Run with:
#   UW_ENABLE_3D_GEOMETRY=1 UW_FAST_SLEEP=1 UW_DEBUG_CRITTER=1 \
#     UW_DATA_DIR="$(pwd)/data" UW_DEMO_FILE=demos/demo_critter_orbit_cardinal.txt \
#     ./build/uw_dbg
# then look at /tmp/critorbit_{N,E,S,W}.bmp. z=768 (confirmed the
# natural floor height for all 4 tiles, via UW_DEBUG_FLOORZ) and the
# 4 SETPLAYERPOS points were calibrated live against this specific
# level/critter: the room here isn't open in every direction close to
# the critter's own tile, so each shot stands in the CENTER of the
# adjacent tile (N/S/E/W of the critter's tile (17,7)) rather than at
# a fixed small radius from the critter itself -- smaller offsets
# clipped into nearby walls from several directions.
#
# What to expect (updated after two more fixes: the "missing else"
# revert in emit_tile_objects's direction resolver -- uw.c ~55457 -- and
# a ushort-vs-byte pointer-scaling bug in FUN_00033880's shared
# "orient toward last-seen-player" tail -- uw.c ~24624/24665 -- that was
# corrupting both this critter's rendered HEIGHT and its heading byte;
# see that fix's own commit for the disassembly evidence, 0x32578-0x3265c):
# E now gives the cleanest full view of the critter (stands square in the
# corridor facing the camera), matching this file's original expectation
# from before either bug. W still shows nothing -- confirmed via
# UW_DEBUG_CRITTER that it resolves to glyph_idx=40, this critter's
# CR32PAGE.N00 page's own 0xff "missing frame" sentinel, a pre-existing,
# already-documented data gap (see ad18e2a's commit message: "3 of 8
# octants missing real per-direction glyph data" for this specific
# asset), not a rendering regression. N shows open corridor with the
# critter out of frame/occluded (unchanged). S is genuinely wall-blocked
# at the tile-center standpoint (real geometry between (17,8) and the
# critter's tile, not a bad camera spot -- TELEPORT 17 8 with its own
# default facing does glimpse the critter, looking due north from
# tile-center does not). If W (or any angle) comes back blank in a
# future check, look at the UW_DEBUG_CRITTER trace's glyph_idx/0xff
# status before assuming a regression.
#
# Also noted while building this: the UW_DEBUG_CRITTER
# "[critter] emit_tile_objects: ... cam_yaw=" trace value looked stuck
# across multiple SETPLAYERPOS calls in a row even though the
# resulting screenshots and the trace's own quadrant/dir(uVar29)
# fields DID visibly change -- likely an artifact of teleporting the
# camera programmatically rather than a real gameplay bug (real
# turning is gradual, this is instant), but flagged here in case a
# future session wants to dig into DAT_00086e6c+0x2c's update timing.

ENTER
ENTER
ENTER
ENTER
ENTER
ENTER
ENTER
ENTER
ENTER
ENTER
ENTER
ENTER
ENTER
ENTER
ENTER
ENTER
ENTER
ENTER
TYPE Avatar
ENTER
ENTER
ENTER
ENTER
ENTER
SETPLAYERPOS 17.500 6.500 768 180 0
WAIT 5
REVEAL
WAIT 3
REVEAL
WAIT 3
SCREENSHOT /tmp/critorbit_N.bmp
SETPLAYERPOS 18.500 7.500 768 270 0
WAIT 5
REVEAL
WAIT 3
REVEAL
WAIT 3
SCREENSHOT /tmp/critorbit_E.bmp
SETPLAYERPOS 17.500 8.500 768 0 0
WAIT 5
REVEAL
WAIT 3
REVEAL
WAIT 3
SCREENSHOT /tmp/critorbit_S.bmp
SETPLAYERPOS 16.500 7.500 768 90 0
WAIT 5
REVEAL
WAIT 3
REVEAL
WAIT 3
SCREENSHOT /tmp/critorbit_W.bmp
