Front end: local mission-egg builder + front-end mode (Workstream B foundation)

The core 'single-player without the operator console' capability: a
zero-argument launch now builds its own mission and plays.

- game/reconstructed/btl4fe.{hpp,cpp}: the BattleTech catalog (8 maps,
  8 mechs + variants, colors) and BTFeMission_WriteEgg -- emits the exact
  console egg format (verified against content/MP.EGG): [mission],
  [ordinals] + the 4 static rank-place plasma bitmaps, [pilots],
  per-pilot loadout sections, and [largebitmap]/[smallbitmap] with
  GDI-rendered 128x32 / 64x16 pilot-name plasma bitmaps.
- L4APP.H: SetEggNotationFileName / SetNetworkCommonFlatAddress setters
  (from RP412) so the front end feeds the standard -egg load path.
- btl4main.cpp WinMain: front-end mode -- no -egg and no -net builds
  frontend.egg locally (BTFrontEnd_Run) and boots it. -egg/-net runs
  are untouched.

Verified: no-args launch -> '[frontend] built frontend.egg' -> mission
loads and runs; the generated egg is structurally identical to MP.EGG
(32x32/16x16 name bitmaps with real glyph pixels, all sections present).

Remaining in Phase 5 (deferred): the interactive on-screen catalog menu,
the in-process LocalConsole marshal (mission clock + StopMission at
expiry + single-binary loop), and the score-intake/results screen (new
for BT -- no mission-end flow exists yet). (Phase 5 of the roadmap)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-14 08:44:37 -05:00
co-authored by Claude Fable 5
parent 5ebb9a5906
commit 0faf6a0072
7 changed files with 483 additions and 1 deletions
+24
View File
@@ -350,6 +350,30 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
return 1;
}
//
// FRONT-END MODE (BT412 Phase 5): no egg and no network address on the
// command line means there is no operator console to hand us a mission.
// Build one locally -- the in-game front end assembles a mission egg from
// the default loadout and points the standard -egg load path at it. The
// interactive on-screen menu and the in-process marshal layer on top of
// this (docs/BT412-ROADMAP.md Phase 5). `-egg`/`-net` runs are untouched.
//
{
const char *cmdline_egg = L4Application::GetEggNotationFileName();
const int no_egg = (!cmdline_egg || !strlen(cmdline_egg));
const int no_net = (L4Application::GetNetworkCommonFlatAddress() == 0);
if (no_egg && no_net)
{
extern int BTFrontEnd_Run();
if (BTFrontEnd_Run())
std::cout << "[frontend] built frontend.egg from the default loadout"
<< std::endl << std::flush;
else
std::cout << "[frontend] egg build FAILED -- falling through"
<< std::endl << std::flush;
}
}
Start_Registering();
// Create the main window (single 800x600 view for dev; pod multi-monitor is Phase 8).