WP-140: the pointer stays visible in the Knights of the Snack Table (Gen 1)
Status: ✅ Done (2026-12-03). Fork PR barefootbetters/scummvm#68 merged by Jeff on 2026-12-03 (b59ea35fd8); Jeff’s live check passed the same day. Actual effort: one session.
Phase: 5 (polish)
Depends on: WP-073 ✅ (the room), WP-090 ✅ (the serving game), WP-116 ✅ (handleEvent())
Found by: WP-087’s live run, 2026-12-02, EC-010 beat 13
Companion EC: none (inline checklist under Exit criteria)
Pre-flight: pre-flight-WP-140-2026-12-02, READY. Session prompt: docs/sessions/session-WP-140-2026-12-02.md.
Targets generation(s): Gen 1, Phantom of the Knight only.
Estimated effort: One to two hours
Goal
Keep the mouse pointer drawn over the whole of ROOM_P31_KST, so the
player can see where they are steering Shaggy and where a click will land.
Background
In WP-087’s live run (2026-12-02) Jeff found no pointer in the Knights of
the Snack Table: “the mouse pointer is missing to control Shaggy. You can
blindly move him and refill the root beer with mouse clicks”. The game
itself worked: the log shows rounds served and the exit to the dining room
(run1.log, 20:09).
The port hides the pointer on purpose. KstRoom::hidesCursor()
(kst_rooms.cpp:740) hides it whenever the mouse is below row 100
(kCursorRows, kst_rooms.cpp:57–58), the value WP-090 read from the
original at 0x45EDAC. So by the decompile, the retail game hides the pointer too;
this isn’t a port defect.
Jeff’s call (2026-12-02): keep the pointer visible anyway. It’s a deliberate change from the original’s behaviour, for playability.
Scope
In scope
KstRoom::hidesCursor()stops hiding the pointer over the play area. Which cursor shows there (the room’s default arrow, or another the original’s cursor set offers) is the packet’s to pick and record.- The comment at
kst_rooms.cpp:57says the original hides it below row 100 and that the port shows it anyway, by Jeff’s decision, with this WP’s number. kst_check.cpp: any line that records the cursor hidden below row 100 now records it shown. Every other KST line is unchanged.
Out of scope
- The serving game’s rules, timing or input (WP-090).
- Hidden pointers in other rooms. Several rooms hide the pointer while a
scene plays (
hidesCursor()in the armory, below the balcony, Brad’s game and others); those follow the original and stay.
Exit criteria
- Over the KST’s play area the pointer is drawn: self-test (a
kst_checkline with the mouse below row 100 records the cursor shown) and live (Jeff or a session sees it while serving). Self-test:kst check cursor: hidden at y 100 0, at y 101 0, andkst check play entryshowsANIM_CURSORARROWat y 300 during the hold and after it. Live — Jeff (2026-12-03): see §Result. - Shaggy still follows the mouse between the benches, and a press
still fills a mug and the release slides it (the WP-090 lines match
their baseline but for the cursor). Self-test:
kst check shaggy,serve,misses,empty,play hover,play serveandplay exitare identical to the baseline, seeded and unseeded. - The rest of the self-test matches its baseline but for the random
keys. Self-test: with
random_seed=140pinned, the whole log differs from the baseline only in the two cursor lines, five newhover … cursor ANIM_CURSORARROWlines, and the timing jitter two baseline runs show between themselves (lip-sync bytes, onemsfigure). - Fork PR opened against
scooby-enginefrom its own worktree (tools/New-ForkWorktree.ps1): barefootbetters/scummvm#68, commit0ea2574dab, fromC:\claude-worktrees\scummvm-wp-140-kst-cursor-visible.
Result
The cursor: ANIM_CURSORARROW, the room’s default arrow, the one the
port already drew over the top 100 rows and during the opening’s hold.
KstRoom::hidesCursor() now returns false, so updateHover() gives the
room its usual cursor everywhere (a hovered object’s rollover, else the
arrow). kCursorRows is gone; the comments at kst_rooms.cpp:57,
kst_rooms.h:65 and kst_check.cpp:361 say the original hides it below
row 100 (0x45EDAC) and that the port shows it by Jeff’s decision. Not
taken: ANIM_CURSORSNACK, an inventory item’s cursor, which would say the
player holds a snack. Only updateHover() reads a room class’s
hidesCursor(), so input is untouched.
The two lines, before (6725e6e288) and after (0ea2574dab):
kst check cursor: hidden at y 100 0, at y 101 1
kst check cursor: hidden at y 100 0, at y 101 0
kst check play entry: opening Knights_of_the_Snack_Table.350X_ held 1 narrating 1; cursor at y 50 ANIM_CURSORARROW, at y 300 -; pressed on the top row: Shaggy state 0; the hold over after 92 ticks (scenes skipped), held 0; cursor at y 50 ANIM_CURSORARROW, at y 300 -
kst check play entry: opening Knights_of_the_Snack_Table.350X_ held 1 narrating 1; cursor at y 50 ANIM_CURSORARROW, at y 300 ANIM_CURSORARROW; pressed on the top row: Shaggy state 0; the hold over after 92 ticks (scenes skipped), held 0; cursor at y 50 ANIM_CURSORARROW, at y 300 ANIM_CURSORARROW
The diff. Headless, --debuglevel=11, game data tools/exes/phantom.
Unseeded, the baseline’s 14 kst check lines equal WP-087’s
(selftest-phantom-8cb9617318.log), and the change’s differ from them in
the two lines above only. To read the whole log, both trees ran again with
random_seed=140, plus a second baseline run as the noise floor:
| Differing lines, lip-sync jitter aside | |
|---|---|
| baseline vs baseline | 1: debug tools check hits … step 2, 37 ms vs 38 ms |
| baseline vs WP-140 | the two cursor lines; five hover 17 OBJ_KST_OVERLAY1 / hover 20 OBJ_KST_OVERLAY3, cursor ANIM_CURSORARROW input lines; the same ms figure |
The five hover lines are new because updateHover() used to return
before logging a hover whenever the class hid the cursor; with the mouse
below row 100 over the table overlays it now logs them, with the arrow.
Logs: C:\pcloud\scooby-engine\verification\wp-140-2026-12-02\ (local).
0 warnings in engines/terraglyph/.
Live — Jeff (2026-12-03): “Yes, I see the mouse cursor in the root
beer game, thank you, it is fixed.” His screenshot shows the arrow over
the top bench, below row 100, with two snacks served. Build 0ea2574dab,
game data tools/exes/phantom, --debugflags=script,graphics
--debuglevel=1. The log (live1.log, local) places him in the room:
[2026-12-03 06:08:27] exit OBJ_P12_DINING_ROOM_MUG: going to ROOM_P31_KST at tick 137
[2026-12-03 06:11:04] room ROOM_P31_KST: 5652 ticks after 157004 ms
[2026-12-03 06:11:04] dining room: from ROOM_P31_KST
Fork PR: barefootbetters/scummvm#68, merged by Jeff on 2026-12-03 (b59ea35fd8).