[Scummvm-cvs-logs] scummvm master -> 2db07a9d39cc9557d292908d84d3fc146635fd75
Strangerke
Strangerke at scummvm.org
Fri May 22 19:58:53 CEST 2015
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
68c7c158e9 SHERLOCK: Fix OR check with identical operands
9a58e485bf SHERLOCK: Fix some uninitialized values and unused variables
2db07a9d39 SHERLOCK: Skip delay when intro is skipped
Commit: 68c7c158e93e27919d0b63d537b3b18ba35543ca
https://github.com/scummvm/scummvm/commit/68c7c158e93e27919d0b63d537b3b18ba35543ca
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-05-22T19:25:52+02:00
Commit Message:
SHERLOCK: Fix OR check with identical operands
Changed paths:
engines/sherlock/settings.cpp
diff --git a/engines/sherlock/settings.cpp b/engines/sherlock/settings.cpp
index 44735d9..ea4dc56 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._released || events._released))
+ && pt.y < (SETUP_POINTS[idx][1] + 10) && (events._presed || events._released))
|| (_key == SETUP_NAMES[idx][0])) {
found = idx;
color = COMMAND_HIGHLIGHTED;
Commit: 9a58e485bfeb97c2a282f809386350e697790db5
https://github.com/scummvm/scummvm/commit/9a58e485bfeb97c2a282f809386350e697790db5
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-05-22T19:52:00+02:00
Commit Message:
SHERLOCK: Fix some uninitialized values and unused variables
Changed paths:
engines/sherlock/inventory.cpp
engines/sherlock/map.cpp
engines/sherlock/map.h
engines/sherlock/objects.h
engines/sherlock/scene.cpp
engines/sherlock/scene.h
engines/sherlock/settings.cpp
diff --git a/engines/sherlock/inventory.cpp b/engines/sherlock/inventory.cpp
index 265b12c..7f216a3 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 9644289..42775ae 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 2c8c023..ab70b08 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 6dbe645..bbd068e 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 f97b791..5ae7e25 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 5ce3702..88d12a3 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 ea4dc56..bf5294f 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;
Commit: 2db07a9d39cc9557d292908d84d3fc146635fd75
https://github.com/scummvm/scummvm/commit/2db07a9d39cc9557d292908d84d3fc146635fd75
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-05-22T19:55:45+02:00
Commit Message:
SHERLOCK: Skip delay when intro is skipped
Changed paths:
engines/sherlock/scalpel/scalpel.cpp
diff --git a/engines/sherlock/scalpel/scalpel.cpp b/engines/sherlock/scalpel/scalpel.cpp
index d55517c..7875f22 100644
--- a/engines/sherlock/scalpel/scalpel.cpp
+++ b/engines/sherlock/scalpel/scalpel.cpp
@@ -611,8 +611,10 @@ bool ScalpelEngine::showOfficeCutscene() {
} else
finished = _events->delay(19000);
- _events->clearEvents();
- finished = _events->delay(500);
+ if (finished) {
+ _events->clearEvents();
+ finished = _events->delay(500);
+ }
}
if (finished)
More information about the Scummvm-git-logs
mailing list