From 1080f199957326261245da49bf0efe5059b17a18 Mon Sep 17 00:00:00 2001 From: Borja Lorente Date: Fri, 29 Jul 2016 12:03:52 +0200 Subject: GRAPHICS: Create wrapper namespace for MacWindowManager constants --- engines/wage/design.h | 13 +++++---- engines/wage/gui.h | 1 + engines/wage/world.h | 3 ++ graphics/macgui/macwindowmanager.h | 58 +++++++++++++------------------------- 4 files changed, 31 insertions(+), 44 deletions(-) diff --git a/engines/wage/design.h b/engines/wage/design.h index c64ae6d065..7a422a48f0 100644 --- a/engines/wage/design.h +++ b/engines/wage/design.h @@ -55,6 +55,9 @@ namespace Wage { +using namespace Graphics::MacGUIConstants; +using Graphics::Patterns; + class Design { public: Design(Common::SeekableReadStream *data); @@ -88,15 +91,15 @@ private: bool _boundsCalculationMode; private: - void render(Graphics::Patterns &patterns); + void render(Patterns &patterns); void drawRect(Graphics::ManagedSurface *surface, Common::ReadStream &in, - Graphics::Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType); + Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType); void drawRoundRect(Graphics::ManagedSurface *surface, Common::ReadStream &in, - Graphics::Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType); + Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType); void drawPolygon(Graphics::ManagedSurface *surface, Common::ReadStream &in, - Graphics::Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType); + Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType); void drawOval(Graphics::ManagedSurface *surface, Common::ReadStream &in, - Graphics::Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType); + Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType); void drawBitmap(Graphics::ManagedSurface *surface, Common::SeekableReadStream &in); }; diff --git a/engines/wage/gui.h b/engines/wage/gui.h index 7a2edb57c6..8536a76fe1 100644 --- a/engines/wage/gui.h +++ b/engines/wage/gui.h @@ -63,6 +63,7 @@ namespace Wage { // Import the enum definitions using namespace Graphics::MacMenuConstants; using namespace Graphics::MacWindowConstants; +using namespace Graphics::MacGUIConstants; class Scene; class WageEngine; diff --git a/engines/wage/world.h b/engines/wage/world.h index b3908be81c..e0e044822c 100644 --- a/engines/wage/world.h +++ b/engines/wage/world.h @@ -53,6 +53,9 @@ namespace Wage { +// Import the enum definitions +using Graphics::Patterns; + class Script; class Sound; diff --git a/graphics/macgui/macwindowmanager.h b/graphics/macgui/macwindowmanager.h index e30d2d8734..d5b817bdca 100644 --- a/graphics/macgui/macwindowmanager.h +++ b/graphics/macgui/macwindowmanager.h @@ -58,24 +58,27 @@ namespace Graphics { -enum { - kDesktopArc = 7 -}; +namespace MacGUIConstants { + enum { + kDesktopArc = 7 + }; -enum { - kColorBlack = 0, - kColorGray = 1, - kColorWhite = 2, - kColorGreen = 3, - kColorGreen2 = 4 -}; + enum MacGUIColor { + kColorBlack = 0, + kColorGray = 1, + kColorWhite = 2, + kColorGreen = 3, + kColorGreen2 = 4 + }; -enum { - kPatternSolid = 1, - kPatternStripes = 2, - kPatternCheckers = 3, - kPatternCheckers2 = 4 -}; + enum MacGUIPattern { + kPatternSolid = 1, + kPatternStripes = 2, + kPatternCheckers = 3, + kPatternCheckers2 = 4 + }; +} +using namespace MacGUIConstants; class ManagedSurface; @@ -135,28 +138,5 @@ private: } // End of namespace Graphics -namespace Wage { - typedef Graphics::Patterns Patterns; - - enum { - kDesktopArc = 7 - }; - - enum { - kColorBlack = 0, - kColorGray = 1, - kColorWhite = 2, - kColorGreen = 3, - kColorGreen2 = 4 - }; - - enum { - kPatternSolid = 1, - kPatternStripes = 2, - kPatternCheckers = 3, - kPatternCheckers2 = 4 - }; -} - #endif -- cgit v1.2.3