diff options
author | Max Horn | 2010-11-19 17:03:07 +0000 |
---|---|---|
committer | Max Horn | 2010-11-19 17:03:07 +0000 |
commit | 2180b2d6b534d3786f89d02fe508c60c68b7ff89 (patch) | |
tree | ac7af0e5f5049537f4c81c401d5685bebbb47068 /engines/sword25/gfx | |
parent | 111384473bb65741f7f2b945e1c00e6aeccc805c (diff) | |
download | scummvm-rg350-2180b2d6b534d3786f89d02fe508c60c68b7ff89.tar.gz scummvm-rg350-2180b2d6b534d3786f89d02fe508c60c68b7ff89.tar.bz2 scummvm-rg350-2180b2d6b534d3786f89d02fe508c60c68b7ff89.zip |
COMMON: Split common/stream.h into several headers
svn-id: r54385
Diffstat (limited to 'engines/sword25/gfx')
-rw-r--r-- | engines/sword25/gfx/graphicengine.h | 4 | ||||
-rw-r--r-- | engines/sword25/gfx/image/pngloader.cpp | 1 | ||||
-rw-r--r-- | engines/sword25/gfx/screenshot.cpp | 7 | ||||
-rw-r--r-- | engines/sword25/gfx/screenshot.h | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/engines/sword25/gfx/graphicengine.h b/engines/sword25/gfx/graphicengine.h index 3f3e111f74..ccfa2ed363 100644 --- a/engines/sword25/gfx/graphicengine.h +++ b/engines/sword25/gfx/graphicengine.h @@ -281,8 +281,8 @@ public: Graphics::Surface _frameBuffer; Graphics::Surface *getFrameBuffer() { return &_frameBuffer; } - Common::MemoryReadStream *_thumbnail; - Common::MemoryReadStream *getThumbnail() { return _thumbnail; } + Common::SeekableReadStream *_thumbnail; + Common::SeekableReadStream *getThumbnail() { return _thumbnail; } // Access methods diff --git a/engines/sword25/gfx/image/pngloader.cpp b/engines/sword25/gfx/image/pngloader.cpp index 1b72595a8f..581d5fd917 100644 --- a/engines/sword25/gfx/image/pngloader.cpp +++ b/engines/sword25/gfx/image/pngloader.cpp @@ -35,6 +35,7 @@ // Disable symbol overrides so that we can use png.h #define FORBIDDEN_SYMBOL_ALLOW_ALL +#include "common/memstream.h" #include "sword25/gfx/image/image.h" #include "sword25/gfx/image/pngloader.h" #include <png.h> diff --git a/engines/sword25/gfx/screenshot.cpp b/engines/sword25/gfx/screenshot.cpp index 3dc88237f9..b7bb31c8e4 100644 --- a/engines/sword25/gfx/screenshot.cpp +++ b/engines/sword25/gfx/screenshot.cpp @@ -37,8 +37,7 @@ #define BS_LOG_PREFIX "SCREENSHOT" -#include "common/system.h" -#include "common/savefile.h" +#include "common/memstream.h" #include "sword25/gfx/screenshot.h" #include "sword25/kernel/filesystemutil.h" #include <png.h> @@ -123,7 +122,7 @@ bool Screenshot::saveToFile(Graphics::Surface *data, Common::WriteStream *stream // ----------------------------------------------------------------------------- -Common::MemoryReadStream *Screenshot::createThumbnail(Graphics::Surface *data) { +Common::SeekableReadStream *Screenshot::createThumbnail(Graphics::Surface *data) { // This method takes a screen image with a dimension of 800x600, and creates a screenshot with a dimension of 200x125. // First 50 pixels are cut off the top and bottom (the interface boards in the game). The remaining image of 800x500 // will be on a 16th of its size, reduced by being handed out in 4x4 pixel blocks and the average of each block @@ -177,7 +176,7 @@ Common::MemoryReadStream *Screenshot::createThumbnail(Graphics::Surface *data) { saveToFile(&thumbnail, stream); // Output a MemoryReadStream that encompasses the written data - Common::MemoryReadStream *result = new Common::MemoryReadStream(stream->getData(), stream->size(), + Common::SeekableReadStream *result = new Common::MemoryReadStream(stream->getData(), stream->size(), DisposeAfterUse::YES); return result; } diff --git a/engines/sword25/gfx/screenshot.h b/engines/sword25/gfx/screenshot.h index eefaa1bca6..a0f615f9e6 100644 --- a/engines/sword25/gfx/screenshot.h +++ b/engines/sword25/gfx/screenshot.h @@ -43,7 +43,7 @@ namespace Sword25 { class Screenshot { public: static bool saveToFile(Graphics::Surface *data, Common::WriteStream *stream); - static Common::MemoryReadStream *createThumbnail(Graphics::Surface *data); + static Common::SeekableReadStream *createThumbnail(Graphics::Surface *data); }; } // End of namespace Sword25 |