diff options
author | Martin Kiewitz | 2010-01-05 00:12:31 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-01-05 00:12:31 +0000 |
commit | 575bc45301f7c510dd9aced29b597ba6bd040618 (patch) | |
tree | 294f5a4c9688bdfa80ade2a4dcdb444ac3010955 | |
parent | f8ba8886ce2694f7fe0867e264d8209e1d3c4f4e (diff) | |
download | scummvm-rg350-575bc45301f7c510dd9aced29b597ba6bd040618.tar.gz scummvm-rg350-575bc45301f7c510dd9aced29b597ba6bd040618.tar.bz2 scummvm-rg350-575bc45301f7c510dd9aced29b597ba6bd040618.zip |
SCI: adjusting cel drawing according to left/top of plane
svn-id: r47002
-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 |