Removed many unnecessary #includes

svn-id: r34959
This commit is contained in:
Max Horn 2008-11-09 15:14:01 +00:00
parent b7991b6ad8
commit f5b70114ca
6 changed files with 24 additions and 45 deletions

View File

@ -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"

View File

@ -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;

View File

@ -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() {

View File

@ -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;
};

View File

@ -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;

View File

@ -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))