Last change
on this file since 02fa8fd was b07eeac, checked in by dportnoy <dmp1488@…>, 11 years ago |
Players pick up flags when they get close to the flag objects, not the structres. When a flag is picked up, a REMOVE_OBJECT message is sent
|
-
Property mode
set to
100644
|
File size:
635 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 | typedef struct
|
---|
15 | {
|
---|
16 | float x;
|
---|
17 | float y;
|
---|
18 | } FLOAT_POSITION;
|
---|
19 |
|
---|
20 | typedef struct
|
---|
21 | {
|
---|
22 | int x;
|
---|
23 | int y;
|
---|
24 | //FLOAT_POSITION toFloat();
|
---|
25 | FLOAT_POSITION toFloat() {
|
---|
26 | FLOAT_POSITION floatPosition;
|
---|
27 | floatPosition.x = x;
|
---|
28 | floatPosition.y = y;
|
---|
29 |
|
---|
30 | return floatPosition;
|
---|
31 | }
|
---|
32 | } POSITION;
|
---|
33 |
|
---|
34 | void set_nonblock(int sock);
|
---|
35 | unsigned long long getCurrentMillis();
|
---|
36 | float posDistance(FLOAT_POSITION pos1, FLOAT_POSITION pos2);
|
---|
37 |
|
---|
38 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.