Changeset 06fc7f7 in network-game for common/MessageContainer.cpp


Ignore:
Timestamp:
Jan 22, 2014, 3:36:37 AM (11 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
e70b66b
Parents:
0678d60
Message:

getMsgTypeString is now defined in MessageContainer.cpp and the message types have been converted to an enum

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/MessageContainer.cpp

    r0678d60 r06fc7f7  
    4343}
    4444
     45
    4546void MessageContainer::setTimeAcked(unsigned long long time) {
    4647   this->timeAcked = time;
    4748}
    4849
    49 /*
    50 string getMsgTypeString(int msgType) {
     50string MessageContainer::getMsgTypeString(int msgType) {
    5151   switch(msgType) {
    5252      case MSG_TYPE_ACK: return "MSG_TYPE_ACK";
     
    6060      case MSG_TYPE_REMOVE_OBJECT: return "MSG_TYPE_REMOVE_OBJECT";
    6161      case MSG_TYPE_PICKUP_FLAG: return "MSG_TYPE_PICKUP_FLAG";
    62       caseMSG_TYPE_DROP_FLAG: return "MSG_TYPE_DROP_FLAG";
     62      case MSG_TYPE_DROP_FLAG: return "MSG_TYPE_DROP_FLAG";
    6363      case MSG_TYPE_SCORE: return "MSG_TYPE_SCORE";
    64       case MSG_TYPE_START_ATTACK: return "MSG_TYPE_START_ATACK";
    6564      case MSG_TYPE_ATTACK: return "MSG_TYPE_ATTACK";
    6665      case MSG_TYPE_PROJECTILE: return "MSG_TYPE_PROJECTILE";
    6766      case MSG_TYPE_REMOVE_PROJECTILE: return "MSG_TYPE_REMOVE_PROJECTILE";
     67      case MSG_TYPE_CREATE_GAME: return "MSG_TYPE_CREATE_GAME";
     68      case MSG_TYPE_JOIN_GAME: return "MSG_TYPE_JOIN_GAME";
     69      case MSG_TYPE_LEAVE_GAME: return "MSG_TYPE_LEAVE_GAME";
     70      case MSG_TYPE_GAME_INFO: return "MSG_TYPE_GAME_INFO";
     71      case MSG_TYPE_JOIN_GAME_SUCCESS: return "MSG_TYPE_JOIN_GAME_SUCCESS";
     72      case MSG_TYPE_JOIN_GAME_FAILURE: return "MSG_TYPE_JOIN_GAME_FAILURE";
     73      case MSG_TYPE_JOIN_GAME_ACK: return "MSG_TYPE_JOIN_GAME_ACK";
     74      case MSG_TYPE_PLAYER_JOIN_GAME: return "MSG_TYPE_PLAYER_JOIN_GAME";
     75      case MSG_TYPE_FINISH_GAME: return "MSG_TYPE_FINISH_GAME";
    6876      default: return "Unknown";
    6977   }
    7078}
    71 */
Note: See TracChangeset for help on using the changeset viewer.