29 SDL_AppResult
event(SDL_Event*
event)
override;
30 SDL_AppResult
iterate()
override;
Borrowed dependencies shared by client screens.
TCP client for connecting to the game server.
Abstract interface for top-level application screens (lobby, in-game).
Shared lobby data types exchanged between server and clients.
Work-in-progress SDL3 GPU renderer.
TCP stream client — sends input to the server and receives state updates.
Definition Client.hpp:69
Interface implemented by each full-screen mode (Lobby, Game).
Definition IScreen.hpp:16
IScreen implementation for the pre-match lobby.
Definition Lobby.hpp:23
std::optional< MatchStatePacket > startMatchState
Set when the server signals a match start.
Definition Lobby.hpp:70
bool canHostStartMatch() const
True when at least one non-host is connected and all connected non-host players are ready.
Definition Lobby.cpp:233
bool startCountdownActive
True while the pre-match countdown is ticking.
Definition Lobby.hpp:71
bool exitRequested
Set when the user confirms "Exit to Desktop".
Definition Lobby.hpp:81
std::optional< MatchConfig > matchConfig
Latest match settings received from the server.
Definition Lobby.hpp:69
bool consumeExitRequest()
True if the user requested closing the application, then clear that request.
Definition Lobby.cpp:296
void updateStartCountdown()
Advance the local countdown timer using SDL_GetTicksNS delta.
Definition Lobby.cpp:249
float startCountdownRemaining
Seconds remaining in the countdown.
Definition Lobby.hpp:72
void quit() override
Deregister all Client callbacks.
Definition Lobby.cpp:208
SDL_Window * window
Application window; not owned.
Definition Lobby.hpp:62
bool hostAddressesVisible
Local UI flag: show listen/local addresses while hosting.
Definition Lobby.hpp:82
std::string_view settingsPath
Save path for user settings.
Definition Lobby.hpp:65
bool serverShutdownNotice
Set when the server connection closed while in the lobby.
Definition Lobby.hpp:76
bool consumeReturnToHostConfig()
True if the host requested HostConfig without shutting down the session, then clear that request.
Definition Lobby.cpp:278
bool returnToMenu
Set to true when the user wants to return to the main menu.
Definition Lobby.hpp:74
bool init(AppContext &ctx)
Bind renderer, window, and network client; register lobby callbacks.
Definition Lobby.cpp:14
std::string hostLanIp
Address shown in the hosting banner.
Definition Lobby.hpp:79
std::optional< MatchStatePacket > consumeStartMatchState()
Take ownership of the pending MatchStatePacket and clear internal countdown state.
Definition Lobby.cpp:223
bool consumeServerShutdownNotice()
True if returning home because the server connection closed, then clear that reason.
Definition Lobby.cpp:287
SDL_AppResult iterate() override
Update the screen state and render the next frame.
Definition Lobby.cpp:145
bool consumeReturnToMenu()
True if the user requested returning to the main menu, then clear that request.
Definition Lobby.cpp:269
std::string serverName
Display name for the connected server.
Definition Lobby.hpp:78
SystemMenuOverlay systemMenu_
Shared Escape menu for front-end screens.
Definition Lobby.hpp:66
Client * client
Network client; not owned.
Definition Lobby.hpp:63
SDL_AppResult event(SDL_Event *event) override
Handle an incoming SDL event.
Definition Lobby.cpp:136
UserSettings * settings
Live user settings; not owned.
Definition Lobby.hpp:64
std::vector< LobbyPlayer > players
Latest snapshot of connected players.
Definition Lobby.hpp:67
NewRenderer * renderer
Shared renderer; not owned.
Definition Lobby.hpp:61
ClientId localClientId
This client's own ID, set by the server on join.
Definition Lobby.hpp:68
Uint64 lastStartCountdownTickNs
SDL tick timestamp of the last countdown update (ns).
Definition Lobby.hpp:73
bool isHosting
True if App owns a running hosted server.
Definition Lobby.hpp:77
bool returnToHostConfig
Set when the host wants to return to HostConfig.
Definition Lobby.hpp:75
uint16_t hostPort
Server port shown in the hosting banner.
Definition Lobby.hpp:80
bool shouldStartMatch() const
True when a non-lobby MatchStatePacket has been received and is ready for handoff.
Definition Lobby.cpp:218
Graphics-team's work-in-progress SDL3 GPU renderer.
Definition NewRenderer.hpp:83
Non-owning view of App-owned services and configuration.
Definition AppContext.hpp:20
Associates an entity with a connected network client.
Definition ClientId.hpp:10
Per-user gameplay settings loaded from SDL's pref-path TOML file.
Definition UserSettings.hpp:25