- Timestamp:
- Jan 17, 2010, 11:49:48 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network2/src/libraries/network/packet/Gamestate.h
r6073 r6449 36 36 #include <cstring> 37 37 #include <list> 38 #include <vector> 38 39 39 40 #include "util/CRC32.h" … … 113 114 inline bool isCompressed() const { return header_->isCompressed(); } 114 115 inline int32_t getBaseID() const { return header_->getBaseID(); } 116 inline uint32_t getDataSize() const { return header_->getDataSize(); } 115 117 Gamestate *diff(Gamestate *base); 116 Gamestate *undiff(Gamestate *base);117 118 Gamestate* doSelection(unsigned int clientID, unsigned int targetSize); 118 119 bool compressData(); … … 123 124 private: 124 125 void rawDiff( uint8_t* newdata, uint8_t* data, uint8_t* basedata, uint32_t datalength, uint32_t baselength); 126 inline uint32_t findObject( const SynchronisableHeader& header, uint8_t* mem, uint32_t dataLength, uint32_t startPosition = 0 ); 125 127 virtual uint32_t getSize() const; 126 128 virtual inline bool process(); 127 128 private:129 129 uint32_t calcGamestateSize(int32_t id, uint8_t mode=0x0); 130 std::list<obj> dataVector_; 131 GamestateHeader* header_; 130 131 std::list<obj> dataVector_; 132 GamestateHeader* header_; 133 std::vector<uint32_t> sizes_; 134 uint32_t nrOfVariables_; 132 135 }; 133 136
Note: See TracChangeset
for help on using the changeset viewer.