diff options
author | Paul Gilbert | 2015-05-01 10:08:14 -1000 |
---|---|---|
committer | Paul Gilbert | 2015-05-01 10:08:14 -1000 |
commit | b8372695ebc3b266f9fbe074dbbdd8e3015ce547 (patch) | |
tree | 01ddc312d9f05b47a3755e913c281e4b60276df6 | |
parent | ffd65cfd36841f6e117d800043d1cf695951f8a9 (diff) | |
download | scummvm-rg350-b8372695ebc3b266f9fbe074dbbdd8e3015ce547.tar.gz scummvm-rg350-b8372695ebc3b266f9fbe074dbbdd8e3015ce547.tar.bz2 scummvm-rg350-b8372695ebc3b266f9fbe074dbbdd8e3015ce547.zip |
SHERLOCK: Refactored out _ongoingCans field
-rw-r--r-- | engines/sherlock/scene.cpp | 8 | ||||
-rw-r--r-- | engines/sherlock/scene.h | 1 | ||||
-rw-r--r-- | engines/sherlock/talk.cpp | 2 |
3 files changed, 2 insertions, 9 deletions
diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp index a9763a7fc5..55cdde2f56 100644 --- a/engines/sherlock/scene.cpp +++ b/engines/sherlock/scene.cpp @@ -91,7 +91,6 @@ Scene::Scene(SherlockEngine *vm): _vm(vm) { _changes = false; _keyboardInput = 0; _walkedInScene = false; - _ongoingCans = 0; _version = 0; _lzwMode = false; _invGraphicItems = 0; @@ -201,7 +200,6 @@ bool Scene::loadScene(const Common::String &filename) { bool flag; _walkedInScene = false; - _ongoingCans = 0; // Reset the list of walkable areas _zones.clear(); @@ -962,8 +960,6 @@ int Scene::startCAnim(int cAnimNum, int playRate) { cObj._imageFrame = &(*cObj._images)[0]; cObj._maxFrames = cObj._images->size(); - ++_ongoingCans; - int frames = 0; if (playRate < 0) { // Reverse direction @@ -1317,7 +1313,7 @@ void Scene::doBgAnim() { _animating = 0; screen.slamRect(Common::Rect(0, 0, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCENE_HEIGHT)); } else { - if (people[AL]._type != INVALID && ((_goToScene == -1 || _ongoingCans == 0))) { + if (people[AL]._type != INVALID && ((_goToScene == -1 || _canimShapes.size() == 0))) { if (people[AL]._type == REMOVE) { screen.slamRect(Common::Rect( people[AL]._oldPosition.x, people[AL]._oldPosition.y, @@ -1383,8 +1379,6 @@ void Scene::doBgAnim() { screen.slamArea(o._position.x, o._position.y, o._delta.x, o._delta.y); _canimShapes[idx]._type = INVALID; - if (_ongoingCans > 0) - --_ongoingCans; } else if (o._type == ACTIVE_BG_SHAPE) { screen.flushImage(o._imageFrame, o._position, &o._oldPosition.x, &o._oldPosition.y, &o._oldSize.x, &o._oldSize.y); diff --git a/engines/sherlock/scene.h b/engines/sherlock/scene.h index 159f281bdf..4fb7ac228a 100644 --- a/engines/sherlock/scene.h +++ b/engines/sherlock/scene.h @@ -111,7 +111,6 @@ public: int _oldKey, _help, _oldHelp; int _oldTemp, _temp; bool _walkedInScene; - int _ongoingCans; int _version; bool _lzwMode; int _invGraphicItems; diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp index da72125f72..a848e11392 100644 --- a/engines/sherlock/talk.cpp +++ b/engines/sherlock/talk.cpp @@ -134,7 +134,7 @@ void Talk::talkTo(const Common::String &filename) { // If there any canimations currently running, or a portrait is being cleared, // save the filename for later executing when the canimation is done - if (scene._ongoingCans || people._clearingThePortrait) { + if (scene._canimShapes.size() > 0 || people._clearingThePortrait) { // Make sure we're not in the middle of a script if (!_scriptMoreFlag) { _scriptName = filename; |