diff options
Diffstat (limited to 'engines/sherlock')
-rw-r--r-- | engines/sherlock/inventory.cpp | 2 | ||||
-rw-r--r-- | engines/sherlock/map.cpp | 4 | ||||
-rw-r--r-- | engines/sherlock/map.h | 3 | ||||
-rw-r--r-- | engines/sherlock/objects.h | 1 | ||||
-rw-r--r-- | engines/sherlock/scene.cpp | 8 | ||||
-rw-r--r-- | engines/sherlock/scene.h | 6 | ||||
-rw-r--r-- | engines/sherlock/settings.cpp | 2 |
7 files changed, 10 insertions, 16 deletions
diff --git a/engines/sherlock/inventory.cpp b/engines/sherlock/inventory.cpp index 265b12ce76..7f216a35c3 100644 --- a/engines/sherlock/inventory.cpp +++ b/engines/sherlock/inventory.cpp @@ -47,6 +47,8 @@ Inventory::Inventory(SherlockEngine *vm) : Common::Array<InventoryItem>(), _vm(v _invIndex = 0; _holdings = 0; _invMode = INVMODE_EXIT; + for (int i = 0; i < 6; ++i) + _invShapes[i] = nullptr; } Inventory::~Inventory() { diff --git a/engines/sherlock/map.cpp b/engines/sherlock/map.cpp index 96442893ef..42775ae4b0 100644 --- a/engines/sherlock/map.cpp +++ b/engines/sherlock/map.cpp @@ -25,6 +25,10 @@ namespace Sherlock { +MapPaths::MapPaths() { + _numLocations = 0; +} + void MapPaths::load(int numLocations, Common::SeekableReadStream &s) { _numLocations = numLocations; _paths.resize(_numLocations * _numLocations); diff --git a/engines/sherlock/map.h b/engines/sherlock/map.h index 2c8c02325b..ab70b0885f 100644 --- a/engines/sherlock/map.h +++ b/engines/sherlock/map.h @@ -48,7 +48,10 @@ class MapPaths { private: int _numLocations; Common::Array< Common::Array<byte> > _paths; + public: + MapPaths(); + /** * Load the data for the paths between locations on the map */ diff --git a/engines/sherlock/objects.h b/engines/sherlock/objects.h index 6dbe645d4b..bbd068eef7 100644 --- a/engines/sherlock/objects.h +++ b/engines/sherlock/objects.h @@ -120,7 +120,6 @@ public: Common::Point _oldSize; // Image's old size Common::Point _goto; // Walk destination SpriteType _type; // Type of object - int _pickup; Common::Point _noShapeSize; // Size of a NO_SHAPE int _status; // Status: open/closed, moved/not moved int8 _misc; // Miscellaneous use diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp index f97b791724..5ae7e25258 100644 --- a/engines/sherlock/scene.cpp +++ b/engines/sherlock/scene.cpp @@ -106,16 +106,12 @@ Scene::Scene(SherlockEngine *vm) : _vm(vm) { _currentScene = -1; _goToScene = -1; _loadingSavedGame = false; - _changes = false; - _keyboardInput = 0; _walkedInScene = false; _version = 0; _lzwMode = false; _invGraphicItems = 0; _cAnimFramePause = 0; _restoreFlag = false; - _invLookFlag = false; - _lookHelp = false; _animating = 0; _doBgAnimDone = true; _tempFadeStyle = 0; @@ -135,9 +131,6 @@ void Scene::selectScene() { // Reset fields ui._windowOpen = ui._infoFlag = false; ui._menuMode = STD_MODE; - _keyboardInput = 0; - _oldKey = _help = _oldHelp = 0; - _oldTemp = _temp = 0; // Free any previous scene freeScene(); @@ -424,7 +417,6 @@ bool Scene::loadScene(const Common::String &filename) { // Clear user interface area and draw controls ui.drawInterface(); - _changes = false; checkSceneStatus(); if (!saves._justLoaded) { diff --git a/engines/sherlock/scene.h b/engines/sherlock/scene.h index 5ce3702ad1..88d12a3fb0 100644 --- a/engines/sherlock/scene.h +++ b/engines/sherlock/scene.h @@ -110,7 +110,6 @@ class Scene { private: SherlockEngine *_vm; Common::String _rrmName; - bool _lookHelp; bool _loadingSavedGame; /** @@ -158,12 +157,8 @@ private: public: int _currentScene; int _goToScene; - bool _changes; bool _sceneStats[SCENES_COUNT][65]; bool _savedStats[SCENES_COUNT][9]; - int _keyboardInput; - int _oldKey, _help, _oldHelp; - int _oldTemp, _temp; bool _walkedInScene; int _version; bool _lzwMode; @@ -186,7 +181,6 @@ public: bool _doBgAnimDone; int _tempFadeStyle; int _cAnimFramePause; - bool _invLookFlag; public: Scene(SherlockEngine *vm); ~Scene(); diff --git a/engines/sherlock/settings.cpp b/engines/sherlock/settings.cpp index ea4dc56eb2..bf5294f08b 100644 --- a/engines/sherlock/settings.cpp +++ b/engines/sherlock/settings.cpp @@ -143,7 +143,7 @@ int Settings::drawButtons(const Common::Point &pt, int _key) { for (int idx = 0; idx < 12; ++idx) { if ((pt.x > SETUP_POINTS[idx][0] && pt.x < SETUP_POINTS[idx][2] && pt.y > SETUP_POINTS[idx][1] - && pt.y < (SETUP_POINTS[idx][1] + 10) && (events._presed || events._released)) + && pt.y < (SETUP_POINTS[idx][1] + 10) && (events._pressed || events._released)) || (_key == SETUP_NAMES[idx][0])) { found = idx; color = COMMAND_HIGHLIGHTED; |