aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukaslw2014-07-01 21:26:53 +0200
committerlukaslw2014-07-01 21:26:53 +0200
commitaaa2696e48f60ee8ea5020d1d80068e80d42072f (patch)
tree2878589e66ae878d89b4f8e77f2d70a6afec5c84
parent6657a7d8cc4458026eba354fbdd459a704ba82d0 (diff)
downloadscummvm-rg350-aaa2696e48f60ee8ea5020d1d80068e80d42072f.tar.gz
scummvm-rg350-aaa2696e48f60ee8ea5020d1d80068e80d42072f.tar.bz2
scummvm-rg350-aaa2696e48f60ee8ea5020d1d80068e80d42072f.zip
PRINCE: O_BACKANIMRANGE()
-rw-r--r--engines/prince/script.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/engines/prince/script.cpp b/engines/prince/script.cpp
index ade79f0071..4dbc6df864 100644
--- a/engines/prince/script.cpp
+++ b/engines/prince/script.cpp
@@ -1461,8 +1461,21 @@ void Interpreter::O_BACKANIMRANGE() {
}
}
- debugInterpreter("O_BACKANIMRANGE slotId %d, animId %d, low %d, high %d", slotId, animId, low, high);
_result = 1;
+ if (slotId < _vm->_backAnimList.size()) {
+ if (animId == 0xFFFF || _vm->_backAnimList[slotId]._seq._current == animId) {
+ int currAnim = _vm->_backAnimList[slotId]._seq._currRelative;
+ Anim &backAnim = _vm->_backAnimList[slotId].backAnims[currAnim];
+ if (!backAnim._state) {
+ if (backAnim._frame >= low) {
+ if (backAnim._frame <= high) {
+ _result = 0;
+ }
+ }
+ }
+ }
+ }
+ debugInterpreter("O_BACKANIMRANGE slotId %d, animId %d, low %d, high %d, _result %d", slotId, animId, low, high, _result);
}
void Interpreter::O_CLEARPATH() {