Pre-Flight — WP-057 — 2026-11-16
Filled-in copy of docs/reference/pre-flight for WP-057. Verdict at the bottom.
Nothing on main, in the fork or in an open PR touched the drawbridge’s or the town’s class.
Header
- WP:
WP-057 - Title: Phantom’s drawbridge and town: four flags to the banners (Gen 1)
- Pre-flight date:
2026-11-16 - Targets generation(s): 1
- Targets disc(s): Phantom (Showdown has neither room)
Pre-flight intent
Validating readiness for
WP-057. Verdict only.
Dependency check
| Prereq | Status in WORK_INDEX |
Locked on | Notes |
|---|---|---|---|
| WP-056 | ✅ Done | 2026-11-16 | The check’s place, at the start of the chase check, on both titles. |
| WP-029 | ✅ Done | 2026-11-14 | Each room’s music and opening. |
| WP-026 | ✅ Done | 2026-11-14 | The profile, which keeps the puzzle. |
| WP-024 | ✅ Done | 2026-11-14 | The snack box, which flashes before a snack. |
| WP-021 | ✅ Done | 2026-11-14 | Clickables, which tell the room of the sign. |
Repo + disc state
- Project worktree on new branch
claude/wp-057frommain(the Phantom audit merged), clean. - Fork on
scooby-engineatc20eefa4ad, clean, in sync. - Phantom. Its
Scooby.exeis imported and analyzed in a scratch Ghidra project outside the repo.
Scope lock
Allowed paths (this repo):
docs/formats/scooby-exe.md (the drawbridge, the town, Phantom's new game, the matched functions)
docs/work-packets/WP-057-drawbridge.md
docs/work-packets/WORK_INDEX.md
docs/reference/pre-flight-WP-057-2026-11-16.md
Fork: engines/scooby/**, staged by name. New files drawbridge_rooms.{h,cpp} and the check in drawbridge_check.cpp. In the shared files:
- a factory line and the module entries;
- the check’s declaration and its call;
- in
room.{h,cpp}: an exit built after loading, andstartAnimat a given tick rate; - in
profile.cpp: Phantom’s new-game story values; - in
scooby.cpp: the sign-in check reads Phantom’s story values; - in
inventory.h: whether the snack box is flashing, for the check.
Risk review
| Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|
| Phantom’s helpers are at other addresses, and guessing them from shape would be wrong somewhere. | — | high | Every function matched to Showdown’s by its instruction sequence with addresses masked; the rest decompiled in Phantom. |
| The flags’ timing. Each move is a sequence whose end starts the next; one tick off moves the puzzle’s end. | — | medium | The reference reads each sequence’s steps from the art and predicts the tick of every move. |
| Random colours. The reset and the starting steps are random. | — | medium | The check sets the colours itself; random steps are checked by their range; the reset’s rules over 200 draws. |
| Phantom’s new game had no story values in the fork, so the town would never scream. | — | medium | 0x42E880 traced whole and ported; the sign-in check reads them. |
Verdict
- READY TO EXECUTE
- NOT READY
Prepared by: Claude (WP-001 session, continuing) Date: 2026-11-16
After execution — lessons learned
Lesson: match the titles’ functions before tracing the second one. A mnemonic-sequence hash with addresses masked mapped Phantom’s helpers to Showdown’s traced ones in one pass; the rest needed a decompile each.
Lesson: a room’s opening holds input on entry. The reference forgot it; the engine had it right. Any check that reads input on entry must say whether the opening is pending.
Lesson: trace what a room reads before porting it. The town reads Screaming, which a Phantom new game never set in the fork; 0x42E880 had to come first.
Scope note: one fork commit of 12 files staged by name: the two classes and their check in new files, an exit built after loading and a tick rate for startAnim in room.{h,cpp}, Phantom’s story values in profile.cpp, the sign-in check’s Phantom values in scooby.cpp, and a getter in inventory.h.