aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorantoniou792019-05-07 11:06:10 +0300
committerantoniou792019-05-08 00:52:21 +0300
commit1b93862891e0643765843beb3549d79540314f82 (patch)
treea4301bd2513aeae9c7c6165eecc702e7682425c9 /engines
parent3de51cefd76ff7dc649c257be6eae71402f50033 (diff)
downloadscummvm-rg350-1b93862891e0643765843beb3549d79540314f82.tar.gz
scummvm-rg350-1b93862891e0643765843beb3549d79540314f82.tar.bz2
scummvm-rg350-1b93862891e0643765843beb3549d79540314f82.zip
BLADERUNNER: Vk show stats debugger command
Diffstat (limited to 'engines')
-rw-r--r--engines/bladerunner/debugger.cpp9
-rw-r--r--engines/bladerunner/debugger.h1
-rw-r--r--engines/bladerunner/ui/vk.cpp14
3 files changed, 20 insertions, 4 deletions
diff --git a/engines/bladerunner/debugger.cpp b/engines/bladerunner/debugger.cpp
index 94464dc236..75ca3b0759 100644
--- a/engines/bladerunner/debugger.cpp
+++ b/engines/bladerunner/debugger.cpp
@@ -86,6 +86,7 @@ Debugger::Debugger(BladeRunnerEngine *vm) : GUI::Debugger() {
_viewWalkboxes = false;
_viewZBuffer = false;
_playFullVk = false;
+ _showStatsVk = false;
_showMazeScore = false;
registerCmd("anim", WRAP_METHOD(Debugger, cmdAnimation));
@@ -1506,7 +1507,7 @@ bool Debugger::cmdRegion(int argc, const char **argv) {
}
/**
-* Toggle playing a full VK session (full)
+* Toggle playing a full VK session (full) and showing current test statistics as subtitles
* Only available in VK mode
*/
bool Debugger::cmdVk(int argc, const char **argv) {
@@ -1528,6 +1529,9 @@ bool Debugger::cmdVk(int argc, const char **argv) {
if (argc == 2 && argName == "full") {
_playFullVk = !_playFullVk;
debugPrintf("Playing full V-K session = %s\n", _playFullVk ? "True":"False");
+ } else if (argc == 2 && argName == "stats") {
+ _showStatsVk = !_showStatsVk;
+ debugPrintf("Showing V-K session statistics= %s\n", _showStatsVk ? "True":"False");
} else {
invalidSyntax = true;
}
@@ -1535,7 +1539,8 @@ bool Debugger::cmdVk(int argc, const char **argv) {
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]);
+ debugPrintf("Also, toggle showing statistics for the current session\n");
+ debugPrintf("Usage: %s (full|stats)\n", argv[0]);
}
return true;
diff --git a/engines/bladerunner/debugger.h b/engines/bladerunner/debugger.h
index 7b0a0e0420..96fa76473d 100644
--- a/engines/bladerunner/debugger.h
+++ b/engines/bladerunner/debugger.h
@@ -54,6 +54,7 @@ public:
bool _viewWalkboxes;
bool _viewZBuffer;
bool _playFullVk;
+ bool _showStatsVk;
bool _showMazeScore;
Debugger(BladeRunnerEngine *vm);
diff --git a/engines/bladerunner/ui/vk.cpp b/engines/bladerunner/ui/vk.cpp
index 05dc239ca2..e0b595cedc 100644
--- a/engines/bladerunner/ui/vk.cpp
+++ b/engines/bladerunner/ui/vk.cpp
@@ -198,6 +198,16 @@ void VK::tick() {
draw();
+ if ( _vm->_debugger->_showStatsVk
+ && !_vm->_actors[_actorId]->isSpeeching()
+ && !_vm->_actors[kActorMcCoy]->isSpeeching()
+ && !_vm->_actors[kActorAnsweringMachine]->isSpeeching()
+ && !_isClosing
+ ) {
+ _vm->_subtitles->setGameSubsText(Common::String::format("Calibration: %02d Ratio: %02d Anxiety: %02d%%\nReplicant: %02d%% Human: %02d%%", _calibration, _calibrationRatio, _anxiety, _replicantProbability, _humanProbability), true);
+ _vm->_subtitles->show();
+ }
+
_vm->_subtitles->tick(_vm->_surfaceFront);
_vm->blitToScreen(_vm->_surfaceFront);
@@ -281,7 +291,7 @@ void VK::subjectReacts(int intensity, int humanResponse, int replicantResponse,
if (humanResponse != 0) {
_humanProbability = CLIP(_humanProbability + humanResponse + _calibration, 0, 100);
-// debug("Human probability is %d, human response is %d, calibration is %d", _humanProbability, humanResponse,_calibration);
+ // debug("Human probability is %d, human response is %d, calibration is %d", _humanProbability, humanResponse,_calibration);
if (_humanProbability >= 80 && !_isClosing) {
closeVK = false;
if (_vm->_debugger->_playFullVk
@@ -312,7 +322,7 @@ void VK::subjectReacts(int intensity, int humanResponse, int replicantResponse,
if (replicantResponse != 0) {
_replicantProbability = CLIP(_replicantProbability + replicantResponse - _calibration, 0, 100);
-// debug("Replicant probability is %d, replicant response is %d, calibration is %d", _replicantProbability, replicantResponse, _calibration);
+ // debug("Replicant probability is %d, replicant response is %d, calibration is %d", _replicantProbability, replicantResponse, _calibration);
if (_replicantProbability >= 80 && !_isClosing) {
closeVK = false;
if (_vm->_debugger->_playFullVk