feat: wire Warden funcList_ dispatchers and implement PacketHandler call

Previously initializeModule() read the 4 WardenFuncList function addresses
from emulated memory, logged them, then discarded them — funcList_ was never
populated, so tick(), generateRC4Keys(), and processCheckRequest() were
permanently no-ops even when the Unicorn emulator successfully ran the module.

Changes:
- initializeModule() now wraps each non-null emulated function address in a
  std::function lambda that marshals args to/from emulated memory via
  emulator_->writeData/callFunction/freeMemory
- generateRC4Keys: copies 4-byte seed to emulated space, calls function
- unload: calls function with NULL (module saves own RC4 state)
- tick: direct uint32_t(deltaMs) dispatch, returns emulated EAX
- packetHandler: 2-arg variant for generic callers
- Stores emulatedPacketHandlerAddr_ for full 4-arg call in processCheckRequest
- processCheckRequest() now calls the emulated PacketHandler with the proper
  4-argument stdcall convention: (data, size, responseOut, responseSizeOut),
  reads back the response size and bytes, returns them in responseOut
- unload() resets emulatedPacketHandlerAddr_ to 0 for clean re-initialization
- Remove dead no-op renderObjectiveTracker() (no call sites, superseded)
This commit is contained in:
Kelsi 2026-03-17 21:29:09 -07:00
parent 005b1fcb54
commit c70740fcdf
4 changed files with 94 additions and 26 deletions

View file

@ -22421,11 +22421,7 @@ void GameScreen::renderBgScoreboard(game::GameHandler& gameHandler) {
ImGui::End();
}
// ─── Quest Objective Tracker (legacy stub — superseded by renderQuestObjectiveTracker) ───
void GameScreen::renderObjectiveTracker(game::GameHandler&) {
// No-op: consolidated into renderQuestObjectiveTracker which renders the
// full-featured draggable tracker with context menus and item icons.
}
// ─── Book / Scroll / Note Window ──────────────────────────────────────────────
void GameScreen::renderBookWindow(game::GameHandler& gameHandler) {