[Scummvm-cvs-logs] CVS: scummvm/scumm debugger.cpp,1.78,1.79
Jochen Hoenicke
hoenicke at users.sourceforge.net
Fri Aug 15 04:24:01 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv27494
Modified Files:
debugger.cpp
Log Message:
The imuse debugger commands now work with playerV2 too.
Index: debugger.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/debugger.cpp,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- debugger.cpp 13 Aug 2003 16:24:35 -0000 1.78
+++ debugger.cpp 15 Aug 2003 11:18:21 -0000 1.79
@@ -24,6 +24,7 @@
#include "actor.h"
#include "boxes.h"
#include "imuse.h"
+#include "player_v2.h"
#include "debugger.h"
#include "common/util.h"
#include "common/file.h"
@@ -364,20 +365,24 @@
}
bool ScummDebugger::Cmd_IMuse (int argc, const char **argv) {
- if (!_s->_imuse) {
+ if (!_s->_imuse && !_s->_playerV2) {
Debug_Printf ("No iMuse engine is active.\n");
return true;
}
if (argc > 1) {
if (!strcmp (argv[1], "panic")) {
- _s->_imuse->stop_all_sounds();
+ if (_s->_imuse)
+ _s->_imuse->stop_all_sounds();
+ if (_s->_playerV2)
+ _s->_playerV2->stopAllSounds();
Debug_Printf ("AAAIIIEEEEEE!\n");
Debug_Printf ("Shutting down all music tracks\n");
return true;
} else if (!strcmp (argv[1], "multimidi")) {
if (argc > 2 && (!strcmp (argv[2], "on") || !strcmp (argv[2], "off"))) {
- _s->_imuse->property (IMuse::PROP_MULTI_MIDI, !strcmp (argv[2], "on"));
+ if (_s->_imuse)
+ _s->_imuse->property (IMuse::PROP_MULTI_MIDI, !strcmp (argv[2], "on"));
Debug_Printf ("MultiMidi mode switched %s.\n", argv[2]);
} else {
Debug_Printf ("Specify \"on\" or \"off\" to switch.\n");
@@ -391,7 +396,14 @@
sound = _s->_rnd.getRandomNumber (_s->getNumSounds());
}
_s->ensureResourceLoaded (rtSound, sound);
- _s->_imuse->startSound (sound);
+ if (_s->_imuse)
+ _s->_imuse->startSound (sound);
+ if (_s->_playerV2) {
+ byte *ptr = _s->getResourceAddress(rtSound, sound);
+ if (ptr)
+ _s->_playerV2->startSound (sound, ptr);
+ }
+
Debug_Printf ("Attempted to start music %d.\n", sound);
} else {
Debug_Printf ("Specify a music resource # from 1-255.\n");
@@ -400,10 +412,16 @@
} else if (!strcmp (argv[1], "stop")) {
if (argc > 2 && (!strcmp (argv[2], "all") || atoi (argv[2]) != 0)) {
if (!strcmp (argv[2], "all")) {
- _s->_imuse->stop_all_sounds();
+ if (_s->_imuse)
+ _s->_imuse->stop_all_sounds();
+ if (_s->_playerV2)
+ _s->_playerV2->stopAllSounds();
Debug_Printf ("Shutting down all music tracks.\n");
} else {
- _s->_imuse->stopSound (atoi (argv[2]));
+ if (_s->_imuse)
+ _s->_imuse->stopSound (atoi (argv[2]));
+ if (_s->_playerV2)
+ _s->_playerV2->stopSound (atoi (argv[2]));
Debug_Printf ("Attempted to stop music %d.\n", atoi (argv[2]));
}
} else {
More information about the Scummvm-git-logs
mailing list