[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.40,1.41

Ruediger Hanke tomjoad at users.sourceforge.net
Sun Jul 21 07:33:02 CEST 2002


Update of /cvsroot/scummvm/scummvm/simon
In directory usw-pr-cvs1:/tmp/cvs-serv10750

Modified Files:
	simon.cpp 
Log Message:
Voices were broken in Simon on Big Endian systems ...

Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- simon.cpp	18 Jul 2002 22:51:28 -0000	1.40
+++ simon.cpp	21 Jul 2002 14:31:58 -0000	1.41
@@ -4613,15 +4613,15 @@
 
 		_effects_offsets = NULL;
 		_effects_file = fopen_maybe_lowercase(e);
-		if (_effects_file == NULL)
-			return;
-
-		_effects_offsets = (uint32 *)malloc(gss->NUM_EFFECTS_RESOURCES * sizeof(uint32));
-		if (_effects_offsets == NULL)
-			error("Out of memory for effects offsets");
+		if (_effects_file != NULL)
+		{
+			_effects_offsets = (uint32 *)malloc(gss->NUM_EFFECTS_RESOURCES * sizeof(uint32));
+			if (_effects_offsets == NULL)
+				error("Out of memory for effects offsets");
 
-		if (fread(_effects_offsets, gss->NUM_EFFECTS_RESOURCES * sizeof(uint32), 1, _effects_file) != 1)
-			error("Cannot read effects offsets");
+			if (fread(_effects_offsets, gss->NUM_EFFECTS_RESOURCES * sizeof(uint32), 1, _effects_file) != 1)
+				error("Cannot read effects offsets");
+		}
 
 #if defined(SCUMM_BIG_ENDIAN)
 		for (int r = 0; r < gss->NUM_VOICE_RESOURCES; r++)
@@ -4688,7 +4688,6 @@
 				|| wave_hdr.fmt != MKID('fmt ') || READ_LE_UINT16(&wave_hdr.format_tag) != 1
 				|| READ_LE_UINT16(&wave_hdr.channels) != 1
 				|| READ_LE_UINT16(&wave_hdr.bits_per_sample) != 8) {
-			warning("playVoice(%d): cannot read RIFF header", voice);
 			return;
 		}
 





More information about the Scummvm-git-logs mailing list