Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/network/src/network/GameStateManager.h @ 314

Last change on this file since 314 was 314, checked in by scheusso, 16 years ago

implementing GameStateManager

File size: 869 bytes
Line 
1//
2// C++ Interface: GameStateManager
3//
4// Description:
5//
6//
7// Author:  Oliver Scheuss, (C) 2007
8//
9// Copyright: See COPYING file that comes with this distribution
10//
11//
12#ifndef NETWORK_GAMESTATEMANAGER_H
13#define NETWORK_GAMESTATEMANAGER_H
14
15#include "network/Synchronisable.h"
16
17namespace network {
18
19/**
20 * This struct defines a gamestate:
21 * size: total size of the data in *data
22 * data: pointer to the data allocated in the memory
23 */
24  struct GameState{
25  int id;
26  int size;
27  unsigned char *data;
28};
29
30/**
31 * This Class implements a manager for gamestates:
32 * - creating snapshots of gamestates
33 * - writing gamestates to universe
34 * - diffing gamestates ?
35 * @author Oliver Scheuss
36*/
37class GameStateManager{
38public:
39  GameStateManager();
40  ~GameStateManager();
41  GameState getSnapshot(int id);
42  bool loadSnapshot(GameState state);
43private:
44 
45};
46
47}
48
49#endif
Note: See TracBrowser for help on using the repository browser.