[Scummvm-git-logs] scummvm master -> 72b033ca2d0afe2d713934b7d3985003ec733f4b
dreammaster
dreammaster at scummvm.org
Sat Aug 26 23:58:38 CEST 2017
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:
72b033ca2d TITANIC: Added frame debugger command for setting objects' movie frames
Commit: 72b033ca2d0afe2d713934b7d3985003ec733f4b
https://github.com/scummvm/scummvm/commit/72b033ca2d0afe2d713934b7d3985003ec733f4b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-08-26T17:58:31-04:00
Commit Message:
TITANIC: Added frame debugger command for setting objects' movie frames
Changed paths:
engines/titanic/debugger.cpp
engines/titanic/debugger.h
diff --git a/engines/titanic/debugger.cpp b/engines/titanic/debugger.cpp
index 15d098a..a8b580b 100644
--- a/engines/titanic/debugger.cpp
+++ b/engines/titanic/debugger.cpp
@@ -44,6 +44,7 @@ Debugger::Debugger(TitanicEngine *vm) : GUI::Debugger(), _vm(vm) {
registerCmd("movie", WRAP_METHOD(Debugger, cmdMovie));
registerCmd("sound", WRAP_METHOD(Debugger, cmdSound));
registerCmd("cheat", WRAP_METHOD(Debugger, cmdCheat));
+ registerCmd("frame", WRAP_METHOD(Debugger, cmdFrame));
}
int Debugger::strToInt(const char *s) {
@@ -346,4 +347,22 @@ bool Debugger::cmdCheat(int argc, const char **argv) {
return false;
}
+bool Debugger::cmdFrame(int argc, const char **argv) {
+ if (argc == 3) {
+ CGameObject *obj = dynamic_cast<CGameObject *>(
+ g_vm->_window->_project->findByName(argv[1]));
+
+ if (obj) {
+ obj->loadFrame(strToInt(argv[2]));
+ return false;
+ } else {
+ debugPrintf("Object not found\n");
+ return true;
+ }
+ } else {
+ debugPrintf("frame <object> <frame number>");
+ return true;
+ }
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/debugger.h b/engines/titanic/debugger.h
index 3e53fee..cd9da2b 100644
--- a/engines/titanic/debugger.h
+++ b/engines/titanic/debugger.h
@@ -115,6 +115,11 @@ private:
* Change to the cheat room
*/
bool cmdCheat(int argc, const char **argv);
+
+ /**
+ * Set the movie frame for a given object
+ */
+ bool cmdFrame(int argc, const char **argv);
protected:
TitanicEngine *_vm;
public:
More information about the Scummvm-git-logs
mailing list