[Scummvm-cvs-logs] SF.net SVN: scummvm: [27520] scummvm/trunk/engines/agos/vga.cpp

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Mon Jun 18 11:07:04 CEST 2007


Revision: 27520
          http://scummvm.svn.sourceforge.net/scummvm/?rev=27520&view=rev
Author:   Kirben
Date:     2007-06-18 02:07:03 -0700 (Mon, 18 Jun 2007)

Log Message:
-----------
Fix bug #1738870 - Elvira1: Glitch after opening a sarcophagus.

Modified Paths:
--------------
    scummvm/trunk/engines/agos/vga.cpp

Modified: scummvm/trunk/engines/agos/vga.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga.cpp	2007-06-18 08:31:41 UTC (rev 27519)
+++ scummvm/trunk/engines/agos/vga.cpp	2007-06-18 09:07:03 UTC (rev 27520)
@@ -804,16 +804,19 @@
 }
 
 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() {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list