aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorMax Horn2010-11-19 01:37:04 +0000
committerMax Horn2010-11-19 01:37:04 +0000
commita0df86955f80dedaa00e6f7593e96b90b697a83a (patch)
tree546f48f5edc6248ce3f2af65cf6a2b4727b7dd40 /graphics
parent785590e504ff2c275ee2a4101ecd4827666230b4 (diff)
downloadscummvm-rg350-a0df86955f80dedaa00e6f7593e96b90b697a83a.tar.gz
scummvm-rg350-a0df86955f80dedaa00e6f7593e96b90b697a83a.tar.bz2
scummvm-rg350-a0df86955f80dedaa00e6f7593e96b90b697a83a.zip
ALL: Push down deps on stream.h from .h to .cpp files
svn-id: r54358
Diffstat (limited to 'graphics')
-rw-r--r--graphics/dither.cpp4
-rw-r--r--graphics/dither.h6
-rw-r--r--graphics/imagedec.cpp1
-rw-r--r--graphics/imagedec.h8
-rw-r--r--graphics/jpeg.cpp1
-rw-r--r--graphics/jpeg.h5
-rw-r--r--graphics/sjis.cpp7
-rw-r--r--graphics/sjis.h9
-rw-r--r--graphics/thumbnail.cpp1
-rw-r--r--graphics/thumbnail.h10
-rw-r--r--graphics/video/codecs/codec.h5
-rw-r--r--graphics/video/codecs/mjpeg.h1
-rw-r--r--graphics/video/codecs/msrle.cpp1
-rw-r--r--graphics/video/codecs/msvideo1.cpp1
-rw-r--r--graphics/video/codecs/rpza.cpp1
-rw-r--r--graphics/video/codecs/smc.cpp1
-rw-r--r--graphics/video/codecs/truemotion1.cpp1
-rw-r--r--graphics/video/coktel_decoder.cpp5
-rw-r--r--graphics/video/coktel_decoder.h4
-rw-r--r--graphics/video/dxa_decoder.cpp1
-rw-r--r--graphics/video/qt_decoder.cpp19
-rw-r--r--graphics/video/qt_decoder.h12
-rw-r--r--graphics/video/video_decoder.h1
23 files changed, 75 insertions, 30 deletions
diff --git a/graphics/dither.cpp b/graphics/dither.cpp
index 7a92441571..6a37679b0a 100644
--- a/graphics/dither.cpp
+++ b/graphics/dither.cpp
@@ -22,9 +22,11 @@
* $Id$
*/
-#include "common/endian.h"
#include "graphics/dither.h"
+#include "common/endian.h"
+#include "common/stream.h"
+
namespace Graphics {
PaletteLUT::PaletteLUT(byte depth, PaletteFormat format) {
diff --git a/graphics/dither.h b/graphics/dither.h
index 1239ba08e8..e5f67b9c71 100644
--- a/graphics/dither.h
+++ b/graphics/dither.h
@@ -26,7 +26,11 @@
#define GRAPHICS_DITHER_H
#include "common/util.h"
-#include "common/stream.h"
+
+namespace Common {
+class SeekableReadStream;
+class WriteStream;
+}
namespace Graphics {
diff --git a/graphics/imagedec.cpp b/graphics/imagedec.cpp
index b38799c45a..a4d2fbc1cf 100644
--- a/graphics/imagedec.cpp
+++ b/graphics/imagedec.cpp
@@ -23,6 +23,7 @@
*/
#include "graphics/imagedec.h"
+#include "graphics/surface.h"
#include "common/file.h"
diff --git a/graphics/imagedec.h b/graphics/imagedec.h
index f3cc5a6e6b..13aa63a153 100644
--- a/graphics/imagedec.h
+++ b/graphics/imagedec.h
@@ -27,13 +27,17 @@
#include "common/scummsys.h"
#include "common/str.h"
-#include "common/stream.h"
-#include "graphics/surface.h"
#include "graphics/pixelformat.h"
+namespace Common{
+class SeekableReadStream;
+}
+
namespace Graphics {
+struct Surface;
+
class ImageDecoder {
public:
ImageDecoder() {}
diff --git a/graphics/jpeg.cpp b/graphics/jpeg.cpp
index fbc81b5db2..bb6da33cfe 100644
--- a/graphics/jpeg.cpp
+++ b/graphics/jpeg.cpp
@@ -27,6 +27,7 @@
#include "common/endian.h"
#include "common/util.h"
+#include "common/stream.h"
namespace Graphics {
diff --git a/graphics/jpeg.h b/graphics/jpeg.h
index ae4ed22f04..f91355e329 100644
--- a/graphics/jpeg.h
+++ b/graphics/jpeg.h
@@ -26,9 +26,12 @@
#ifndef GRAPHICS_JPEG_H
#define GRAPHICS_JPEG_H
-#include "common/stream.h"
#include "graphics/surface.h"
+namespace Common {
+class SeekableReadStream;
+}
+
namespace Graphics {
#define JPEG_MAX_QUANT_TABLES 4
diff --git a/graphics/sjis.cpp b/graphics/sjis.cpp
index 06712a9226..4b9f2fac57 100644
--- a/graphics/sjis.cpp
+++ b/graphics/sjis.cpp
@@ -29,6 +29,9 @@
#include "common/debug.h"
#include "common/archive.h"
#include "common/endian.h"
+#include "common/stream.h"
+
+#include "graphics/surface.h"
namespace Graphics {
@@ -52,6 +55,10 @@ FontSJIS *FontSJIS::createFont(const Common::Platform platform) {
return 0;
}
+void FontSJIS::drawChar(Graphics::Surface &dst, uint16 ch, int x, int y, uint32 c1, uint32 c2) const {
+ drawChar(dst.getBasePtr(x, y), ch, dst.pitch, dst.bytesPerPixel, c1, c2, dst.w - x, dst.h - y);
+}
+
template<typename Color>
void FontSJISBase::blitCharacter(const uint8 *glyph, const int w, const int h, uint8 *dst, int pitch, Color c) const {
for (int y = 0; y < h; ++y) {
diff --git a/graphics/sjis.h b/graphics/sjis.h
index 365e63e470..86bc167b52 100644
--- a/graphics/sjis.h
+++ b/graphics/sjis.h
@@ -46,13 +46,12 @@
#endif
#include "common/scummsys.h"
-#include "common/stream.h"
#include "common/util.h"
-#include "graphics/surface.h"
-
namespace Graphics {
+struct Surface;
+
/**
* A font that is able to draw SJIS encoded characters.
*/
@@ -116,9 +115,7 @@ public:
/**
* Draws a SJIS encoded character on the given surface.
*/
- void drawChar(Graphics::Surface &dst, uint16 ch, int x, int y, uint32 c1, uint32 c2) const {
- drawChar(dst.getBasePtr(x, y), ch, dst.pitch, dst.bytesPerPixel, c1, c2, dst.w - x, dst.h - y);
- }
+ void drawChar(Graphics::Surface &dst, uint16 ch, int x, int y, uint32 c1, uint32 c2) const;
/**
* Draws a SJIS char on the given raw buffer.
diff --git a/graphics/thumbnail.cpp b/graphics/thumbnail.cpp
index ccde78806d..b245cfc5fa 100644
--- a/graphics/thumbnail.cpp
+++ b/graphics/thumbnail.cpp
@@ -27,6 +27,7 @@
#include "graphics/colormasks.h"
#include "common/endian.h"
#include "common/system.h"
+#include "common/stream.h"
namespace Graphics {
diff --git a/graphics/thumbnail.h b/graphics/thumbnail.h
index 9341582aa1..0bfeeda2ed 100644
--- a/graphics/thumbnail.h
+++ b/graphics/thumbnail.h
@@ -25,11 +25,17 @@
#ifndef GRAPHICS_THUMBNAIL_H
#define GRAPHICS_THUMBNAIL_H
-#include "common/stream.h"
-#include "graphics/surface.h"
+#include "common/scummsys.h"
+
+namespace Common{
+class SeekableReadStream;
+class WriteStream;
+}
namespace Graphics {
+struct Surface;
+
/**
* Checks for presence of the thumbnail save header.
* Seeks automatically back to start position after check.
diff --git a/graphics/video/codecs/codec.h b/graphics/video/codecs/codec.h
index 4a280a81df..802671a037 100644
--- a/graphics/video/codecs/codec.h
+++ b/graphics/video/codecs/codec.h
@@ -26,10 +26,13 @@
#ifndef GRAPHICS_CODEC_H
#define GRAPHICS_CODEC_H
-#include "common/stream.h"
#include "graphics/surface.h"
#include "graphics/pixelformat.h"
+namespace Common{
+class SeekableReadStream;
+}
+
namespace Graphics {
class Codec {
diff --git a/graphics/video/codecs/mjpeg.h b/graphics/video/codecs/mjpeg.h
index ab364fb5be..8b0a03609b 100644
--- a/graphics/video/codecs/mjpeg.h
+++ b/graphics/video/codecs/mjpeg.h
@@ -27,7 +27,6 @@
#define GRAPHICS_MJPEG_H
#include "common/scummsys.h"
-#include "common/stream.h"
#include "graphics/video/codecs/codec.h"
#include "graphics/jpeg.h"
diff --git a/graphics/video/codecs/msrle.cpp b/graphics/video/codecs/msrle.cpp
index 64099430d3..f7dcaf7467 100644
--- a/graphics/video/codecs/msrle.cpp
+++ b/graphics/video/codecs/msrle.cpp
@@ -26,6 +26,7 @@
// Based off ffmpeg's msrledec.c
#include "graphics/video/codecs/msrle.h"
+#include "common/stream.h"
namespace Graphics {
diff --git a/graphics/video/codecs/msvideo1.cpp b/graphics/video/codecs/msvideo1.cpp
index f37bdbbf95..8cb1e75058 100644
--- a/graphics/video/codecs/msvideo1.cpp
+++ b/graphics/video/codecs/msvideo1.cpp
@@ -26,6 +26,7 @@
// Based off ffmpeg's msvideo.cpp
#include "graphics/video/codecs/msvideo1.h"
+#include "common/stream.h"
namespace Graphics {
diff --git a/graphics/video/codecs/rpza.cpp b/graphics/video/codecs/rpza.cpp
index f0ed72e730..050f2a5bcf 100644
--- a/graphics/video/codecs/rpza.cpp
+++ b/graphics/video/codecs/rpza.cpp
@@ -28,6 +28,7 @@
#include "graphics/video/codecs/rpza.h"
#include "common/system.h"
+#include "common/stream.h"
#include "graphics/colormasks.h"
namespace Graphics {
diff --git a/graphics/video/codecs/smc.cpp b/graphics/video/codecs/smc.cpp
index 4661e3dc84..6e4914b6f0 100644
--- a/graphics/video/codecs/smc.cpp
+++ b/graphics/video/codecs/smc.cpp
@@ -26,6 +26,7 @@
// Based off ffmpeg's SMC decoder
#include "graphics/video/codecs/smc.h"
+#include "common/stream.h"
namespace Graphics {
diff --git a/graphics/video/codecs/truemotion1.cpp b/graphics/video/codecs/truemotion1.cpp
index 81ac857367..fde9f5c2c8 100644
--- a/graphics/video/codecs/truemotion1.cpp
+++ b/graphics/video/codecs/truemotion1.cpp
@@ -30,6 +30,7 @@
#ifdef GRAPHICS_TRUEMOTION1_H
#include "graphics/video/codecs/truemotion1data.h"
+#include "common/stream.h"
namespace Graphics {
diff --git a/graphics/video/coktel_decoder.cpp b/graphics/video/coktel_decoder.cpp
index 15ba049536..0247630579 100644
--- a/graphics/video/coktel_decoder.cpp
+++ b/graphics/video/coktel_decoder.cpp
@@ -31,6 +31,7 @@
#include "sound/audiostream.h"
#include "sound/decoders/raw.h"
+#include "common/stream.h"
static const uint32 kVideoCodecIndeo3 = MKID_BE('iv32');
@@ -219,7 +220,7 @@ bool CoktelDecoder::hasEmbeddedFile(const Common::String &fileName) const {
return false;
}
-Common::MemoryReadStream *CoktelDecoder::getEmbeddedFile(const Common::String &fileName) const {
+Common::SeekableReadStream *CoktelDecoder::getEmbeddedFile(const Common::String &fileName) const {
return 0;
}
@@ -2440,7 +2441,7 @@ bool VMDDecoder::hasEmbeddedFile(const Common::String &fileName) const {
return false;
}
-Common::MemoryReadStream *VMDDecoder::getEmbeddedFile(const Common::String &fileName) const {
+Common::SeekableReadStream *VMDDecoder::getEmbeddedFile(const Common::String &fileName) const {
const File *file = 0;
for (Common::Array<File>::const_iterator it = _files.begin(); it != _files.end(); ++it)
diff --git a/graphics/video/coktel_decoder.h b/graphics/video/coktel_decoder.h
index 97be9df44b..548e313937 100644
--- a/graphics/video/coktel_decoder.h
+++ b/graphics/video/coktel_decoder.h
@@ -108,7 +108,7 @@ public:
virtual bool hasEmbeddedFile(const Common::String &fileName) const;
/** Return that embedded file. */
- virtual Common::MemoryReadStream *getEmbeddedFile(const Common::String &fileName) const;
+ virtual Common::SeekableReadStream *getEmbeddedFile(const Common::String &fileName) const;
/** Return the current subtitle index. */
virtual int32 getSubtitleIndex() const;
@@ -352,7 +352,7 @@ public:
bool hasEmbeddedFiles() const;
bool hasEmbeddedFile(const Common::String &fileName) const;
- Common::MemoryReadStream *getEmbeddedFile(const Common::String &fileName) const;
+ Common::SeekableReadStream *getEmbeddedFile(const Common::String &fileName) const;
int32 getSubtitleIndex() const;
diff --git a/graphics/video/dxa_decoder.cpp b/graphics/video/dxa_decoder.cpp
index 5066e8cf37..1f7ccc3640 100644
--- a/graphics/video/dxa_decoder.cpp
+++ b/graphics/video/dxa_decoder.cpp
@@ -27,6 +27,7 @@
#include "common/endian.h"
#include "common/archive.h"
#include "common/system.h"
+#include "common/stream.h"
#include "common/util.h"
#include "graphics/video/dxa_decoder.h"
diff --git a/graphics/video/qt_decoder.cpp b/graphics/video/qt_decoder.cpp
index 8437f0af43..f4ecf551d6 100644
--- a/graphics/video/qt_decoder.cpp
+++ b/graphics/video/qt_decoder.cpp
@@ -1331,4 +1331,23 @@ void QuickTimeDecoder::updateAudioBuffer() {
}
}
+QuickTimeDecoder::MOVStreamContext::MOVStreamContext() {
+ // FIXME: Setting all members to 0 via memset is a hack -- it works
+ // because the only non-POD member of MOVStreamContext is of type
+ // Common::Rational, and that luckily has no virtual methods nor
+ // does it keep internal pointers or anything like that. But watch
+ // out if you ever extend MOVStreamContext!
+ memset(this, 0, sizeof(MOVStreamContext));
+}
+
+QuickTimeDecoder::MOVStreamContext::~MOVStreamContext() {
+ delete[] chunk_offsets;
+ delete[] stts_data;
+ delete[] ctts_data;
+ delete[] sample_to_chunk;
+ delete[] sample_sizes;
+ delete[] keyframes;
+ delete extradata;
+}
+
} // End of namespace Graphics
diff --git a/graphics/video/qt_decoder.h b/graphics/video/qt_decoder.h
index 6dcfc0944d..86a092f9a1 100644
--- a/graphics/video/qt_decoder.h
+++ b/graphics/video/qt_decoder.h
@@ -155,16 +155,8 @@ protected:
};
struct MOVStreamContext {
- MOVStreamContext() { memset(this, 0, sizeof(MOVStreamContext)); }
- ~MOVStreamContext() {
- delete[] chunk_offsets;
- delete[] stts_data;
- delete[] ctts_data;
- delete[] sample_to_chunk;
- delete[] sample_sizes;
- delete[] keyframes;
- delete extradata;
- }
+ MOVStreamContext();
+ ~MOVStreamContext();
int ffindex; /* the ffmpeg stream id */
int is_ff_stream; /* Is this stream presented to ffmpeg ? i.e. is this an audio or video stream ? */
diff --git a/graphics/video/video_decoder.h b/graphics/video/video_decoder.h
index a398a62009..4ad7ae054f 100644
--- a/graphics/video/video_decoder.h
+++ b/graphics/video/video_decoder.h
@@ -29,7 +29,6 @@
#include "common/events.h"
#include "common/list.h"
#include "common/rational.h"
-#include "common/stream.h"
#include "graphics/surface.h"
#include "graphics/pixelformat.h"