WP-111: Phantom’s king’s armory and its slide, played (Gen 1)

Status: ✅ Done (2026-11-28). Fork PR barefootbetters/scummvm#35 merged on 2026-11-28 (merge commit cb505e77f2). Phase: 5 (rooms checked without clicks, played) Depends on: WP-068 ✅ (the port of both rooms) Companion EC: none (inline checklist under Exit criteria) Pre-flight: pre-flight-WP-111-2026-11-28. Required: the packet modifies engines/terraglyph/**. Targets generation(s): Gen 1, Phantom of the Knight only. Estimated effort: Two hours


Corrected 2026-11-28 (found in WP-112). The one fix recorded below, the cursor, changed nothing. The engine hides the cursor whenever a room class is busy or hides it (isBusy() || hidesCursor(), terraglyph.cpp), and the armory’s isBusy already covered the duster. So the armory had no gap; the hidesCursor override is a harmless duplicate. Also: the self-test’s line that each scream plays is not always so. Kings_Armory.Jane_Screaming5 has no clip on the disc, so one visit in five while Jane screams is silent, in the original too.

Goal

Play the king’s armory (ROOM_P20_Kings_Armory) and its slide (ROOM_P20_Kings_Armory_Slide), one class (0x40EBC0, vtable 0x45E710), through the engine’s mouse and tick, against the decompile, and fix what differs.

WP-068 ported both rooms. Their check only inspected state and never clicked. They’re the second of the five room groups whose checks don’t click at all (after the gallery, WP-110).

What the decompile says

What differed

The cursor. The fork held input while the duster was being taken but didn’t hide the cursor. It now does (hidesCursor). Everything else matched, including the second read of Scooby’s state, which the gallery (WP-110) had missed.

Traced along the way

Just after starting a character’s special, the original calls the character’s vtable +0x10. The armory does it, and so do the maze centre and the Princess’s bedroom; WP-100 left that call untraced. The character’s vtable (0x45E4D8, from its constructor 0x4048E0) has 0x4316F0 there, a sprite method. It sets the shown cel (+0x18) from the sequence at the current step, so the new sequence shows on this frame. The fork’s sprites draw from their step anyway, so there is nothing to model. The comments in all three rooms and the format doc’s character notes now say so.

Scope

In scope: fork armory_rooms.{h,cpp} (the cursor), armory_check.cpp (the played section), and the +0x10 comments in maze_interior_rooms.cpp and princess_rooms.cpp; this packet, its pre-flight, a pointer in WP-068, the format doc’s notes, and the index row.

Exit criteria

  1. Expectations first. The new lines and the difference were written from the decompile before the run.
  2. Fixed. The cursor.
  3. Self-test. The new lines match the expectations, after the one wrong expectation was corrected (below). The rest matches the WP-110 run except for the per-run random keys. No new warnings.
  4. Live. A scripted run plays the duster through Scooby’s take.
  5. Process. The fork PR against scooby-engine is open (merged later the same day).

Result

Evidence labels: log (a self-test’s debug log), live (session) (a scripted run this session drove and read).

Deliverables