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 | namespace network { |
---|
16 | |
---|
17 | /** |
---|
18 | * This struct defines a gamestate: |
---|
19 | * size: total size of the data in *data |
---|
20 | * data: pointer to the data allocated in the memory |
---|
21 | */ |
---|
22 | struct GameState{ |
---|
23 | int size; |
---|
24 | unsigned char *data; |
---|
25 | }; |
---|
26 | |
---|
27 | /** |
---|
28 | * This Class implements a manager for gamestates: |
---|
29 | * - creating snapshots of gamestates |
---|
30 | * - writing gamestates to universe |
---|
31 | * - diffing gamestates ? |
---|
32 | * @author Oliver Scheuss |
---|
33 | */ |
---|
34 | class GameStateManager{ |
---|
35 | public: |
---|
36 | GameStateManager(); |
---|
37 | ~GameStateManager(); |
---|
38 | GameState getSnapshot(); |
---|
39 | bool loadSnapshot(GameState state); |
---|
40 | private: |
---|
41 | |
---|
42 | }; |
---|
43 | |
---|
44 | } |
---|
45 | |
---|
46 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.