PPT Slide
//Entry point for the windows program
int PASCAL WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
joinSession = FALSE; //By default create new session
if(strcmp(lpCmdLine,"join")==0)
if( !WinInit( hInstance, nCmdShow ) ) // Initialize & set up Windows
if( !DXInit() ) // Initialize & set up DirectX
ShowCursor(FALSE); //Hide the mouse pointer
if( PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE ) )
if( !GetMessage( &msg, NULL, 0, 0 ) )
UpdateFrame("NONE"); //Update the screen
The main Function - WinMain()
to join an already existing
We update the screen even when
no keys are pressed because the
other player might have changed