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):
- The door’s claim reversed, a soft-lock. The fork built the blue ball
only once
BlueBallFoundwas set. Finding it is what sets the flag, so the ball never appeared and couldn’t be found at the door. The fork also built the Jester only until the ball was found, so he couldn’t take it there. The original (0x4108C0) does both the other way round. WP-076’s reference had the same reading, so its check agreed with it. - The ball below the balcony was a looping sprite, visible from the start. The original’s is hidden and stopped until its reveal.
- The reveal called the player with swapped arguments (
mode 3, start step 3, −1 ticks a step), and didn’t hide the cursor. - The rusty shears were meant to give
260F_through the event. A requires object answers only the right item or the arrow, so the event never came. The original reads the click in its tick.
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:
- The cursor reset at
game+0x238on the maze map route (WP-097). It’s read here as the cursor, not a pending opening; whether that route also resets it is a follow-up. - The Jester’s missing
BLINK(see Notes).
Exit criteria
- 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.
- 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.
- 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 profile writer, which confirms
game+0x25CBlueBallFoundandgame+0x25EBlueBallSeen.
The detail is in the WP-099 note under scooby-exe.
The port (source). On wp-099-below-balcony (8f01f6c70e):
- The claims: the ball under layer 1 at depth 0, hidden, and stopped on entry. At the door, the ball and the Jester the original’s way round.
- The reveal’s player call, with the cursor hidden.
- The rusty shears through the class’s click.
- The door’s return to the room loaded.
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.
- The claims: the ball is a sprite (layer 1, depth 0, hidden). At the door, the blue ball is built fresh and skipped once found; the Jester is skipped fresh and built once it’s found.
- The reveal:
- On entry the ball is hidden and stopped on step 0, the vines are a requires object, and there’s no way to P26.
- The first click gives
260D_(1 click); the second gives260_(2 clicks). - When
260_ends, the ball shows and plays from step 0 with its sfx. Input is held, the cursor hidden, andShowBallis spent. - After 92 ticks, input and the cursor are back,
100A_plays andPlayBallSceneis 0. - A third click gives
260D_.
- With
BlueBallSeen, the second click gives260D_and no reveal. - The shears:
- The rusty shears on the vines: the cursor goes back to the arrow and
260F_plays. - The sharp shears (the vines’
requiredanim,ANIM_CURSORSHARP_SHEARS):ROOM_P27_Below_Balconythrough movie 5. The shears leave their slot but are still held, and the cursor is the arrow. - Entered again: no vines, and the way to P26 is there.
- The rusty shears on the vines: the cursor goes back to the arrow and
- The door:
- Fresh: the ball and no Jester.
- The ball clicked: the door again through movie 2, with
BlueBallFoundset. Entered again: the door through movie 57. Entered again: the Jester playsANIM_JESTER_BTAKES_BLUE,BlueBallTakenandBlueBallSeenare set, and the ball is gone. - With
YellowBallFound: movie 67, then 57. The Jester takes the yellow ball too, since the check sets it found but not taken. - With the full bottle used: no movie 57. The Jester takes the blue ball on the next entry.
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).
- Below the balcony (
start_room): a mouse sweep found the vines at (240, 220).- Two clicks:
260D_(Scooby, Shaggy), then260_(Shaggy). As it ended,the ball revealed, then100A_(Shaggy, Scooby). - The screenshots: before the clicks, no ball and the arrow. During the reveal, the blue ball drops past the vines and the cursor is hidden. Afterwards, no ball again; it has played to its end.
- Two clicks:
- The door (
start_room): a finer sweep found the blue ball at (486, 414).- The log:
OBJ_JESTER_B claimed, not built, then the click, thenthe blue ball found, movie 2(9.5 s). Thento ROOM_P27A_Below_Balcony_Door, movie 57(23.4 s), thenANIM_JESTER_BTAKES_BLUE. - The screenshots: before, the ball on the floor and no Jester. After, the Jester standing by the door and no ball.
- The log:
Deliverables
- Fork:
wp-099-below-balcony, PR barefootbetters/scummvm#22 (8f01f6c70e), merged on 2026-11-28 as51c6d151e2; the fork worktree is removed, andC:\dev\scummvmwas rebuilt from it. Staged by name:below_balcony_rooms.{h,cpp}andbelow_balcony_check.cpp. - Docs: this packet, its pre-flight, the WP-099 note in scooby-exe, the pointer in WP-076, and the index row.
- Local only: the decompile dumps, the self-test and live logs, and the screenshots.
Notes
- The Jester has no
BLINK. At the door, his idles logSetting OBJ_JESTER_B to ANIM_JESTER_BBLINK failed, and he stays on his idle. The shared character code (two blinks in three) asks for an anim his art lacks. It’s harmless here; whether the original skips the blink for him isn’t checked. - The next rooms from the same search: