[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.132,1.133 simon.h,1.43,1.44
Travis Howell
kirben at users.sourceforge.net
Sat Jan 4 16:48:03 CET 2003
Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv2905/simon
Modified Files:
simon.cpp simon.h
Log Message:
Small cleanup
Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -d -r1.132 -r1.133
--- simon.cpp 3 Jan 2003 12:33:53 -0000 1.132
+++ simon.cpp 5 Jan 2003 00:47:49 -0000 1.133
@@ -828,46 +828,32 @@
warning("loadTablesIntoMem: didn't find %d", subr_id);
}
-bool SimonState::readSting(uint a)
+void SimonState::playSting(uint a)
{
+ if (!midi._midi_sfx_toggle)
+ return;
+
char filename[11];
uint16 size;
_mus_file = new File();
-
- sprintf(filename, "stings%i.mus", a);
-
+ sprintf(filename, "STINGS%i.MUS", a);
_mus_file->open(filename, _gameDataPath);
-
if (!_mus_file->isOpen()) {
warning("Can't load sound effect from '%s'", filename);
- return false;
+ return;
}
size = _mus_file->readUint16LE();
-
_mus_offsets = (uint16 *)malloc(size);
_mus_file->seek(0, SEEK_SET);
-
if (_mus_file->read(_mus_offsets, size) != size)
error("Cannot read offsets");
- return true;
-}
-
-void SimonState::playSting(uint a)
-{
- if (!midi._midi_sfx_toggle)
- return;
-
- if (!readSting(_midi_sfx))
- return;
-
midi.shutdown();
_mus_file->seek(_mus_offsets[a], SEEK_SET);
midi.read_all_songs_old(_mus_file, a, _mus_offsets[a+1] - _mus_offsets[a]);
-
midi.initialize();
midi.play();
}
Index: simon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.h,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- simon.h 4 Jan 2003 19:11:45 -0000 1.43
+++ simon.h 5 Jan 2003 00:47:49 -0000 1.44
@@ -103,7 +103,6 @@
File *_mus_file;
uint16 *_mus_offsets;
- bool readSting(uint a);
void playSting(uint a);
byte *_vc_ptr; /* video code ptr */
More information about the Scummvm-git-logs
mailing list