#19197 Create basic visual studio

This commit is contained in:
vincent 2013-03-28 18:32:52 +01:00
parent 83abc571f1
commit 1c1b7369ae
5 changed files with 20 additions and 21 deletions

View file

@ -166,7 +166,7 @@ double elapsedTime;
// Particles
char texture_filename[] = "resources/images/int-texture256-v4.png";
char texture_filename[] = "images/int-texture256-v4.png";
unsigned int texture_width = 256;
unsigned int texture_height = 256;
@ -562,7 +562,7 @@ void display(void)
char val[20];
sprintf(val, "%d,%d", target_x, target_y);
drawtext(target_x, target_y-20, 0.08, 0, 1.0, 0, val, 0, 1, 0);
glPointSize(1.0f);
glPointSize(1.0f);
}
if (display_head_mouse && !display_head && stats_on)
{
@ -572,7 +572,7 @@ void display(void)
glBegin(GL_POINTS);
glVertex2f(head_mouse_x, head_mouse_y);
glEnd();
glPointSize(1.0f);
glPointSize(1.0f);
}
// Spot bouncing back and forth on bottom of screen
if (0)

View file

@ -298,13 +298,13 @@ void AgentList::stopSilentAgentRemovalThread() {
#ifdef _WIN32
void usleep(int waitTime){
__int64 time1 = 0, time2 = 0, sysFreq = 0;
__int64 time1 = 0, time2 = 0, sysFreq = 0;
QueryPerformanceCounter((LARGE_INTEGER *)&time1);
QueryPerformanceFrequency((LARGE_INTEGER *)&sysFreq);
do{
QueryPerformanceCounter((LARGE_INTEGER *)&time2);
}while( (time2-time1) <waitTime);
QueryPerformanceCounter((LARGE_INTEGER *)&time1);
QueryPerformanceFrequency((LARGE_INTEGER *)&sysFreq);
do{
QueryPerformanceCounter((LARGE_INTEGER *)&time2);
}while( (time2-time1) <waitTime);
}
#endif
@ -345,7 +345,6 @@ void *checkInWithDomainServer(void *args) {
if (usecToSleep > 0) {
usleep(usecToSleep);
}
}
pthread_exit(0);

View file

@ -9,7 +9,7 @@
#define _timeval_
/*
* Structure returned by gettimeofday(2) system call,
* and used in other calls.
* and used in other calls.
*/
struct timeval {
long tv_sec; /* seconds */

View file

@ -85,21 +85,21 @@ int getLocalAddress() {
freeifaddrs(ifAddrStruct);
#else
// Get the local hostname
char szHostName[255];
gethostname(szHostName, 255);
struct hostent *host_entry;
host_entry=gethostbyname(szHostName);
char * szLocalIP;
szLocalIP = inet_ntoa (*(struct in_addr *)*host_entry->h_addr_list);
localAddress = inet_addr(szLocalIP);
// Get the local hostname
char szHostName[255];
gethostname(szHostName, 255);
struct hostent *host_entry;
host_entry=gethostbyname(szHostName);
char * szLocalIP;
szLocalIP = inet_ntoa (*(struct in_addr *)*host_entry->h_addr_list);
localAddress = inet_addr(szLocalIP);
#endif
return localAddress;
}
UDPSocket::UDPSocket(int listeningPort) {
init();
init();
// create the socket
handle = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);

View file

@ -24,7 +24,7 @@ class UDPSocket {
public:
UDPSocket(int listening_port);
~UDPSocket();
bool init();
bool init();
int send(sockaddr *destAddress, const void *data, size_t byteLength);
int send(char *destAddress, int destPort, const void *data, size_t byteLength);
bool receive(void *receivedData, ssize_t *receivedBytes);