With RP412STEAM=1 but no Steam client, the lobby buttons were not drawn at all - the menu simply had two fewer buttons than last time, with the only explanation a line near the top of rpl4.log that scrolls past during a normal startup. It reads as a broken build, and it cost someone a puzzled look today. The buttons are now laid out whenever environ.ini asks for Steam, and greyed out when the wire did not come up, with STEAM NOT RUNNING above them. Clicks on a greyed button do nothing - a dead control that still fires would be worse than the silence it replaces. Two conditions rather than one, so RPL4Lobby_Configured joins Available: configured is the ini switch, available is whether the transport got a FakeIP. Configured keeps the #ifdef in the lobby module, so a build without the Steam SDK still shows no buttons at all rather than a pair that can never work. The notice does not fit inside a button - they are about sixteen characters wide and "HOST STEAM GAME - STEAM NOT RUNNING" is more than twice that, so appending it clipped mid-word. It goes on its own line above the pair instead. Verified both ways, with the Steam client up and with it unavailable: bright and clickable, dim and inert. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
67 lines
2.5 KiB
C
67 lines
2.5 KiB
C
#pragma once
|
|
|
|
#include "..\munga\style.h"
|
|
|
|
//########################################################################
|
|
//########################### RPL4 Steam Lobby ###########################
|
|
//########################################################################
|
|
//
|
|
// The multiplayer front door (docs/RP412-FRONTEND-DESIGN.md section 3):
|
|
// an ISteamMatchmaking lobby stands in for the arcade's Site Management
|
|
// screen. Every member publishes its FakeIP + fake ports + persona +
|
|
// loadout as lobby member data; the owner is the console. Launching
|
|
// writes a "go" roster into lobby data - each pod registers every
|
|
// peer with the Steam transport and enters the race, the owner
|
|
// through the hosted-race path (it builds the egg and marshals), the
|
|
// members as network pods waiting for the owner's console connection.
|
|
//
|
|
// The lobby OBJECT outlives races - that is the point of the single
|
|
// binary. After a race everyone lands back in the room for the next
|
|
// launch.
|
|
//
|
|
// Compiled to stubs without RP412_STEAM.
|
|
//
|
|
enum RPL4LobbyOutcome
|
|
{
|
|
LobbyRoomLeft = 0, // player left the lobby - back to the menu
|
|
LobbyRoomClosed, // window went away - quit
|
|
LobbyLaunchHost, // owner launched: hosted-race path is primed
|
|
LobbyLaunchMember // owner launched: enter the race as a pod
|
|
};
|
|
|
|
// True when the Steam transport is up (lobby UI is offered).
|
|
Logical
|
|
RPL4Lobby_Available();
|
|
|
|
// True when this build has Steam and environ.ini asked for it, whether
|
|
// or not it actually came up. The menu offers the lobby buttons on this
|
|
// and greys them out on Available() - a player who turned Steam on and
|
|
// then launched without the client running should be told so, not left
|
|
// looking at a menu that quietly has two fewer buttons than the last
|
|
// time they saw it.
|
|
Logical
|
|
RPL4Lobby_Configured();
|
|
|
|
// True while we sit in a lobby (races return to the room).
|
|
Logical
|
|
RPL4Lobby_InRoom();
|
|
|
|
// Create a lobby / find-and-join one, then run the room screen.
|
|
int
|
|
RPL4Lobby_Host(HINSTANCE instance, HWND main_window);
|
|
int
|
|
RPL4Lobby_Join(HINSTANCE instance, HWND main_window);
|
|
|
|
// Re-enter the room of the lobby we are already in (post-race).
|
|
int
|
|
RPL4Lobby_Room(HINSTANCE instance, HWND main_window);
|
|
|
|
// Post-race score sheet: the owner publishes its console's results
|
|
// into lobby data; members pull them into the local results intake so
|
|
// the same results screen shows everywhere. Both are no-ops when not
|
|
// in a lobby (or not the respective role).
|
|
void
|
|
RPL4Lobby_PushRaceResults();
|
|
void
|
|
RPL4Lobby_PullRaceResults();
|