[Scummvm-cvs-logs] scummvm master -> 101d355b4a14cb14b23435a69fb1d687bfad2c92
digitall
dgturner at iee.org
Sun Dec 16 14:43:35 CET 2012
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
101d355b4a TOUCHE: Add commands to play and stop music tracks to engine console.
Commit: 101d355b4a14cb14b23435a69fb1d687bfad2c92
https://github.com/scummvm/scummvm/commit/101d355b4a14cb14b23435a69fb1d687bfad2c92
Author: D G Turner (digitall at scummvm.org)
Date: 2012-12-16T05:42:28-08:00
Commit Message:
TOUCHE: Add commands to play and stop music tracks to engine console.
Changed paths:
engines/touche/console.cpp
engines/touche/console.h
engines/touche/touche.h
diff --git a/engines/touche/console.cpp b/engines/touche/console.cpp
index 51ef5fc..2c4c6a0 100644
--- a/engines/touche/console.cpp
+++ b/engines/touche/console.cpp
@@ -26,9 +26,28 @@
namespace Touche {
ToucheConsole::ToucheConsole(ToucheEngine *vm) : GUI::Debugger(), _vm(vm) {
+ DCmd_Register("startMusic", WRAP_METHOD(ToucheConsole, Cmd_StartMusic));
+ DCmd_Register("stopMusic", WRAP_METHOD(ToucheConsole, Cmd_StopMusic));
}
ToucheConsole::~ToucheConsole() {
}
+bool ToucheConsole::Cmd_StartMusic(int argc, const char **argv) {
+ if (argc != 2) {
+ DebugPrintf("Usage: startMusic <num>\n");
+ return true;
+ }
+
+ int num = atoi(argv[1]);
+
+ _vm->startMusic(num);
+ return false;
+}
+
+bool ToucheConsole::Cmd_StopMusic(int argc, const char **argv) {
+ _vm->stopMusic();
+ return false;
+}
+
} // End of namespace Touche
diff --git a/engines/touche/console.h b/engines/touche/console.h
index e3cdc9d..43a303a 100644
--- a/engines/touche/console.h
+++ b/engines/touche/console.h
@@ -36,6 +36,9 @@ public:
private:
ToucheEngine *_vm;
+
+ bool Cmd_StartMusic(int argc, const char **argv);
+ bool Cmd_StopMusic(int argc, const char **argv);
};
} // End of namespace Touche
diff --git a/engines/touche/touche.h b/engines/touche/touche.h
index 75d99c2..6b04dfb 100644
--- a/engines/touche/touche.h
+++ b/engines/touche/touche.h
@@ -652,8 +652,10 @@ protected:
Common::File _extMusicFile;
void initMusic();
+public: // To allow access from console
void startMusic(int num);
void stopMusic();
+protected:
int getMusicVolume();
void setMusicVolume(int volume);
void adjustMusicVolume(int diff);
More information about the Scummvm-git-logs
mailing list