WP-125: Phantom’s Ewan’s quiz, played (Gen 1)
Status: ✅ Done (2026-11-30). Fork PR barefootbetters/scummvm#50 merged on 2026-11-30 (merge commit 77a9b2047b).
Phase: 5 (rooms played)
Depends on: WP-066 ✅ (the port of the quiz), WP-116 ✅ (handleEvent())
Companion EC: none (inline checklist under Exit criteria)
Pre-flight: pre-flight-WP-125-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 Ewan’s quiz (ROOM_Ewan, 0x4109D0, vtable 0x45E890) through the
engine’s own event path, against the decompile, and fix what differs.
WP-066 ported the quiz. Its check called the room
class’s click() on an answer and set the hovered sprite by hand, never
through the mouse. It’s the seventh 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, Maria’s game and the kitchen (WP-117,
WP-119–122, WP-124).
What the decompile says
- An answer’s click (
0x402F20, a requires object’s): the button coming up (game+0x20bit 4) over it (+0x08). With the game’s own cursor, its callback (0x411480, set by0x402FF0); with any other, nothing. - Entry (
0x410F20):- the toolbar off, input held, and the cursor out;
- with no question yet, one drawn (never page 2 or 5);
- then the page set up (
0x410FF0).
- The tick (
0x410A70):- every tick, input held and the cursor out;
- erasing: nothing else until the eraser stops, then the next page;
- the level + 3 answered and the eraser stopped: the board and answers hidden, done;
- then only with the sound waited for over and the opening played:
- done: the kitchen;
- wrong:
WRONG_2, then done; - the page read, then each answer, each lit;
- free: input and the cursor let go, and what the mouse is over lit, saying itself 36 ticks on.
- The callback (
0x411480):- the answer pressed (step 2), and the sounds stopped;
- right: a
RIGHT_line, and the eraser withEwan.Erase_Board; - wrong: a
WRONG_1.line; - either way, input held and the cursor out.
- Leaving (
0x410FB0): the level + 3 answered,EwanPuzzle.
What differed
Nothing. The room class matches the decompile, and nothing in the engine
needed a change. The hold is the class’s isBusy(), true every tick until
the free state. An answer’s click is read on the press, where the original
reads the release. As in WP-117, WP-120, WP-121 and WP-124, a press and
release on one point plays the same.
Scope
In scope:
- Fork:
ewan_check.cpp(the played section). - Docs: this packet, its pre-flight, a note in scooby-exe, a pointer in WP-066, 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-124 run except for the per-run random keys and Maria’s item places. No new warnings.
- Live. A scripted run shows the opening and the reading with no cursor, a click meanwhile not taken, the hovers, and a right answer erased.
- 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-125-ewan-quiz(80cae0ee4a): a section at the end ofcheckEwan, with events fed throughhandleEvent(). - Self-test (log). Entered from the kitchen on page 1, at level 0.
- The opening (
Ewan.NOTEBOOKPAGE_INTRO_):- held, the room busy, no cursor, and the toolbar off;
- a click on B: not taken.
- The reading:
- the page with the board lit, then A to D, each lit in turn;
- held throughout, with no cursor;
- A clicked while it’s read: not taken.
- Free:
- the arrow;
- on C: the open hand, C lit, and its sound at tick 37;
- on the board: the arrow, the board lit, the page’s sound, and C’s sound still playing;
- off both: nothing lit, and no sound.
- The right answers:
- each pressed (step 2 of 3), with a
RIGHT_line; - the eraser shown, with
Ewan.Erase_Board; - held, with no cursor;
- the eraser stops 54 ticks on, and a page not yet asked comes up, never 2 or 5.
Three right: done, and the board and answers hidden. The line over:
ROOM_P13_Kitchen, andEwanPuzzleset as the room is left. The pages drawn vary by run. - each pressed (step 2 of 3), with a
- Each page’s right answer: all ten right, each starting the eraser, and each on step 2 of 3 but page 11’s A, on step 1 of 2.
- A wrong answer (page 4, A):
- pressed, with a
WRONG_1.line, held, and no cursor; - then
WRONG_2, and the kitchen; EwanPuzzlenot set;- back in: page 4 again.
- pressed, with a
The rest matches the WP-124 run (
4dd6608100), 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.
WP-066’s Ewan lines are unchanged. Both runs have 18 warnings, and the build has no warnings in
engines/terraglyph. - The opening (
- What I got wrong first.
- Moving from an answer to the board, I expected the answer’s sound to stop. It plays on, in the original too: the board takes the hover sound first, so the answer’s no longer matches it.
- One slip in the check: after the third right answer it waited for the kitchen without ending the line. The self-test runs faster than the sound plays, so the line never ended. It now ends the line at once, as WP-066’s check does.
- Found on the way. Page 11’s right answer has two steps, so pressed it
shows its last.
0x430AA0puts a start step past the end on the last step, and the fork’ssetPlayerdoes too. - Live (session). One run from a profile on page 1, read in real time:
- The opening: a click on B went untaken, with no click in the log.
- The reading: a screenshot during it shows B lit as it’s read, and no cursor.
- Free:
- on C: the open hand, with C lit in green;
- on the board: the arrow;
- on B: the open hand.
- B clicked: “answer B on page 1 right”. The screenshot shows the eraser wiping the board, with no cursor.
Deliverables
- Fork:
wp-125-ewan-quiz, PR barefootbetters/scummvm#50 (80cae0ee4a), merged on 2026-11-30 as77a9b2047b; the fork worktree is removed, andC:\dev\scummvmwas rebuilt from it. Staged by name:ewan_check.cpp. - Docs: this packet, its pre-flight, the note in scooby-exe, the pointer in WP-066, and the index row.
- Local only: the self-test and live logs, the screenshots, the profile, and the expected text.