WP-099: Phantom’s below-the-balcony and its door, played (Gen 1)

Status: ✅ Done (2026-11-28). Fork PR barefootbetters/scummvm#22 merged on 2026-11-28 (merge commit 51c6d151e2). Phase: 5 (a gap found while searching the packets for rooms checked only by name) Depends on: WP-076 ✅ (the two rooms’ classes), WP-061 ✅ (the shared Jester) Companion EC: none (inline checklist under Exit criteria) Pre-flight: pre-flight-WP-099-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: Half a day


Goal

Check below the balcony (ROOM_P27_Below_Balcony, 0x40F220) and its door (ROOM_P27A_Below_Balcony_Door, 0x4106B0) against the decompile by playing them through the engine’s mouse and tick, and live, and fix what differs.

Background

WP-076 ported both rooms. Its self-test checked the claims, the clips and the keys by name. Its live run started in each room and saw it draw. Jeff asked for the packets to be searched for more gaps like those WP-094, WP-095 and WP-097 had found, and this pair led the list. The blue ball found here is one of the three the Jester takes.

The fork at b24b8b2 (source):

Scope

In scope: fork below_balcony_rooms.{h,cpp} and below_balcony_check.cpp; this packet, its pre-flight, a WP-099 note in scooby-exe, a pointer in WP-076, and the index row.

Out of scope:

Exit criteria

  1. Self-test. The new lines match text written from the decompile before the run. The rest matches the WP-098 self-test, except for the per-run random keys and the two claim lines this packet corrects. No new warnings.
  2. Live (session). The vines’ clicks reveal the ball. At the door the blue ball is there, a click plays its movies, and the Jester takes it.
  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:

The detail is in the WP-099 note under scooby-exe.

The port (source). On wp-099-below-balcony (8f01f6c70e):

Self-test (self-test). The text was written from the decompile before the run (kept locally). Each line clicks through the engine’s mouse, at a point the hit test finds on the object.

What failed first. The first run printed BlueBallFound 0 right after the click, where the expectation said 1. My check read the flag in the same call that ran the ticks, and C++ doesn’t fix the order the arguments are evaluated in. With the ticks run first, it reads 1. The door’s next entry already showed the flag set, since the Jester was built.

The rest of the self-test matches the WP-098 run (b24b8b2), except for the per-run random keys and WP-076’s two claim lines, which change as fixed. The runtime warnings match, 18 each.

Build (log). Terraglyph only, in the fork worktree; no warnings in the engine.

Live (live — session, with log).

Deliverables

Notes