Closes the gap left by the football commit. Members publish their picks as lobby member data (tm/ps) alongside their loadout, and the owner publishes the scenario (sc) so members know when the picks matter. The lobby room turns into a team sheet: each member row shows their team and position, and MY TEAM / MY POSITION buttons cycle the local pick and republish it live, so everyone watches the sides fill out before the host launches. The egg builder honors explicit picks and only fills gaps: - pilots who chose a team get it; the rest are spread across the host team and one other so the sides stay balanced - a team with no volunteer runner promotes its first UNPICKED member, never overriding someone who chose crusher or blocker - if two pilots on a team both claim runner, the first keeps it and the second lines up - colors stay derived: runner in the team runner color, everyone else in the team color Verified: a three-pilot egg puts the host on crusher in team color with an unpicked teammate promoted to runner in runner color, the other side gets its own runner, and the teams/pilots blocks group correctly; the lobby room cycles picks and repaints the roster; both scenarios still pass their single-player regressions. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
116 lines
3.6 KiB
C
116 lines
3.6 KiB
C
#pragma once
|
|
|
|
#include "..\munga\style.h"
|
|
|
|
//########################################################################
|
|
//############################ RPL4 Front End ############################
|
|
//########################################################################
|
|
//
|
|
// The in-game race setup: shown when the game starts with no egg, no
|
|
// network, and no mission-review mode. Presents the Death Race catalog
|
|
// (track / vehicle / color / badge / time / weather / length + pilot
|
|
// name), builds the mission egg locally - the same NotationFile text
|
|
// TeslaConsole generated, including the pre-rendered plasma name
|
|
// bitmaps - and hands its path back for the standard egg-load path.
|
|
//
|
|
// Returns True with egg_path_out filled when the player launches;
|
|
// False if they close the window instead.
|
|
//
|
|
Logical
|
|
RPL4FrontEnd_Run(
|
|
HINSTANCE instance,
|
|
HWND main_window,
|
|
char *egg_path_out,
|
|
int egg_path_size
|
|
);
|
|
|
|
// The race length (seconds; 0 = endless) selected at the last
|
|
// successful launch - the local console marshals the mission with it.
|
|
int
|
|
RPL4FrontEnd_LastMissionSeconds();
|
|
|
|
// [pilots]-order pilot names of the last launched race (owner first),
|
|
// comma separated - labels for the network console's results intake.
|
|
const char *
|
|
RPL4FrontEnd_LastPilotNames();
|
|
|
|
// How the last Run() ended: a plain race, hosting a network race (the
|
|
// console marshals the other pods), or entering one as a member pod
|
|
// (the lobby owner's console marshals us; no local egg, no console).
|
|
enum FELaunchMode
|
|
{
|
|
FELaunchSingle = 0,
|
|
FELaunchHost,
|
|
FELaunchMember
|
|
};
|
|
int
|
|
RPL4FrontEnd_LastLaunchMode();
|
|
|
|
// The player's persisted loadout (lobby member data). Buffers: 24/16/24.
|
|
void
|
|
RPL4FrontEnd_GetLoadout(char *vehicle, char *color, char *badge);
|
|
|
|
//---------------------------------------------------------------
|
|
// Football team / position: the catalogs, and this player's picks.
|
|
// The lobby publishes the picks as member data and lets members
|
|
// cycle them in the room; the host's egg builder honors them.
|
|
//---------------------------------------------------------------
|
|
int
|
|
RPL4FrontEnd_TeamCount();
|
|
const char *
|
|
RPL4FrontEnd_TeamName(int index);
|
|
const char *
|
|
RPL4FrontEnd_TeamKey(int index);
|
|
|
|
int
|
|
RPL4FrontEnd_PositionCount();
|
|
const char *
|
|
RPL4FrontEnd_PositionName(int index);
|
|
const char *
|
|
RPL4FrontEnd_PositionKey(int index);
|
|
|
|
int
|
|
RPL4FrontEnd_GetTeamIndex();
|
|
void
|
|
RPL4FrontEnd_SetTeamIndex(int index);
|
|
int
|
|
RPL4FrontEnd_GetPositionIndex();
|
|
void
|
|
RPL4FrontEnd_SetPositionIndex(int index);
|
|
|
|
// True when this player's setup menu has Football selected (the host's
|
|
// pick decides the mission; members use it to know what to show).
|
|
Logical
|
|
RPL4FrontEnd_IsFootballSelected();
|
|
|
|
// Hosted-race pilots fed by the Steam lobby: overrides the
|
|
// RP412HOSTPODS parsing with real personas and loadouts. owner_address
|
|
// is this pod's mesh IP (the FakeIP); count 0 clears the override.
|
|
struct FEHostedPilot
|
|
{
|
|
char address[64]; // mesh (game port) address for [pilots]
|
|
char name[32];
|
|
char vehicle[24];
|
|
char color[16];
|
|
char badge[24];
|
|
// football: the member's own picks, empty = assign one for them
|
|
char team[32]; // team key ("Red/Pink", ...)
|
|
char position[16]; // "runner" / "crusher" / "blocker"
|
|
};
|
|
void
|
|
RPL4FrontEnd_SetHostedPilots(
|
|
const char *owner_address,
|
|
const FEHostedPilot *pilots,
|
|
int count
|
|
);
|
|
|
|
// The between-races results screen: shows the last mission's final
|
|
// scores (from the local console) with a CONTINUE button. Returns
|
|
// immediately when there are no results (first boot). False only if
|
|
// the player closed the window instead of continuing.
|
|
Logical
|
|
RPL4FrontEnd_ShowResults(
|
|
HINSTANCE instance,
|
|
HWND main_window
|
|
);
|