Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6868 in orxonox.OLD for trunk/src/lib/network/synchronizeable.h


Ignore:
Timestamp:
Jan 30, 2006, 4:41:19 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the Network back to the trunk.
merged with command
svn merge https://svn.orxonox.net/orxonox/branches/network . -r6817:HEAD
no conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/network/synchronizeable.h

    r6815 r6868  
    3333  NWT_SS_VELY,
    3434  NWT_SS_VELZ,
     35  NWT_SS_PL_SYNC,
    3536 
    3637  NWT_HS_HOST_ID,
    3738  NWT_HS_NGM_ID,
     39 
     40  NWT_PL_FLAGS,
    3841 
    3942  NWT_PN_BO_WRITESTATE,
     
    101104 * with the same argument names!
    102105 *
     106 * id is one int out of that enum on top of this comment it is used to identify
     107 * read/write. when you read a value you have to use exactly the same as you used
     108 * to write or you will see an assertion failing.
     109 *
    103110 * SYNCHELP_WRITE_BEGIN()
    104  * SYNCHELP_WRITE_INT(i)
    105  * SYNCHELP_WRITE_FLOAT(f)
    106  * SYNCHELP_WRITE_BYTE(b)
    107  * SYNCHELP_WRITE_STRING(s)
     111 * SYNCHELP_WRITE_INT(i,id)
     112 * SYNCHELP_WRITE_FLOAT(f,id)
     113 * SYNCHELP_WRITE_BYTE(b,id)
     114 * SYNCHELP_WRITE_STRING(s,id)
    108115 * SYNCHELP_WRITE_N
    109116 *
    110117 * SYNCHELP_READ_BEGIN()
    111  * SYNCHELP_READ_INT(i)
    112  * SYNCHELP_READ_FLOAT(f)
    113  * SYNCHELP_READ_STRING(s,l) l = size of buffer s
    114  * SYNCHELP_READ_STRINGM(s)  allocates memory for string! you have to free this after
    115  * SYNCHELP_READ_BYTE(b)
     118 * SYNCHELP_READ_INT(i,id)
     119 * SYNCHELP_READ_FLOAT(f,id)
     120 * SYNCHELP_READ_STRING(s,l,id) l = size of buffer s
     121 * SYNCHELP_READ_STRINGM(s,id)  allocates memory for string! you have to delete this later
     122 * SYNCHELP_READ_BYTE(b,id)
     123 * SYNCHELP_READ_REMAINING() returns the remaining buffer size
     124 * SYNCHELP_READ_NEXTBYTE()  reads the next byte but it is not removed from the buffer
    116125 * SYNCHELP_READ_N
    117126 *
     
    122131 *  SYNCHELP_READ_FLOAT(size);
    123132 *  SYNCHELP_READ_STRING( textureName, 1024 ); //1024 is the length of textureName
     133 *  delete[] textureName;
     134 *  textureName = NULL;
     135 *  SYNCHELP_READ_STRINGM( texturename );      //this will call new char[strlen()+1]
    124136 *
    125137 * Example 2:
     
    130142 *
    131143 */
     144 
    132145#define SYNCHELP_WRITE_DEBUG(n) {\
    133146  __synchelp_write_n = Converter::intToByteArray( n, data+__synchelp_write_i, maxLength-__synchelp_write_i ); \
Note: See TracChangeset for help on using the changeset viewer.