diff options
author | Strangerke | 2013-03-27 00:51:35 +0100 |
---|---|---|
committer | Strangerke | 2013-03-27 00:51:35 +0100 |
commit | 9f9e665d8ececf9a068029daeae0e5d24ccc4cee (patch) | |
tree | f6392212ebf0f49d3bf47b1fdc2556bccaba176b /engines/hopkins/objects.cpp | |
parent | 02f939c28209122ed1b8bef3cbf98973afed4bee (diff) | |
download | scummvm-rg350-9f9e665d8ececf9a068029daeae0e5d24ccc4cee.tar.gz scummvm-rg350-9f9e665d8ececf9a068029daeae0e5d24ccc4cee.tar.bz2 scummvm-rg350-9f9e665d8ececf9a068029daeae0e5d24ccc4cee.zip |
HOPKINS: Fix several Cppcheck warning
Diffstat (limited to 'engines/hopkins/objects.cpp')
-rw-r--r-- | engines/hopkins/objects.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index eec65aca3c..c4bb7b5bc1 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -718,7 +718,9 @@ void ObjectsManager::SCBOB(int idx) { if ((oldBottom > hid->_y) && (oldBottom < hid->_yOffset +hid->_height + hid->_y)) { if ((oldRight >= hid->_x && oldRight <= cachedRight) - || (cachedRight >= _bob[i]._oldWidth && _bob[i]._oldWidth >= hid->_x) + // CHECKME: The original was doing the test two times. This looks like an + // original bug + // || (cachedRight >= _bob[i]._oldWidth && _bob[i]._oldWidth >= hid->_x) || (cachedRight >= _bob[i]._oldWidth && _bob[i]._oldWidth >= hid->_x) || (_bob[i]._oldWidth >= hid->_x && oldRight <= cachedRight) || (_bob[i]._oldWidth <= hid->_x && oldRight >= cachedRight)) @@ -827,7 +829,9 @@ void ObjectsManager::checkHidingItem() { if (bottom > hid->_y && bottom < (hid->_yOffset + hid->_height + hid->_y)) { if ((right >= hid->_x && right <= hidingRight) - || (hidingRight >= spr->_destX && hid->_x <= spr->_destX) + // CHECKME: The original was doing the test two times. This looks like an + // original bug + // || (hidingRight >= spr->_destX && hid->_x <= spr->_destX) || (hidingRight >= spr->_destX && hid->_x <= spr->_destX) || (hid->_x <= spr->_destX && right <= hidingRight) || (hid->_x >= spr->_destX && right >= hidingRight)) |