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):

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

  1. 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.
  2. Live (session). Shaggy takes the shears, and the exit toward the garden goes into the hedge maze.
  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 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):

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.

What failed first. Two things in my check, not the room:

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 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).

  1. The opening: 250_ (Fred, Shaggy, Scooby).
  2. The shears: click at 42,118 on 5 OBJ_INV_RUSTY_SHEARS, then ANIM_SHAGGY_P23_TAKES_SHEARS1. About a second later: OBJ_INV_RUSTY_SHEARS in slot 0, and 250B_’s five lines.
  3. 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).
  4. The maze: hedge maze: in from ROOM_P23_Maze_Center at (1,3) dir 4, movie 41, then movie 41 (17.3 s), then in 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

Notes