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

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Mon Apr 20 07:19:42 CEST 2009


Revision: 40023
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40023&view=rev
Author:   Kirben
Date:     2009-04-20 05:19:42 +0000 (Mon, 20 Apr 2009)

Log Message:
-----------
Fix sound effects regression in Waxworks.

Modified Paths:
--------------
    scummvm/trunk/engines/agos/event.cpp
    scummvm/trunk/engines/agos/res_snd.cpp
    scummvm/trunk/engines/agos/vga_e2.cpp

Modified: scummvm/trunk/engines/agos/event.cpp
===================================================================
--- scummvm/trunk/engines/agos/event.cpp	2009-04-19 18:27:11 UTC (rev 40022)
+++ scummvm/trunk/engines/agos/event.cpp	2009-04-20 05:19:42 UTC (rev 40023)
@@ -285,6 +285,7 @@
 	_curVgaFile1 = vpe->vgaFile1;
 	_curVgaFile2 = vpe->vgaFile2;
 	_curSfxFile = vpe->sfxFile;
+	_curSfxFileSize = vpe->sfxFileEnd - vpe->sfxFile;
 
 	_vcPtr = codePtr;
 

Modified: scummvm/trunk/engines/agos/res_snd.cpp
===================================================================
--- scummvm/trunk/engines/agos/res_snd.cpp	2009-04-19 18:27:11 UTC (rev 40022)
+++ scummvm/trunk/engines/agos/res_snd.cpp	2009-04-20 05:19:42 UTC (rev 40023)
@@ -533,35 +533,36 @@
 
 	dst = _curSfxFile;
 	if (getGameType() == GType_WW) {
-		uint tmp = sound;
+		uint16 tmp = sound;
+
 		while (tmp--) {
+			size += READ_LE_UINT16(dst) + 4;
 			dst += READ_LE_UINT16(dst) + 4;
-			size += READ_LE_UINT16(dst) + 4;
 
 			if (size > _curSfxFileSize)
-				error("loadSound: Reading beyond EOF");
+				error("loadSound: Reading beyond EOF (%d, %d)", size, _curSfxFileSize);
 		}
 
 		size = READ_LE_UINT16(dst);
 		offs = 4;
 	} else if (getGameType() == GType_ELVIRA2) {
 		while (READ_BE_UINT32(dst + 4) != sound) {
+			size += 12;
 			dst += 12;
-			size += 12;
 
 			if (size > _curSfxFileSize)
-				error("loadSound: Reading beyond EOF");
+				error("loadSound: Reading beyond EOF (%d, %d)", size, _curSfxFileSize);
 		}
 
 		size = READ_BE_UINT32(dst);
 		offs = READ_BE_UINT32(dst + 8);
 	} else {
 		while (READ_BE_UINT16(dst + 6) != sound) {
+			size += 12;
 			dst += 12;
-			size += 12;
 
 			if (size > _curSfxFileSize)
-				error("loadSound: Reading beyond EOF");
+				error("loadSound: Reading beyond EOF (%d, %d)", size, _curSfxFileSize);
 
 		}
 

Modified: scummvm/trunk/engines/agos/vga_e2.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga_e2.cpp	2009-04-19 18:27:11 UTC (rev 40022)
+++ scummvm/trunk/engines/agos/vga_e2.cpp	2009-04-20 05:19:42 UTC (rev 40023)
@@ -195,6 +195,8 @@
 		_sound->playEffects(sound);
 	} else if (getGameId() == GID_SIMON1DOS) {
 		playSting(sound);
+	} else if (getGameType() == GType_WW) {
+		// TODO: Sound effects in PC version only
 	} else {
 		loadSound(sound, 0, 0);
 	}


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