Basic HTML version of Foils prepared July 5 98

Foil 151 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. by Wojtek Furmanski, Subhash Nair, Tom Pulikal


1 //Entry point for the windows program
2 int PASCAL WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
3 {
4 MSG msg;
5 joinSession = FALSE; //By default create new session
6 if(strcmp(lpCmdLine,"join")==0)
7 joinSession=TRUE;
8 if( !WinInit( hInstance, nCmdShow ) ) // Initialize & set up Windows
9 return FALSE;
10 if( !DXInit() ) // Initialize & set up DirectX
11 return FALSE;
12 ShowCursor(FALSE); //Hide the mouse pointer
13 // Start windows loop
14 while( 1 )
15 {
16 if( PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE ) )
17 {
18 if( !GetMessage( &msg, NULL, 0, 0 ) )
19 return msg.wParam;
20 TranslateMessage(&msg);
21 DispatchMessage(&msg);
22 }
23 else
24 {
25 UpdateFrame("NONE"); //Update the screen
26 }
27 }
28 }
29 The main Function - WinMain()
30 A command line argument
31 `join' must be supplied
32 to join an already existing
33 session
34 We update the screen even when
35 no keys are pressed because the
36 other player might have changed
37 position.

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Nov 28 1998