Box2D Binary Counter
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  eGameState {
  Start , Playing , Waiting , Finished ,
  Reading , Size
}
 Game state type. More...
 
enum class  eSprite : UINT {
  Background , One , Zero , Ledge ,
  Ramp , Block , Arm , Leg ,
  Leg2 , Ring , RedLEDOn , RedLEDOff ,
  LED , Nixie0 , Nixie1 , Size
}
 Sprite enumerated type. More...
 
enum class  eSound : UINT {
  Overflow , Bonk , Squeek , Ding ,
  Zero , One , Size
}
 Sound enumerated type. More...
 

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.
 
float RW2PW (unsigned x)
 Render World to Physics World units for an unsigned 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 float fPRV = 10.0f
 Physics World to Render World rescale value.
 

Detailed Description

Game specific defines.

Enumeration Type Documentation

◆ eGameState

enum eGameState

Game state type.

An enumerated type for the game state. Size must be last.

◆ 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.

◆ eSprite

enum eSprite : UINT
strong

Sprite enumerated type.

An enumerated type for the sprites, which will be cast to an unsigned integer and used for the index of the corresponding texture in graphics memory. Size must be last.