Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 9, 2008, 4:25:52 AM (16 years ago)
Author:
landauf
Message:

merged core3 back to trunk

Location:
code/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/network/packet/Gamestate.cc

    r1740 r1747  
    3030#include "network/ClientInformation.h"
    3131#include "network/GamestateHandler.h"
     32#include "core/Iterator.h"
    3233
    3334#include <zlib.h>
     
    7980  unsigned char *mem=data_;
    8081  mem+=sizeof(GamestateHeader);
    81   orxonox::Iterator<Synchronisable> it;
    82   for(it = orxonox::ObjectList<Synchronisable>::start(); it; ++it){
     82  orxonox::ObjectList<Synchronisable>::iterator it;
     83  for(it = orxonox::ObjectList<Synchronisable>::begin(); it; ++it){
    8384    tempsize=it->getSize2(mode);
    8485
     
    8687      // start allocate additional memory
    8788      COUT(3) << "G.St.Man: need additional memory" << std::endl;
    88       orxonox::Iterator<Synchronisable> temp = it;
     89      orxonox::ObjectList<Synchronisable>::iterator temp = it;
    8990      int addsize=tempsize;
    9091      while(++temp)
     
    124125  unsigned char *mem=data_+sizeof(GamestateHeader);
    125126    // get the start of the Synchronisable list
    126   orxonox::Iterator<Synchronisable> it=orxonox::ObjectList<Synchronisable>::start();
     127  orxonox::ObjectList<Synchronisable>::iterator it=orxonox::ObjectList<Synchronisable>::begin();
    127128
    128129  while(mem < data_+sizeof(GamestateHeader)+HEADER->normsize){
     
    318319  int size=0;
    319320    // get the start of the Synchronisable list
    320   orxonox::Iterator<Synchronisable> it;
     321  orxonox::ObjectList<Synchronisable>::iterator it;
    321322    // get total size of gamestate
    322   for(it = orxonox::ObjectList<Synchronisable>::start(); it; ++it)
     323  for(it = orxonox::ObjectList<Synchronisable>::begin(); it; ++it)
    323324    size+=it->getSize2(mode); // size of the actual data of the synchronisable
    324325//  size+=sizeof(GamestateHeader);
     
    331332 * @return iterator pointing to the next object in the list
    332333 */
    333   void Gamestate::removeObject(orxonox::Iterator<Synchronisable> &it) {
    334     orxonox::Iterator<Synchronisable> temp=it;
     334  void Gamestate::removeObject(orxonox::ObjectList<Synchronisable>::iterator &it) {
     335    orxonox::ObjectList<Synchronisable>::iterator temp=it;
    335336    ++it;
    336337    delete  *temp;
  • code/trunk/src/network/packet/Gamestate.h

    r1735 r1747  
    3838
    3939namespace packet {
    40  
     40
    4141struct GamestateHeader{
    4242  ENUM::Type packetType;
     
    5151
    5252/**
    53         @author 
     53        @author
    5454*/
    5555class Gamestate: public Packet{
     
    5757    Gamestate();
    5858    Gamestate(unsigned char *data, int clientID);
    59    
     59
    6060    ~Gamestate();
    61    
     61
    6262    bool collectData(int id, int mode=0x0);
    6363    bool spreadData(int mode=0x0);
     
    6969    bool compressData();
    7070    bool decompressData();
    71    
     71
    7272    // Packet functions
    7373    virtual unsigned int getSize() const;
    7474    virtual bool process();
    7575
    76    
     76
    7777  private:
    7878    unsigned int calcGamestateSize(int mode=0x0);
    79     void removeObject(orxonox::Iterator<Synchronisable> &it);
     79    void removeObject(orxonox::ObjectListIterator<Synchronisable> &it);
    8080
    81    
     81
    8282    //Bytestream *bs_;
    8383    //GamestateHeader *header_;
Note: See TracChangeset for help on using the changeset viewer.