From 896e08cde8cd13d0ba3c4c7df253d4619e3b5933 Mon Sep 17 00:00:00 2001 From: Borja Lorente Date: Thu, 11 Aug 2016 09:17:23 +0200 Subject: MACVENTURE: Add proper flags to gui debug rects --- engines/macventure/gui.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'engines/macventure') diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp index 2c2e4b5281..56381369bb 100644 --- a/engines/macventure/gui.cpp +++ b/engines/macventure/gui.cpp @@ -22,6 +22,8 @@ #include "common/file.h" #include "common/system.h" +#include "common/debug-channels.h" +#include "common/debug.h" #include "image/bmp.h" #include "macventure/gui.h" @@ -29,8 +31,6 @@ namespace MacVenture { -#define MACVENTURE_DEBUG_GUI true - enum MenuAction; enum { @@ -567,7 +567,7 @@ void Gui::drawMainGameWindow() { drawObjectsInWindow(data, _mainGameWindow->getSurface()); - if (MACVENTURE_DEBUG_GUI) { + if (DebugMan.isDebugChannelEnabled(kMVDebugGUI)) { Graphics::MacWindow *win = findWindow(data.refcon); Common::Rect innerDims = win->getInnerDimensions(); int x = win->getDimensions().left; @@ -597,7 +597,7 @@ void Gui::drawInventories() { srf->fillRect(srf->getBounds(), kColorWhite); drawObjectsInWindow(data, srf); - if (MACVENTURE_DEBUG_GUI) { + if (DebugMan.isDebugChannelEnabled(kMVDebugGUI)) { Graphics::MacWindow *win = findWindow(data.refcon); Common::Rect innerDims = win->getInnerDimensions(); int x = win->getDimensions().left; @@ -676,8 +676,7 @@ void Gui::drawObjectsInWindow(const WindowData &targetData, Graphics::ManagedSur } } - // For test - if (MACVENTURE_DEBUG_GUI) { + if (DebugMan.isDebugChannelEnabled(kMVDebugGUI)) { Common::Rect testBounds = _engine->getObjBounds(child); testBounds.translate(-targetData.scrollPos.x, -targetData.scrollPos.y); surface->frameRect(testBounds, kColorGreen); -- cgit v1.2.3