WP-124: Phantom’s kitchen, played (Gen 1)
Status: ✅ Done (2026-11-30). Fork PR barefootbetters/scummvm#49 merged on 2026-11-30 (merge commit d49e7e83d2).
Phase: 5 (rooms played)
Depends on: WP-065 ✅ (the port of the room), WP-116 ✅ (handleEvent())
Companion EC: none (inline checklist under Exit criteria)
Pre-flight: pre-flight-WP-124-2026-11-30. Required: the packet modifies engines/terraglyph/**.
Targets generation(s): Gen 1, Phantom of the Knight only.
Estimated effort: Two hours
Goal
Play the kitchen (ROOM_P13_Kitchen, 0x412C90, vtable 0x45E954) through
the engine’s own event path, against the decompile, and fix what differs.
WP-065 ported the room. Its check clicked Ewan through
the room class’s click(), the grease through sendEvent() and hotspot 3
through clickClickable(), never through the mouse. It’s the sixth of the 11
checks that click through a class or script function, after the drawbridge,
the room of doors, the throne room, the dining room and Maria’s game
(WP-117, WP-119–122).
What the decompile says
- Entry (
0x412EA0, after the base entry):- the walk-ins: from the dining room Daphne; from the storage room Daphne and Fred;
- his quiz won and his clue not given:
190B_, blocking, his clue, and “to give” (+0xBC); - else, won:
STIRRING, orSLEEPINGwith the screwdriver until the mirror is used; either way at depth −1; - nothing pending at the grease, and Ewan hit by his step polygon.
- The tick (
0x4130D0):- Ewan clicked (game
+0x20bit 4, his+0x08, the game’s default cursor):- his quiz not won: the first time met and Big Head with
190A_, on toROOM_Ewan; after, straight to it; - won and awake: with the speech lock free (
0x40A230), his next line as a sound. With the lock held, nothing, and his next line stays; - asleep:
190F_,190F1_,190F2_in turn, blocking.
- his quiz not won: the first time met and Big Head with
- His line over (
0x435A10): the lock freed. - His clue, only once he’s idle: with “to give”,
GIVES, then “thanks” (+0xBD), the cursor hidden at once (0x435E80with 0) and input held (game+0x24); idle again with “thanks”, the exit handler, toROOM_Suspect_ChooserwithGlobal.Thank_You_. - The bottle at the grease (
+0xC4):- Fred idle, no scene playing and the opening done: he fetches it
(
OBJ_FRED_P13_GET_GREASE,Kitchen.Get_Grease), the grease hidden, the empty bottle used, the game’s default cursor; - every tick until he’s idle again, the cursor hidden and input held;
- idle again: the full bottle unless ever had, and
190G_, blocking.
- Fred idle, no scene playing and the opening done: he fetches it
(
- Ewan clicked (game
- The event (
0x4136C0): the grease with the empty bottle sets+0xC4; with the arrow,190C_, blocking. Hotspot 3 scares Daphne. - The way to the storage room (
0x412D20): no movie once the screwdriver has been had.
What differed
Nothing. The room class matches the decompile, and nothing in the engine
needed a change. The holds while Ewan gives and while Fred fetches the grease
are the class’s isBusy(), which returns “thanks” or the bottle at the
grease. Ewan’s click is read on the press, where the original reads the
release; as in WP-117, WP-120 and WP-121, a press and release on one point
plays the same.
Scope
In scope:
- Fork:
kitchen_check.cpp(the played section). - Docs: this packet, its pre-flight, a note in scooby-exe, a pointer in WP-065, 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 expectation I got wrong corrected (below). The rest matches the WP-122 run except for the per-run random keys and Maria’s item places. No new warnings.
- Live. Scripted runs show the hovers, Ewan into Big Head, his clue with no cursor while he gives it, his scenes asleep, and the grease filled with the bottle taken from the toolbar.
- Process. The fork PR against
scooby-engineis open (merged on 2026-11-30).
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-124-kitchen(4dd6608100): a section at the end ofcheckKitchen, with events fed throughhandleEvent(). - Self-test (log). Every visit enters from the dining room.
- A new game:
- Daphne walks in, and there’s no opening;
- the open hand on Ewan and hotspot 3,
ANIM_CURSOREU45RonTO_P12; - the grease and
TO_P17not built.
- Ewan clicked:
ROOM_Big_Headwith190A_onBIG_HEAD_BG_P13, back toROOM_Ewan; met, andEwanIntroset. Clicked again:ROOM_Ewan, movie −1. - His quiz won:
190B_held, no cursor, and Ewan a clue owner;- his
GIVES: input held by the room class (room busy 1), no cursor on him, and a click on him not taken; - then
Global.Thank_You_, andROOM_Suspect_Chooser.
- Awake (
STIRRING, depth −1):- clicked:
1010G_playing, the lock held; - clicked again while it plays: the same line;
- the line over: the lock free;
- clicked:
1010G1_.
- clicked:
- Asleep (
SLEEPING, with the screwdriver):- clicked:
190F_held, no cursor; - clicked during it: still
190F_; - after it:
190F1_.
- clicked:
- The grease:
- a requires object at depth 0 under the first layer, with the open hand;
- the arrow:
190C_held; - the empty bottle’s cursor: the bottle at the grease the next tick, and the room busy;
- Fred fetches it that tick:
ANIM_FRED_P13_GET_GREASE1,Get_Grease, the grease hidden, the empty bottle out of its slot, the default cursor, none drawn; - 81 ticks later: the full bottle and
190G_held; - after it, the arrow.
- Hotspot 3: Daphne scared at once.
TO_P17, won:- without the screwdriver:
190D_, then movie 8; - with it: no movie.
- without the screwdriver:
The rest matches the WP-122 run (
5d2ff3781e), except for:- the per-run random keys: the drawbridge’s states and flag points, Ewan’s question, the room of doors’ ways, and the screams in the gardener’s house and the armory;
- the item places in Maria’s played lines, random per run. Her lines are otherwise the same.
WP-065’s kitchen lines are unchanged. Both runs have 18 warnings, and the build has no warnings in
engines/terraglyph. - A new game:
- What I got wrong first. I expected the arrow over Ewan. It’s the open
hand, his object’s rollover, as with Maria and Jane. Three slips in the
check:
- two cursor reads came before any mouse move, so they showed the cursor from before;
- the empty bottle was read with “ever had”, not “in a slot”.
The check now moves the mouse first and reads the slots.
- Live (session). Three runs from profiles, starting in the kitchen:
- A new game: the open hand on Ewan; a click on him and Big Head starts.
- His quiz won:
190B_on entry, with his clue;ANIM_EWANGIVES, thenGlobal.Thank_You_, and the suspects and clues;- the screenshot during
GIVESshows no cursor.
- His clue given, with the screwdriver and the empty bottle:
- the open hand on Ewan asleep; a click on him and
190F_, with no cursor in the screenshot; - the open hand on the grease; a click with the arrow and
190C_; - the van opens the toolbar, and the bottle’s slot puts it on the cursor;
- on the grease: “Fred gets the grease”. The screenshot shows him kneeling at it with no cursor;
- then the full bottle in slot 0,
190G_, and the arrow back.
- the open hand on Ewan asleep; a click on him and
A first try at the third run missed Ewan asleep and the bottle’s slot. Both were the script’s points, taken from the wrong pose and room.
Deliverables
- Fork:
wp-124-kitchen, PR barefootbetters/scummvm#49 (4dd6608100), merged on 2026-11-30 asd49e7e83d2; the fork worktree is removed, andC:\dev\scummvmwas rebuilt from it. Staged by name:kitchen_check.cpp. - Docs: this packet, its pre-flight, the note in scooby-exe, the pointer in WP-065, and the index row.
- Local only: the self-test and live logs, the screenshots, the profiles, and the expected text.