diff options
author | Filippos Karapetis | 2010-01-30 01:46:54 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-01-30 01:46:54 +0000 |
commit | b01a793e550dcd7254de5cecfa6d05b25de82846 (patch) | |
tree | ce834dc8da5a9403f18aeb5b35711ef4a54642e6 | |
parent | 928b4a6df6cc24c57ce899c431a5d98da4325af8 (diff) | |
download | scummvm-rg350-b01a793e550dcd7254de5cecfa6d05b25de82846.tar.gz scummvm-rg350-b01a793e550dcd7254de5cecfa6d05b25de82846.tar.bz2 scummvm-rg350-b01a793e550dcd7254de5cecfa6d05b25de82846.zip |
Added a sanity check to baseSetter() - Torin's demo progresses a bit further now
svn-id: r47695
-rw-r--r-- | engines/sci/graphics/gui32.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/engines/sci/graphics/gui32.cpp b/engines/sci/graphics/gui32.cpp index e517496ef0..bc76b4c22c 100644 --- a/engines/sci/graphics/gui32.cpp +++ b/engines/sci/graphics/gui32.cpp @@ -145,17 +145,19 @@ void SciGui32::baseSetter(reg_t object) { int16 loopNo = GET_SEL32V(_s->_segMan, object, loop); int16 celNo = GET_SEL32V(_s->_segMan, object, cel); - View *tmpView = _gfx->getView(viewId); - Common::Rect celRect; - - tmpView->getCelRect(loopNo, celNo, x, y, z, &celRect); - celRect.bottom = y + 1; - celRect.top = celRect.bottom - yStep; - - PUT_SEL32V(_s->_segMan, object, brLeft, celRect.left); - PUT_SEL32V(_s->_segMan, object, brRight, celRect.right); - PUT_SEL32V(_s->_segMan, object, brTop, celRect.top); - PUT_SEL32V(_s->_segMan, object, brBottom, celRect.bottom); + if (viewId != SIGNAL_OFFSET) { + View *tmpView = _gfx->getView(viewId); + Common::Rect celRect; + + tmpView->getCelRect(loopNo, celNo, x, y, z, &celRect); + celRect.bottom = y + 1; + celRect.top = celRect.bottom - yStep; + + PUT_SEL32V(_s->_segMan, object, brLeft, celRect.left); + PUT_SEL32V(_s->_segMan, object, brRight, celRect.right); + PUT_SEL32V(_s->_segMan, object, brTop, celRect.top); + PUT_SEL32V(_s->_segMan, object, brBottom, celRect.bottom); + } } } |