Pool End Game
Chapter 3 of Ian Parberry's "Introduction to Game Physics with Box2D"
|
Main file for your game. More...
Functions | |
int | DefaultWinMain (HINSTANCE, HINSTANCE, LPSTR, int) |
LRESULT CALLBACK | DefaultWindowProc (HWND, UINT, WPARAM, LPARAM) |
void | CreateObjects () |
Create all game objects. | |
void | BeginGame () |
Start the game. | |
void | InitGame () |
Initialize and start the game. | |
void | EndGame () |
Shut down game and release resources. | |
void | RenderFrame () |
Render a frame of animation. | |
void | ProcessFrame () |
BOOL | KeyboardHandler (WPARAM k) |
LRESULT CALLBACK | WindowProc (HWND h, UINT m, WPARAM w, LPARAM l) |
int WINAPI | WinMain (HINSTANCE hI, HINSTANCE hP, LPSTR lpC, int nCS) |
Variables | |
int | g_nScreenHeight |
char | g_szGameName [256] |
Name of this game. | |
GameStateType | g_nGameState |
Current game state. | |
CTimer | g_cTimer |
The game timer. | |
CSoundManager * | g_pSoundManager |
The sound manager. | |
CRenderWorld | g_cRenderWorld |
The Render World. | |
CObjectWorld | g_cObjectWorld |
The Object World. | |
Main file for your game.
BOOL KeyboardHandler | ( | WPARAM | k | ) |
Keyboard handler. Take the appropriate action when the user mashes a key on the keyboard.
k | Virtual key code for the key pressed |
< Small change in position.
< Small change in angle.
void ProcessFrame | ( | ) |
Process a frame of animation. Called once a frame to animate game objects and take appropriate action if the player has won or lost.
LRESULT CALLBACK WindowProc | ( | HWND | h, |
UINT | m, | ||
WPARAM | w, | ||
LPARAM | l | ||
) |
Window procedure. Handler for messages from the Windows API. Dont mess with these unless you really know what you're doing.
h | window handle |
m | message code |
w | parameter for message |
l | second parameter for message |
int WINAPI WinMain | ( | HINSTANCE | hI, |
HINSTANCE | hP, | ||
LPSTR | lpC, | ||
int | nCS | ||
) |
Winmain. Main entry point for this application. Dont mess with these unless you really know what you're doing.
hI | handle to the current instance of this application |
hP | unused |
lpC | unused |
nCS | specifies how the window is to be shown |