/* Update the dirty rectangle map with the new list */
for ( i=0; i<dirtymaplen; ++i ) {
if ( dirtymap[i] != NULL ) {
dirtymap[i] = (SDL_Rect *)(
dirtymap[i] = newlist + (dirtymap[i]-updatelist);
((int)dirtymap[i]-(int)updatelist) +
(int)newlist
);
}
delete[] updatelist;
/* Here we go... */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <errno.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
for ( i=0; i<numplayers; ++i ) {
connection *player = &players[positions[i]];
strcpy(ptr, (char *)inet_ntoa(player->raddr.sin_addr));
strcpy(ptr, inet_ntoa(player->raddr.sin_addr));
printf("Setting up player %d at host %s and port ", i+1, ptr);
len += strlen(ptr)+1;
ptr += strlen(ptr)+1;