diff options
Diffstat (limited to 'engines/sherlock')
-rw-r--r-- | engines/sherlock/objects.cpp | 8 | ||||
-rw-r--r-- | engines/sherlock/objects.h | 2 | ||||
-rw-r--r-- | engines/sherlock/scene.cpp | 10 |
3 files changed, 10 insertions, 10 deletions
diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp index 78b6cda2d3..6231c9abc7 100644 --- a/engines/sherlock/objects.cpp +++ b/engines/sherlock/objects.cpp @@ -544,7 +544,7 @@ void Object::toggleHidden() { /** * Check the state of the object */ -void Object::checkObject(Object &o) { +void Object::checkObject() { Scene &scene = *_vm->_scene; Sound &sound = *_vm->_sound; int checkFrame = _allow ? MAX_FRAME : 32000; @@ -559,9 +559,9 @@ void Object::checkObject(Object &o) { } else { // Continue doing sequence if (*ptr > _seqTo) - *ptr--; + *ptr -= 1; else - *ptr++; + *ptr += 1; return; } @@ -654,7 +654,7 @@ void Object::checkObject(Object &o) { _frameNumber += 2; } else if (v < 4) { for (int idx = 0; idx < 4; ++idx) { - o.checkNameForCodes(_use[v]._names[idx], nullptr); + checkNameForCodes(_use[v]._names[idx], nullptr); } if (_use[v]._useFlag) diff --git a/engines/sherlock/objects.h b/engines/sherlock/objects.h index 534ed66643..2b2472fbbf 100644 --- a/engines/sherlock/objects.h +++ b/engines/sherlock/objects.h @@ -206,7 +206,7 @@ public: void toggleHidden(); - void checkObject(Object &o); + void checkObject(); int checkNameForCodes(const Common::String &name, const char *const messages[]); diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp index 3f551ef5ba..16bb8daecf 100644 --- a/engines/sherlock/scene.cpp +++ b/engines/sherlock/scene.cpp @@ -964,7 +964,7 @@ int Scene::startCAnim(int cAnimNum, int playRate) { Object::_countCAnimFrames = true; while (cObj._type == ACTIVE_BG_SHAPE) { - cObj.checkObject(_bgShapes[0]); + cObj.checkObject(); ++frames; if (frames >= 1000) @@ -1035,7 +1035,7 @@ int Scene::startCAnim(int cAnimNum, int playRate) { gotoCode = cObj._sequences[cObj._frameNumber + 3]; // Set canim to REMOVE type and free memory - cObj.checkObject(_bgShapes[0]); + cObj.checkObject(); if (gotoCode > 0 && !talk._talkToAbort) { _goToScene = gotoCode; @@ -1119,15 +1119,15 @@ void Scene::doBgAnim() { for (uint idx = 0; idx < _bgShapes.size(); ++idx) { if (_bgShapes[idx]._type == ACTIVE_BG_SHAPE) - _bgShapes[idx].checkObject(_bgShapes[idx]); + _bgShapes[idx].checkObject(); } if (people._portraitLoaded && people._portrait._type == ACTIVE_BG_SHAPE) - people._portrait.checkObject(people._portrait); + people._portrait.checkObject(); for (uint idx = 0; idx < _canimShapes.size(); ++idx) { if (_canimShapes[idx]._type != INVALID && _canimShapes[idx]._type != REMOVE) - _canimShapes[idx].checkObject(_bgShapes[0]); + _canimShapes[idx].checkObject(); } if (_currentScene == 12 && _vm->getGameID() == GType_SerratedScalpel) |