diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/script.cpp | 3 | ||||
-rw-r--r-- | engines/sci/engine/vm.h | 2 | ||||
-rw-r--r-- | engines/sci/gui/gui.cpp | 6 |
3 files changed, 11 insertions, 0 deletions
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp index 36f47e8da8..4ec7e6c54f 100644 --- a/engines/sci/engine/script.cpp +++ b/engines/sci/engine/script.cpp @@ -241,6 +241,9 @@ void Kernel::mapSelectors() { #ifdef ENABLE_SCI32 FIND_SELECTOR(data); FIND_SELECTOR(picture); + FIND_SELECTOR(plane); + FIND_SELECTOR(top); + FIND_SELECTOR(left); #endif } diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h index abc1af119a..a90528ac16 100644 --- a/engines/sci/engine/vm.h +++ b/engines/sci/engine/vm.h @@ -201,6 +201,8 @@ struct SelectorCache { Selector picture; // Used to hold the picture ID for SCI32 pictures Selector plane; + Selector top; + Selector left; #endif }; diff --git a/engines/sci/gui/gui.cpp b/engines/sci/gui/gui.cpp index 32ab95f052..5f03cec1f9 100644 --- a/engines/sci/gui/gui.cpp +++ b/engines/sci/gui/gui.cpp @@ -880,6 +880,9 @@ void SciGui::frameOut() { if (priority == -1) continue; + int16 planeTop = GET_SEL32V(_s->_segMan, planeObj, top); + int16 planeLeft = GET_SEL32V(_s->_segMan, planeObj, left); + for (uint32 itemNr = 0; itemNr < _screenItems.size(); itemNr++) { reg_t viewObj = _screenItems[itemNr]; reg_t planeOfItem = GET_SEL32(_s->_segMan, viewObj, plane); @@ -892,6 +895,9 @@ void SciGui::frameOut() { priority = GET_SEL32V(_s->_segMan, viewObj, priority); //int16 signal = GET_SEL32V(_s->_segMan, viewObj, signal); + leftPos += planeLeft; + topPos += planeTop; + // Theoretically, leftPos and topPos should be sane // Apparently, sometimes they're not, therefore I'm adding some sanity checks here so that // the hack underneath does not try and draw cels outside the screen coordinates |