![]() |
Box2D Binary Counter
Game Physics with a 2D Physics Engine
|
The Renderer. More...
#include <Renderer.h>


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. | |
Render world handles the game-specific rendering tasks, relying on the base class to do all of the actual API-specific rendering.
| CRenderer::CRenderer | ( | const UINT | n, |
| const float | fPRS ) |
Constructor.
| n | index of the line sprite. |
| fPRS | Physics World to Render World scale value. |
| 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.
| n | Number to display in binary. |
| m | Number of bits. |

| 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.
| n | The number to be drawn. |

| void CRenderer::DrawOverflow | ( | bool | bOflo | ) |
If there is overflow, flash the warning led on and off. Otherwise just draw it unlit.
| bOflo | true if there is overflow. |

| void CRenderer::LoadSpritesMT | ( | ) |
Spawn a thread to load sprites.


|
private |
Set sprite media list.
| media | [out] Media descriptor list. |
