Changeset b35b2b2 in network-game for common/MessageContainer.h
- Timestamp:
- Jul 29, 2013, 10:32:59 PM (11 years ago)
- Branches:
- master
- Children:
- d05086b
- Parents:
- 297682c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/MessageContainer.h
r297682c rb35b2b2 3 3 4 4 #include "Compiler.h" 5 6 #include <string> 5 7 6 8 #if defined WINDOWS … … 10 12 #include <netinet/in.h> 11 13 #endif 14 15 using namespace std; 12 16 13 17 #define MSG_TYPE_ACK 1 … … 54 58 void setAcked(bool acked); 55 59 void setTimeAcked(unsigned long long time); 60 61 static string getMsgTypeString(int msgType) { 62 switch(msgType) { 63 case MSG_TYPE_ACK: return "MSG_TYPE_ACK"; 64 case MSG_TYPE_REGISTER: return "MSG_TYPE_REGISTER"; 65 case MSG_TYPE_LOGIN: return "MSG_TYPE_LOGIN"; 66 case MSG_TYPE_LOGOUT: return "MSG_TYPE_LOGOUT"; 67 case MSG_TYPE_CHAT: return "MSG_TYPE_CHAT"; 68 case MSG_TYPE_PLAYER: return "MSG_TYPE_PLAYER"; 69 case MSG_TYPE_PLAYER_MOVE: return "MSG_TYPE_PLAYER_MOVE"; 70 case MSG_TYPE_OBJECT: return "MSG_TYPE_OBJECT"; 71 case MSG_TYPE_REMOVE_OBJECT: return "MSG_TYPE_REMOVE_OBJECT"; 72 case MSG_TYPE_PICKUP_FLAG: return "MSG_TYPE_PICKUP_FLAG"; 73 case MSG_TYPE_DROP_FLAG: return "MSG_TYPE_DROP_FLAG"; 74 case MSG_TYPE_SCORE: return "MSG_TYPE_SCORE"; 75 case MSG_TYPE_START_ATTACK: return "MSG_TYPE_START_ATACK"; 76 case MSG_TYPE_ATTACK: return "MSG_TYPE_ATTACK"; 77 case MSG_TYPE_PROJECTILE: return "MSG_TYPE_PROJECTILE"; 78 case MSG_TYPE_REMOVE_PROJECTILE: return "MSG_TYPE_REMOVE_PROJECTILE"; 79 default: return "Unknown"; 80 } 81 } 56 82 }; 57 83
Note:
See TracChangeset
for help on using the changeset viewer.