SetBkColor( hdc, PALETTEINDEX(0) ); |
//Draw the other player at his new position |
SetTextColor( hdc, RGB(255, 255, 255) ); |
TextOut(hdc,x1,y1,msg, strlen(msg)); |
//Draw myself at my new position |
SetTextColor( hdc, RGB(196, 0, 38) ); |
TextOut(hdc,x,y,msg, strlen(msg)); |
//Send my new position to the other player |
pMessage->x = x; |
pMessage->y = y; |
hr = lpDirectPlay1->Send(playerID, 0, DPSEND_GUARANTEE, pMessage, 8); |
lpBackBuffer->ReleaseDC(hdc); |
lpFrontBuffer->Flip(NULL,DDFLIP_WAIT); //Flip buffers |
} |
delete lpmsgFrom; |
delete lpmsgTo; |
delete pMessage; |
} |
Here, we draw at the |
new positions |