1 | SetBkColor( hdc, PALETTEINDEX(0) ); |
2 | //Draw the other player at his new position |
3 | SetTextColor( hdc, RGB(255, 255, 255) ); |
4 | TextOut(hdc,x1,y1,msg, strlen(msg)); |
5 | //Draw myself at my new position |
6 | SetTextColor( hdc, RGB(196, 0, 38) ); |
7 | TextOut(hdc,x,y,msg, strlen(msg)); |
8 | //Send my new position to the other player |
9 | pMessage->x = x; |
10 | pMessage->y = y; |
11 | hr = lpDirectPlay1->Send(playerID, 0, DPSEND_GUARANTEE, pMessage, 8); |
12 | lpBackBuffer->ReleaseDC(hdc); |
13 | lpFrontBuffer->Flip(NULL,DDFLIP_WAIT); //Flip buffers |
14 | } |
15 | delete lpmsgFrom; |
16 | delete lpmsgTo; |
17 | delete pMessage; |
18 | } |
19 | Here, we draw at the |
20 | new positions |