Changeset 0693e25 in network-game for common/Common.h


Ignore:
Timestamp:
Sep 28, 2013, 2:11:19 AM (11 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
6319311
Parents:
3ef8cf4
Message:

The client draws the map and players in individual games

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/Common.h

    r3ef8cf4 r0693e25  
    1616using namespace std;
    1717
    18 typedef struct
    19 {
     18struct FLOAT_POSITION;
     19
     20struct POSITION {
     21   int x;
     22   int y;
     23   FLOAT_POSITION toFloat();
     24};
     25
     26struct FLOAT_POSITION {
    2027   float x;
    2128   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};
    3631
    3732void set_nonblock(int sock);
    3833unsigned long long getCurrentMillis();
    3934string getCurrentDateTimeString();
     35
     36POSITION screenToMap(POSITION pos);
     37POSITION mapToScreen(POSITION pos);
    4038float posDistance(FLOAT_POSITION pos1, FLOAT_POSITION pos2);
    4139
Note: See TracChangeset for help on using the changeset viewer.