Box2D Cannon Game
Chapter 7 of Ian Parberry's "Introduction to Game Physics with Box2D"
 All Classes Files Functions Variables Enumerations Friends Pages
Public Member Functions | Public Attributes | List of all members
CHeadsUpDisplay Class Reference

The heads-up display. More...

#include <hud.h>

Inheritance diagram for CHeadsUpDisplay:
CObjectManager

Public Member Functions

 CHeadsUpDisplay (int size)
 Constructor.
 
void draw (int secs, float temp, float maxtemp)
 Draw HUD.
 
- Public Member Functions inherited from CObjectManager
 CObjectManager (int size)
 Constructor.
 
 ~CObjectManager ()
 Destructor.
 
CGameObjectcreate (GameObjectType objecttype)
 Create new object.
 
void move ()
 Move all objects.
 
void draw ()
 Draw all objects.
 
void clear ()
 Clear the object list.
 
void MakeSound ()
 Make sounds.
 

Public Attributes

BOOL m_bEasterEgg
 

Additional Inherited Members

- Protected Attributes inherited from CObjectManager
CGameObject ** m_pObjectList
 List of game objects.
 
int m_nCount
 How many objects in list.
 
int m_nSize
 Maximum size of list.
 

Detailed Description

The heads-up display.

The HUD is responsible for managing parts of the heads-up display.

Member Function Documentation

void CHeadsUpDisplay::draw ( int  secs,
float  temp,
float  maxtemp 
)

Draw HUD.

Draw HUD, which includes a clock and a thermometer.

Parameters
secsNumber of seconds to display on clock.
tempTemperature to display on thermometer.
maxtempMaximimum temperature that thermometer can display.