Box2D Cannon Game With Stars
Ian Parberry's "Introduction to Game Physics"
Enumerations | Functions | Variables
GameDefines.h File Reference

Game specific defines. More...

#include "Defines.h"
#include "Box2D\Box2D.h"

Enumerations

enum  eSprite {
  Background , Smoke , Ball , Crate ,
  Barrel , Base , Wheel , Clock ,
  Needle , Temperature , CurTemperature , MaxTemperature ,
  Star , EasterEgg , Size
}
 Sprite type.
 
enum class  eSound : UINT {
  Thump , Thump2 , Tap , Cannon ,
  Tick , Win , Lose , Clang ,
  Arr , Size
}
 Sound enumerated type. More...
 
enum class  eGameState : UINT { Playing , Won , Lost , Size }
 State of game play, including whether the player has won or lost. Size must be last.
 

Functions

float PW2RW (float x)
 Physics World to Render World units for a float.
 
Vector2 PW2RW (const b2Vec2 &v)
 Physics World to Render World units for a vector.
 
float RW2PW (float x)
 Render World to Physics World units for a float.
 
float RW2PW (int x)
 Render World to Physics World units for an int.
 
b2Vec2 RW2PW (int x, int y)
 Render World to Physics World units for a vector provided as a pair of ints.
 
b2Vec2 RW2PW (const Vector2 &v)
 Render World to Physics World units for a vector.
 

Variables

const UINT MAXPLAYTIME = 60
 Maximum allowable playing time per level.
 
const float fPRV = 10.0f
 Physics World to Render World rescale value.
 

Detailed Description

Game specific defines.

Enumeration Type Documentation

◆ eSound

enum eSound : UINT
strong

Sound enumerated type.

An enumerated type for the sounds, which will be cast to an unsigned integer and used for the index of the corresponding sample. Size must be last.