Files
BT411/game/glass/btl4fe.hpp
T
CydandClaude Fable 5 2cbfaef177 FE: the full authentic BattleTech mission-option catalog (TeslaSuite console)
The mission-control menu was missing player experience + many options.  Added
the complete set recovered from the Mac 4.10 operator console's BT:: adventure
tree (TeslaSuite/410console/.../Console.ini) -- the tag= values are the egg
fields; cross-checked vs the port spec + reference/cavern.egg:

  NEW groups: SCENARIO (Free For All / No Return respawn role), EXPERIENCE
  (novice/standard/veteran/expert), BADGE (7 team emblems), PATCH (8 badge
  colours), DROP ZONE (one..five), ADV. DAMAGE (on/off).
  CORRECTED: TIME (evening, not 'dusk'); COLOR (full 7: +Brown/Green/Grey/Tan,
  Red->Crimson, Gray->Grey); MECH (full 18 with console friendly names ->
  tags, was 8).

btl4fe.hpp: BTFePilot gains experience/badge/patch/dropzone/advancedDamage;
BTFeMission gains roleKey/roleModel.  The egg writer emits the selected values
(were hardcoded expert/VGL/Yellow/one/advancedDamage=1); No-Return role model
= the game's 8.3 resource 'noretun'.  5-column layout (mission | mech | pilot |
emblem/patch | session+controls); loadout persists across the relaunch
(fe_last.ini, all 14 groups).

Verified: menu drives (click Expert+Davion -> egg experience=expert
badge=Davion, persisted), and the generated egg parses + runs a full mission
(no egg errors, drive 61.501).

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

85 lines
2.8 KiB
C++

#pragma once
//###########################################################################
//
// btl4fe -- the miniconsole front end (BT_GLASS only): a developer-grade
// green-on-black GDI menu that composes a mission and self-launches it,
// replacing the (absent) operator console for desktop testing.
//
// Runs BEFORE any engine init (the zero-arg path in WinMain): presents the
// catalog menu, writes the console-shape mission egg (frontend.egg), and
// returns a launch spec; WinMain then RELAUNCHES this exe with the real
// arguments (the per-mission process-relaunch pattern -- reconstructed
// gBT* globals do not survive in-process re-init).
//
// The egg writer emits the FULL console egg shape validated against
// content/MP.EGG: [mission], [ordinals] + the 4 static rank bitmaps,
// [pilots] roster, per-pilot pages, GDI-rendered [largebitmap]/
// [smallbitmap] pilot-name plasma bitmaps, and the role model pages.
//
//###########################################################################
struct BTFePilot
{
char name[32];
char vehicle[16]; // mech tag (madcat, ...)
char color[16]; // camo tag (Grey, Crimson, ...)
char experience[16]; // novice / standard / veteran / expert
char badge[16]; // team emblem (VGL, Davion, ...)
char patch[16]; // badge colour (Red, Yellow, ...)
char dropzone[8]; // one .. five
int advancedDamage; // 0/1
char address[64]; // ip:gamePort for the roster
};
struct BTFeMission
{
char map[16];
char time[16];
char weather[16];
char roleKey[16]; // egg role key: Default / NoReturn
char roleModel[16]; // role model: dfltrole / noreturn
int temperature;
int lengthSeconds;
int pilotCount;
BTFePilot pilots[8];
};
//
// Launch modes the menu can resolve to.
//
enum BTFeLaunchMode
{
BTFeLaunchNone = 0, // quit / window closed
BTFeLaunchSolo, // networked 1-pod mission (console marshal + self)
BTFeLaunchRawSolo, // plain -egg endless solo (renderer work)
BTFeLaunchHostLan, // marshal feeds self + remote pods
BTFeLaunchJoinLan, // plain -net pod; a remote host's marshal feeds us
BTFeLaunchHostSteam, // (BT_STEAM) lobby host: marshal over the Steam wire
BTFeLaunchJoinSteam // (BT_STEAM) lobby member: -net pod on the Steam wire
};
struct BTFeLaunchSpec
{
BTFeLaunchMode mode;
char eggPath[64]; // the written frontend.egg
int consolePort; // this instance's -net port
char podList[256]; // marshal targets (host modes)
int missionSeconds;
char steamMyToken[48]; // (BT_STEAM) my roster token ip
char steamMap[512]; // (BT_STEAM) ip=steamid64;...
};
//
// Write the console-shape egg for a mission. Returns 0 on success.
//
int
BTFeMission_WriteEgg(const BTFeMission *mission, const char *path);
//
// Run the menu (blocking, own message loop). Fills the spec; returns 0
// when a launch was chosen, nonzero for quit.
//
int
BTFrontEnd_Run(BTFeLaunchSpec *spec);