aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/vga.cpp
diff options
context:
space:
mode:
authorTravis Howell2007-06-18 09:07:03 +0000
committerTravis Howell2007-06-18 09:07:03 +0000
commit71f2f4f6bdcd8261c0fd2cb65c93840ab2aa90a7 (patch)
tree00c6e819944fae1c3ba8365053417c0a5af7edec /engines/agos/vga.cpp
parent1e048c1de6c68a9900ed5fa6de7852652317e74e (diff)
downloadscummvm-rg350-71f2f4f6bdcd8261c0fd2cb65c93840ab2aa90a7.tar.gz
scummvm-rg350-71f2f4f6bdcd8261c0fd2cb65c93840ab2aa90a7.tar.bz2
scummvm-rg350-71f2f4f6bdcd8261c0fd2cb65c93840ab2aa90a7.zip
Fix bug #1738870 - Elvira1: Glitch after opening a sarcophagus.
svn-id: r27520
Diffstat (limited to 'engines/agos/vga.cpp')
-rw-r--r--engines/agos/vga.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp
index 8b9d685dec..a618ba8dd3 100644
--- a/engines/agos/vga.cpp
+++ b/engines/agos/vga.cpp
@@ -804,16 +804,19 @@ void AGOSEngine::checkWaitEndTable() {
}
void AGOSEngine::vc17_waitEnd() {
+ uint16 id = vcReadNextWord();
+
VgaSleepStruct *vfs = _waitEndTable;
while (vfs->ident)
vfs++;
- vfs->ident = vcReadNextWord();
- vfs->code_ptr = _vcPtr;
- vfs->sprite_id = _vgaCurSpriteId;
- vfs->cur_vga_file = _vgaCurZoneNum;
-
- _vcPtr = (byte *)&_vc_get_out_of_code;
+ if (isSpriteLoaded(id, id / 100)) {
+ vfs->ident = id;
+ vfs->code_ptr = _vcPtr;
+ vfs->sprite_id = _vgaCurSpriteId;
+ vfs->cur_vga_file = _vgaCurZoneNum;
+ _vcPtr = (byte *)&_vc_get_out_of_code;
+ }
}
void AGOSEngine::vc18_jump() {