Pre-Flight — WP-055 — 2026-11-16
Filled-in copy of docs/reference/pre-flight for WP-055. Verdict at the bottom.
Nothing on main, in the fork or in an open PR touched ROOM_P32_Pie_Noon.
Header
- WP:
WP-055 - Title: Showdown’s Pie Noon: pies until the clock chimes, a snack a ghost hit (Gen 1)
- Pre-flight date:
2026-11-16 - Targets generation(s): 1
- Targets disc(s): Showdown
Pre-flight intent
Validating readiness for
WP-055. Verdict only.
Dependency check
| Prereq | Status in WORK_INDEX |
Locked on | Notes |
|---|---|---|---|
| WP-054 | ✅ Done | 2026-11-16 | The tree walk with sprite updates. |
| WP-051 | ✅ Done | 2026-11-15 | The saloon, where Pie Noon is built and where it returns. |
| WP-021 | ✅ Done | 2026-11-14 | Sprites, their players and hit tests. |
| WP-019 | ✅ Done | 2026-11-14 | Sound. |
Repo + disc state
- Project worktree on new branch
claude/wp-055frommain(WP-054 merged), clean. - Fork on
scooby-engineatda9ad7b744, clean, in sync. - Showdown only.
Scope lock
Allowed paths (this repo):
docs/formats/scooby-exe.md (Pie Noon; the tree's sweep; the corral's horseshoes corrected)
docs/work-packets/WP-055-pie-noon.md
docs/work-packets/WP-054-horseshoe-corral.md (a correction note)
docs/work-packets/WORK_INDEX.md
docs/reference/pre-flight-WP-055-2026-11-16.md
docs/02-SCUMMVM-INTEGRATION.md (a handle per sound effect)
Fork: engines/scooby/**, staged by name. New files pienoon_rooms.{h,cpp}; the check in chase_check.cpp. In the shared files:
- a factory line and the module entry;
- in
room.{h,cpp}: the tree walk as a linked list, the sweep after it, deleting a sprite, a point and frame-rect hit test, a step’s cel width, and a step past a sequence’s last. - in
sound.{h,cpp}: a handle per sound effect, found during the work (the chime and the tock play in the same tick).
Risk review
| Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|
| The audit counted only the room’s own functions (602 instructions); the game lives in four sprite classes. | — | high | Traced in full: Scooby, the ghost, the runners and the pies. |
| Floats. Pies fly by the stage’s edges and are hit by pixel; one rounding off moves a hit. | — | high | Floats stored as the x87 code stores them, sums and products in between as doubles. The reference simulates the same way, with the cels decoded from the art for the hit tests. |
| Most of the game is random (the gang’s lanes and sides, the ghost’s choices). | — | medium | The check drives runners, pies and the ghost’s states through the class, during the 216-tick intro when the gang can’t run on and the ghost can’t throw. It checks the random parts by their rules. |
The sweep after the walk (0x431190) deletes sprites marked done; the fork had kept them (the corral’s horseshoes). |
— | medium | The sweep now runs in rooms with sprite updates; the corral’s check must stay identical. |
Verdict
- READY TO EXECUTE
- NOT READY
Prepared by: Claude (WP-001 session, continuing) Date: 2026-11-16
After execution — lessons learned
Lesson: read what the tree does after the walk. 0x431190 deletes every sprite marked done; “paused” was the wrong reading of +0x30 in WP-054.
Lesson: let the reference pick the test inputs. With the cels decoded from the art, the reference found the throws that really hit (the ghost from x 232 to 321, Fred only once he is in the pies’ span). The check then drives those, and the reference predicts every tick.
Lesson: check the sound model when a room waits for a sound. The chime ends the room, and the tock played in the same tick. The fork’s handle per file had never been tested against two effects at once.
Lesson: verify an argument’s order in the disassembly. Ghidra showed the splat counter’s increment before the format call; the old value was pushed first, and the disc’s Splat.0 to Splat.4 agree.
Scope note: one fork commit of 9 files staged by name. Beyond the room: the tree walk and its sweep, hit-test helpers and a step past the last in room.{h,cpp}, and a handle per sound effect in sound.{h,cpp}.