Commit Graph
2 Commits
Author SHA1 Message Date
CydandClaude Fable 5 e74957758b Front end: post-mission results screen (kills/deaths scoreboard)
Completes the marshal chain: menu -> mission -> timed stop -> results ->
relaunch.  BT had no mission-end score flow; this builds one from the
data the Comm MFD pilotList already tracks.

- btl4console: at the timed stop (game thread, state still live) snapshot
  each roster pilot's kills/deaths via the BTResolveRosterPilot /
  BTPilotKills / BTPilotDeaths bridges; expose BTLocalConsole_ResultCount
  / GetResult.
- btl4fe: BTFrontEnd_ShowResults -- a GDI green-on-black 'MISSION COMPLETE'
  scoreboard (PILOT / KILLS / DEATHS, slot 0 named from the menu), any
  key or ~12s to dismiss; store the last pilot name.
- btl4main: show the scoreboard after a marshaled mission, before the
  relaunch.

Verified: MISSION COMPLETE screen renders with the pilot row and the
snapshotted score (0/0 on a no-combat test run; the data path is the
same one the live Comm MFD reads).

Phase 5 (front end) COMPLETE: menu + egg builder + marshal + timed stop
+ results + single-binary (relaunch) loop.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 22:48:09 -05:00
CydandClaude Fable 5 9d660fa50b Front end: LocalConsole marshal + single-binary loop (timed stop, relaunch)
The in-process console that replaces the operator for solo play: it owns
the mission clock and ends the race at the chosen length, then relaunches
to the setup menu -- the arcade launcher behavior in one binary.

- engine/APPMGR: gPerFrameHook -- a per-frame observer called on the game
  thread in RunMissions (the marshal's engine-safe tick site).
- btl4console.{hpp,cpp}: BTLocalConsole_Install/MissionCompleted -- the
  marshal watches for RunningMission, starts the clock, and dispatches
  Application::StopMissionMessage at expiry (BT_MISSION_SECONDS overrides
  for testing).  Confirmed: StopMission cleanly ends the mission and
  RunMissions returns.
- btl4fe: expose BTFrontEnd_LastMissionSeconds; Enter=LAUNCH / Esc=quit in
  the menu loop; BT_FE_AUTOLAUNCH quick-launch (skips the menu).
- btl4main WinMain: front-end mode runs menu -> arms marshal -> mission;
  when the marshal ends it, RELAUNCH a fresh instance (arcade launcher
  model) -> lands back on the menu.  This sidesteps BT's in-process
  re-init fragility: a second mission in-process AV'd on stale gBT*
  per-mission entity globals (gBTTerrainEntity et al., cdb-traced to
  MakeEntityRenderables); a fresh process has none.

Verified: menu LAUNCH -> mission runs -> marshal stops it at the set
length -> RunMissions returns -> relaunch (3 distinct PIDs across a
multi-cycle run, no crash).

Remaining in Phase 5: the results screen (kills/deaths at stop).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 22:41:20 -05:00