diff options
-rw-r--r-- | engines/bladerunner/debugger.cpp | 13 | ||||
-rw-r--r-- | engines/bladerunner/debugger.h | 1 |
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; |