Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 12, 2010, 1:08:58 PM (14 years ago)
Author:
scheusso
Message:
  • merged network2 branch into presentation3 branch (lots of network traffic and cpu load improvements)
  • fixed network related bugs in BigExplosion
Location:
code/branches/presentation3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation3

  • code/branches/presentation3/src/libraries/network/packet/Gamestate.h

    r6073 r7153  
    3636#include <cstring>
    3737#include <list>
     38#include <vector>
    3839
    3940#include "util/CRC32.h"
     
    113114    inline bool isCompressed() const { return header_->isCompressed(); }
    114115    inline int32_t getBaseID() const { return header_->getBaseID(); }
    115     Gamestate *diff(Gamestate *base);
     116    inline uint32_t getDataSize() const { return header_->getDataSize(); }
     117    Gamestate* diffVariables(Gamestate *base);
     118    Gamestate* diffData(Gamestate *base);
    116119    Gamestate *undiff(Gamestate *base);
    117120    Gamestate* doSelection(unsigned int clientID, unsigned int targetSize);
     
    123126  private:
    124127    void rawDiff( uint8_t* newdata, uint8_t* data, uint8_t* basedata, uint32_t datalength, uint32_t baselength);
     128    inline uint32_t findObject( const SynchronisableHeader& header, uint8_t* mem, uint32_t dataLength, uint32_t startPosition = 0 );
    125129    virtual uint32_t getSize() const;
    126130    virtual inline bool process();
    127 
    128   private:
    129131    uint32_t calcGamestateSize(int32_t id, uint8_t mode=0x0);
    130     std::list<obj> dataVector_;
    131     GamestateHeader* header_;
     132   
     133    std::list<obj>          dataVector_;
     134    GamestateHeader*        header_;
     135    std::vector<uint32_t>   sizes_;
     136    uint32_t                nrOfVariables_;
    132137};
    133138
Note: See TracChangeset for help on using the changeset viewer.