mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 14:18:37 +00:00
TSAGE: Added sound debugger command
This commit is contained in:
parent
0034257976
commit
4778bf99eb
@ -38,6 +38,7 @@ Debugger::Debugger() : GUI::Debugger() {
|
||||
DCmd_Register("listobjects", WRAP_METHOD(Debugger, Cmd_ListObjects));
|
||||
DCmd_Register("moveobject", WRAP_METHOD(Debugger, Cmd_MoveObject));
|
||||
DCmd_Register("hotspots", WRAP_METHOD(Debugger, Cmd_Hotspots));
|
||||
DCmd_Register("sound", WRAP_METHOD(Debugger, Cmd_Sound));
|
||||
}
|
||||
|
||||
static int strToInt(const char *s) {
|
||||
@ -434,5 +435,18 @@ bool Debugger::Cmd_Hotspots(int argc, const char **argv) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Play the specified sound
|
||||
*/
|
||||
bool Debugger::Cmd_Sound(int argc, const char **argv) {
|
||||
if (argc != 2) {
|
||||
DebugPrintf("Usage: %s <sound number>\n", argv[0]);
|
||||
return true;
|
||||
}
|
||||
|
||||
int soundNum = strToInt(argv[1]);
|
||||
_globals->_soundHandler.play(soundNum);
|
||||
return false;
|
||||
}
|
||||
|
||||
} // End of namespace tSage
|
||||
|
@ -42,8 +42,8 @@ protected:
|
||||
bool Cmd_ClearFlag(int argc, const char **argv);
|
||||
bool Cmd_ListObjects(int argc, const char **argv);
|
||||
bool Cmd_MoveObject(int argc, const char **argv);
|
||||
|
||||
bool Cmd_Hotspots(int argc, const char **argv);
|
||||
bool Cmd_Sound(int argc, const char **argv);
|
||||
};
|
||||
|
||||
} // End of namespace tSage
|
||||
|
Loading…
Reference in New Issue
Block a user