Pre-Flight — WP-083 — 2026-11-22
Filled-in copy of docs/reference/pre-flight for WP-083. Verdict at the bottom.
Nothing on main, in the fork or in an open PR touches
ROOM_P30_WFR(checked 2026-11-22: noWP-083packet, nowp-083branch local or onoriginbefore the claim;WP-082is the unrelated upstream-submission-prep packet, now on main; the fork’sscooby-enginecarries the WFR as the base class). The fork work chains off WP-081’s branch (wp-081-wizards-bedroom-veranda@ce1846a567, PR #6, open), whose registration files (room_class.cpp,module.mk,scooby.h,chase_check.cpp) this WP also edits.
Header
- WP:
WP-083 - Title: Phantom’s Wizard’s Rule Room — the fourth and last group-8 (Upstairs) packet (Gen 1)
- Pre-flight date:
2026-11-22 - Targets generation(s): 1
- Targets disc(s): Phantom (Showdown has no such room)
Pre-flight intent
Validating readiness for
WP-083. Not implementing, not editing engine code, not annotating Ghidra. Verdict only.
Dependency check
The fourth sub-bullet of the Phantom audit’s group 8, Upstairs is the Wizard’s Rule Room — the wizard’s Simon-says potion game, the game’s largest class. It returns the gang to the wizard’s bedroom (WP-081), where the wizard’s clue is given.
| Prereq | Status in WORK_INDEX |
Locked on | Notes |
|---|---|---|---|
| WP-018 | ✅ Done | 2026-11-14 | Hotspots and exits. |
| WP-021 | ✅ Done | 2026-11-14 | Clickables: the coloured ingredients answer a click. |
| WP-031 | ✅ Done | 2026-11-14 | The accusation and clues — the wizard’s clue the return gives. |
| WP-057 | ✅ Done | 2026-11-16 | Phantom’s new game and first room — the fixed-flag block. |
| WP-081 | ✅ Done | 2026-11-21 | The wizard’s bedroom — reads the return from == ROOM_P30_WFR and gives the clue. |
Rule check: every prereq is ✅ Done. Phase ordering holds — a Phase 4 (game-logic) room port on top of the closed resource and front-end lanes.
Repo + disc state
- Docs repo: the execution worktree (
C:\claude-worktrees\scooby-engine\wp-077-upstairs-318968, branchclaude/wp-083-wfr) cut from the WP-081 docs tip (so itsWORK_INDEXcarries WP-081’s additions), with the WFR renumbered WP-082 → WP-083 where WP-081 forward-referenced it. - Fork base checkout (
C:\dev\scummvm) onscooby-engine;originfetched. - Dedicated fork worktree — the claim.
tools/New-ForkWorktree.ps1 -Branch wp-083-wfr -Base wp-081-wizards-bedroom-veranda→C:\claude-worktrees\scummvm-wp-083-wfr, forked fromorigin/wp-081-wizards-bedroom-veranda @ ce1846a567. The branch name is the claim. - Phantom. Decompiled
Scooby.exe(md5c5fdb9a0c8f26dfec98f0148ecf505fa, imagebase0x400000) from the throwaway scratchpad Ghidra project (not the committedghidra/scooby.gpr, which holds Showdown — the WP-076 lesson).ROOM_P30_WFRis0x41BEA0, vtable0x45EE7C; the vtable diff against the base room vtable (0x45E5FC) confirms the override set (destructor, tick, enter, reset, claim, the +0x24 leave builder). The WFR animated sub-class is0x41BAC0, vtable0x45EE54; the position table is0x46C5B0.
Scope lock
Allowed paths (this repo):
docs/formats/scooby-exe.md (the Wizard's Rule Room)
docs/work-packets/WP-083-wfr.md
docs/work-packets/WORK_INDEX.md
docs/reference/pre-flight-WP-083-2026-11-22.md
Fork: engines/scooby/**, staged by name. New wfr_rooms.{h,cpp} and
wfr_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. The room already
has its 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/.
Risk review
| Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|
The spinner runs off a scene’s fractional playback position (0x4358D0), which the fork’s scene player does not expose. |
high | medium | Drive the spinner on a tick counter over the same position table (0x46C5B0), the way Maria’s game (WP-064) drives its physics on a tick counter. Reconstruction, not a bit-for-bit copy; the contract (classes, clips, claims, music, exit) is what the self-test checks, the feel is for live play. |
| 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 colours, WFR.Potion_, Wizards_Rule.Correct/Incorrect[/2/3], Knights.Glass_Breaks.1, Wizards_Rule.Music. |
| The player-input coupling is in the sub-sprite’s own click handlers, not a room event override (no +0x14 override). | med | medium | Port the input as a room click(sprite) override on the coloured ingredients (the Maria idiom), reconstructed to the trace’s observable run; flagged for live confirmation. |
| The clue handoff. | low | low | The WFR does not give the clue; the bedroom gives it on the return from == ROOM_P30_WFR (WP-081, already shipped). The WFR only returns to the bedroom. |
| Generation / disc conflation. | low | medium | Every claim is Gen 1 Phantom; Showdown has no WFR and the check asserts it prints so. |
Verdict
- READY TO EXECUTE — dependency, scope and risk gates all pass.
- NOT READY
Prepared by: Claude (WP-083 session, drafting + execution in one) Date: 2026-11-22
After execution — lessons learned
- The live draw caught what the self-test could not. The first wiring
scanned object names for the six colours and the self-test passed — but it
calls
claimPlacement("OBJ_WFR_BOTTLES")with a hardcoded name, so it never exercises the real placements. Thestart_room=ROOM_P30_WFRrun showed0 bottles: the six bottles are oneOBJ_WFR_BOTTLESplacement each, told apart by the colour in their ANIM (getAnim), not the object name; only Scooby and the wizard are the animated sub-class, and the counter isOBJ_WFR_COUNTER, notCOUNTERNUMBERS. Always do the live draw — a green self-test on hardcoded names is not proof the room wires up. - The spinner’s scene-position clock was the main porting judgment. The
original advances the spinner off a lip-sync scene’s fractional playback
position (
0x4358D0), which the fork’s scene player does not expose. Driven on a tick counter over the same position table (0x46C5B0) — the Maria-game idiom (WP-064). Reconstruction, not a bit-for-bit copy; the contract is what the self-test checks, the feel is for live play. - Every clip name from the trace resolved first try. The inlined dotted
names (
Wizards_Rule.Music, the six colours,WFR.Potion_%i,Wizards_Rule.Correct%i_1_NARRATOR,.Incorrect[/2/3]_1_NARRATOR,Knights.Glass_Breaks.1) all probed 1 by prefix — the trace’s strings were right, the WP-074 anim-vs-clip trap did not bite here. - The number collision — WP-082 was taken. The WFR split off from WP-081 as “WP-082”, but another session had meanwhile claimed WP-082 for the upstream-submission-prep brief (now on main). The claim check caught it before any work; the WFR took WP-083, and WP-081’s forward references were renumbered on both open PRs (#139 docs, #6 fork). Always recheck main/branches/PRs at claim time — the number you reserved a session ago may be gone.
- The Ghidra “warm project holds Showdown” hazard (WP-076) held again: Phantom was re-used from the throwaway scratchpad project, read-only; the committed project was left untouched.