Last change
on this file since 6319311 was 6319311, checked in by Dmitry Portnoy <dportnoy@…>, 11 years ago |
Some redfinition issues related to winsock2 are fixed and a few allegro rendering functions are now in GameRender
|
-
Property mode
set to
100644
|
File size:
657 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 | struct FLOAT_POSITION;
|
---|
19 |
|
---|
20 | struct POSITION {
|
---|
21 | int x;
|
---|
22 | int y;
|
---|
23 | FLOAT_POSITION toFloat();
|
---|
24 | };
|
---|
25 |
|
---|
26 | struct FLOAT_POSITION {
|
---|
27 | float x;
|
---|
28 | float y;
|
---|
29 | POSITION toInt();
|
---|
30 | };
|
---|
31 |
|
---|
32 | void set_nonblock(int sock);
|
---|
33 | unsigned long long getCurrentMillis();
|
---|
34 | string getCurrentDateTimeString();
|
---|
35 |
|
---|
36 | POSITION screenToMap(POSITION pos);
|
---|
37 | POSITION mapToScreen(POSITION pos);
|
---|
38 | float posDistance(FLOAT_POSITION pos1, FLOAT_POSITION pos2);
|
---|
39 |
|
---|
40 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.