diff options
author | Strangerke | 2014-03-20 19:31:40 +0100 |
---|---|---|
committer | Strangerke | 2014-03-20 19:31:40 +0100 |
commit | 8481ff0e618f94e125aed8d90cbabfbacd9ab29a (patch) | |
tree | 2103b8dbb69f330f29b51660fa6b9234b74cbe68 | |
parent | e324f3e6be23ff3c415a22ec2cb2596dbdec2bfc (diff) | |
download | scummvm-rg350-8481ff0e618f94e125aed8d90cbabfbacd9ab29a.tar.gz scummvm-rg350-8481ff0e618f94e125aed8d90cbabfbacd9ab29a.tar.bz2 scummvm-rg350-8481ff0e618f94e125aed8d90cbabfbacd9ab29a.zip |
BVBS: Use a constant instead of a variable for the snapshot size
-rw-r--r-- | engines/bbvs/bbvs.cpp | 1 | ||||
-rw-r--r-- | engines/bbvs/bbvs.h | 2 | ||||
-rw-r--r-- | engines/bbvs/saveload.cpp | 5 |
3 files changed, 3 insertions, 5 deletions
diff --git a/engines/bbvs/bbvs.cpp b/engines/bbvs/bbvs.cpp index ed5963ae08..d2e13e525c 100644 --- a/engines/bbvs/bbvs.cpp +++ b/engines/bbvs/bbvs.cpp @@ -91,7 +91,6 @@ BbvsEngine::BbvsEngine(OSystem *syst, const ADGameDescription *gd) : _currWalkDistance = kMaxDistance; _walkReachedDestArea = false; _hasSnapshot = false; - _snapshotSize = 0; _snapshot = nullptr; _snapshotStream = nullptr; _isSaveAllowed = false; diff --git a/engines/bbvs/bbvs.h b/engines/bbvs/bbvs.h index 958d315964..6a9a13905c 100644 --- a/engines/bbvs/bbvs.h +++ b/engines/bbvs/bbvs.h @@ -199,6 +199,7 @@ struct WalkArea { bool contains(const Common::Point &pt) const; }; +const int kSnapshotSize = 23072; const int kSceneObjectsCount = 64; const int kSceneSoundsCount = 8; const int kInventoryItemStatusCount = 50; @@ -304,7 +305,6 @@ public: bool _walkReachedDestArea; bool _hasSnapshot; - uint32 _snapshotSize; byte *_snapshot; Common::SeekableMemoryWriteStream *_snapshotStream; diff --git a/engines/bbvs/saveload.cpp b/engines/bbvs/saveload.cpp index 3bb980053c..ff53cc457b 100644 --- a/engines/bbvs/saveload.cpp +++ b/engines/bbvs/saveload.cpp @@ -212,9 +212,8 @@ bool BbvsEngine::existsSavegame(int num) { } void BbvsEngine::allocSnapshot() { - _snapshotSize = 23072; - _snapshot = new byte[_snapshotSize]; - _snapshotStream = new Common::SeekableMemoryWriteStream(_snapshot, _snapshotSize); + _snapshot = new byte[kSnapshotSize]; + _snapshotStream = new Common::SeekableMemoryWriteStream(_snapshot, kSnapshotSize); } void BbvsEngine::freeSnapshot() { |