diff options
author | Martin Kiewitz | 2010-01-15 21:13:33 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-01-15 21:13:33 +0000 |
commit | edb9487df58db906c30d2ac0f3338a9adb5951cb (patch) | |
tree | 52588ed621925e38f3a401bb1676bea35a215551 /engines/sci | |
parent | 552746951e5c034d1e740f81a6940f948cc36d19 (diff) | |
download | scummvm-rg350-edb9487df58db906c30d2ac0f3338a9adb5951cb.tar.gz scummvm-rg350-edb9487df58db906c30d2ac0f3338a9adb5951cb.tar.bz2 scummvm-rg350-edb9487df58db906c30d2ac0f3338a9adb5951cb.zip |
SCI: adding caching for scalesignal, scaleX and scaleY within kAnimate()
svn-id: r47311
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/graphics/animate.cpp | 19 | ||||
-rw-r--r-- | engines/sci/graphics/helpers.h | 3 |
2 files changed, 14 insertions, 8 deletions
diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp index f4668540f0..004db1712f 100644 --- a/engines/sci/graphics/animate.cpp +++ b/engines/sci/graphics/animate.cpp @@ -158,6 +158,16 @@ void SciGuiAnimate::makeSortedList(List *list) { listEntry->z = GET_SEL32V(_s->_segMan, curObject, z); listEntry->priority = GET_SEL32V(_s->_segMan, curObject, priority); listEntry->signal = GET_SEL32V(_s->_segMan, curObject, signal); + if (getSciVersion() >= SCI_VERSION_1_1) { + // Cel scaling + listEntry->scaleSignal = GET_SEL32V(_s->_segMan, curObject, scalesignal); + listEntry->scaleX = GET_SEL32V(_s->_segMan, curObject, scaleX); + listEntry->scaleY = GET_SEL32V(_s->_segMan, curObject, scaleY); + } else { + listEntry->scaleSignal = 0; + listEntry->scaleX = 128; + listEntry->scaleY = 128; + } // listEntry->celRect is filled in AnimateFill() listEntry->showBitsFlag = false; @@ -347,7 +357,6 @@ void SciGuiAnimate::drawCels() { reg_t bitsHandle; AnimateList::iterator listIterator; AnimateList::iterator listEnd = _list.end(); - uint16 scaleX = 128, scaleY = 128; // no scaling _lastCastCount = 0; listIterator = _list.begin(); @@ -361,14 +370,8 @@ void SciGuiAnimate::drawCels() { bitsHandle = _gfx->BitsSave(listEntry->celRect, SCI_SCREEN_MASK_ALL); PUT_SEL32(_s->_segMan, curObject, underBits, bitsHandle); - if (getSciVersion() >= SCI_VERSION_1_1) { - // View scaling - scaleX = GET_SEL32V(_s->_segMan, curObject, scaleX); - scaleY = GET_SEL32V(_s->_segMan, curObject, scaleY); - } - // draw corresponding cel - _gfx->drawCel(listEntry->viewId, listEntry->loopNo, listEntry->celNo, listEntry->celRect, listEntry->priority, listEntry->paletteNo, scaleX, scaleY); + _gfx->drawCel(listEntry->viewId, listEntry->loopNo, listEntry->celNo, listEntry->celRect, listEntry->priority, listEntry->paletteNo, listEntry->scaleX, listEntry->scaleY); listEntry->showBitsFlag = true; if (signal & kSignalRemoveView) { diff --git a/engines/sci/graphics/helpers.h b/engines/sci/graphics/helpers.h index 6799162f40..2d7239f975 100644 --- a/engines/sci/graphics/helpers.h +++ b/engines/sci/graphics/helpers.h @@ -87,6 +87,9 @@ struct AnimateEntry { int16 x, y, z; int16 priority; uint16 signal; + uint16 scaleSignal; + int16 scaleX; + int16 scaleY; Common::Rect celRect; bool showBitsFlag; reg_t castHandle; |