Roadmap update

This commit is contained in:
Maddo 2026-10-07 00:20:26 +02:00
commit 25f258393f

View file

@ -552,7 +552,19 @@ After the first source-backed interaction, complete the original player/item loo
Use this sequence to move the normal Windows launch path from host-modeled behavior back to the intended decompiled-source port. Keep the current executable, data readers, preview, and tests; treat host gameplay implementations as temporary until their original call paths replace them.
1. **Freeze and classify the normal path:** do not add more host-only gameplay behavior to the default launch path. For startup, ticking, input, movement, interaction, and drawing, record the controlling original function/address, current host implementation, required host-service boundary, and status as translated, verified, or stand-in. Keep diagnostic-only behavior behind `--diagnostics`.
### Normal-Path Classification (2026-10-07)
**Step 1 complete:** freeze further host-only gameplay additions to the default path and classify its current implementation. The default executable is `remorse_game`; `--diagnostics` adds separate fixtures and HUD behavior. The table distinguishes translated rules from an integrated original call path. The current CMake target builds hand-maintained `remorse_core` sources; exported function slices remain staging input and are not directly linked.
| Path | Current normal-path implementation | Original path and status | Host boundary and recovery target |
|---|---|---|---|
| Startup and spawn | [`loadSceneAsync`](../rebuild/remorse/src/windowed_game_main.cpp#L471) loads retail data, creates the host avatar/item state, then models the two teleports to map 1's level-start pad. | `Game_Start` (`1020:0000`), `Teleporter_CreateProcessDirect`, and original wait-list lifecycle are **not integrated**; spawn is host-modeled. | Keep data-root/file access and worker/window notification at the host edge. Port the startup/teleporter call chain and initialize world ownership through it. |
| Tick and scheduler | [`updatePlayer`](../rebuild/remorse/src/windowed_game_main.cpp#L1084) is driven by Win32 `WM_TIMER`/performance-counter timing and calls the host `ProcessKernel`. Selected scheduler predicates and process behavior are translated, but the original loop and general vtable dispatch are absent. | `Kernel_11d0_31cf` / scan `11d0:0255` are **partial translations, not original-loop parity**; normal simulation remains host-driven. | Inject elapsed ticks through a replaceable clock/timer adapter; move scheduling and process dispatch into the recovered core path. |
| Input | [`windowProcedure`](../rebuild/remorse/src/windowed_game_main.cpp#L1345) maps Win32 key messages and modifier state into synthesized `KeyEvent`s queued on the host kernel. The recovered keyboard filter/copy behavior is only partial and does not provide the original input pipeline. | Keyboard process/registration functions (`11b8:02e1`, `11b8:03ad`, `11e0:172a`, `11d0:3b74`) are **partially translated**; original queue, interrupt, daemon, and controller dispatch are not integrated. | Keep Win32 message handling as an input adapter; pass normalized events into platform-neutral queue and recovered handlers. |
| Movement and animation | [`updatePlayer`](../rebuild/remorse/src/windowed_game_main.cpp#L1084) drives `ControllerMovementState`, host animation processes, and approximate TYPEFLAG collision against the shared mutable item 1. | Some direction/modifier rules are **translated**, but the original controller/process call chain, actor collision response, and scheduler-driven player update are **stand-ins/unported**. | Keep world rules and input-to-action behavior in the core; replace the step policy and approximate collision with recovered actor, animation, and collision paths. |
| Interaction | [`startNearbyUsecode`](../rebuild/remorse/src/windowed_game_main.cpp#L287) and [`runUsecodeTasks`](../rebuild/remorse/src/windowed_game_main.cpp#L319) perform host candidate selection, context/task setup, and a bounded VM subset. | Item search has source-derived/translated pieces, but original `Item_Grab` (`10a0:2970`), `Usecode_ItemCallEvent` (`1420:0e3a`), and event dispatch are **not integrated end to end**; no verified reachable spawn interaction yet. | Keep archive/resource reads and memory allocation behind host services; execute recovered search, dispatch, and VM behavior in the core. |
| Presentation | [`paintWindow`](../rebuild/remorse/src/windowed_game_main.cpp#L884) crops a rendered fixed-map image and composites a separately rendered live-player patch; the renderer refreshes that patch and sometimes rebuilds the full scene. | Retail asset decoding and host sorting are implemented, but the original live draw-list, source order, and camera path are **not ported**; this remains preview-style presentation. | Keep pixel buffers and projection platform-neutral; isolate GDI presentation, then replace static-scene recentering with recovered live rendering. |
2. **Prove the source-to-build pipeline:** choose a small, already-understood exported function used by the runtime (for example, a process sleep/timer primitive), clean its types, globals, layout, and calling convention, then compile and link that implementation into `remorse_core`. Replace the matching host-authored behavior with this compiled function and test its state changes against the export and Ghidra evidence. The import helper is staging only; do not count a staged export or isolated test as integrated.
3. **Restore the original startup and tick path:** port the minimum dependency chain for `Game_Start` (`1020:0000`), teleporter placement/waiting, kernel scheduler, timer, and item/NPC ownership. Route normal startup and simulation through these compiled functions; retain modeled startup and host polling only as diagnostics until parity checks pass.
4. **Move player behavior onto that path:** replace host-created avatar/controller state, movement-step policy, and approximate collision with the recovered item, keyboard, controller, animation, and collision call chain. Feed Win32 input and timing into explicit host-service adapters; the game logic must not depend directly on Win32 APIs.