|
int Game_Main(void *parms = NULL, int num_parms = 0)
{
// this is the main loop of the game, do all your processing
// here
// get the time
DWORD start_time = GetTickCount();
// erase the stars
Erase_Stars();
// move the stars
Move_Stars();
// draw the stars
Draw_Stars();
// lock to 30 fps
while((start_time - GetTickCount() < 33)); //这不就是负数吗???这怎么控制的??
// for now test if user is hitting ESC and send WM_CLOSE
if (KEYDOWN(VK_ESCAPE))
SendMessage(main_window_handle,WM_CLOSE,0,0);
// return success or failure or your own return code here
return(1);
} // end Game_Main |
|