re: the transition between screens is a fade through black, and most of

its timing is on the disc

Q7. Every title-side screen carries a full-screen black .prm quad that
paints last, and its keyframe group IS the transition: black at T0, clear
by T1, clear until T2, then back to black on exit. Read with the corpus's
start-of-a-ramp rule and Q1's time unit that gives 0.87s for EXTRAS,
0.97s for the main menu, 4.08s for the title -- from the file, not from a
stopwatch.

The disc-wide check is per-pak all-or-nothing rather than the 41% the
headline count suggests, and GP_TITLE's 6 of 12 is the useful row: the
six builds carrying a fade quad are exactly the six SCREENS, and the six
without are exactly the six overlays. GP_DIALOG is 0 of 133. That is
independent corroboration of the overlay finding from two iterations ago.

One piece is NOT on the disc and says so: the fade-OUT length. The fourth
keyframe has no time slot, because a group's last block stops four bytes
short. Measured instead, at 30fps, ~0.4s and the same both directions.

And a warning I earned: the luminance rise after a transition is NOT the
quad's ramp. The incoming screen's own elements animate in after the quad
has cleared -- 1.47s observed against a declared 0.97s. Time the fade
from where the frame is pure black.

Rig: screenshot samples at 0.5 Hz and cannot see a 0.4s fade at all,
which is why an earlier burst called this an instant cut. ffmpeg x11grab
at 30fps instead; both go in METHOD.
This commit is contained in:
Sylpheed RE agent
2026-08-28 18:05:19 +00:00
parent 4e745c8177
commit 7fef19b3a0
8 changed files with 625 additions and 6 deletions

52
tools/re-capture/fade_quads.py Executable file
View File

@@ -0,0 +1,52 @@
#!/usr/bin/env python3
"""Dump every `.prm` primitive's keyframe group (alpha + time) for a UI build.
The screen-transition fade lives here -- see docs/re/screen-transitions.md.
Usage: PAK=<pak> fade_quads.py [build...] (default: GP_TITLE, builds 2 4 5 6)"""
import struct, sys, glob, os, zlib
sys.path.insert(0, "/work/Syplheed-Reborn/tools/re-capture")
src = open("/work/Syplheed-Reborn/tools/re-capture/regn_decode.py").read()
exec(src.split("# ── POF0")[0])
DECL_AT, DECL_ENTRY, KF = 0x20, 60, 40
def be32(b,o): return struct.unpack_from(">I", b, o)[0]
def parse(bundle):
n = be32(bundle, 0x14)
names=[]
for i in range(n):
o = DECL_AT + i*DECL_ENTRY
names.append(bundle[o:o+28].split(b"\0")[0].decode("ascii","replace"))
groups={}
pos = DECL_AT + n*DECL_ENTRY
for _ in range(n):
if pos+8 > len(bundle): break
idx = be32(bundle,pos); frames = be32(bundle,pos+4)
if idx>=n or frames==0 or frames>4096: break
first = pos+12; end = first + frames*KF - 4
g=[]
for k in range(frames):
blk = first + k*KF
if blk+36 > len(bundle) or blk+36 > end: break
g.append(dict(fade=be32(bundle,blk), sx=be32(bundle,blk+16), sy=be32(bundle,blk+20),
x=struct.unpack_from(">i",bundle,blk+28)[0], y=struct.unpack_from(">i",bundle,blk+32)[0],
t=(be32(bundle,blk+36) if blk+40<=end else None)))
groups[idx]=g; pos=end
return names, groups
pak = os.environ.get("PAK", "/work/sylph_extract/dat/GP_TITLE.pak")
E = pak_entries(pak)
E = [b for h,b in E]
# build index -> pak entry index, from `screen list`: 0..9 then 12, 15
BUILDS = {0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,10:12,11:15}
want = [int(a) for a in sys.argv[1:]] or [2,4,5,6]
for b in want:
names, groups = parse(E[BUILDS[b]])
print(f"=== build {b} ===")
for i,nm in enumerate(names):
if not nm.endswith(".prm"): continue
g = groups.get(i, [])
print(f" [{i}] {nm} {len(g)} kf")
for k in g:
a=(k['fade']>>24)&0xff
print(f" t={str(k['t']):>5} fade=0x{k['fade']:08x} (alpha {a:3d}) scale={k['sx']}x{k['sy']} pos=({k['x']},{k['y']})")