[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.61,1.62
Oliver Kiehl
olki at users.sourceforge.net
Fri Nov 8 05:39:02 CET 2002
Update of /cvsroot/scummvm/scummvm/simon
In directory usw-pr-cvs1:/tmp/cvs-serv379
Modified Files:
simon.cpp
Log Message:
last fix didn't work properly
Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- simon.cpp 8 Nov 2002 13:25:27 -0000 1.61
+++ simon.cpp 8 Nov 2002 13:38:25 -0000 1.62
@@ -3276,6 +3276,7 @@
void SimonState::readSfxFile(const char *filename)
{
+ uint num;
if (_game == GAME_SIMON1WIN) { /* simon 1 win */
uint32 size;
@@ -3294,6 +3295,8 @@
_effects_file->seek(4, SEEK_SET);
_effects_file->read(&size, sizeof(uint32));
+ num = size / sizeof(uint32);
+
_effects_offsets = (uint32 *)malloc(size);
_effects_file->seek(0, SEEK_SET);
@@ -3305,7 +3308,6 @@
int set;
uint32 offs;
- int num;
int i;
vc_29_stop_all_sounds();
@@ -3332,7 +3334,7 @@
#if defined(SCUMM_BIG_ENDIAN)
uint r;
if (_effects_offsets) {
- for (r = 0; r < gss->NUM_EFFECTS_RESOURCES; r++)
+ for (r = 0; r <= num; r++)
_effects_offsets[r] = READ_LE_UINT32(&_effects_offsets[r]);
}
#endif
More information about the Scummvm-git-logs
mailing list