source:
network-game/common/Common.h@
ea3a3a9
Last change on this file since ea3a3a9 was 8554263, checked in by , 11 years ago | |
---|---|
|
|
File size: 520 bytes |
Rev | Line | |
---|---|---|
[3b1efcc] | 1 | #ifndef _COMMON_H |
2 | #define _COMMON_H | |
3 | ||
[d05086b] | 4 | #include <string> |
5 | ||
6 | using namespace std; | |
7 | ||
[0693e25] | 8 | struct FLOAT_POSITION; |
[edfd1d0] | 9 | |
[0693e25] | 10 | struct POSITION { |
[edfd1d0] | 11 | int x; |
12 | int y; | |
[0693e25] | 13 | FLOAT_POSITION toFloat(); |
14 | }; | |
[b07eeac] | 15 | |
[0693e25] | 16 | struct FLOAT_POSITION { |
17 | float x; | |
18 | float y; | |
19 | POSITION toInt(); | |
20 | }; | |
[3b1efcc] | 21 | |
[8554263] | 22 | void error(const char *msg); |
[b07eeac] | 23 | void set_nonblock(int sock); |
24 | unsigned long long getCurrentMillis(); | |
[d05086b] | 25 | string getCurrentDateTimeString(); |
[0693e25] | 26 | |
27 | POSITION screenToMap(POSITION pos); | |
28 | POSITION mapToScreen(POSITION pos); | |
[b07eeac] | 29 | float posDistance(FLOAT_POSITION pos1, FLOAT_POSITION pos2); |
[60017fc] | 30 | |
[3b1efcc] | 31 | #endif |
Note:
See TracBrowser
for help on using the repository browser.