diff options
| author | Sven Hesse | 2011-01-26 19:02:20 +0000 |
|---|---|---|
| committer | Sven Hesse | 2011-01-26 19:02:20 +0000 |
| commit | 1686ecdf8395a511e93c9a69ef179403e3d17cf2 (patch) | |
| tree | 2391b9309001dccf4e8aa6752b09a7ddd3e37d58 /engines | |
| parent | e5f9eb30d36768352ebd677a0809bf30572e2053 (diff) | |
| download | scummvm-rg350-1686ecdf8395a511e93c9a69ef179403e3d17cf2.tar.gz scummvm-rg350-1686ecdf8395a511e93c9a69ef179403e3d17cf2.tar.bz2 scummvm-rg350-1686ecdf8395a511e93c9a69ef179403e3d17cf2.zip | |
GOB: Increase kEnvironmentCount to 20 for Addy
svn-id: r55545
Diffstat (limited to 'engines')
| -rw-r--r-- | engines/gob/game.cpp | 6 | ||||
| -rw-r--r-- | engines/gob/game.h | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/engines/gob/game.cpp b/engines/gob/game.cpp index 09f925bcc7..29319996b5 100644 --- a/engines/gob/game.cpp +++ b/engines/gob/game.cpp @@ -44,8 +44,6 @@ namespace Gob { Environments::Environments(GobEngine *vm) : _vm(vm) { - _environments = new Environment[kEnvironmentCount]; - for (uint i = 0; i < kEnvironmentCount; i++) { Environment &e = _environments[i]; @@ -60,8 +58,6 @@ Environments::Environments(GobEngine *vm) : _vm(vm) { Environments::~Environments() { clear(); - - delete[] _environments; } void Environments::clear() { @@ -565,7 +561,7 @@ void Game::totSub(int8 flags, const char *newTotFile) { warning("Urban Stub: Game::totSub(), flags == %d", flags); if (_numEnvironments >= Environments::kEnvironmentCount) - return; + error("Game::totSub(): Environments overflow"); _environments->set(_numEnvironments); diff --git a/engines/gob/game.h b/engines/gob/game.h index a9985028cb..186afdee1a 100644 --- a/engines/gob/game.h +++ b/engines/gob/game.h @@ -37,7 +37,7 @@ class Hotspots; class Environments { public: - static const uint8 kEnvironmentCount = 5; + static const uint8 kEnvironmentCount = 20; Environments(GobEngine *vm); ~Environments(); @@ -48,7 +48,7 @@ public: const char *getTotFile(uint8 env) const; bool has(Variables *variables, uint8 startEnv = 0, int16 except = -1) const; - bool has(Script *script , uint8 startEnv = 0, int16 except = -1) const; + bool has(Script *script , uint8 startEnv = 0, int16 except = -1) const; bool has(Resources *resources, uint8 startEnv = 0, int16 except = -1) const; void clear(); @@ -65,7 +65,7 @@ private: GobEngine *_vm; - Environment *_environments; + Environment _environments[kEnvironmentCount]; }; class Game { |
