Box2D Cannon Game
Chapter 7 of Ian Parberry's "Introduction to Game Physics with Box2D"
 All Classes Files Functions Variables Enumerations Friends Pages
Enumerations | Functions | Variables
gamedefines.h File Reference

Game defines. More...

#include "defines.h"

Enumerations

enum  GameObjectType {
  UNKNOWN_OBJECT, BALL_OBJECT, BOOK_OBJECT, CANNONBARREL_OBJECT,
  CANNONMOUNT_OBJECT, WHEEL_OBJECT, TEMPGUAGE_OBJECT, TEMPNEEDLE_OBJECT,
  TEMPMAXNEEDLE_OBJECT, CLOCKFACE_OBJECT, CLOCKNEEDLE_OBJECT, PIRATE_OBJECT
}
 Object type. More...
 
enum  GameStateType { PLAYING_GAMESTATE, WON_GAMESTATE, LOST_GAMESTATE }
 Render World to Physics World units. More...
 

Functions

float PW2RW (float x)
 
float RW2PW (float x)
 Physics World to Render World units.
 
float RW2PW (int x)
 Render World to Physics World units.
 

Variables

const float fPRV = 10.0f
 Physics world rescale value.
 
const int g_nMaxPlayingTime = 60
 Maximum allowable playing time per level.
 

Detailed Description

Game defines.

Enumeration Type Documentation

Object type.

Types of object that can appear in the game.

Render World to Physics World units.

State of game play, including whether the player has won or lost.