diff options
author | lukaslw | 2014-07-01 21:26:53 +0200 |
---|---|---|
committer | lukaslw | 2014-07-01 21:26:53 +0200 |
commit | aaa2696e48f60ee8ea5020d1d80068e80d42072f (patch) | |
tree | 2878589e66ae878d89b4f8e77f2d70a6afec5c84 | |
parent | 6657a7d8cc4458026eba354fbdd459a704ba82d0 (diff) | |
download | scummvm-rg350-aaa2696e48f60ee8ea5020d1d80068e80d42072f.tar.gz scummvm-rg350-aaa2696e48f60ee8ea5020d1d80068e80d42072f.tar.bz2 scummvm-rg350-aaa2696e48f60ee8ea5020d1d80068e80d42072f.zip |
PRINCE: O_BACKANIMRANGE()
-rw-r--r-- | engines/prince/script.cpp | 15 |
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() { |