diff options
-rw-r--r-- | engines/wage/debugger.cpp | 13 | ||||
-rw-r--r-- | engines/wage/debugger.h | 4 |
2 files changed, 12 insertions, 5 deletions
diff --git a/engines/wage/debugger.cpp b/engines/wage/debugger.cpp index f4444f8f55..2b6ec612c3 100644 --- a/engines/wage/debugger.cpp +++ b/engines/wage/debugger.cpp @@ -28,7 +28,7 @@ namespace Wage { -Debugger::Debugger(WageEngine *vm) : GUI::Debugger(), _vm(vm) { +Debugger::Debugger(WageEngine *engine) : GUI::Debugger(), _engine(engine) { registerCmd("continue", WRAP_METHOD(Debugger, cmdExit)); registerCmd("scenes", WRAP_METHOD(Debugger, Cmd_ListScenes)); } @@ -37,10 +37,17 @@ Debugger::~Debugger() { } bool Debugger::Cmd_ListScenes(int argc, const char **argv) { - for (uint i = 0; i < _vm->_world->_orderedScenes.size(); i++) { - debugPrintf("%d: %s\n", i, _vm->_world->_orderedScenes[i]->_name.c_str()); + int currentScene; + + for (uint i = 0; i < _engine->_world->_orderedScenes.size(); i++) { + if (_engine->_world->_player->_currentScene == _engine->_world->_orderedScenes[i]) + currentScene = i; + + debugPrintf("%d: %s\n", i, _engine->_world->_orderedScenes[i]->_name.c_str()); } + debugPrintf("\nCurrent scene is #%d: %s\n", currentScene, _engine->_world->_orderedScenes[currentScene]->_name.c_str()); + return true; } diff --git a/engines/wage/debugger.h b/engines/wage/debugger.h index e1d3b1c416..339a555468 100644 --- a/engines/wage/debugger.h +++ b/engines/wage/debugger.h @@ -32,12 +32,12 @@ class WageEngine; class Debugger : public GUI::Debugger { protected: - WageEngine *_vm; + WageEngine *_engine; bool Cmd_ListScenes(int argc, const char **argv); public: - Debugger(WageEngine *vm); + Debugger(WageEngine *engine); virtual ~Debugger(); }; |