diff options
author | Sven Hesse | 2009-06-25 10:55:01 +0000 |
---|---|---|
committer | Sven Hesse | 2009-06-25 10:55:01 +0000 |
commit | 8343bc6cc05dfbc8480306cfb60fe8cde593deb5 (patch) | |
tree | f6620997b114a5d4f8ae0399fbacbc10b5a987be /engines/gob/game.h | |
parent | 88062e90a00112e8c959edf7adac83db489198c2 (diff) | |
download | scummvm-rg350-8343bc6cc05dfbc8480306cfb60fe8cde593deb5.tar.gz scummvm-rg350-8343bc6cc05dfbc8480306cfb60fe8cde593deb5.tar.bz2 scummvm-rg350-8343bc6cc05dfbc8480306cfb60fe8cde593deb5.zip |
Giving the "backup" arrays their own class, Environments, and really plugging all related leaks
svn-id: r41860
Diffstat (limited to 'engines/gob/game.h')
-rw-r--r-- | engines/gob/game.h | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/engines/gob/game.h b/engines/gob/game.h index bf66312f6a..e01fe53641 100644 --- a/engines/gob/game.h +++ b/engines/gob/game.h @@ -26,12 +26,11 @@ #ifndef GOB_GAME_H #define GOB_GAME_H -#include "gob/variables.h" - namespace Gob { class Script; class Resources; +class Variables; class Game { public: @@ -121,6 +120,29 @@ public: virtual void popCollisions(void) = 0; protected: + static const int kMaxEnvironments = 5; + + class Environment { + public: + Environment(GobEngine *vm); + ~Environment(); + + void set(); + void get(); + + const char *getTotFile() const; + + private: + GobEngine *_vm; + + int16 _cursorHotspotX; + int16 _cursorHotspotY; + char _curTotFile[14]; + Variables *_variables; + Script *_script; + Resources *_resources; + }; + int16 _lastCollKey; int16 _lastCollAreaIndex; int16 _lastCollId; @@ -145,14 +167,9 @@ protected: char _collStr[256]; // For totSub() - int8 _backupedCount; - int8 _curBackupPos; - int16 _cursorHotspotXArray[5]; - int16 _cursorHotspotYArray[5]; - Variables *_variablesArray[5]; - char _curTotFileArray[5][14]; - Script *_scriptArray[5]; - Resources *_resourcesArray[5]; + int8 _curEnvironment; + int8 _numEnvironments; + Environment *_environments[kMaxEnvironments]; GobEngine *_vm; |