Main file for your game.
More...
|
int | DefaultWinMain (HINSTANCE, HINSTANCE, LPSTR, int) |
|
LRESULT CALLBACK | DefaultWindowProc (HWND, UINT, WPARAM, LPARAM) |
|
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) |
|
BOOL KeyboardHandler |
( |
WPARAM |
k | ) |
|
Keyboard handler. Take the appropriate action when the user mashes a key on the keyboard.
- Parameters
-
k | Virtual key code for the key pressed |
- Returns
- TRUE if the game is to exit
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.
- Parameters
-
h | window handle |
m | message code |
w | parameter for message |
l | second parameter for message |
- Returns
- 0 if message is handled
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.
- Parameters
-
hI | handle to the current instance of this application |
hP | unused |
lpC | unused |
nCS | specifies how the window is to be shown |
- Returns
- TRUE if application terminates correctly