#ifndef _COMMON_H #define _COMMON_H #include "Compiler.h" #if defined WINDOWS #include #include #elif defined LINUX #include #include #endif typedef struct { float x; float y; } FLOAT_POSITION; typedef struct { int x; int y; //FLOAT_POSITION toFloat(); FLOAT_POSITION toFloat() { FLOAT_POSITION floatPosition; floatPosition.x = x; floatPosition.y = y; return floatPosition; } } POSITION; void set_nonblock(int sock); unsigned long long getCurrentMillis(); float posDistance(FLOAT_POSITION pos1, FLOAT_POSITION pos2); #endif