Changeset 0693e25 in network-game for common/Common.h
- Timestamp:
- Sep 28, 2013, 2:11:19 AM (12 years ago)
- Branches:
- master
- Children:
- 6319311
- Parents:
- 3ef8cf4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/Common.h
r3ef8cf4 r0693e25 16 16 using namespace std; 17 17 18 typedef struct 19 { 18 struct FLOAT_POSITION; 19 20 struct POSITION { 21 int x; 22 int y; 23 FLOAT_POSITION toFloat(); 24 }; 25 26 struct FLOAT_POSITION { 20 27 float x; 21 28 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; 29 POSITION toInt(); 30 }; 36 31 37 32 void set_nonblock(int sock); 38 33 unsigned long long getCurrentMillis(); 39 34 string getCurrentDateTimeString(); 35 36 POSITION screenToMap(POSITION pos); 37 POSITION mapToScreen(POSITION pos); 40 38 float posDistance(FLOAT_POSITION pos1, FLOAT_POSITION pos2); 41 39
Note:
See TracChangeset
for help on using the changeset viewer.