WP-103: Phantom’s maze centre, played (Gen 1)
Status: ✅ Done (2026-11-28). Fork PR barefootbetters/scummvm#29 merged on 2026-11-28 (merge commit 43605802e2).
Phase: 5 (from the search of the packets for rooms checked only by name)
Depends on: WP-075 ✅ (the centre’s class), WP-097 ✅ (the hedge maze its exits lead into)
Companion EC: none (inline checklist under Exit criteria)
Pre-flight: pre-flight-WP-103-2026-11-28. Required: the packet modifies engines/terraglyph/**.
Targets generation(s): Gen 1, Phantom of the Knight only. Showdown has no such room.
Estimated effort: A few hours
Goal
Play the maze centre (ROOM_P23_Maze_Center, 0x42A090) through the engine’s
mouse and tick, and live, against the decompile, and fix what differs.
Background
WP-075 ported the centre with the fountain and the well. WP-093 and WP-092 later played the fountain and the well. The centre’s check stayed by name, and its live run saw it load. Shaggy takes the rusty shears here; they’re sharpened in the arena (WP-069) and cut the vines below the balcony (WP-099). The centre was the last room on Jeff’s list from the search of the packets.
The fork at 76688f1 (source):
- The hedge maze skipped. The centre’s exit handler (
0x42A640,+0x24) sends the exits toward the garden and below the balcony into the hedge maze, setting the maze’s start flag by which.- The fork’s exits went straight to the garden and the balcony, skipping the maze.
- It set the flag on entry by the room come from. Coming from the maze in the fork that changed nothing, but WP-075 had read the function as an entry routing.
- No opening. The room’s opening handler (
0x42A1A0,+0x30) alternatesCenter_of_Maze.250_and250C_by theEntranceskey. The fork read it as a second hotspot handler and never used it, so the centre had no opening.Entranceswas saved asYes/No; it’s an int. - The take didn’t hide the shears, hold input or hide the cursor, and didn’t wait for the opening.
Scope
In scope: fork maze_interior_rooms.{h,cpp} (the centre) and
maze_interior_check.cpp; this packet, its pre-flight, a WP-103 note in
scooby-exe, a pointer in WP-075, and the index row.
Out of scope: the water’s volume. The original plays it at 90; the fork’s sound has no per-play volume, and it plays at the clip’s own.
Exit criteria
- Self-test. The new lines match text written from the decompile before the run. The rest matches the WP-102 self-test except for the per-run random keys and the lines this packet changes on purpose. No new warnings.
- Live (session). Shaggy takes the shears, and the exit toward the garden goes into the hedge maze.
- 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:
the class and its vtable, including +0x24 and +0x30. The claim, the event,
the leave and the keys’ layout match the fork. The detail is in the WP-103 note
under scooby-exe.
The port (source). On wp-103-maze-centre (3e53d8bb0a):
- The exit handler through
leaveBy: it reads the exit, sets the flag and points the exit at the maze, then hands it to the default handler. - The opening through
prepare. Entrancesas an int.- The take’s hiding, holding and guard.
Self-test (self-test). The text was written from the decompile before the run (kept locally). Each line clicks through the engine’s mouse, after the opening.
- The openings: three visits give
250_,250C_,250_, withEntrances1, 0, 1. - The shears:
- Clicked: pending, input held, the cursor hidden.
- The take: Shaggy in state 13, the shears hidden, the take’s sound playing.
- Done: the shears held and in a slot, and
250B_playing. - Entered again: no shears.
- Hotspot 4:
250X_,250X1_,250X_. - The exits:
- Toward the garden:
ROOM_Hedge_Maze, withMazeCenterFromGarden1. The maze starts at (1,3) going down, through movie 41. - Toward below the balcony:
ROOM_Hedge_Maze, with the flag 0. The maze starts at (0,2) going left, through movie 41. - To the fountain:
ROOM_P44_Fountain_Closeup, unchanged.
- Toward the garden:
What failed first. Two things in my check, not the room:
- The build. The clips line still used the old name for the openings.
- Hotspot 4. The first run’s second click went nowhere: the check clicked while the hotspot’s own animation was playing, which a clickable ignores. It now waits.
One expectation was wrong: I’d written that the engine’s exit check would show
the two maze exits going to the maze. That check reads object.ini’s exits
and doesn’t go through the class’s handler, so it’s unchanged.
The rest of the self-test matches the WP-102 run (76688f1) except for:
- the per-run random keys, including the library’s taunt;
- the centre’s state and clips lines, worded and keyed anew;
- the setup line for the centre, which now has an opening;
- the profile line,
Entrances=1.
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_P23_Maze_Center. A
mouse sweep found the shears at (42, 118) and the exit toward the garden at
(30, 10).
- The opening:
250_(Fred, Shaggy, Scooby). - The shears:
click at 42,118 on 5 OBJ_INV_RUSTY_SHEARS, thenANIM_SHAGGY_P23_TAKES_SHEARS1. About a second later:OBJ_INV_RUSTY_SHEARS in slot 0, and250B_’s five lines. - The exit:
click at 30,10 on 7 OBJ_P23_TO_HEDGE_MAZE_TO_P06, then… toward ROOM_P06_Garden, into the hedge maze (flag 1). - The maze:
hedge maze: in from ROOM_P23_Maze_Center at (1,3) dir 4, movie 41, then movie 41 (17.3 s), thenin cell (1,3)=13.
The engine’s log also says the room's class keeps the gang here for that
exit. That’s the generic line for any exit a class handles, here one that
leaves.
Deliverables
- Fork:
wp-103-maze-centre, PR barefootbetters/scummvm#29 (3e53d8bb0a), merged on 2026-11-28 as43605802e2; the fork worktree is removed, andC:\dev\scummvmwas rebuilt from it. Staged by name:maze_interior_rooms.{h,cpp}andmaze_interior_check.cpp. - Docs: this packet, its pre-flight, the WP-103 note in scooby-exe, the pointer in WP-075, and the index row.
- Local only: the decompile dump, the self-test and live logs, the screenshots.
Notes
- The search’s list is done. Played through the engine, the rooms it named
turned up soft-locks:
- the WFR’s game and the way to it (WP-094, WP-101);
- the skull (WP-095);
- the maze’s ways out (WP-097);
- the blue ball (WP-099);
- the library’s shelf (WP-102).
They also turned up a set of smaller gaps, here the skipped maze and the missing opening. Only the Princess’s bedroom (WP-100) was right apart from a cursor.
- The log line “the room’s class keeps the gang here” is misleading for a class that takes the exit itself. Rewording it would be a small separate change.