aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTravis Howell2007-06-21 05:26:47 +0000
committerTravis Howell2007-06-21 05:26:47 +0000
commitd2e7058b59e8f3a26f8e2fdbfd104749854ce950 (patch)
treea67ec29f4462c4f82a3a10d319e969d4a1993902 /engines
parent64cafa0270e0e912c3efe04b660e264833a3e7f8 (diff)
downloadscummvm-rg350-d2e7058b59e8f3a26f8e2fdbfd104749854ce950.tar.gz
scummvm-rg350-d2e7058b59e8f3a26f8e2fdbfd104749854ce950.tar.bz2
scummvm-rg350-d2e7058b59e8f3a26f8e2fdbfd104749854ce950.zip
Fix regressions, due to zoneNum changes.
svn-id: r27579
Diffstat (limited to 'engines')
-rw-r--r--engines/agos/agos.h4
-rw-r--r--engines/agos/vga_ww.cpp25
2 files changed, 16 insertions, 13 deletions
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index 8fb80810c4..8cbde9856f 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -1213,7 +1213,7 @@ protected:
void fastFadeIn();
void slowFadeIn();
- virtual void vcStopAnimation(uint zone, uint sprite);
+ virtual void vcStopAnimation(uint16 zone, uint16 sprite);
bool confirmOverWrite(WindowBlock *window);
int16 matchSaveGame(const char *name, uint16 max);
@@ -1499,7 +1499,7 @@ protected:
virtual void playMusic(uint16 music, uint16 track);
- virtual void vcStopAnimation(uint zone, uint sprite);
+ virtual void vcStopAnimation(uint16 zone, uint16 sprite);
};
class AGOSEngine_Simon2 : public AGOSEngine_Simon1 {
diff --git a/engines/agos/vga_ww.cpp b/engines/agos/vga_ww.cpp
index cd39e2dc8a..c24a115e71 100644
--- a/engines/agos/vga_ww.cpp
+++ b/engines/agos/vga_ww.cpp
@@ -45,15 +45,17 @@ void AGOSEngine_Waxworks::setupVideoOpcodes(VgaOpcodeProc *op) {
op[63] = &AGOSEngine::vc63_fastFadeIn;
}
-void AGOSEngine::vcStopAnimation(uint zone, uint sprite) {
- uint16 old_sprite_id;
+void AGOSEngine::vcStopAnimation(uint16 zone, uint16 sprite) {
+ uint16 oldCurSpriteId, oldCurZoneNum;
VgaSprite *vsp;
VgaTimerEntry *vte;
const byte *vcPtrOrg;
- old_sprite_id = _vgaCurSpriteId;
+ oldCurSpriteId = _vgaCurSpriteId;
+ oldCurZoneNum = _vgaCurZoneNum;
vcPtrOrg = _vcPtr;
+ _vgaCurZoneNum = zone;
_vgaCurSpriteId = sprite;
vsp = findCurSprite();
@@ -62,7 +64,7 @@ void AGOSEngine::vcStopAnimation(uint zone, uint sprite) {
vte = _vgaTimerList;
while (vte->delay) {
- if (vte->sprite_id == _vgaCurSpriteId) {
+ if (vte->sprite_id == _vgaCurSpriteId && vte->cur_vga_file == _vgaCurZoneNum) {
deleteVgaEvent(vte);
break;
}
@@ -70,19 +72,20 @@ void AGOSEngine::vcStopAnimation(uint zone, uint sprite) {
}
}
- _vgaCurSpriteId = old_sprite_id;
+ _vgaCurZoneNum = oldCurZoneNum;
+ _vgaCurSpriteId = oldCurSpriteId;
_vcPtr = vcPtrOrg;
}
-void AGOSEngine_Simon1::vcStopAnimation(uint zone, uint sprite) {
- uint16 old_sprite_id, old_cur_file_id;
+void AGOSEngine_Simon1::vcStopAnimation(uint16 zone, uint16 sprite) {
+ uint16 oldCurSpriteId, oldCurZoneNum;
VgaSleepStruct *vfs;
VgaSprite *vsp;
VgaTimerEntry *vte;
const byte *vcPtrOrg;
- old_sprite_id = _vgaCurSpriteId;
- old_cur_file_id = _vgaCurZoneNum;
+ oldCurSpriteId = _vgaCurSpriteId;
+ oldCurZoneNum = _vgaCurZoneNum;
vcPtrOrg = _vcPtr;
_vgaCurZoneNum = zone;
@@ -114,8 +117,8 @@ void AGOSEngine_Simon1::vcStopAnimation(uint zone, uint sprite) {
}
}
- _vgaCurZoneNum = old_cur_file_id;
- _vgaCurSpriteId = old_sprite_id;
+ _vgaCurZoneNum = oldCurZoneNum;
+ _vgaCurSpriteId = oldCurSpriteId;
_vcPtr = vcPtrOrg;
}