diff options
author | Paul Gilbert | 2012-12-05 20:53:14 +1100 |
---|---|---|
committer | Paul Gilbert | 2012-12-05 20:53:14 +1100 |
commit | 6831f5bae612b8472d2f0ce82ec492192c29634b (patch) | |
tree | 664185d30c356a2eba4daba079ab667c17cb9e3c /engines | |
parent | 1f0e31d95ffa0cd072c06b31d37c4ef3014abb7e (diff) | |
download | scummvm-rg350-6831f5bae612b8472d2f0ce82ec492192c29634b.tar.gz scummvm-rg350-6831f5bae612b8472d2f0ce82ec492192c29634b.tar.bz2 scummvm-rg350-6831f5bae612b8472d2f0ce82ec492192c29634b.zip |
HOPKINS: Further fixes for SCBOB
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hopkins/objects.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index 9112245738..ebc1e03f1a 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -722,11 +722,11 @@ void ObjectsManager::SCBOB(int idx) { if (_vm->_globals.Cache[idx].fieldA <= 0) return; - for (int idx = 0; idx <= 20; idx++) { - if ((_vm->_globals.Bob[idx].field0) && (!_vm->_globals.Bob[idx].field16) && (!_vm->_globals.Bob[idx].field34) && (_vm->_globals.Bob[idx].frameIndex != 250)) { - int v2 = _vm->_globals.Bob[idx].oldWidth; - int v9 = _vm->_globals.Bob[idx].oldX + _vm->_globals.Bob[idx].oldWidth; - int v6 = _vm->_globals.Bob[idx].oldY + _vm->_globals.Bob[idx].oldHeight; + for (int v8 = 0; v8 <= 20; v8++) { + if ((_vm->_globals.Bob[v8].field0) && (!_vm->_globals.Bob[v8].field16) && (!_vm->_globals.Bob[v8].field34) && (_vm->_globals.Bob[v8].frameIndex != 250)) { + int v2 = _vm->_globals.Bob[v8].oldWidth; + int v9 = _vm->_globals.Bob[v8].oldX + _vm->_globals.Bob[v8].oldWidth; + int v6 = _vm->_globals.Bob[v8].oldY + _vm->_globals.Bob[v8].oldHeight; int v3 =_vm->_globals.Cache[idx].field0; int v4 =_vm->_globals.Cache[idx].field4; int v7 =_vm->_globals.Cache[idx].field6 + v3; @@ -738,25 +738,25 @@ void ObjectsManager::SCBOB(int idx) { ++_vm->_globals.Cache[idx].fieldA; v1 = 1; } - if (!v1) { + if (!(uint16)v1) { if (v2 >= v3 && v7 >= v2) { ++_vm->_globals.Cache[idx].fieldA; v1 = 1; } } - if (!v1) { + if (!(uint16)v1) { if ( v7 >= v2 && v2 >= v3 ) { ++_vm->_globals.Cache[idx].fieldA; v1 = 1; } } - if (!v1) { + if (!(uint16)v1) { if (v2 >= v3 && v9 <= v7) { ++_vm->_globals.Cache[idx].fieldA; v1 = 1; } } - if (!v1 && v2 <= v3 && v9 >= v7) + if (!(uint16)v1 && v2 <= v3 && v9 >= v7) ++_vm->_globals.Cache[idx].fieldA; } } |