diff options
Diffstat (limited to 'engines/saga')
-rw-r--r-- | engines/saga/console.cpp | 22 | ||||
-rw-r--r-- | engines/saga/console.h | 5 |
2 files changed, 18 insertions, 9 deletions
diff --git a/engines/saga/console.cpp b/engines/saga/console.cpp index 1ba959f7d8..421245ab30 100644 --- a/engines/saga/console.cpp +++ b/engines/saga/console.cpp @@ -38,17 +38,18 @@ namespace Saga { Console::Console(SagaEngine *vm) : GUI::Debugger() { _vm = vm; - DCmd_Register("continue", WRAP_METHOD(Console, Cmd_Exit)); + DCmd_Register("continue", WRAP_METHOD(Console, Cmd_Exit)); // CVAR_Register_I(&_soundEnabled, "sound", NULL, CVAR_CFG, 0, 1); // CVAR_Register_I(&_musicEnabled, "music", NULL, CVAR_CFG, 0, 1); // Actor commands - DCmd_Register("actor_walk_to", WRAP_METHOD(Console, cmdActorWalkTo)); + DCmd_Register("actor_walk_to", WRAP_METHOD(Console, cmdActorWalkTo)); // Animation commands - DCmd_Register("anim_info", WRAP_METHOD(Console, Cmd_AnimInfo)); - DCmd_Register("cutaway_info", WRAP_METHOD(Console, Cmd_CutawayInfo)); + DCmd_Register("anim_info", WRAP_METHOD(Console, cmdAnimInfo)); + DCmd_Register("cutaway_info", WRAP_METHOD(Console, cmdCutawayInfo)); + DCmd_Register("play_cutaway", WRAP_METHOD(Console, cmdPlayCutaway)); // Game stuff @@ -87,17 +88,24 @@ bool Console::cmdActorWalkTo(int argc, const char **argv) { return true; } - -bool Console::Cmd_AnimInfo(int argc, const char **argv) { +bool Console::cmdAnimInfo(int argc, const char **argv) { _vm->_anim->animInfo(); return true; } -bool Console::Cmd_CutawayInfo(int argc, const char **argv) { +bool Console::cmdCutawayInfo(int argc, const char **argv) { _vm->_anim->cutawayInfo(); return true; } +bool Console::cmdPlayCutaway(int argc, const char **argv) { + if (argc != 2) + DebugPrintf("Usage: %s <Cutaway number>\n", argv[0]); + else + _vm->_anim->playCutaway(atoi(argv[1]), false); + return true; +} + bool Console::cmdCurrentScene(int argc, const char **argv) { DebugPrintf("Current Scene is: %i, scene resource id: %i\n", _vm->_scene->currentSceneNumber(), _vm->_scene->currentSceneResourceId()); diff --git a/engines/saga/console.h b/engines/saga/console.h index 7bc210bdbc..3db9833f22 100644 --- a/engines/saga/console.h +++ b/engines/saga/console.h @@ -40,8 +40,9 @@ public: private: bool cmdActorWalkTo(int argc, const char **argv); - bool Cmd_AnimInfo(int argc, const char **argv); - bool Cmd_CutawayInfo(int argc, const char **argv); + bool cmdAnimInfo(int argc, const char **argv); + bool cmdCutawayInfo(int argc, const char **argv); + bool cmdPlayCutaway(int argc, const char **argv); bool cmdCurrentScene(int argc, const char **argv); bool cmdCurrentChapter(int argc, const char **argv); |