This repository has been archived on 2026-09-16. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Syplheed-Reborn/docs/re/data/kf-angle-census.txt
Sylpheed RE agent 67fa1a1b0b re(ui): decode keyframe +12 as screen-plane rotation in degrees
The rotated quads on the title screen come from the keyframe block after
all. The earlier negative -- "every GP_TITLE build 4 element has all three
angle words at zero" -- read the right bytes over too small a region: it
walked the top-level declaration table, and the rotated elements are the
nested leaf records ptloop01.rat / ptloop02.rat.

Confirmed against the framebuffer rather than against our own renderer.
The two records declare +12 = 30 and -45; the GPU capture submits their
quads at +30.26 and -45.28 degrees -- magnitude and sign, two different
values. Corroborated by shape in GP_BUNK 117ca14f, where +12 ramps
0 -> 360 with position, scale and alpha constant: a spin in place.

Identifying which draw it was needed edge lengths, not bounding boxes:
400x1076 and 400x1444 against pteff03/pteff03a 399x180 at the elements'
two different declared scales, 600% (1080) and 800% (1440). The same test
names three known-positives in the capture (ptlogo1, ptcopyright,
ptbtn00), so it passes its own control.

Keyframe gains rotation_deg plus unknown_4/unknown_8, carried rather than
dropped. NOT rendered -- ui_layout::blit is axis-aligned only, so the
reference renderer and the port will both draw these upright until a
rotating blit exists.

The census tool ships with the trap that broke its first version: nested
RATC blobs are not 4-byte aligned, so an aligned scan found 0/3 of its
own control blocks and missed 16 341 blocks. Disc-wide +12 is non-zero in
14.50 % of 83 862 blocks.

sylpheed-formats tests, SYLPHEED_DISC set: 131 passed, 0 failed across the
6 suites finished at commit time; the run had not yet completed.
2026-08-28 22:42:00 +00:00

52 lines
1.6 KiB
Plaintext

# tools/re-capture/kf_rotation_census.py over dat/GP_*.pak — 2026-08-28
# CONTROL must read 3/3; see the tool docstring for why.
CONTROL ptloop01: 3/3 blocks found, +12 = {30} (want 30)
CONTROL ptloop02: 3/3 blocks found, +12 = {-45} (want -45)
blocks scanned disc-wide: 83862
+4: non-zero in 3990 ( 4.76 %)
+8: non-zero in 3878 ( 4.62 %)
+12: non-zero in 12164 (14.50 %)
value histogram (non-zero), top 25:
+4 = 180 x3880
+8 = 180 x3102
+12 = 90 x1824
+12 = -90 x1176
+12 = 360 x1173
+12 = 120 x492
+12 = 180 x474
+12 = -58 x402
+12 = 53 x396
+12 = -125 x378
+12 = -120 x366
+12 = -66 x294
+12 = 114 x240
+8 = 90 x201
+12 = 129 x200
+12 = -43 x199
+12 = 115 x186
+12 = -360 x180
+8 = -180 x156
+12 = 58 x156
+8 = 178 x144
+12 = -33 x138
+12 = 124 x138
+12 = -133 x126
+12 = 130 x126
examples:
+12 ('GP_BUNK', '117ca14f', '0x73961b', 360)
+12 ('GP_BUNK', '117ca14f', '0x7398ac', 360)
+12 ('GP_BUNK', '117ca14f', '0x739a93', 360)
+12 ('GP_BUNK', '117ca14f', '0x739d24', 360)
+4 ('GP_BUNK', '117ca14f', '0x73ae5d', -180)
+4 ('GP_BUNK', '117ca14f', '0x73ae85', -180)
+4 ('GP_BUNK', '1ff0bcb0', '0x733d68', -180)
+4 ('GP_BUNK', '1ff0bcb0', '0x733d90', -180)
+8 ('GP_DEBRIEFING_PILOTLOG', '18ab1d66', '0x6f8', 90)
+8 ('GP_DEBRIEFING_PILOTLOG', '18ab1d66', '0x770', 90)
+8 ('GP_DEBRIEFING_PILOTLOG', '1c8a0129', '0x6f8', 90)
+8 ('GP_DEBRIEFING_PILOTLOG', '1c8a0129', '0x770', 90)