Pre-Flight — WP-081 — 2026-11-21
Filled-in copy of docs/reference/pre-flight for WP-081. Verdict at the bottom.
Nothing on main, in the fork or in an open PR touches
ROOM_P24_Wizards_BedroomorROOM_P28_Veranda(checked 2026-11-21: noWP-081packet, nowp-081branch local or onoriginbefore the claim; WP-079 / WP-080 are Showdown’s closeout and suspect-board fix, unrelated; the fork’sscooby-engineis at6e5ff59ceawith WP-078 / PR #4 merged).
Header
- WP:
WP-081 - Title: Phantom’s wizard’s bedroom and veranda — the third group-8 (Upstairs) packet (Gen 1)
- Pre-flight date:
2026-11-21 - Targets generation(s): 1
- Targets disc(s): Phantom (Showdown has neither room)
Pre-flight intent
Validating readiness for
WP-081. Not implementing, not editing engine code, not annotating Ghidra. Verdict only.
Dependency check
The third sub-bullet of the Phantom audit’s group 8, Upstairs pairs the wizard’s bedroom (the wizard’s lair: where he is met, and where the gang accuses him on the return from the Wizard’s Rule Room) with the veranda (the well and its line over Big Head). Neither depends on a sibling Upstairs room’s code; the WFR they border is the fourth sub-bullet, split off to WP-083.
| Prereq | Status in WORK_INDEX |
Locked on | Notes |
|---|---|---|---|
| WP-018 | ✅ Done | 2026-11-14 | Hotspots and exits: the veranda’s well hotspot. |
| WP-021 | ✅ Done | 2026-11-14 | Clickables: the bedroom’s wizard answers a click. |
| WP-023 | ✅ Done | 2026-11-14 | The inventory: OBJ_INV_MAZE_MAP (the scroll). |
| WP-031 | ✅ Done | 2026-11-14 | The accusation: ROOM_Suspect_Chooser, Global.Thank_You_, Big Head — the bedroom’s endgame and the veranda’s Big Head visit. |
| WP-057 | ✅ Done | 2026-11-16 | Phantom’s new game and first room — the fixed-flag block these rooms read. |
Rule check: every prereq is ✅ Done. Phase ordering holds — this is a Phase 4 (game-logic) room port on top of the resource and front-end lanes already closed.
Repo + disc state
- Docs repo clean; the execution worktree (
C:\claude-worktrees\scooby-engine\wp-077-upstairs-318968, branchclaude/wp-081-wizards-bedroom-veranda) is cut from a freshorigin/main. - Fork base checkout (
C:\dev\scummvm) onscooby-engine;origin/scooby-enginefetched to6e5ff59cea(WP-078 / PR #4 merged). - Dedicated fork worktree — the claim.
tools/New-ForkWorktree.ps1 -Branch wp-081-wizards-bedroom-veranda, forked fromorigin/scooby-engine @ 6e5ff59cea→C:\claude-worktrees\scummvm-wp-081-wizards-bedroom-veranda-wfr. The branch name is the claim. - Phantom. Re-decompiled
Scooby.exe(md5c5fdb9a0c8f26dfec98f0148ecf505fa, imagebase0x400000) from the throwaway scratchpad Ghidra project (not the committedghidra/scooby.gpr, which holds Showdown — the WP-076 lesson). The two classes areROOM_P24_Wizards_Bedroom(0x42CCF0, vtable0x45F444) andROOM_P28_Veranda(0x4183B0, vtable0x45ECDC). The vtable diff against the base room vtable (0x45E5FC) confirms the audit’s override set (bedroom: tick/reset/enter/claim; veranda: reset/event/save/load and arrive at slot +0x2C).
Scope lock
Allowed paths (this repo):
docs/formats/scooby-exe.md (the wizard's bedroom and veranda)
docs/work-packets/WP-081-wizards-bedroom-veranda.md
docs/work-packets/WORK_INDEX.md
docs/reference/pre-flight-WP-081-2026-11-21.md
Fork: engines/scooby/**, staged by name. New wizards_bedroom_rooms.{h,cpp} and wizards_bedroom_check.cpp; a factory line and include in room_class.cpp, the two module.mk entries, and the check’s declaration (scooby.h) and call (chase_check.cpp). No edit to a sibling room expected. Both rooms already have their room_setup entry — no room_setup edit.
Forbidden: game data from the discs (copyright); engines/scooby/** beyond the files above; ScummVM upstream paths outside engines/scooby/; ROOM_P30_WFR (WP-083).
Risk review
| Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|
| Ghidra’s underscored labels mask the dotted clip names (the WP-074/075 trap). | med | medium | Probe the voice lines by prefix (Sound::hasClipPrefix). The bedroom’s Wizards_Bedroom.Scroll and Global.Thank_You_; the veranda’s Veranda.270D_ / 290_ / 290B_ / 290X1_ / 290X2_. |
strcmp polarity (the WP-077 trap): the veranda’s arrive guards on the room left with 0x433460, not 0x433360. |
med | high | Decompile both helpers: 0x433360 returns true on equal, 0x433460 on not equal. The veranda plays its intro when from != "ROOM_Big_Head". |
The wizard flow (met, clue, GIVES, the armed accusation) spans enter and tick. |
low | medium | Reproduce against the dining-room / arena idiom already in the fork (meetSuspect, giveClue, act("GIVES"), the ROOM_Suspect_Chooser / Global.Thank_You_ exit). |
The maze-map scroll’s visibility (FUN_00432120 on the placement’s +0x14). |
low | low | +0x14 is the sprite’s hidden flag (room.cpp); the scroll shows only while the wizard’s clue is given and the map isn’t held, when Wizards_Bedroom.Scroll plays; otherwise hidden. |
| Generation / disc conflation. | low | medium | Every claim is Gen 1 Phantom; Showdown has neither room and the check asserts it prints so. |
Verdict
- READY TO EXECUTE — dependency, scope and risk gates all pass.
- NOT READY
Prepared by: Claude (WP-081 session, drafting + execution in one) Date: 2026-11-21
After execution — lessons learned
- The scope split was the packet’s main decision. The last group-8 room,
ROOM_P30_WFR, turned out to be the Wizard’s Rule Room — a 1022-line floating-point spinner/potion minigame, the game’s largest class and its own audit sub-bullet. It was split to WP-083 rather than crammed into this packet, which keeps the fork PR and the trace of the two tractable rooms reviewable. - The strcmp polarity (the WP-077 trap) was pinned empirically. The veranda’s
arriveguards the room left with0x433460, not0x433360; decompiling both showed0x433360true on equal and0x433460true on not equal, so the veranda plays its intro whenfrom != "ROOM_Big_Head". Never read a string-compare’s polarity from the branch alone. - One session traced; verification was against the fork’s own siblings. Rather
than a second-session trace, each engine call was mapped against code already in
the fork and tested — the dining room’s accusation (
meetSuspect, the clue at game vtable+0x44,act("GIVES"), theROOM_Suspect_Chooser/Global.Thank_You_exit), the post office’sarrive→setOpening, and the below-balcony door’s save/load — and the ambiguous helpers (0x432120the sprite’s hidden byte,0x40a930/0x40a870the suspect queries) decompiled directly. Engine == reference passed line for line. - The check’s one correction (the WP-074 anim-vs-clip trap again).
Global.Thank_You_is a scene (the accusation the dining room and arenas also use), not a sound clip, so ahasClipPrefixprobe read “0” of a name that is right. It is named, not probed — the live log confirms it starts as a scene and leaves toROOM_Suspect_Chooser. - The from-WFR arming path waits on WP-083. The wizard’s clue, his GIVES pose
and the armed accusation only fire on the return from
ROOM_P30_WFR, which is not yet ported; the self-test verifies the wiring, and the identicalGlobal.Thank_You_→ROOM_Suspect_Chooseridiom is exercised live by the dining room (WP-063) and the arenas (WP-069). - The Ghidra “warm project holds Showdown” hazard (WP-076) held again: Phantom was re-decompiled from the throwaway scratchpad project, read-only; the committed project was left untouched.