[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.16,1.17
Max Horn
fingolfin at users.sourceforge.net
Mon Oct 21 15:07:01 CEST 2002
Update of /cvsroot/scummvm/scummvm/simon
In directory usw-pr-cvs1:/tmp/cvs-serv32655
Modified Files:
simon.cpp
Log Message:
don't crash if no voice file is present; also added a FIXME
Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- simon.cpp 21 Oct 2002 13:23:25 -0000 1.16
+++ simon.cpp 21 Oct 2002 22:06:06 -0000 1.17
@@ -4743,6 +4743,9 @@
void SimonState::playVoice(uint voice)
{
+ if (_voice_offsets == NULL)
+ return;
+
_mixer->stop(_voice_sound);
_voice_file->seek(_voice_offsets[voice], SEEK_SET);
@@ -4819,6 +4822,8 @@
}
_effects_file->read(&size, 4);
+ // FIXME - do we really want to read a block of 4 bytes, ignoring endian issues?
+ printf("FOO %08x 7 %d \n", size, size & 0xffffff);
size = size & 0xffffff;
_effects_file->seek(-1, SEEK_CUR);
_effects_file->read(&voc_block_hdr, sizeof(voc_block_hdr));
More information about the Scummvm-git-logs
mailing list