WP-114: Phantom’s kitchen storage room, played (Gen 1)
Status: ✅ Done (2026-11-29). Fork PR barefootbetters/scummvm#39 merged on 2026-11-29 (merge commit 11f252d7a4).
Phase: 5 (rooms checked without clicks, played)
Depends on: WP-067 ✅ (the port of the room)
Companion EC: none (inline checklist under Exit criteria)
Pre-flight: pre-flight-WP-114-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 kitchen storage room (ROOM_P17_Kitchen_Storage, 0x4139A0,
vtable 0x45E994) through the engine’s mouse and tick, against the
decompile, and fix what differs.
WP-067 ported the room. Its check only inspected state and sent events by name, never through the mouse. It’s the fourth of the five room groups whose checks don’t click at all, after the gallery (WP-110), the armory (WP-111) and the garden group (WP-112). WP-113 is the TV remote’s D-pad, so this packet is WP-114.
What the decompile says
- Entry (
0x413A00, after the base entry):- with the door open (
DoorClicked3), from elsewhere:200A_, blocking; - back from the first door movie (
DoorClicked1):200D_, blocking; - with the door begun, Fred moves 144 left and 13 up (the floats at
0x45E9D8and0x45E9D4).
- with the door open (
- The claim (
0x414B30):- The door, until open, is a requires object at depth 0 (
0x402D90), hit by its polygon. Once begun, the claim writesANIM_CURSORSCREWDRIVERinto the door’s+0x70. - The screwdriver and the shield are requires objects until had
(
0x408C80). - Hotspot 3 is a clickable at depth -1 (
0x408DC0); it has nopriority=key, so this is what the default path builds too.
- The door, until open, is a requires object at depth 0 (
- The event (
0x413EA0):- The screwdriver or the shield clicked: the taking starts.
- Hotspots 1 and 2 cycle their three lines.
- Hotspot 3 says
200XA_only while its sprite playsANIM_P17_KITCHEN_STORAGE_HOTSPOT3A(0x46B074, read at+0x54). - The door, through the room’s exit handler: with the screwdriver, movie
62; with the arrow, movie 65, then
200B1_,200B2_. Once begun, any click gives movie 63, then 64.
- The tick (
0x413B20):- Each taking holds input (game
+0x24). - Fred takes the screwdriver once he’s idle, no scene is playing and the
opening is done. It goes in the toolbar on his step 33, and
200C_plays once he’s idle again. - Daphne takes the shield the same way. Then
200G_if Brad has been met (0x4697B4=BRAD), else400A_.
- Each taking holds input (game
- A requires object’s rollover:
- The constructor (
0x402D90) sets+0x70toANIM_CURSOROPEN, whatever the object’s keys. - The rollover (
0x403010) returns+0x70while the cursor is the arrow, and nothing otherwise.
- The constructor (
- Depths (
0x408F90, the default path): an exit at -1000 (0x401850), a requires object at 0, both under the same layer.
What differed
The fork’s room class matched the decompile. It sets the door’s rollover
in enter() rather than in the claim, but both run before the room is shown.
One gap was in the engine. The fork showed the open hand over every requires object and ignored the room’s rollover, so the begun door never showed the screwdriver. Now:
- a requires object is built with
ANIM_CURSOROPENas its rollover (room.cpp); - the toolbar’s rollover for one is the room’s (
inventory.cpp).
The only other room that writes a requires object’s rollover is the gallery,
whose mirror gets ANIM_CURSOROPEN. No requires object on the Phantom disc
has a rolloveranim= key.
Scope
In scope:
- Fork:
storage_check.cpp(the played section),room.cppandinventory.cpp. - Docs: this packet, its pre-flight, the corrections in scooby-exe, a pointer in WP-067 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
expectations I got wrong corrected (below). The rest matches the WP-112
run except for the per-run random keys and the storage placement line,
whose requires objects now show
ANIM_CURSOROPENas their rollover. No new warnings. - Live. A scripted run takes the screwdriver, works the door open and leaves for the kitchen.
- 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).
- The fix (source). On
wp-114-kitchen-storage(abe55e0d84):room.cpp,inventory.cpp, and a section at the end ofcheckStorage. - Self-test (log). The new lines:
- Entry from the kitchen:
- the door, the screwdriver and the shield are requires objects, and hotspot 3 a clickable;
- Fred is at (284, 376);
- over the door,
ANIM_CURSOROPEN.
- The screwdriver:
- busy at once, and a click on hotspot 1 meanwhile starts nothing;
ANIM_FRED_P17_TAKE_SCREWDRIVER1withFred_Takes_Screwdriver, and the screwdriver hidden;- in a slot on Fred’s step 33, then
200C_held, not busy.
- The shield:
ANIM_DAPHNE_P17_TAKES_SHIELD1withDaphne_Takes_Shield, the shield hidden, then in a slot with400A_. With Brad met,200G_. - The door with the arrow: movie 65 back here with no opening, then
200B1_,200B2_, then movie 65 again. - The door with the screwdriver:
- movie 62; the screwdriver out of the toolbar and the cursor
ANIM_CURSORARROW; - back:
200D_held, Fred at (140, 363), and the arrow over the door showingANIM_CURSORSCREWDRIVER; - then movie 63 (
DoorClicked2), then movie 64 (DoorClicked3) with the door not built; - from the kitchen after:
200A_held.
- movie 62; the screwdriver out of the toolbar and the cursor
- The hotspots:
- hotspot 1 gives
200XB_,200XB1_,200XB2_,200XB_; - hotspot 2 gives
200X_,200X1_,200X2_,200X_; - hotspot 3 gives
200XA_, none, none, none,200XA_.
- hotspot 1 gives
- The way back:
- with the door closed, no point on the screen hits the exit;
- alone, the exit is hit at (51, 180), where with everything shown the door is hit instead;
- with the door open,
200F_, then the kitchen with movie -1.
The rest matches the WP-112 run (
3d9de8eb96), except for:- the per-run random keys (the drawbridge, Ewan’s question, the screams);
- the storage placement line, which now shows
ANIM_CURSOROPENfor its requires objects.
18 warnings in both runs, and no build warnings in
engines/terraglyph. - Entry from the kitchen:
- What I got wrong first.
- The hover on the fresh door. I wrote “no rollover”;
0x402D90gives every requires object the open hand. - Hotspot 3. I wrote
200XA_on every click. Its clickable moves fromAtoDa click at a time, and the room answers onlyA. - The way back. I expected the exit to be clickable with the door closed. The door is in front of it and covers it, so the room can be left only once the door is open. In the original, too, the default path builds the exit at -1000 and the door at 0 under the same layer, and the hit test goes front to back.
- A check slip. The first run clicked the hotspots again before their clickables had finished animating, and a clickable takes no click until then. The check now waits.
- The hover on the fresh door. I wrote “no rollover”;
- Live (session). Started in the storage room:
- the arrow over the door shows
ANIM_CURSOROPEN; - a click on the screwdriver: Fred takes it, then
200C_; - the screwdriver from the toolbar, then a click on the door: movie 62,
then
200D_; - the arrow over the door now shows
ANIM_CURSORSCREWDRIVER, and the screenshot shows the screwdriver cursor on the door; - two more clicks: movies 63 and 64, and the door is open;
- over the doorway,
ANIM_CURSOREU45L; a click plays200F_, then the kitchen.
- the arrow over the door shows
Deliverables
- Fork:
wp-114-kitchen-storage, PR barefootbetters/scummvm#39 (abe55e0d84), merged on 2026-11-29 as11f252d7a4; the fork worktree is removed, andC:\dev\scummvmwas rebuilt from it. Staged by name:storage_check.cpp,room.cpp,inventory.cpp. - Docs: this packet, its pre-flight, the corrections in scooby-exe (the requires object’s rollover, and the storage room’s door, way back and hotspot 3), the pointer in WP-067, and the index row.
- Local only: the self-test and live logs, the screenshots, and the expected text.