WP-100: Phantom’s Princess’s bedroom and mermaid’s cavern, played (Gen 1)
Status: ✅ Done (2026-11-28). Fork PR barefootbetters/scummvm#24 merged on 2026-11-28 (merge commit 1539a7b59c).
Phase: 5 (from the search of the packets for rooms checked only by name)
Depends on: WP-078 ✅ (the two rooms’ classes)
Companion EC: none (inline checklist under Exit criteria)
Pre-flight: pre-flight-WP-100-2026-11-28. Required: the packet modifies engines/terraglyph/**.
Targets generation(s): Gen 1, Phantom of the Knight only. Showdown has neither room.
Estimated effort: A few hours
Corrected 2026-11-28 (found in WP-112). The one fix recorded below, the cursor hidden while the take is armed, changed nothing. The engine hides the cursor whenever a room class is busy or hides it (
isBusy() || hidesCursor(),terraglyph.cpp), and the bedroom’sisBusyalready covered the take. So the fork already matched the original here; thehidesCursoroverride is a harmless duplicate. Both rooms had no gap.
Goal
Play the Princess’s bedroom (ROOM_P29_Princess_Bedroom, 0x415350) and
the mermaid’s cavern (ROOM_P21_Mermaids_Cavern, 0x415280) through the
engine’s mouse and tick, and live, against the decompile, and fix what differs.
Background
WP-078 ported both rooms. Its self-test checked the classes, the clips and the claims by name. Its live run started in each room and saw it draw. It said the spell book’s take and the mermaid’s scare “run on a click, ported from the reconciled trace”. The spell book taken here opens the wizard’s library. This pair was second on the list from Jeff’s search of the packets, after below the balcony (WP-099).
Scope
In scope: fork princess_rooms.{h,cpp} and princess_check.cpp; this
packet, its pre-flight, a WP-100 note in
scooby-exe, a pointer in WP-078, and the index row.
Out of scope: Daphne’s vtable +0x10 call just after her take starts,
which isn’t traced, and the ghost flag the original’s hotspot carries
(0x408DC0 with 1). The fork’s ghost chance is per room, not per clickable,
in every room.
Exit criteria
- Self-test. The new lines match text written from the decompile before the run. One expectation was corrected before the rerun (see §Result). The rest matches the WP-099 self-test except for the per-run random keys. No new warnings.
- Live (session). After the opening, a click on the spell book has Daphne take it, and it goes in the toolbar.
- Process. The fork PR against
scooby-engineis open (merged later the same day), and each claim carries its evidence label.
Result
Every claim is Gen 1, Phantom. Evidence labels: source (the decompile), self-test, log (the engine’s debug log of a live run), live — session (a scripted run this session drove). Nothing here is live — Jeff.
Source. Scooby.exe (SHA-256 619EA687…AF807ED), Ghidra 12.1.4 headless:
both classes and their vtables. The two rooms match the fork except for one
thing: the bedroom’s tick (0x4153B0) hides the cursor every tick the take
is armed. The fork held input but showed the cursor. The take’s guard, its
order, the book’s hiding, the toolbar, 280A_, the leave, the claims, the
hotspot and the cavern’s scare all match.
This is the first room from the search whose play turned up no game-breaking bug.
The port (source). On wp-100-princess-bedroom (424daa8a36): the
cursor hidden while the take is armed, and a comment naming what isn’t traced.
Self-test (self-test). The text was written from the decompile before the run (kept locally). Each line clicks through the engine’s mouse.
- The take:
- The opening starts at tick 101 and is skipped.
- A click on the book: pending, input held, the cursor hidden.
- The take starts at once: Daphne in state 13 (
0xD), the book hidden, andPrincess_Bedroom.Daphne_Takes_Bookplaying. - 45 ticks later: the book held and in a slot, and
Princess_Bedroom.280A_playing. Nothing is pending and the cursor is back. - Entered again: no book.
- The hotspot:
Princess_Bedroom.280XA_. - A take left mid-way: the book is still given.
- Another item on the book: nothing; a requires object answers only the arrow or its own item.
- The cavern’s hotspot: Daphne, Shaggy and Scooby in state 17 (
0x11).
The corrected expectation. I first wrote that a click before the opening
would arm the take, and that Daphne would wait for the opening. The first run
said the click did nothing. It wasn’t the room: the opening has a line someone
in the room says, so the base entry (0x40C7B0, WP-031) holds input from entry
until the opening is over. Nobody can click the book before then. I corrected
the expectation, and the check now clicks after the opening; the rerun
matches. The take’s own “opening done” guard covers a case that input already
prevents.
The rest of the self-test matches the WP-099 run (51c6d15) except for the
per-run random keys. The runtime warnings match, 18 each.
Build (log). Terraglyph only, in the fork worktree; no warnings in the engine.
Live (live — session, with log). start_room=ROOM_P29_Princess_Bedroom.
- The opening:
280_, Daphne, then Fred. - The click at (273, 204):
click at 273,204 on 3 OBJ_INV_SPELL_BOOK,room event OBJ_INV_SPELL_BOOK 0, thenANIM_DAPHNE_P24_TAKE_BOOK1. About 2 s later:OBJ_INV_SPELL_BOOK in slot 0, and280A_(Fred, then Daphne). - The screenshots:
- During the take, Daphne holds the book and the cursor is hidden.
- Afterwards, the toolbar shows the spell book and the cursor is back.
Deliverables
- Fork:
wp-100-princess-bedroom, PR barefootbetters/scummvm#24 (424daa8a36), merged on 2026-11-28 as1539a7b59c; the fork worktree is removed, andC:\dev\scummvmwas rebuilt from it. Staged by name:princess_rooms.{h,cpp}andprincess_check.cpp. - Docs: this packet, its pre-flight, the WP-100 note in scooby-exe, the pointer in WP-078, and the index row.
- Local only: the decompile dump, the self-test and live logs, and the screenshots.