group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
IScreen Class Referenceabstract

Interface implemented by each full-screen mode (Lobby, Game). More...

#include <IScreen.hpp>

Inheritance diagram for IScreen:
[legend]

Public Member Functions

virtual ~IScreen ()=default
virtual SDL_AppResult event (SDL_Event *event)=0
 Handle an incoming SDL event.
virtual SDL_AppResult iterate ()=0
 Update the screen state and render the next frame.
virtual void quit ()=0
 Perform any necessary cleanup before the screen is destroyed.
virtual void shutdownAfterRenderer ()
 Perform cleanup that must happen after the App-owned renderer shuts down.

Detailed Description

Interface implemented by each full-screen mode (Lobby, Game).

App owns one active IScreen at a time and delegates SDL event processing, per-frame iteration, and shutdown to it.

Constructor & Destructor Documentation

◆ ~IScreen()

virtual IScreen::~IScreen ( )
virtualdefault

Member Function Documentation

◆ event()

virtual SDL_AppResult IScreen::event ( SDL_Event * event)
pure virtual

Handle an incoming SDL event.

Parameters
eventThe SDL event to process.
Returns
SDL_APP_CONTINUE to keep running, SDL_APP_FAILURE to exit.

Implemented in Game, Home, and Lobby.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ iterate()

virtual SDL_AppResult IScreen::iterate ( )
pure virtual

Update the screen state and render the next frame.

Returns
SDL_APP_CONTINUE to keep running, SDL_APP_FAILURE to exit.

Implemented in Game, Home, and Lobby.

◆ quit()

virtual void IScreen::quit ( )
pure virtual

Perform any necessary cleanup before the screen is destroyed.

Implemented in Game, Home, and Lobby.

◆ shutdownAfterRenderer()

virtual void IScreen::shutdownAfterRenderer ( )
inlinevirtual

Perform cleanup that must happen after the App-owned renderer shuts down.

Reimplemented in Game.


The documentation for this class was generated from the following file: