diff options
author | Travis Howell | 2007-06-02 13:35:24 +0000 |
---|---|---|
committer | Travis Howell | 2007-06-02 13:35:24 +0000 |
commit | 89abea6b517c5f6b9e1925c53fe0fcbd9aa50dad (patch) | |
tree | d7ad889efd341d1d427568f2aedbbcbcdd71736b | |
parent | 95ba2986d353cbc6a8cd4262cb9980b6071499b1 (diff) | |
download | scummvm-rg350-89abea6b517c5f6b9e1925c53fe0fcbd9aa50dad.tar.gz scummvm-rg350-89abea6b517c5f6b9e1925c53fe0fcbd9aa50dad.tar.bz2 scummvm-rg350-89abea6b517c5f6b9e1925c53fe0fcbd9aa50dad.zip |
Fix display of conversation responses in Waxworks.
svn-id: r27052
-rw-r--r-- | engines/agos/agos.h | 4 | ||||
-rw-r--r-- | engines/agos/vga_ww.cpp | 33 |
2 files changed, 34 insertions, 3 deletions
diff --git a/engines/agos/agos.h b/engines/agos/agos.h index d51c1169cf..895313f9be 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -1202,7 +1202,7 @@ protected: void fastFadeIn(); void slowFadeIn(); - void vcStopAnimation(uint file, uint sprite); + virtual void vcStopAnimation(uint zone, uint sprite); void disableFileBoxes(); virtual void listSaveGames(char *dst); @@ -1475,6 +1475,8 @@ protected: virtual void listSaveGames(char *dst); virtual void userGame(bool load); virtual int userGameGetKey(bool *b, char *buf, uint maxChar); + + virtual void vcStopAnimation(uint zone, uint sprite); }; class AGOSEngine_Simon2 : public AGOSEngine_Simon1 { diff --git a/engines/agos/vga_ww.cpp b/engines/agos/vga_ww.cpp index 60aeeaeebe..571dc25cec 100644 --- a/engines/agos/vga_ww.cpp +++ b/engines/agos/vga_ww.cpp @@ -43,7 +43,36 @@ void AGOSEngine_Waxworks::setupVideoOpcodes(VgaOpcodeProc *op) { op[63] = &AGOSEngine::vc63_fastFadeIn; } -void AGOSEngine::vcStopAnimation(uint file, uint sprite) { +void AGOSEngine::vcStopAnimation(uint zone, uint sprite) { + uint16 old_sprite_id; + VgaSprite *vsp; + VgaTimerEntry *vte; + const byte *vcPtrOrg; + + old_sprite_id = _vgaCurSpriteId; + vcPtrOrg = _vcPtr; + + _vgaCurSpriteId = sprite; + + vsp = findCurSprite(); + if (vsp->id) { + vc25_halt_sprite(); + + vte = _vgaTimerList; + while (vte->delay) { + if (vte->sprite_id == _vgaCurSpriteId) { + deleteVgaEvent(vte); + break; + } + vte++; + } + } + + _vgaCurSpriteId = old_sprite_id; + _vcPtr = vcPtrOrg; +} + +void AGOSEngine_Simon1::vcStopAnimation(uint zone, uint sprite) { uint16 old_sprite_id, old_cur_file_id; VgaSleepStruct *vfs; VgaSprite *vsp; @@ -54,7 +83,7 @@ void AGOSEngine::vcStopAnimation(uint file, uint sprite) { old_cur_file_id = _vgaCurZoneNum; vcPtrOrg = _vcPtr; - _vgaCurZoneNum = file; + _vgaCurZoneNum = zone; _vgaCurSpriteId = sprite; vfs = _waitSyncTable; |