Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 25, 2007, 11:06:13 PM (16 years ago)
Author:
scheusso
Message:

added GameStateManager class:

  • gets snapshots of the universe (gamestate) and returns them
  • processes snapshots and loads them to the universe

modified Synchronisable

  • added a function getData(usigned char *data), which puts the data to

the already given pointer (more efficient memory handling for the
GameState class)

  • added a function getSize(), which tells you the total size of the

current gamestate (so that you can allocate enough memory and give it to
getData

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/network/Synchronisable.h

    r237 r247  
    1010//
    1111//
    12 #ifndef NETWORKSYNCHRONISABLE_H
    13 #define NETWORKSYNCHRONISABLE_H
     12#ifndef NETWORK_SYNCHRONISABLE_H
     13#define NETWORK_SYNCHRONISABLE_H
    1414
    1515#include <list>
     
    4646  void registerVar(const void *var, int size);
    4747  syncData getData();
     48  syncData getData(unsigned char *mem);
     49  int getSize();
    4850  bool updateData(syncData vars);
    4951  virtual void registerAllVariables();
     
    5153private:
    5254  std::list<SYNCVAR> syncList;
     55  int datasize;
    5356};
    5457
Note: See TracChangeset for help on using the changeset viewer.