aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2008-11-09 15:14:01 +0000
committerMax Horn2008-11-09 15:14:01 +0000
commitf5b70114ca087fc55fdf384788080d11d96a73d0 (patch)
tree105d940f04391e40b361d6e5eb18af149ca52002
parentb7991b6ad8c5efcf84de2b252383c18e5bb66f09 (diff)
downloadscummvm-rg350-f5b70114ca087fc55fdf384788080d11d96a73d0.tar.gz
scummvm-rg350-f5b70114ca087fc55fdf384788080d11d96a73d0.tar.bz2
scummvm-rg350-f5b70114ca087fc55fdf384788080d11d96a73d0.zip
Removed many unnecessary #includes
svn-id: r34959
-rw-r--r--common/xmlparser.h1
-rw-r--r--gui/ThemeEngine.cpp20
-rw-r--r--gui/ThemeEval.cpp13
-rw-r--r--gui/ThemeEval.h13
-rw-r--r--gui/ThemeParser.cpp7
-rw-r--r--gui/ThemeParser.h15
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<Common::String, int> VariablesMap;
- typedef Common::HashMap<Common::String, ThemeLayout*> LayoutsMap;
+ typedef Common::HashMap<Common::String, ThemeLayout *> LayoutsMap;
public:
ThemeEval() {
@@ -105,7 +100,7 @@ private:
VariablesMap _builtin;
LayoutsMap _layouts;
- Common::Stack<ThemeLayout*> _curLayout;
+ Common::Stack<ThemeLayout *> _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))