aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/debugger.cpp
diff options
context:
space:
mode:
authorThanasis Antoniou2019-04-24 15:07:44 +0300
committerThanasis Antoniou2019-04-24 15:13:26 +0300
commit81575df8d976aee1f98ce567a2eb5bd6181106de (patch)
tree9464106bb967485dc9a9e5d1dea5523705fba4b7 /engines/bladerunner/debugger.cpp
parentac32d35ff47d3d0dac069fd7e125031ad24708d4 (diff)
downloadscummvm-rg350-81575df8d976aee1f98ce567a2eb5bd6181106de.tar.gz
scummvm-rg350-81575df8d976aee1f98ce567a2eb5bd6181106de.tar.bz2
scummvm-rg350-81575df8d976aee1f98ce567a2eb5bd6181106de.zip
BLADERUNNER: Debugger command for full VK sessions
Diffstat (limited to 'engines/bladerunner/debugger.cpp')
-rw-r--r--engines/bladerunner/debugger.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/engines/bladerunner/debugger.cpp b/engines/bladerunner/debugger.cpp
index 0913e5ec3f..acafd68a59 100644
--- a/engines/bladerunner/debugger.cpp
+++ b/engines/bladerunner/debugger.cpp
@@ -56,6 +56,7 @@
#include "bladerunner/ui/elevator.h"
#include "bladerunner/ui/vk.h"
#include "bladerunner/ui/scores.h"
+#include "bladerunner/script/vk_script.h"
#include "bladerunner/overlays.h"
#include "bladerunner/subtitles.h"
@@ -83,6 +84,7 @@ Debugger::Debugger(BladeRunnerEngine *vm) : GUI::Debugger() {
_viewWaypoints = false;
_viewWalkboxes = false;
_viewZBuffer = false;
+ _playFullVk = false;
registerCmd("anim", WRAP_METHOD(Debugger, cmdAnimation));
registerCmd("draw", WRAP_METHOD(Debugger, cmdDraw));
@@ -101,6 +103,7 @@ Debugger::Debugger(BladeRunnerEngine *vm) : GUI::Debugger() {
registerCmd("save", WRAP_METHOD(Debugger, cmdSave));
registerCmd("overlay", WRAP_METHOD(Debugger, cmdOverlay));
registerCmd("subtitle", WRAP_METHOD(Debugger, cmdSubtitle));
+ registerCmd("vk", WRAP_METHOD(Debugger, cmdVk));
}
Debugger::~Debugger() {
@@ -1073,6 +1076,41 @@ bool Debugger::cmdSubtitle(int argc, const char **argv) {
}
/**
+* Toggle playing a full VK session (full)
+* Only available in VK mode
+*/
+bool Debugger::cmdVk(int argc, const char **argv) {
+ bool invalidSyntax = false;
+
+ if (argc != 2) {
+ invalidSyntax = true;
+ } else {
+ if (!_vm->_vk->isOpen()) {
+ debugPrintf("Error:Command %s is only valid within a Voigt-Kampff session\n", argv[0]);
+ return true;
+ }
+ //
+ // set a debug variable to enable going through the (remaining) VK session
+ // enabling all the remaining VK questions
+ //
+ Common::String argName = argv[1];
+ argName.toLowercase();
+ if (argc == 2 && argName == "full") {
+ _playFullVk = !_playFullVk;
+ debugPrintf("Playing full V-K session = %s\n", _playFullVk ? "True":"False");
+ } else {
+ invalidSyntax = true;
+ }
+ }
+
+ if (invalidSyntax) {
+ debugPrintf("Toggle playing the full VK session instead of the at most 10 questions of the vanilla mode\n");
+ debugPrintf("Usage: %s full\n", argv[0]);
+ }
+ return true;
+
+}
+/**
*
* Similar to draw but only list items instead of drawing
* Maybe keep this separate from the draw command, even though some code gets repeated here