source: network-game/common/Common.h@ e62b56c

Last change on this file since e62b56c was e6c26b8, checked in by Dmitry Portnoy <dportnoy@…>, 11 years ago

The client dynamically allocates memory for players and passes around a map with player pointers and some includes are now in individual files instead of in Common.h

  • Property mode set to 100644
File size: 491 bytes
Line 
1#ifndef _COMMON_H
2#define _COMMON_H
3
4#include <string>
5
6using namespace std;
7
8struct FLOAT_POSITION;
9
10struct POSITION {
11 int x;
12 int y;
13 FLOAT_POSITION toFloat();
14};
15
16struct FLOAT_POSITION {
17 float x;
18 float y;
19 POSITION toInt();
20};
21
22void set_nonblock(int sock);
23unsigned long long getCurrentMillis();
24string getCurrentDateTimeString();
25
26POSITION screenToMap(POSITION pos);
27POSITION mapToScreen(POSITION pos);
28float posDistance(FLOAT_POSITION pos1, FLOAT_POSITION pos2);
29
30#endif
Note: See TracBrowser for help on using the repository browser.