Pre-Flight — WP-018 — 2026-11-14
Filled-in copy of docs/reference/pre-flight for WP-018. Verdict at the bottom.
Written before engine code, on Jeff’s “continue” after PR #51 merged. Input and hotspots were the next step named at WP-017’s close. The trace for this WP turned up a correction to WP-016 and WP-017, so the WP includes it.
Header
- WP:
WP-018 - Title: Placement kinds, hotspots, the cursor and exits (Gen 1)
- Pre-flight date:
2026-11-14 - Targets generation(s): 1
- Targets disc(s): Showdown, Phantom
Pre-flight intent
Validating readiness for
WP-018. Verdict only.
Dependency check
| Prereq | Status in WORK_INDEX |
Locked on | Notes |
|---|---|---|---|
| WP-017 | ✅ Done | 2026-11-14 (PR #51 merged) | Room with players and a cel cache. |
| WP-016 | ✅ Done | 2026-11-14 | Tree and draw order. |
| WP-001 | ✅ Done | 2026-11-13 | Labels for the placement constructors, hit tests, and exit click and rollover. |
Repo + disc state
- Project worktree on new branch
claude/wp-018fromorigin/main(697ac3f), clean. - Fork
C:\dev\scummvmonscooby-engineat7fd40d5da6, clean, in sync. - Trace (2026-11-14).
0x4311F0,0x430D10,0x431350,0x4312A0come from the decompile dump.0x431400,0x402410,0x4015F0,0x408450,0x402130and0x4091FFwere not functions in that dump; several are vtable-only. They were decompiled headless (DecAt.java, read-only).- Start modes come from each constructor’s call to
0x430790. Hit types come from+4: the base constructor0x430D60sets 1, and0x408F90/0x4091FFset 2.
Doc-vs-tree cross-check
- tgifile-art says “the default placement path passes mode 1 at 3 ticks per step”. That is true of exits, requires, inventory, simple sprites and characters, but not of clickables (mode 0) or
OBJ_GHOST(mode 0, hidden). WP-017’s engine and both references inherited it. The probe’s--roomrenders and WP-016/017’s references show the ghost in 15 rooms (10 Showdown, 5 Phantom). - WP-017’s Saloon note blamed the looping root-beer sign and piano bench on missing per-room code. They are clickables, and the correct default already stops them.
Scope lock
Allowed paths (this repo):
tools/probe_art.py (render_room: OBJ_GHOST hidden)
docs/formats/tgifile-art.md (§Rendering a room, §Sequences, hit test)
docs/formats/scooby-exe.md (hit walk, rollover rows)
docs/02-SCUMMVM-INTEGRATION.md (§5 note)
docs/work-packets/WP-017-sprite-animation.md (pointer to the correction)
docs/work-packets/WP-018-hotspots-and-exits.md
docs/work-packets/WORK_INDEX.md
docs/reference/pre-flight-WP-018-2026-11-14.md
Fork: engines/scooby/**, staged by name.
Risk review
| Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|
Mask test 0x438210 not decompiled |
med | low | Type 1 uses the coverage map built from the same span lists. If a check fails on a type-1 sprite, decompile it. |
| Cursor sprite’s own mode and parent unknown | med | low | Draw it on top in mode 1 at 3 ticks per step. Flag it as an inference; it doesn’t affect hit tests. |
| Injected mouse input in the live test | med | low | Win32 SetCursorPos/mouse_event on the scaled window. The checkable result is the log line for the destination room. |
Verdict
- READY TO EXECUTE
- NOT READY
Prepared by: Claude (WP-001 session, continuing), on Jeff’s “continue” of 2026-11-14 Date: 2026-11-14
After execution — lessons learned
Lesson: read each constructor, not just the dispatcher. The kind table in tgifile-art came from the dispatcher (0x408F90/0x4091FF), which sets parent and depth. The start mode is an argument inside each constructor’s call to 0x430790, and the ghost’s hidden flag is one call further on. Two WPs inherited “mode 1 for every placement” from a sentence that was only true of the path traced first.
Lesson: a shared model can share a mistake. WP-016 and WP-017 matched their references exactly, and both were wrong about the ghost and the clickables, because both followed the same doc sentence. Exactness checks the code against the model; it doesn’t check the model against the binary.
Lesson: the decompile dump is not the whole binary. 0x431400 and the rollover getters are only reached through vtables. They, and 0x4091FF, were not functions in WP-001’s dump. Searching the vtables for a known slot value, then decompiling headless with DecAt.java, found them in minutes.
Scope note: the lock held. One fork commit, staged by name. probe_art.py’s change is limited to render_room. The ISOs were dismounted afterwards, and the captures stayed in the scratchpad.