Files
BT411/game/glass/btl4fe.hpp
T
arcattackandClaude Opus 4.8 fcedc046cf Walk-up callsign/mech request: join menu -> relay -> the session egg
The 1995 front-desk conversation, over the internet.  join.bat/
join_lan.bat now open a JOIN-GAME menu (the FE in BT_FE_JOIN trim:
CALLSIGN edit + the 18-mech list + JOIN); the choice relaunches into the
normal join with BT_CALLSIGN/BT_MECH env, rides the relay SEAT_REQUEST
as {callsign NUL mech NUL} (empty payload = roster defaults, wire-
compatible), and the relay validates the mech tag, HOLDS egg delivery
until every pod's console pad is connected, rewrites the egg via
eggmodel (vehicle= + rasterized callsign bitmaps, graceful no-PySide6
fallback) and streams it to all pads -- so every player's egg copy
carries every player's callsign.

The hold is gated on CONSOLE-PAD count, not game-side registration: a
pod HELLOs only after parsing the egg's roster, so a registration gate
deadlocks (hit live in the first run; pods animate in WAITING FOR
MISSION ASSIGNMENT during the hold).

Verified 2-node e2e (env-injected requests): thor/vulture requested over
roster defaults bhk1/ava1 -> relay held 1/2, released at 2/2, rewrote
both seats (relay log), the delivered egg carries vehicle=thor/vulture +
name=VIPER/MONGOOSE, both pods launched and built [cyl] tables for both
requested mechs.  Join-menu layout screenshot-verified; the menu's
click-through relaunch awaits live human verification.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 13:58:51 -05:00

88 lines
3.0 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
BTFeLaunchJoinRelay, // BT_FE_JOIN: relay join with callsign/mech request
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;...
char joinCallsign[32]; // (BT_FE_JOIN) requested callsign
char joinVehicle[16]; // (BT_FE_JOIN) requested mech tag
};
//
// 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);