aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2018-04-02 23:50:47 +0200
committerEugene Sandulenko2018-04-02 23:50:47 +0200
commitc395c5f6196f97c6a93274ae90c027dbdd423e02 (patch)
treeed61b27c8a3f184ad9bdda2cac5e33fcac8194a4 /engines
parent066a14bd4c688e82670f4d0b944fcaa969939895 (diff)
downloadscummvm-rg350-c395c5f6196f97c6a93274ae90c027dbdd423e02.tar.gz
scummvm-rg350-c395c5f6196f97c6a93274ae90c027dbdd423e02.tar.bz2
scummvm-rg350-c395c5f6196f97c6a93274ae90c027dbdd423e02.zip
BLADERUNNER: Added 'draw actors' debug command.
Implemented as a hack on top of 'draw obj' with skipping all other scene objects.
Diffstat (limited to 'engines')
-rw-r--r--engines/bladerunner/debugger.cpp13
-rw-r--r--engines/bladerunner/debugger.h1
2 files changed, 13 insertions, 1 deletions
diff --git a/engines/bladerunner/debugger.cpp b/engines/bladerunner/debugger.cpp
index 6f5c7153b6..5dfd3f47ae 100644
--- a/engines/bladerunner/debugger.cpp
+++ b/engines/bladerunner/debugger.cpp
@@ -56,6 +56,7 @@ Debugger::Debugger(BladeRunnerEngine *vm) : GUI::Debugger() {
_vm = vm;
_viewSceneObjects = false;
+ _viewActorsOnly = false;
_viewUI = false;
_viewZBuffer = false;
@@ -107,7 +108,7 @@ bool Debugger::cmdAnimation(int argc, const char **argv) {
bool Debugger::cmdDraw(int argc, const char **argv) {
if (argc != 2) {
debugPrintf("Enables debug rendering of scene objects, ui elements, zbuffer or disables debug rendering.\n");
- debugPrintf("Usage: %s (obj | ui | zbuf | reset)\n", argv[0]);
+ debugPrintf("Usage: %s (obj | actors | ui | zbuf | reset)\n", argv[0]);
return true;
}
@@ -115,6 +116,10 @@ bool Debugger::cmdDraw(int argc, const char **argv) {
if (arg == "obj") {
_viewSceneObjects = !_viewSceneObjects;
debugPrintf("Drawing scene objects = %i\n", _viewSceneObjects);
+ } else if (arg == "actors") {
+ _viewSceneObjects = !_viewSceneObjects;
+ _viewActorsOnly = _viewSceneObjects;
+ debugPrintf("Drawing scene actors = %i\n", _viewSceneObjects);
} else if (arg == "ui") {
_viewUI = !_viewUI;
debugPrintf("Drawing UI elements = %i\n", _viewUI);
@@ -389,6 +394,9 @@ void Debugger::drawSceneObjects() {
Vector3 pos = _vm->_view->calculateScreenPosition(0.5 * (a + b));
int color;
+ if (_viewActorsOnly && sceneObject->type != kSceneObjectTypeActor)
+ continue;
+
switch (sceneObject->type) {
case kSceneObjectTypeUnknown:
break;
@@ -421,6 +429,9 @@ void Debugger::drawSceneObjects() {
}
}
+ if (_viewActorsOnly)
+ return;
+
//draw regions
for (int i = 0; i < 10; i++) {
Regions::Region *region = &_vm->_scene->_regions->_regions[i];
diff --git a/engines/bladerunner/debugger.h b/engines/bladerunner/debugger.h
index bfe4e49b9b..e507e8c176 100644
--- a/engines/bladerunner/debugger.h
+++ b/engines/bladerunner/debugger.h
@@ -41,6 +41,7 @@ class Debugger : public GUI::Debugger{
public:
bool _viewSceneObjects;
+ bool _viewActorsOnly;
bool _viewUI;
bool _viewZBuffer;