[Scummvm-cvs-logs] scummvm master -> 766b4fdde65d8592c00df8cce9e52f4964a2d061
eriktorbjorn
eriktorbjorn at telia.com
Fri Jun 5 08:20:28 CEST 2015
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:
766b4fdde6 SHERLOCK: Scalpel and Rose Tattoo have different SCENE_COUNT
Commit: 766b4fdde65d8592c00df8cce9e52f4964a2d061
https://github.com/scummvm/scummvm/commit/766b4fdde65d8592c00df8cce9e52f4964a2d061
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2015-06-05T08:17:47+02:00
Commit Message:
SHERLOCK: Scalpel and Rose Tattoo have different SCENE_COUNT
Though at the moment, the SCENE_COUNT for Rose Tattoo is just a
guess.
Changed paths:
engines/sherlock/scene.cpp
engines/sherlock/scene.h
engines/sherlock/sherlock.h
diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp
index abcf0d9..c377ab7 100644
--- a/engines/sherlock/scene.cpp
+++ b/engines/sherlock/scene.cpp
@@ -161,8 +161,16 @@ Scene *Scene::init(SherlockEngine *vm) {
}
Scene::Scene(SherlockEngine *vm): _vm(vm) {
- for (int idx = 0; idx < SCENES_COUNT; ++idx)
- Common::fill(&_sceneStats[idx][0], &_sceneStats[idx][65], false);
+ // TODO: _savedStats isn't ever used?
+ _sceneStats = new bool *[SCENES_COUNT];
+ _savedStats = new bool *[SCENES_COUNT];
+ _sceneStats[0] = new bool[SCENES_COUNT * 65];
+ _savedStats[0] = new bool[SCENES_COUNT * 9];
+ Common::fill(&_sceneStats[0][0], &_sceneStats[0][SCENES_COUNT * 65], false);
+ for (int idx = 1; idx < SCENES_COUNT; ++idx) {
+ _sceneStats[idx] = _sceneStats[idx - 1] + 65;
+ _savedStats[idx] = _savedStats[idx - 1] + 9;
+ }
_currentScene = -1;
_goToScene = -1;
_loadingSavedGame = false;
@@ -180,6 +188,10 @@ Scene::Scene(SherlockEngine *vm): _vm(vm) {
Scene::~Scene() {
freeScene();
+ delete[] _sceneStats[0];
+ delete[] _sceneStats;
+ delete[] _savedStats[0];
+ delete[] _savedStats;
}
void Scene::selectScene() {
diff --git a/engines/sherlock/scene.h b/engines/sherlock/scene.h
index 0831de2..1555e37 100644
--- a/engines/sherlock/scene.h
+++ b/engines/sherlock/scene.h
@@ -33,7 +33,6 @@
namespace Sherlock {
-#define SCENES_COUNT 63
#define MAX_ZONES 40
#define INFO_LINE 140
@@ -202,8 +201,8 @@ protected:
public:
int _currentScene;
int _goToScene;
- bool _sceneStats[SCENES_COUNT][65];
- bool _savedStats[SCENES_COUNT][9];
+ bool **_sceneStats;
+ bool **_savedStats;
bool _walkedInScene;
int _version;
bool _lzwMode;
diff --git a/engines/sherlock/sherlock.h b/engines/sherlock/sherlock.h
index 75c8498..a392e1d 100644
--- a/engines/sherlock/sherlock.h
+++ b/engines/sherlock/sherlock.h
@@ -65,6 +65,8 @@ enum GameType {
#define SHERLOCK_SCREEN_WIDTH _vm->_screen->w()
#define SHERLOCK_SCREEN_HEIGHT _vm->_screen->h()
#define SHERLOCK_SCENE_HEIGHT (IS_SERRATED_SCALPEL ? 138 : 480)
+// TODO: Is this the correct scene count for The Case of the Rose Tattoo?
+#define SCENES_COUNT (IS_SERRATED_SCALPEL ? 63 : 99)
struct SherlockGameDescription;
More information about the Scummvm-git-logs
mailing list