diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/bladerunner/debugger.cpp | 9 | ||||
-rw-r--r-- | engines/bladerunner/debugger.h | 1 | ||||
-rw-r--r-- | engines/bladerunner/ui/vk.cpp | 14 |
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 |