The 8-ball Pool End Game
Ian Parberry's "Introduction to Game Physics"
Public Member Functions | List of all members
CRenderer Class Reference

The renderer. More...

#include <Renderer.h>

Inheritance diagram for CRenderer:

Public Member Functions

 CRenderer ()
 Constructor.
 
void LoadImages ()
 Load images. More...
 
void DrawMessage (eGameState)
 Draw win/lose text message to screen. More...
 

Detailed Description

CRenderer handles the game-specific rendering tasks, relying on the base class CSpriteRenderer to do all of the actual API-specific rendering.

Member Function Documentation

◆ DrawMessage()

void CRenderer::DrawMessage ( eGameState  state)

Draw a win/lose text message to the center of the window if the game is in the appropriate state.

Parameters
stateCurrent game state.

◆ LoadImages()

void CRenderer::LoadImages ( )

Load the specific images needed for this game. This is where eSprite values from GameDefines.h get tied to the names of sprite tags in gamesettings.xml. Those sprite tags contain the name of the corresponding image file. If the image tag or the image file are missing, then the game should abort from deeper in the Engine code, leaving you with a dialog box that tells you what went wrong.