Box2D Binary Counter
Game Physics with a 2D Physics Engine
Loading...
Searching...
No Matches
CRenderer Class Reference

The Renderer. More...

#include <Renderer.h>

Inheritance diagram for CRenderer:
Collaboration diagram for CRenderer:

Public Member Functions

 CRenderer (const UINT, const float)
 Constructor.
 
void LoadSprites ()
 Load sprites.
 
void LoadSpritesMT ()
 Load sprites multithreaded.
 
void DrawOverflow (bool)
 
void DrawNumber (UINT)
 Draw a 2-digit number as text.
 
void DrawNixieBits (UINT, UINT)
 Draw number using nixie tubes.
 

Private Member Functions

void SetMediaList (Sage::CMediaList< eSprite > &)
 Set sprite media list.
 

Detailed Description

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

Constructor & Destructor Documentation

◆ CRenderer()

CRenderer::CRenderer ( const UINT n,
const float fPRS )

Constructor.

Parameters
nindex of the line sprite.
fPRSPhysics World to Render World scale value.

Member Function Documentation

◆ DrawNixieBits()

void CRenderer::DrawNixieBits ( UINT n,
UINT m )

Draw a number in binary using nixie tubes in a hard-coded position, with a hard-coded gap between the tubes. Yes, nixie tubes are a thing: https://en.wikipedia.org/wiki/Nixie_tube.

Parameters
nNumber to display in binary.
mNumber of bits.
Here is the caller graph for this function:

◆ DrawNumber()

void CRenderer::DrawNumber ( UINT n)

Draw a 2-digit number in a hard-coded position. If the number has more than two digits, the two least-significant ones will be drawn and the rest will be ignored. This function works by printing the number into a text buffer and then using CRenderer's DrawText function to draw it.

Parameters
nThe number to be drawn.
Here is the caller graph for this function:

◆ DrawOverflow()

void CRenderer::DrawOverflow ( bool bOflo)

If there is overflow, flash the warning led on and off. Otherwise just draw it unlit.

Parameters
bOflotrue if there is overflow.
Here is the caller graph for this function:

◆ LoadSpritesMT()

void CRenderer::LoadSpritesMT ( )

Spawn a thread to load sprites.

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

◆ SetMediaList()

void CRenderer::SetMediaList ( Sage::CMediaList< eSprite > & media)
private

Set sprite media list.

Parameters
media[out] Media descriptor list.
Here is the caller graph for this function: