Here are some more suggestions...
Remove all of the include lines except for this one:
Code:
#include <windows.h>
Add this at the top of the file, under the include files section
Code:
// Macros //////////////////////////////////////////////////////////////////
#define KEY_DOWN(vk_code) ((GetAsyncKeyState(vk_code) & 0x08000) ? 1 : 0)
Add a global variable in the section at the top
Code:
HWND main_window_handle;
Add this after the global variable section
Code:
// Function Declarations //////////////////////////////////////////////////////
int Game_Main(void);
int Game_Shutdown(void);
int Game_Init(void);
Add main_window_handle = hwnd; to WinMain after the return(0); that follows CreateWindowEx(). It should look like this:
Code:
// create the window
if (NULL == (hwnd = CreateWindowEx(
0, // extended style
WINDOW_CLASS_NAME, // class
"Geo 3D Game Engine V1.0 Alpha -- By Ryan Capote ©", // title
WS_OVERLAPPEDWINDOW|WS_VISIBLE, // window style
0,0, // initial x,y
800,600, // initial width, height
NULL, // handle to parent
NULL, // handle to menu
hInstance, // instance of this application
NULL))) // extra creation parms
return 0;
main_window_handle = hwnd; // <<<=== HERE
Remove the void *params from these functions
Code:
int Game_Main(void *params);
int Game_Shutdown(void *params);
int Game_Init(void *params);
They should all start like this:
Code:
int Game_Main()
int Game_Shutdown()
int Game_Init()
I also noticed that Game_Shutdown was mispelled as game_Shutdown in two places.
Rog