aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/vga.cpp
diff options
context:
space:
mode:
authorTravis Howell2006-10-22 05:11:27 +0000
committerTravis Howell2006-10-22 05:11:27 +0000
commit196c2bf2545ac1a95c09c02078c29b0db7125ba5 (patch)
treec739eda30499cacb2abbb73a7a48c447f4ef252e /engines/agos/vga.cpp
parent872a708c4ea66a6e9963ec059b62b94d9b6bee71 (diff)
downloadscummvm-rg350-196c2bf2545ac1a95c09c02078c29b0db7125ba5.tar.gz
scummvm-rg350-196c2bf2545ac1a95c09c02078c29b0db7125ba5.tar.bz2
scummvm-rg350-196c2bf2545ac1a95c09c02078c29b0db7125ba5.zip
Fix regression is WW, caused by functions merge
svn-id: r24429
Diffstat (limited to 'engines/agos/vga.cpp')
-rw-r--r--engines/agos/vga.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp
index e398fa2dd4..fa66b41c8c 100644
--- a/engines/agos/vga.cpp
+++ b/engines/agos/vga.cpp
@@ -420,7 +420,7 @@ void AGOSEngine::vc2_call() {
old_file_1 = _curVgaFile1;
old_file_2 = _curVgaFile2;
- setImage(num, false);
+ setImage(num, true);
_curVgaFile1 = old_file_1;
_curVgaFile2 = old_file_2;
@@ -451,7 +451,7 @@ void AGOSEngine::vc3_loadSprite() {
old_file_1 = _curVgaFile1;
- animate(windowNum, zoneNum, vgaSpriteId, x, y, palette, false);
+ animate(windowNum, zoneNum, vgaSpriteId, x, y, palette, true);
_curVgaFile1 = old_file_1;
}
@@ -1670,7 +1670,7 @@ void AGOSEngine::vc63_fastFadeIn() {
_fastFadeOutFlag = false;
}
-void AGOSEngine::animate(uint windowNum, uint zoneNum, uint vgaSpriteId, uint x, uint y, uint palette, bool setZone) {
+void AGOSEngine::animate(uint windowNum, uint zoneNum, uint vgaSpriteId, uint x, uint y, uint palette, bool vgaScript) {
VgaSprite *vsp;
VgaPointersEntry *vpe;
byte *p, *pp;
@@ -1704,12 +1704,7 @@ void AGOSEngine::animate(uint windowNum, uint zoneNum, uint vgaSpriteId, uint x,
for (;;) {
vpe = &_vgaBufferPointers[zoneNum];
_curVgaFile1 = vpe->vgaFile1;
- if (setZone) {
- _zoneNumber = zoneNum;
- if (vpe->vgaFile1 != NULL)
- break;
- loadZone(zoneNum);
- } else {
+ if (vgaScript) {
if (vpe->vgaFile1 != NULL)
break;
if (_zoneNumber != zoneNum)
@@ -1717,6 +1712,11 @@ void AGOSEngine::animate(uint windowNum, uint zoneNum, uint vgaSpriteId, uint x,
loadZone(zoneNum);
_noOverWrite = 0xFFFF;
+ } else {
+ _zoneNumber = zoneNum;
+ if (vpe->vgaFile1 != NULL)
+ break;
+ loadZone(zoneNum);
}
}
@@ -1797,7 +1797,7 @@ void AGOSEngine::animate(uint windowNum, uint zoneNum, uint vgaSpriteId, uint x,
}
}
-void AGOSEngine::setImage(uint16 vga_res_id, bool setZone) {
+void AGOSEngine::setImage(uint16 vga_res_id, bool vgaScript) {
uint zoneNum;
VgaPointersEntry *vpe;
byte *bb, *b;
@@ -1811,22 +1811,22 @@ void AGOSEngine::setImage(uint16 vga_res_id, bool setZone) {
_curVgaFile1 = vpe->vgaFile1;
_curVgaFile2 = vpe->vgaFile2;
- if (setZone) {
- _curSfxFile = vpe->sfxFile;
- _zoneNumber = zoneNum;
-
+ if (vgaScript) {
if (vpe->vgaFile1 != NULL)
break;
+ if (_zoneNumber != zoneNum)
+ _noOverWrite = _zoneNumber;
loadZone(zoneNum);
+ _noOverWrite = 0xFFFF;
} else {
+ _curSfxFile = vpe->sfxFile;
+ _zoneNumber = zoneNum;
+
if (vpe->vgaFile1 != NULL)
break;
- if (_zoneNumber != zoneNum)
- _noOverWrite = _zoneNumber;
loadZone(zoneNum);
- _noOverWrite = 0xFFFF;
}
}
@@ -1842,7 +1842,6 @@ void AGOSEngine::setImage(uint16 vga_res_id, bool setZone) {
b += sizeof(ImageHeader_Feeble);
}
assert(READ_LE_UINT16(&((ImageHeader_Feeble *) b)->id) == vga_res_id);
-
} else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) {
b = bb + READ_BE_UINT16(bb + 4);
count = READ_BE_UINT16(&((VgaFileHeader2_Common *) b)->imageCount);
@@ -1868,7 +1867,8 @@ void AGOSEngine::setImage(uint16 vga_res_id, bool setZone) {
}
assert(READ_BE_UINT16(&((ImageHeader_WW *) b)->id) == vga_res_id);
- clearWindow(_windowNum, READ_BE_UINT16(&((ImageHeader_WW *) b)->color));
+ if (!vgaScript)
+ clearWindow(_windowNum, READ_BE_UINT16(&((ImageHeader_WW *) b)->color));
}
if (_startVgaScript) {
@@ -1936,7 +1936,7 @@ void AGOSEngine::setWindowImage(uint16 mode, uint16 vga_res_id) {
}
}
- setImage(vga_res_id, true);
+ setImage(vga_res_id);
if (getGameType() == GType_FF || getGameType() == GType_PP) {
fillFrontFromBack(0, 0, _screenWidth, _screenHeight);