WP-120: Phantom’s throne room, played (Gen 1)
Status: ✅ Done (2026-11-29). Fork PR barefootbetters/scummvm#44 merged on 2026-11-29 (merge commit e617f82e73).
Phase: 5 (rooms played)
Depends on: WP-062 ✅ (the port of the room), WP-116 ✅ (handleEvent())
Companion EC: none (inline checklist under Exit criteria)
Pre-flight: pre-flight-WP-120-2026-11-29. Required: the packet modifies engines/terraglyph/**.
Targets generation(s): Gen 1, Phantom of the Knight only.
Estimated effort: Two hours
Goal
Play the throne room (ROOM_P10_Throne_Room, 0x417A90, vtable 0x45EC1C)
through the engine’s own event path, against the decompile, and fix what
differs.
WP-062 ported the room. Its check clicked Jane through
the room class’s click(), the throne through clickClickable() and
sendEvent(), and set the items as the cursor by hand. It’s the third of the
11 checks that click through a class or script function, after the drawbridge
(WP-117) and the room of doors (WP-119).
What the decompile says
- Entry (
0x417B20):- the first time, movie 18 back to this room, without the base entry; after that, the base entry;
- Velma, Daphne or Shaggy walks in, by the room left;
Screamingoff.
- The tick (
0x417E80):- Jane clicked (game
+0x20bit 4, her+0x08) withANIM_CURSORDUSTER: the duster leaves the toolbar, the cursor is the default again, and160E_plays, blocking; - the third hotspot on step 1 of its A: the five are scared (
0x11).
- Jane clicked (game
- The event (
0x417FB0):- the throne with the ruby: movie 9 back to this room, the ruby out of the toolbar, the default cursor;
- else
160X_, blocking.
- The vtable: the exit handler is the default
0x40C1E0. Slot+0x30is the room’s own0x417B10, which is empty, as the base’s is. object.ini:- the throne is a requires object for
ANIM_CURSORRUBY; the claim makes it a clickable until the balls are found; - each exit has its own rollover;
TO_P09andTO_P14carry scenes,160B_and160C_.
- the throne is a requires object for
What differed
Nothing. The room class matches the decompile, and nothing in the engine needed a change.
Scope
In scope:
- Fork:
throne_check.cpp(the played section). - Docs: this packet, its pre-flight, a note in scooby-exe, a pointer in WP-062, and the index row.
Exit criteria
- Expectations first. The new lines were written from the decompile before the run.
- Self-test. The new lines match the decompile, with the check slips corrected (below). The rest matches the WP-119 run except for the per-run random keys. No new warnings.
- Live. Scripted runs give Jane the duster and the throne the ruby, each taken from the toolbar, and scare the gang with the third hotspot.
- Process. The fork PR against
scooby-engineis open (merged on 2026-11-29).
Result
Evidence labels: log (a self-test’s debug log), live (session) (a scripted run this session drove and read, with screenshots).
- The change (source). On
wp-120-throne-room(fbe9d0b356): a section at the end ofcheckThrone, with events fed throughhandleEvent(). - Self-test (log).
- The first visit, from the room of doors: movie 18 asked for, back to
this room;
Screamingoff. - Again:
- Velma walking in, and the opening
Throne_Room.160_held; - after it, the open hand on Jane, the throne and hotspot 3;
ANIM_CURSORED45LonTO_P11,…EU45LonTO_P09,…EU45RonTO_P14;TO_P19hit nowhere: the throne covers it.
- Velma walking in, and the opening
- Jane:
- with the arrow, no scene;
- the duster from the toolbar: the cursor
ANIM_CURSORDUSTER, and the same over Jane; - on her:
160E_held, the duster out of its slot (had, so used), and the arrow back; - the inventory’s log has no wrong-item line.
- Hotspot 3: the five are scared at tick 4.
- The throne:
- without the balls, with the arrow:
160X_held; - with them, it’s a requires object at depth 0, with the open hand over it;
- the ruby from the toolbar on it at (390, 192): movie 9 back here, the ruby out of its slot, the arrow back;
- back: the throne hidden, and
TO_P19hit at (390, 207) withANIM_CURSOREU.
- without the balls, with the arrow:
- The way to the first arena:
160B_, thenROOM_P09_Arena1.
The rest matches the WP-119 run (
1719c08bb9), except for the per-run random keys (the drawbridge’s states and flag points, Ewan’s question, the screams in the gardener’s house and the armory). 18 warnings in both runs, and no build warnings inengines/terraglyph. - The first visit, from the room of doors: movie 18 asked for, back to
this room;
- What I got wrong first. Nothing in the expectations. Five slips in the
check:
- The first visit was read on a second entry, after the movie had been asked for. The check now reads the first.
160X_read as not held: the sameformat()call ticked for the line and read the hold, and GCC read the hold first (as in WP-115).- The duster’s log wasn’t cleared before the click, so it showed everything since the run began.
- The duster from the toolbar. The check added the duster after entering the room. An item added there drives the toolbar in by itself, so the check’s click on the van sent it away again. The check now has the item before the visit and clicks the van only when the toolbar is parked.
- The ruby from the toolbar. On the tick the toolbar reaches open, the ruby’s item isn’t hit anywhere; a tick later it is. The duster’s is hit at once. The check now waits a few ticks with the toolbar open, as a player would. Why the ruby’s item lags a tick isn’t traced.
- Live (session). Two runs from profiles, entered from the room of doors,
with the movie and the opening played:
- Run 1, the duster in the toolbar:
- the hovers on Jane, the throne, hotspot 3 and three ways out;
- Jane with the arrow: nothing;
- hotspot 3: the five switch to their
SCAREDanimations, and the screenshot shows the bats and the gang scared; - the throne:
160X_, with no cursor in the screenshot; - the van, the duster’s slot, then Jane: “OBJ_INV_DUSTER out of slot 0”
and
160E_.
- Run 2, the balls found, the ruby in the toolbar:
- the van, the ruby’s slot, then the throne: the ruby out of its slot;
- movie 9 (90 frames), back to the room, the throne gone;
ANIM_CURSOREUover the passage where it stood.
- Run 1, the duster in the toolbar:
Found on the way
- An item added while the room is shown drives the toolbar in (the log
has
Global.Toolbarbefore the add), so a click on the van at that moment sends it away. A player who opens the toolbar then can do the same. That’s the original’s toolbar, not a gap.
Deliverables
- Fork:
wp-120-throne-room, PR barefootbetters/scummvm#44 (fbe9d0b356), merged on 2026-11-29 ase617f82e73; the fork worktree is removed, andC:\dev\scummvmwas rebuilt from it. Staged by name:throne_check.cpp. - Docs: this packet, its pre-flight, the note in scooby-exe, the pointer in WP-062, and the index row.
- Local only: the self-test and live logs, the screenshots, the profiles, and the expected text.