aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/gfx
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sword25/gfx')
-rw-r--r--engines/sword25/gfx/graphicengine.h4
-rw-r--r--engines/sword25/gfx/image/pngloader.cpp1
-rw-r--r--engines/sword25/gfx/screenshot.cpp7
-rw-r--r--engines/sword25/gfx/screenshot.h2
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