From 4df049f4d7fccb794db45c932e5188296907dbc8 Mon Sep 17 00:00:00 2001 From: md5 Date: Sun, 20 Mar 2011 14:56:13 +0200 Subject: SCI: Added a new console command "window_list" or "wl" This can be used to see a list of the currently open windows. Also, added a sanity check for the "al" command and performed some minor cleanup --- engines/sci/graphics/ports.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'engines/sci/graphics/ports.cpp') diff --git a/engines/sci/graphics/ports.cpp b/engines/sci/graphics/ports.cpp index 9ac8d103fc..aca278fe4a 100644 --- a/engines/sci/graphics/ports.cpp +++ b/engines/sci/graphics/ports.cpp @@ -25,6 +25,7 @@ #include "common/util.h" +#include "sci/console.h" #include "sci/sci.h" #include "sci/engine/features.h" #include "sci/engine/kernel.h" @@ -707,4 +708,16 @@ int16 GfxPorts::kernelPriorityToCoordinate(byte priority) { return _priorityBottom; } +void GfxPorts::printWindowList(Console *con) { + for (PortList::const_iterator it = _windowList.begin(); it != _windowList.end(); ++it) { + if ((*it)->isWindow()) { + Window *wnd = ((Window *)*it); + con->DebugPrintf("%d: '%s' at %d, %d, (%d, %d, %d, %d), drawn: %d, style: %d\n", + wnd->id, wnd->title.c_str(), wnd->left, wnd->top, + wnd->rect.left, wnd->rect.top, wnd->rect.right, wnd->rect.bottom, + wnd->bDrawn, wnd->wndStyle); + } + } +} + } // End of namespace Sci -- cgit v1.2.3