Last change
on this file since 1009 was
1005,
checked in by scheusso, 17 years ago
|
enhanced memory management in gamestatemanager and gamestateclient
|
File size:
1.1 KB
|
Line | |
---|
1 | // |
---|
2 | // C++ Interface: GameStateClient |
---|
3 | // |
---|
4 | // Description: |
---|
5 | // |
---|
6 | // |
---|
7 | // Author: <>, (C) 2007 |
---|
8 | // |
---|
9 | // Copyright: See COPYING file that comes with this distribution |
---|
10 | // |
---|
11 | // |
---|
12 | #ifndef _GameStateClient_H__ |
---|
13 | #define _GameStateClient_H__ |
---|
14 | |
---|
15 | #include <queue> |
---|
16 | |
---|
17 | #include "NetworkPrereqs.h" |
---|
18 | #include "PacketTypes.h" |
---|
19 | |
---|
20 | namespace network |
---|
21 | { |
---|
22 | class GameStateClient |
---|
23 | { |
---|
24 | public: |
---|
25 | GameStateClient(); |
---|
26 | ~GameStateClient(); |
---|
27 | //#### ADDED FOR TESTING PURPOSE #### |
---|
28 | GameState* testDecompress( GameStateCompressed* gc ); |
---|
29 | GameState* testUndiff( GameState* g_old, GameState* g_diffed ); |
---|
30 | //#### END TESTING PURPOSE #### |
---|
31 | bool pushGameState(GameStateCompressed *compstate); |
---|
32 | private: |
---|
33 | bool loadSnapshot(GameState *state); |
---|
34 | GameState *undiff(GameState *a, GameState *b); |
---|
35 | GameState *decompress(GameStateCompressed *a); |
---|
36 | GameState *decode(GameState *a, GameStateCompressed *x); |
---|
37 | GameState *decode(GameStateCompressed *x); |
---|
38 | void removeObject(orxonox::Iterator<Synchronisable> &it); |
---|
39 | |
---|
40 | GameState *reference; |
---|
41 | std::queue<GameState *> gameStateList; |
---|
42 | }; |
---|
43 | |
---|
44 | } |
---|
45 | |
---|
46 | #endif /* _GameStateClient_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.