From f5b70114ca087fc55fdf384788080d11d96a73d0 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 9 Nov 2008 15:14:01 +0000 Subject: Removed many unnecessary #includes svn-id: r34959 --- common/xmlparser.h | 1 - gui/ThemeEngine.cpp | 20 ++++++++++---------- gui/ThemeEval.cpp | 13 ++----------- gui/ThemeEval.h | 13 ++++--------- gui/ThemeParser.cpp | 7 +++++++ gui/ThemeParser.h | 15 +-------------- 6 files changed, 24 insertions(+), 45 deletions(-) diff --git a/common/xmlparser.h b/common/xmlparser.h index b095034192..ca01c4df0e 100644 --- a/common/xmlparser.h +++ b/common/xmlparser.h @@ -29,7 +29,6 @@ #include "common/scummsys.h" #include "common/archive.h" #include "common/system.h" -#include "common/xmlparser.h" #include "common/stream.h" #include "common/file.h" #include "common/fs.h" diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 9e0ff396a6..755d322816 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -24,27 +24,27 @@ */ #include "common/util.h" -#include "graphics/surface.h" -#include "graphics/colormasks.h" #include "common/system.h" #include "common/events.h" #include "common/config-manager.h" #include "common/fs.h" #include "common/unzip.h" + +#include "graphics/surface.h" +#include "graphics/colormasks.h" #include "graphics/imageman.h" #include "graphics/cursorman.h" -#include "gui/launcher.h" +#include "graphics/VectorRenderer.h" +#include "gui/launcher.h" #include "gui/ThemeEngine.h" #include "gui/ThemeEval.h" -#include "graphics/VectorRenderer.h" +#include "gui/ThemeParser.h" #define GUI_ENABLE_BUILTIN_THEME namespace GUI { -using namespace Graphics; - struct TextDrawData { const Graphics::Font *_fontPtr; @@ -456,12 +456,12 @@ void ThemeEngine::screenInit(bool backBuffer) { if (backBuffer) { freeBackbuffer(); - _backBuffer = new Surface; + _backBuffer = new Graphics::Surface; _backBuffer->create(width, height, sizeof(PixelType)); } freeScreen(); - _screen = new Surface; + _screen = new Graphics::Surface; _screen->create(width, height, sizeof(PixelType)); _system->clearOverlay(); } @@ -481,7 +481,7 @@ void ThemeEngine::setGraphicsMode(GraphicsMode mode) { } freeRenderer(); - _vectorRenderer = createRenderer(mode); + _vectorRenderer = Graphics::createRenderer(mode); _vectorRenderer->setSurface(_screen); } @@ -1152,7 +1152,7 @@ bool ThemeEngine::createCursor(const Common::String &filename, int hotspotX, int return true; // Try to locate the specified file among all loaded bitmaps - const Surface *cursor = _bitmaps[filename]; + const Graphics::Surface *cursor = _bitmaps[filename]; if (!cursor) return false; diff --git a/gui/ThemeEval.cpp b/gui/ThemeEval.cpp index abf58534bd..229077722c 100644 --- a/gui/ThemeEval.cpp +++ b/gui/ThemeEval.cpp @@ -23,20 +23,11 @@ * */ -#include "common/util.h" -#include "common/system.h" -#include "common/events.h" -#include "common/hashmap.h" -#include "common/hash-str.h" -#include "common/xmlparser.h" -#include "graphics/scaler.h" - -#include "gui/ThemeEngine.h" -#include "gui/ThemeParser.h" #include "gui/ThemeEval.h" - #include "gui/widget.h" +#include "graphics/scaler.h" + namespace GUI { ThemeEval::~ThemeEval() { diff --git a/gui/ThemeEval.h b/gui/ThemeEval.h index 0b5537f190..5fe0e73bd3 100644 --- a/gui/ThemeEval.h +++ b/gui/ThemeEval.h @@ -26,16 +26,11 @@ #ifndef GUI_THEME_EVAL #define GUI_THEME_EVAL -#include "common/util.h" -#include "common/system.h" -#include "common/events.h" +#include "common/scummsys.h" #include "common/hashmap.h" #include "common/hash-str.h" -#include "common/xmlparser.h" +#include "common/stack.h" -#include "gui/ThemeEngine.h" -#include "gui/ThemeParser.h" -#include "gui/ThemeEval.h" #include "gui/ThemeLayout.h" namespace GUI { @@ -43,7 +38,7 @@ namespace GUI { class ThemeEval { typedef Common::HashMap VariablesMap; - typedef Common::HashMap LayoutsMap; + typedef Common::HashMap LayoutsMap; public: ThemeEval() { @@ -105,7 +100,7 @@ private: VariablesMap _builtin; LayoutsMap _layouts; - Common::Stack _curLayout; + Common::Stack _curLayout; Common::String _curDialog; }; diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp index ced47a1ef1..4ac3d2fe8c 100644 --- a/gui/ThemeParser.cpp +++ b/gui/ThemeParser.cpp @@ -60,6 +60,13 @@ ThemeParser::ThemeParser(ThemeEngine *parent) : XMLParser() { _theme = parent; } +ThemeParser::~ThemeParser() { + delete _defaultStepGlobal; + delete _defaultStepLocal; + _palette.clear(); + _drawFunctions.clear(); +} + void ThemeParser::cleanup() { delete _defaultStepGlobal; delete _defaultStepLocal; diff --git a/gui/ThemeParser.h b/gui/ThemeParser.h index c565aadd07..21b5976716 100644 --- a/gui/ThemeParser.h +++ b/gui/ThemeParser.h @@ -27,17 +27,9 @@ #define THEME_PARSER_H #include "common/scummsys.h" -#include "graphics/surface.h" #include "common/system.h" - -#include "common/hashmap.h" -#include "common/hash-str.h" -#include "common/stack.h" #include "common/xmlparser.h" -#include "graphics/VectorRenderer.h" -#include "gui/ThemeEngine.h" - namespace GUI { class ThemeEngine; @@ -48,12 +40,7 @@ class ThemeParser : public Common::XMLParser { public: ThemeParser(GUI::ThemeEngine *parent); - virtual ~ThemeParser() { - delete _defaultStepGlobal; - delete _defaultStepLocal; - _palette.clear(); - _drawFunctions.clear(); - } + virtual ~ThemeParser(); bool getPaletteColor(const Common::String &name, int &r, int &g, int &b) { if (!_palette.contains(name)) -- cgit v1.2.3