Last change
on this file since d05086b was d05086b, checked in by dportnoy <dmp1488@…>, 11 years ago |
Support for logging to a textfile
|
-
Property mode
set to
100644
|
File size:
680 bytes
|
Line | |
---|
1 | #ifndef _COMMON_H
|
---|
2 | #define _COMMON_H
|
---|
3 |
|
---|
4 | #include "Compiler.h"
|
---|
5 |
|
---|
6 | #if defined WINDOWS
|
---|
7 | #include <winsock2.h>
|
---|
8 | #include <WS2tcpip.h>
|
---|
9 | #elif defined LINUX
|
---|
10 | #include <fcntl.h>
|
---|
11 | #include <assert.h>
|
---|
12 | #endif
|
---|
13 |
|
---|
14 | #include <string>
|
---|
15 |
|
---|
16 | using namespace std;
|
---|
17 |
|
---|
18 | typedef struct
|
---|
19 | {
|
---|
20 | float x;
|
---|
21 | float y;
|
---|
22 | } FLOAT_POSITION;
|
---|
23 |
|
---|
24 | typedef struct
|
---|
25 | {
|
---|
26 | int x;
|
---|
27 | int y;
|
---|
28 | FLOAT_POSITION toFloat() {
|
---|
29 | FLOAT_POSITION floatPosition;
|
---|
30 | floatPosition.x = x;
|
---|
31 | floatPosition.y = y;
|
---|
32 |
|
---|
33 | return floatPosition;
|
---|
34 | }
|
---|
35 | } POSITION;
|
---|
36 |
|
---|
37 | void set_nonblock(int sock);
|
---|
38 | unsigned long long getCurrentMillis();
|
---|
39 | string getCurrentDateTimeString();
|
---|
40 | float posDistance(FLOAT_POSITION pos1, FLOAT_POSITION pos2);
|
---|
41 |
|
---|
42 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.