WP-097: Phantom’s hedge maze: the original’s ride (Gen 1)

Status: ✅ Done (2026-11-28). Fork PR barefootbetters/scummvm#20 merged on 2026-11-28 (merge commit 8f6cd09415). Phase: 5 (a reconstruction found while searching packets for setup-only checks) Depends on: WP-074 ✅ (the maze’s class and tables), WP-075 ✅ (the centre), WP-076 ✅ (below the balcony), WP-081 ✅ (the maze map item) Companion EC: none (inline checklist under Exit criteria) Pre-flight: pre-flight-WP-097-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: Half a day


Goal

Port the hedge maze’s navigation (ROOM_Hedge_Maze, class 0x42AA90) from the decompile, in place of WP-074’s model, and prove it by riding the maze through the engine’s mouse and tick, and live.

Background

WP-074 wrote that “the navigation is modelled, not frame-exact”, and that the idle mutterings didn’t play. It was the last candidate from Jeff’s search of the packets for setup-only checks, after WP-090 and WP-092–095. (WP-096 is another session’s TV-package study.)

The fork at 6b5b02c (source):

Scope

In scope: fork maze_rooms.{h,cpp} (the hedge maze; the map room is unchanged) and maze_check.cpp; this packet, its pre-flight, a WP-097 note in scooby-exe, a pointer in WP-074, and the index row.

Out of scope:

Exit criteria

  1. Self-test. The new ride lines match text written from the decompile before the run. The rest matches the WP-095 self-test, except for the per-run random keys and the two table lines this packet fixes. No new warnings.
  2. Live (session). Clicks through the engine’s mouse ride the maze cell by cell and into the maze centre.
  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-097 note under scooby-exe. It also corrects the account’s movies, which had 41 and 42 the wrong way round.

The port (source). On wp-097-hedge-maze (146c12a343).

Self-test (self-test). The text was written from the decompile before the run (kept locally). Level 0 unless said:

What failed first. The first run printed “not hit” for every button. My check looked for a hit only inside each button’s box, and the hits lie outside it. With the whole screen scanned, every line matched. A later run added a line with a point on each button, for the live script.

The rest of the self-test matches the WP-095 run (6b5b02c), except for:

The runtime warnings match, 18 each.

Build (log). Terraglyph only, in the fork worktree. No warnings in the engine; the two shared-code warnings (gob, halestorm) were there before.

Live (live — session, with log). start_room=ROOM_Hedge_Maze, level 0, starting at (2,4).

Deviations:

Deliverables

Notes