Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 6, 2008, 1:30:50 PM (16 years ago)
Author:
scheusso
Message:

first efforts to make the network module 64bit compatible
gamestates are still missing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/network/packet/Chat.cc

    r1800 r1890  
    3737#define   _PACKETID         0
    3838const int _PLAYERID     =   _PACKETID + sizeof(ENUM::Type);
    39 #define   _MESSAGELENGTH    _PLAYERID + sizeof(unsigned int)
    40 #define   _MESSAGE          _MESSAGELENGTH + sizeof(unsigned int)
     39#define   _MESSAGELENGTH    _PLAYERID + sizeof(uint32_t)
     40#define   _MESSAGE          _MESSAGELENGTH + sizeof(uint32_t)
    4141
    4242Chat::Chat( std::string message, unsigned int playerID )
     
    5252}
    5353
    54 Chat::Chat( unsigned char *data, int clientID )
     54Chat::Chat( uint8_t* data, unsigned int clientID )
    5555  : Packet(data, clientID)
    5656{
    57   messageLength_ = *(unsigned int *)(data + _MESSAGELENGTH );
     57  messageLength_ = *(uint32_t *)(data + _MESSAGELENGTH );
    5858}
    5959
     
    6767
    6868bool Chat::process(){
    69   bool b = Host::incomingChat(std::string((const char*)data_+_MESSAGE), *(unsigned int *)(data_+_PLAYERID));
     69  bool b = Host::incomingChat(std::string((const char*)data_+_MESSAGE), *(uint32_t *)(data_+_PLAYERID));
    7070  delete this;
    7171  return b;
Note: See TracChangeset for help on using the changeset viewer.