diff options
author | Martin Kiewitz | 2010-07-27 23:20:43 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-07-27 23:20:43 +0000 |
commit | 97b1cd34cf5b41c08e3e80f3dd9ce59db9865093 (patch) | |
tree | 4674c8cd1e0fe9403ef9485bdeaae7f10767a680 | |
parent | 6e8b11867f471682ccab841da08d97575753c54f (diff) | |
download | scummvm-rg350-97b1cd34cf5b41c08e3e80f3dd9ce59db9865093.tar.gz scummvm-rg350-97b1cd34cf5b41c08e3e80f3dd9ce59db9865093.tar.bz2 scummvm-rg350-97b1cd34cf5b41c08e3e80f3dd9ce59db9865093.zip |
SCI: sci1.1 priority bands now changing in kDrawPic
fixes qfg3: right guard on top of the palace having wrong priority
fixes sq5 and all sorts of sci1.1 games: when loading wrong priority for some actors that fixed itself after one frame
svn-id: r51397
-rw-r--r-- | engines/sci/graphics/animate.cpp | 3 | ||||
-rw-r--r-- | engines/sci/graphics/picture.cpp | 4 | ||||
-rw-r--r-- | engines/sci/graphics/ports.cpp | 22 | ||||
-rw-r--r-- | engines/sci/graphics/ports.h | 6 |
4 files changed, 9 insertions, 26 deletions
diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp index f2aa4f9479..a883f572bb 100644 --- a/engines/sci/graphics/animate.cpp +++ b/engines/sci/graphics/animate.cpp @@ -542,9 +542,6 @@ void GfxAnimate::animateShowPic() { _transitions->doit(picRect); if (previousCursorState) _cursor->kernelShow(); - - // We set SCI1.1 priority band information here - _ports->priorityBandsRecall(); } void GfxAnimate::kernelAnimate(reg_t listReference, bool cycle, int argc, reg_t *argv) { diff --git a/engines/sci/graphics/picture.cpp b/engines/sci/graphics/picture.cpp index b31036daa8..107c5d0967 100644 --- a/engines/sci/graphics/picture.cpp +++ b/engines/sci/graphics/picture.cpp @@ -122,8 +122,8 @@ void GfxPicture::drawSci11Vga() { // process vector data drawVectorData(inbuffer + vector_dataPos, vector_size); - // Remember priority band information for later - _ports->priorityBandsRemember(inbuffer + 40); + // Set priority band information + _ports->priorityBandsInitSci11(inbuffer + 40); } #ifdef ENABLE_SCI32 diff --git a/engines/sci/graphics/ports.cpp b/engines/sci/graphics/ports.cpp index 71c4c5e656..9268888b6c 100644 --- a/engines/sci/graphics/ports.cpp +++ b/engines/sci/graphics/ports.cpp @@ -134,8 +134,6 @@ void GfxPorts::init(bool usesOldGfxFunctions, GfxPaint16 *paint16, GfxText16 *te if (g_sci->_features->usesOldGfxFunctions()) _picWind->top = offTop; - priorityBandsMemoryActive = false; - kernelInitPriorityBands(); } @@ -541,22 +539,14 @@ void GfxPorts::priorityBandsInit(byte *data) { _priorityBands[i++] = inx; } -// Gets used by picture class to remember priority bands data from sci1.1 pictures that need to get applied when -// transitioning to that picture -void GfxPorts::priorityBandsRemember(byte *data) { - int bandNo; - for (bandNo = 0; bandNo < 14; bandNo++) { - priorityBandsMemory[bandNo] = READ_LE_UINT16(data); +// Gets used to read priority bands data from sci1.1 pictures +void GfxPorts::priorityBandsInitSci11(byte *data) { + byte priorityBands[14]; + for (int bandNo = 0; bandNo < 14; bandNo++) { + priorityBands[bandNo] = READ_LE_UINT16(data); data += 2; } - priorityBandsMemoryActive = true; -} - -void GfxPorts::priorityBandsRecall() { - if (priorityBandsMemoryActive) { - priorityBandsInit((byte *)&priorityBandsMemory); - priorityBandsMemoryActive = false; - } + priorityBandsInit(priorityBands); } void GfxPorts::kernelInitPriorityBands() { diff --git a/engines/sci/graphics/ports.h b/engines/sci/graphics/ports.h index 818f92f44f..d10bc6772f 100644 --- a/engines/sci/graphics/ports.h +++ b/engines/sci/graphics/ports.h @@ -81,8 +81,7 @@ public: void priorityBandsInit(int16 bandCount, int16 top, int16 bottom); void priorityBandsInit(byte *data); - void priorityBandsRemember(byte *data); - void priorityBandsRecall(); + void priorityBandsInitSci11(byte *data); void kernelInitPriorityBands(); void kernelGraphAdjustPriority(int top, int bottom); @@ -121,9 +120,6 @@ private: // Priority Bands related variables int16 _priorityTop, _priorityBottom, _priorityBandCount; byte _priorityBands[200]; - - byte priorityBandsMemory[14]; - bool priorityBandsMemoryActive; }; } // End of namespace Sci |