WP-133: Phantom’s Wizard’s Rule Room bottles, played (Gen 1)

Status: ✅ Done (2026-12-01). Fork PR barefootbetters/scummvm#60 merged on 2026-12-01 (merge commit 1b5db3fc40). Phase: 5 (rooms played) Depends on: WP-083 ✅ (the port of the room), WP-094 ✅ (the game played through the engine’s tick), WP-116 ✅ (handleEvent()) Companion EC: none (inline checklist under Exit criteria) Pre-flight: pre-flight-WP-133-2026-12-01. Required: the packet modifies engines/terraglyph/**. Targets generation(s): Gen 1, Phantom of the Knight only. Estimated effort: Two hours


Goal

Play the Wizard’s Rule Room’s bottles (ROOM_P30_WFR, tick 0x41C3A0) through the engine’s own event path, against the decompile, and fix what differs.

WP-094 played the game through the engine’s tick. Its check still clicked a bottle by calling the room class’s click(), never through the mouse (wfr_check.cpp:195). It’s the last of the 11 checks that click through a class or script function, the one the WP-087 pre-flight left open. Jeff picked the bottles over the wizard’s skull (2026-12-01). The bottles’ parent and hit test changed the same day (fork PR barefootbetters/scummvm#58), so a played check covers that change too.

What the decompile says

What differed

The bottles: nothing. Played with the mouse, they match the decompile, and nothing in the engine needed a change for them.

The dances: one bug, found by the live run. The port read the beat’s dance before a phrase’s first beat drew them. So on each phrase’s first beat the wizard (and Scooby, on the player’s half) danced the previous phrase’s first dance. On the song’s first beat that’s dance 0. ANIM_WFR_WIZARDDANCE0 doesn’t exist, so the wizard vanished for that dance. The live log said so: OBJ_WFR_WIZARD has no ANIM ANIM_WFR_WIZARDDANCE0; it shows nothing. The read now comes after the draw, as in the original (wfr_rooms.cpp). A new line checks it.

Scope

In scope:

Out of scope: the wizard’s skull (wizards_check.cpp:174), which also calls its class directly; the song’s clock, which the check still sets.

Exit criteria

  1. Expectations first. The new lines were written from the decompile before the run (460faa9). The first-dance line was added after the first run, before the second.
  2. Self-test. The new lines match the decompile. The rest matches the last run on scooby-engine except for the per-run random keys. No new warnings.
  3. Live. A scripted run shows the open hand on a bottle and a bottle lit by a click.
  4. Process. The fork PR against scooby-engine is open: barefootbetters/scummvm#60 (merged on 2026-12-01).

Expectations (written before the run)

Level 0, the room’s random draws forced to 1, the clock set as the direct lines set it.

Result

Evidence labels: log (a self-test’s debug log), live (session) (a scripted run this session drove and read, with screenshots).

Deliverables