aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorOri Avtalion2011-04-24 11:34:27 +0300
committerOri Avtalion2011-04-28 15:08:58 +0300
commit9414d7a6e287ff8abfb5746b564e92c8f0e6de58 (patch)
tree7abed9aac21437c04915b59a2abe1c187661b238 /graphics
parent845db59e088796df6628fcadb263ddc75f00f691 (diff)
downloadscummvm-rg350-9414d7a6e287ff8abfb5746b564e92c8f0e6de58.tar.gz
scummvm-rg350-9414d7a6e287ff8abfb5746b564e92c8f0e6de58.tar.bz2
scummvm-rg350-9414d7a6e287ff8abfb5746b564e92c8f0e6de58.zip
JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
Diffstat (limited to 'graphics')
-rw-r--r--graphics/VectorRenderer.cpp7
-rw-r--r--graphics/VectorRenderer.h7
-rw-r--r--graphics/VectorRendererSpec.cpp1
-rw-r--r--graphics/conversion.cpp1
-rw-r--r--graphics/conversion.h3
-rw-r--r--graphics/font.cpp4
-rw-r--r--graphics/font.h5
-rw-r--r--graphics/fontman.cpp1
-rw-r--r--graphics/fontman.h3
-rw-r--r--graphics/fonts/scummfont.cpp1
-rw-r--r--graphics/fonts/winfont.cpp3
-rw-r--r--graphics/fonts/winfont.h2
-rw-r--r--graphics/iff.cpp4
-rw-r--r--graphics/iff.h2
-rw-r--r--graphics/imagedec.cpp1
-rw-r--r--graphics/imagedec.h3
-rw-r--r--graphics/jpeg.cpp3
-rw-r--r--graphics/palette.h1
-rw-r--r--graphics/pict.cpp5
-rw-r--r--graphics/png.cpp3
-rw-r--r--graphics/png.h7
-rw-r--r--graphics/scaler/scale2x.cpp1
-rw-r--r--graphics/scaler/scale3x.cpp1
-rw-r--r--graphics/scaler/scalebit.cpp1
-rw-r--r--graphics/scaler/thumbnail_intern.cpp1
-rw-r--r--graphics/sjis.cpp1
-rw-r--r--graphics/surface.cpp3
-rw-r--r--graphics/surface.h5
-rw-r--r--graphics/thumbnail.cpp1
-rw-r--r--graphics/wincursor.cpp5
30 files changed, 55 insertions, 31 deletions
diff --git a/graphics/VectorRenderer.cpp b/graphics/VectorRenderer.cpp
index 0237712f13..e3ca0bf588 100644
--- a/graphics/VectorRenderer.cpp
+++ b/graphics/VectorRenderer.cpp
@@ -23,14 +23,9 @@
*
*/
+#include "common/textconsole.h"
#include "common/util.h"
-#include "common/system.h"
-#include "common/events.h"
-#include "graphics/surface.h"
-#include "graphics/colormasks.h"
-
-#include "gui/ThemeEngine.h"
#include "graphics/VectorRenderer.h"
#define VECTOR_RENDERER_FAST_TRIANGLES
diff --git a/graphics/VectorRenderer.h b/graphics/VectorRenderer.h
index 0a783a077d..9285fa21c5 100644
--- a/graphics/VectorRenderer.h
+++ b/graphics/VectorRenderer.h
@@ -26,16 +26,19 @@
#ifndef VECTOR_RENDERER_H
#define VECTOR_RENDERER_H
+#include "common/rect.h"
#include "common/scummsys.h"
-#include "common/system.h"
+#include "common/str.h"
#include "graphics/surface.h"
-#include "graphics/pixelformat.h"
#include "gui/ThemeEngine.h"
+class OSystem;
+
namespace Graphics {
class VectorRenderer;
+struct DrawStep;
typedef void (VectorRenderer::*DrawingFunctionCallback)(const Common::Rect &, const Graphics::DrawStep &);
diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp
index 0ee13033af..3eef1b11a9 100644
--- a/graphics/VectorRendererSpec.cpp
+++ b/graphics/VectorRendererSpec.cpp
@@ -25,7 +25,6 @@
#include "common/util.h"
#include "common/system.h"
-#include "common/events.h"
#include "common/frac.h"
#include "graphics/surface.h"
diff --git a/graphics/conversion.cpp b/graphics/conversion.cpp
index fee4b05f66..c9679432fa 100644
--- a/graphics/conversion.cpp
+++ b/graphics/conversion.cpp
@@ -23,6 +23,7 @@
*/
#include "graphics/conversion.h"
+#include "graphics/pixelformat.h"
namespace Graphics {
diff --git a/graphics/conversion.h b/graphics/conversion.h
index b6d230612e..2759f3bb5e 100644
--- a/graphics/conversion.h
+++ b/graphics/conversion.h
@@ -27,10 +27,11 @@
#define GRAPHICS_CONVERSION_H
#include "common/util.h"
-#include "graphics/pixelformat.h"
namespace Graphics {
+struct PixelFormat;
+
/** Converting a color from YUV to RGB colorspace. */
inline static void YUV2RGB(byte y, byte u, byte v, byte &r, byte &g, byte &b) {
r = CLIP<int>(y + ((1357 * (v - 128)) >> 10), 0, 255);
diff --git a/graphics/font.cpp b/graphics/font.cpp
index 359374436c..9d450e881c 100644
--- a/graphics/font.cpp
+++ b/graphics/font.cpp
@@ -25,7 +25,11 @@
#include "common/stream.h"
#include "common/file.h"
#include "common/endian.h"
+#include "common/array.h"
+#include "common/textconsole.h"
+#include "common/util.h"
#include "graphics/font.h"
+#include "graphics/surface.h"
namespace Graphics {
diff --git a/graphics/font.h b/graphics/font.h
index b1a4735249..9e6e180ec3 100644
--- a/graphics/font.h
+++ b/graphics/font.h
@@ -26,15 +26,16 @@
#define GRAPHICS_FONT_H
#include "common/str.h"
-#include "common/array.h"
-#include "graphics/surface.h"
namespace Common {
class SeekableReadStream;
+template<class T> class Array;
}
namespace Graphics {
+struct Surface;
+
/** Text alignment modes */
enum TextAlign {
kTextAlignInvalid,
diff --git a/graphics/fontman.cpp b/graphics/fontman.cpp
index 35ea14b199..bbd75bfca2 100644
--- a/graphics/fontman.cpp
+++ b/graphics/fontman.cpp
@@ -22,6 +22,7 @@
* $Id$
*/
+#include "graphics/font.h"
#include "graphics/fontman.h"
DECLARE_SINGLETON(Graphics::FontManager);
diff --git a/graphics/fontman.h b/graphics/fontman.h
index 7871f32ba9..34b457ae83 100644
--- a/graphics/fontman.h
+++ b/graphics/fontman.h
@@ -30,11 +30,12 @@
#include "common/str.h"
#include "common/hashmap.h"
#include "common/hash-str.h"
-#include "graphics/font.h"
namespace Graphics {
+class Font;
+
class FontManager : public Common::Singleton<FontManager> {
public:
enum FontUsage {
diff --git a/graphics/fonts/scummfont.cpp b/graphics/fonts/scummfont.cpp
index 87078e1475..ea1935cea5 100644
--- a/graphics/fonts/scummfont.cpp
+++ b/graphics/fonts/scummfont.cpp
@@ -23,6 +23,7 @@
*/
#include "graphics/font.h"
+#include "graphics/surface.h"
namespace Graphics {
diff --git a/graphics/fonts/winfont.cpp b/graphics/fonts/winfont.cpp
index 12509fd9e1..18866b4f6f 100644
--- a/graphics/fonts/winfont.cpp
+++ b/graphics/fonts/winfont.cpp
@@ -24,8 +24,11 @@
#include "common/file.h"
#include "common/str.h"
+#include "common/stream.h"
+#include "common/textconsole.h"
#include "common/winexe_ne.h"
#include "common/winexe_pe.h"
+#include "graphics/surface.h"
#include "graphics/fonts/winfont.h"
namespace Graphics {
diff --git a/graphics/fonts/winfont.h b/graphics/fonts/winfont.h
index a552b18b66..c31d45e2ce 100644
--- a/graphics/fonts/winfont.h
+++ b/graphics/fonts/winfont.h
@@ -25,11 +25,11 @@
#ifndef GRAPHICS_WINFONT_H
#define GRAPHICS_WINFONT_H
+#include "common/str.h"
#include "graphics/font.h"
namespace Common {
class SeekableReadStream;
-class String;
}
namespace Graphics {
diff --git a/graphics/iff.cpp b/graphics/iff.cpp
index 2174291112..a1f4e8aa6a 100644
--- a/graphics/iff.cpp
+++ b/graphics/iff.cpp
@@ -25,6 +25,10 @@
#include "graphics/iff.h"
#include "graphics/surface.h"
+#include "common/endian.h"
+#include "common/func.h"
+#include "common/iff_container.h"
+#include "common/textconsole.h"
#include "common/util.h"
namespace Graphics {
diff --git a/graphics/iff.h b/graphics/iff.h
index 0aab0e09cb..fc837a3ea2 100644
--- a/graphics/iff.h
+++ b/graphics/iff.h
@@ -31,7 +31,7 @@
#ifndef GRAPHICS_IFF_H
#define GRAPHICS_IFF_H
-#include "common/iff_container.h"
+#include "common/stream.h"
namespace Graphics {
diff --git a/graphics/imagedec.cpp b/graphics/imagedec.cpp
index a4d2fbc1cf..91da83cc63 100644
--- a/graphics/imagedec.cpp
+++ b/graphics/imagedec.cpp
@@ -23,6 +23,7 @@
*/
#include "graphics/imagedec.h"
+#include "graphics/pixelformat.h"
#include "graphics/surface.h"
#include "common/file.h"
diff --git a/graphics/imagedec.h b/graphics/imagedec.h
index 13aa63a153..7ea987b1e4 100644
--- a/graphics/imagedec.h
+++ b/graphics/imagedec.h
@@ -28,14 +28,13 @@
#include "common/scummsys.h"
#include "common/str.h"
-#include "graphics/pixelformat.h"
-
namespace Common{
class SeekableReadStream;
}
namespace Graphics {
+struct PixelFormat;
struct Surface;
class ImageDecoder {
diff --git a/graphics/jpeg.cpp b/graphics/jpeg.cpp
index 169c3b5f1b..2d990b9b0e 100644
--- a/graphics/jpeg.cpp
+++ b/graphics/jpeg.cpp
@@ -27,9 +27,10 @@
#include "graphics/jpeg.h"
#include "graphics/pixelformat.h"
+#include "common/debug.h"
#include "common/endian.h"
-#include "common/util.h"
#include "common/stream.h"
+#include "common/textconsole.h"
namespace Graphics {
diff --git a/graphics/palette.h b/graphics/palette.h
index 8d7fdbd99a..14e433f153 100644
--- a/graphics/palette.h
+++ b/graphics/palette.h
@@ -26,6 +26,7 @@
#ifndef GRAPHICS_PALETTE_H
#define GRAPHICS_PALETTE_H
+#include "common/scummsys.h"
#include "common/noncopyable.h"
/**
diff --git a/graphics/pict.cpp b/graphics/pict.cpp
index ca4aac751d..b61b000acd 100644
--- a/graphics/pict.cpp
+++ b/graphics/pict.cpp
@@ -23,9 +23,12 @@
*
*/
+#include "common/debug.h"
+#include "common/endian.h"
+#include "common/stream.h"
#include "common/substream.h"
+#include "common/textconsole.h"
-#include "graphics/conversion.h"
#include "graphics/jpeg.h"
#include "graphics/pict.h"
#include "graphics/surface.h"
diff --git a/graphics/png.cpp b/graphics/png.cpp
index ed1dd78674..46e3c2523b 100644
--- a/graphics/png.cpp
+++ b/graphics/png.cpp
@@ -23,13 +23,14 @@
*
*/
-#include "graphics/conversion.h"
#include "graphics/png.h"
#include "graphics/pixelformat.h"
+#include "graphics/surface.h"
#include "common/endian.h"
#include "common/memstream.h"
#include "common/stream.h"
+#include "common/types.h"
#include "common/util.h"
#include "common/zlib.h"
diff --git a/graphics/png.h b/graphics/png.h
index af6630c9c4..21e0f35be1 100644
--- a/graphics/png.h
+++ b/graphics/png.h
@@ -31,8 +31,6 @@
#ifndef GRAPHICS_PNG_H
#define GRAPHICS_PNG_H
-#include "graphics/surface.h"
-
// PNG decoder, based on the W3C specs:
// http://www.w3.org/TR/PNG/
// Parts of the code have been adapted from LodePNG, by Lode Vandevenne:
@@ -54,12 +52,17 @@
// is a bit unclear. For now, these won't be supported, until a suitable sample
// is found.
+#include "common/scummsys.h"
+#include "common/textconsole.h"
+
namespace Common {
class SeekableReadStream;
}
namespace Graphics {
+struct Surface;
+
enum PNGColorType {
kGrayScale = 0, // bit depths: 1, 2, 4, 8, 16
kTrueColor = 2, // bit depths: 8, 16
diff --git a/graphics/scaler/scale2x.cpp b/graphics/scaler/scale2x.cpp
index deae44c1c7..ec2aa2086e 100644
--- a/graphics/scaler/scale2x.cpp
+++ b/graphics/scaler/scale2x.cpp
@@ -34,7 +34,6 @@
#include "common/scummsys.h"
-#include "graphics/scaler/intern.h"
#include "graphics/scaler/scale2x.h"
/***************************************************************************/
diff --git a/graphics/scaler/scale3x.cpp b/graphics/scaler/scale3x.cpp
index 4e78796ee7..788c8694c5 100644
--- a/graphics/scaler/scale3x.cpp
+++ b/graphics/scaler/scale3x.cpp
@@ -34,7 +34,6 @@
#include "common/scummsys.h"
-#include "graphics/scaler/intern.h"
#include "graphics/scaler/scale3x.h"
/***************************************************************************/
diff --git a/graphics/scaler/scalebit.cpp b/graphics/scaler/scalebit.cpp
index 706fea8f05..c6d2a0d752 100644
--- a/graphics/scaler/scalebit.cpp
+++ b/graphics/scaler/scalebit.cpp
@@ -35,7 +35,6 @@
#include "common/scummsys.h"
-#include "graphics/scaler/intern.h"
#include "graphics/scaler/scale2x.h"
#include "graphics/scaler/scale3x.h"
diff --git a/graphics/scaler/thumbnail_intern.cpp b/graphics/scaler/thumbnail_intern.cpp
index 5cee1c7a72..4b460b29ce 100644
--- a/graphics/scaler/thumbnail_intern.cpp
+++ b/graphics/scaler/thumbnail_intern.cpp
@@ -30,6 +30,7 @@
#include "graphics/colormasks.h"
#include "graphics/scaler.h"
#include "graphics/scaler/intern.h"
+#include "graphics/palette.h"
template<int bitFormat>
uint16 quadBlockInterpolate(const uint8 *src, uint32 srcPitch) {
diff --git a/graphics/sjis.cpp b/graphics/sjis.cpp
index c581f9b265..13ea339375 100644
--- a/graphics/sjis.cpp
+++ b/graphics/sjis.cpp
@@ -31,6 +31,7 @@
#include "common/archive.h"
#include "common/endian.h"
#include "common/stream.h"
+#include "common/textconsole.h"
#include "graphics/surface.h"
diff --git a/graphics/surface.cpp b/graphics/surface.cpp
index f06c24c2cd..271e32fc0c 100644
--- a/graphics/surface.cpp
+++ b/graphics/surface.cpp
@@ -24,7 +24,8 @@
#include "common/algorithm.h"
#include "common/util.h"
-#include "common/endian.h"
+#include "common/rect.h"
+#include "common/textconsole.h"
#include "graphics/primitives.h"
#include "graphics/surface.h"
diff --git a/graphics/surface.h b/graphics/surface.h
index f9cb6cc474..92c7b7e899 100644
--- a/graphics/surface.h
+++ b/graphics/surface.h
@@ -26,7 +26,10 @@
#define GRAPHICS_SURFACE_H
#include "common/scummsys.h"
-#include "common/rect.h"
+
+namespace Common {
+struct Rect;
+}
namespace Graphics {
diff --git a/graphics/thumbnail.cpp b/graphics/thumbnail.cpp
index 8688096c3d..fa906ca517 100644
--- a/graphics/thumbnail.cpp
+++ b/graphics/thumbnail.cpp
@@ -28,6 +28,7 @@
#include "common/endian.h"
#include "common/system.h"
#include "common/stream.h"
+#include "common/textconsole.h"
namespace Graphics {
diff --git a/graphics/wincursor.cpp b/graphics/wincursor.cpp
index 10939a677a..bae64f9303 100644
--- a/graphics/wincursor.cpp
+++ b/graphics/wincursor.cpp
@@ -23,12 +23,9 @@
*
*/
-#include "common/debug.h"
-#include "common/file.h"
-#include "common/memstream.h"
#include "common/ptr.h"
-#include "common/str.h"
#include "common/stream.h"
+#include "common/textconsole.h"
#include "common/winexe_ne.h"
#include "common/winexe_pe.h"