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
|
Rev | Line | |
---|
[416] | 1 | // |
---|
| 2 | // C++ Interface: GameStateClient |
---|
| 3 | // |
---|
[732] | 4 | // Description: |
---|
[416] | 5 | // |
---|
| 6 | // |
---|
| 7 | // Author: <>, (C) 2007 |
---|
| 8 | // |
---|
| 9 | // Copyright: See COPYING file that comes with this distribution |
---|
| 10 | // |
---|
| 11 | // |
---|
[673] | 12 | #ifndef _GameStateClient_H__ |
---|
| 13 | #define _GameStateClient_H__ |
---|
[416] | 14 | |
---|
[1005] | 15 | #include <queue> |
---|
| 16 | |
---|
[777] | 17 | #include "NetworkPrereqs.h" |
---|
[1005] | 18 | #include "PacketTypes.h" |
---|
[416] | 19 | |
---|
[777] | 20 | namespace network |
---|
| 21 | { |
---|
| 22 | class GameStateClient |
---|
| 23 | { |
---|
| 24 | public: |
---|
| 25 | GameStateClient(); |
---|
| 26 | ~GameStateClient(); |
---|
[984] | 27 | //#### ADDED FOR TESTING PURPOSE #### |
---|
| 28 | GameState* testDecompress( GameStateCompressed* gc ); |
---|
| 29 | GameState* testUndiff( GameState* g_old, GameState* g_diffed ); |
---|
| 30 | //#### END TESTING PURPOSE #### |
---|
[777] | 31 | bool pushGameState(GameStateCompressed *compstate); |
---|
| 32 | private: |
---|
[905] | 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); |
---|
[777] | 38 | void removeObject(orxonox::Iterator<Synchronisable> &it); |
---|
[416] | 39 | |
---|
[1005] | 40 | GameState *reference; |
---|
| 41 | std::queue<GameState *> gameStateList; |
---|
[777] | 42 | }; |
---|
[732] | 43 | |
---|
[416] | 44 | } |
---|
| 45 | |
---|
[673] | 46 | #endif /* _GameStateClient_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.