Front end: the miniconsole menu -- interactive race setup (Workstream B)
The in-game menu that replaces the operator console. A GDI-painted green-on-black terminal (RP412 RPL4FE pattern) in its own top-level window, shown in front-end mode (no -egg/-net) before the mission: - Catalogs as clickable columns: MAP (8), MECH (8), COLOR (8), TIME, WEATHER, LENGTH, plus a PILOT NAME edit box and a LAUNCH button. Selected item highlighted; click cycles selections. - LAUNCH fills a BTFeMission from the selections, writes the egg (BTFeMission_WriteEgg -- the existing builder), and points the standard -egg load path at it. Closing the menu quits the process. - btl4main.cpp: front-end mode runs the menu; menu-close exits. Verified end to end: no-args launch shows the menu; clicking LAUNCH builds frontend.egg from the chosen map/mech/color/time/length and the mission loads and runs (map=grass mech=bhk1 color=White time=day length=300 from the default selections). Remaining in Phase 5: the LocalConsole marshal (timed stop + results + single-binary menu<->mission loop). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+14
-11
@@ -393,10 +393,11 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
||||
//
|
||||
// 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.
|
||||
// Run the in-game miniconsole menu -- the player configures the race
|
||||
// (map / mech / color / time / weather / length / pilot name) and clicks
|
||||
// LAUNCH, which builds the mission egg locally and points the standard
|
||||
// -egg load path at it. Closing the menu quits. `-egg`/`-net` runs skip
|
||||
// the menu. (docs/BT412-ROADMAP.md Phase 5.)
|
||||
//
|
||||
{
|
||||
const char *cmdline_egg = L4Application::GetEggNotationFileName();
|
||||
@@ -404,13 +405,15 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
||||
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;
|
||||
extern int BTFrontEnd_Run();
|
||||
if (BTFrontEnd_Run())
|
||||
std::cout << "[frontend] menu LAUNCH -> frontend.egg built"
|
||||
<< std::endl << std::flush;
|
||||
else
|
||||
{
|
||||
std::cout << "[frontend] menu closed -- exiting" << std::endl << std::flush;
|
||||
return 0; // player quit from the setup menu
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user