Basic HTML version of Foils prepared July 5 98

Foil 156 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


// Update the screen with new coordinates
static void UpdateFrame(char* direction)
{
HRESULT hr;
HDC hdc;
LPDPID lpmsgFrom = new DPID; //ID of player sending the message
LPDPID lpmsgTo = new DPID; //ID of player who will receive the message
MESSAGE *pMessage = new MESSAGE;
DWORD msgSize = 8;
static SIZE size; //To store text size
static int xchange = 1; //Change along x direction
static int ychange = 1; //Change along y direction
//My initial coordinates
static int x = window_width/2;
static int y = window_height/2;
//The other player's initial coordinate
static int x1 = window_width/2;
static int y1 = window_height/2;
//-------- To introduce delay in updating screen-----------
static DWORD lastTickCount = 0;
DWORD thisTickCount;
thisTickCount = GetTickCount();
if((thisTickCount - lastTickCount) <= UpdateDelay)
return;
lastTickCount = thisTickCount;
//----------------------------------------------------------
UpdateFrame():
Redraws the objects at
their new position
Since we have used an
update delay of 0, this
doesn't take effect.
If we had used, say, 5ms,
this function wouldn't
continue execution until
5ms had elapsed
Continued...



© 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