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
This commit is contained in:
Martin Kiewitz 2010-07-27 23:20:43 +00:00
parent 6e8b11867f
commit 97b1cd34cf
4 changed files with 9 additions and 26 deletions

View File

@ -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) {

View File

@ -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

View File

@ -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() {

View File

@ -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