Pre-Flight — WP-016 — 2026-11-14

Filled-in copy of docs/reference/pre-flight for WP-016. Verdict at the bottom.

Written before engine code, on Jeff’s “continue” after PR #45 merged. Sprites were the next step named at WP-015’s close. Before the WP was written, the blitter at 0x439170 was read from WP-001’s decompile dump and its tables were dumped, because the WP’s exactness criterion depends on them.


Pre-flight intent

Validating readiness for WP-016. Verdict only.

Dependency check

Prereq Status in WORK_INDEX Locked on Notes
WP-015 ✅ Done 2026-11-14 (PR #45 merged) Cel decodes every cel with coverage.
WP-001 ✅ Done 2026-11-13 Sprite tree, placement kinds and blitters traced. The decompile dump is in the session scratchpad.
WP-008 ✅ Done 2026-06-03 object.ini layout: 215 sections in Showdown, ID= kinds.

Repo + disc state

Doc-vs-tree cross-check

Scope lock

Allowed paths (this repo):

docs/formats/tgifile-art.md       (§Cel format blend tables)
docs/02-SCUMMVM-INTEGRATION.md    (§5)
docs/work-packets/WP-016-room-sprites.md
docs/work-packets/WORK_INDEX.md
docs/reference/pre-flight-WP-016-2026-11-14.md

Fork: engines/scooby/** only, staged by file name (lesson from WP-015).

Forbidden: game data, decoded images or binary dumps in git. The blend tables are documented as formulas, and the engine computes them.

Risk review

Risk Likelihood Impact Mitigation
Two implementations share a misreading of the tree rules low med The rules are traced, and the probe’s renders were checked against WP-009 frames. The engine reimplements them from the doc, not from the probe’s code.
Painter’s order differs from the original’s occlusion order on translucent-over-translucent pixels low low Back-to-front blending matches the original’s back-to-front alpha pass. The 565 model fixes the expected values.
start_room config key leaks into upstream low low It’s a debug convenience. Before Phase 5, revisit it or move it into the console.

Verdict

Prepared by: Claude (WP-001 session, continuing), on Jeff’s “continue” of 2026-11-14 Date: 2026-11-14


After execution — lessons learned

Lesson: read the blitter before trusting a reference. The probe’s RGBA renders looked right, but the original rounds its 5- and 6-bit expansion where the probe floors. Exact matching needed the decompiled blend and the dumped tables. Model the target’s arithmetic, not a plausible one.

Lesson: a hash map’s values move. The first draft of RoomRenderer kept raw pointers to object blocks stored in a HashMap, and a rehash would leave them dangling. Shared pointers fixed it before the first build. Watch for this wherever blocks are cached.

Lesson: staging by name in the shared fork checkout worked. git status before staging showed only this WP’s seven files, and they were staged explicitly (WP-015 lesson).

Scope note: the lock held. One fork commit. The ISOs were dismounted afterwards, and the screenshots and probe renders stayed in the scratchpad.