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’s isBusy already covered the take. So the fork already matched the original here; the hidesCursor override 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

  1. 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.
  2. Live (session). After the opening, a click on the spell book has Daphne take it, and it goes in the toolbar.
  3. Process. The fork PR against scooby-engine is 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 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.

Deliverables

Notes