[Scummvm-cvs-logs] scummvm master -> 8481ff0e618f94e125aed8d90cbabfbacd9ab29a
Strangerke
Strangerke at scummvm.org
Thu Mar 20 19:33:42 CET 2014
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
8481ff0e61 BVBS: Use a constant instead of a variable for the snapshot size
Commit: 8481ff0e618f94e125aed8d90cbabfbacd9ab29a
https://github.com/scummvm/scummvm/commit/8481ff0e618f94e125aed8d90cbabfbacd9ab29a
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-03-20T19:31:40+01:00
Commit Message:
BVBS: Use a constant instead of a variable for the snapshot size
Changed paths:
engines/bbvs/bbvs.cpp
engines/bbvs/bbvs.h
engines/bbvs/saveload.cpp
diff --git a/engines/bbvs/bbvs.cpp b/engines/bbvs/bbvs.cpp
index ed5963a..d2e13e5 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 958d315..6a9a139 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 3bb9800..ff53cc4 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() {
More information about the Scummvm-git-logs
mailing list