aboutsummaryrefslogtreecommitdiff
path: root/graphics/imagedec.h
diff options
context:
space:
mode:
authorMax Horn2009-01-23 23:50:54 +0000
committerMax Horn2009-01-23 23:50:54 +0000
commit5556fc7f72856fde1746c89792d97bd826da33a2 (patch)
treee47901665a0e52b5e3d3d5613968fd3a6033039b /graphics/imagedec.h
parent4d5702606f7eb4c62ee07587724c1f21873bc096 (diff)
downloadscummvm-rg350-5556fc7f72856fde1746c89792d97bd826da33a2.tar.gz
scummvm-rg350-5556fc7f72856fde1746c89792d97bd826da33a2.tar.bz2
scummvm-rg350-5556fc7f72856fde1746c89792d97bd826da33a2.zip
Changed Graphics::ImageDecoder to allow custom PixelFormats
svn-id: r36026
Diffstat (limited to 'graphics/imagedec.h')
-rw-r--r--graphics/imagedec.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/graphics/imagedec.h b/graphics/imagedec.h
index 6fac4c40c6..c2ef39ebab 100644
--- a/graphics/imagedec.h
+++ b/graphics/imagedec.h
@@ -30,15 +30,17 @@
#include "common/stream.h"
#include "graphics/surface.h"
+#include "graphics/pixelformat.h"
namespace Graphics {
+
class ImageDecoder {
public:
ImageDecoder() {}
virtual ~ImageDecoder() {}
- static Surface *loadFile(const Common::String &name);
- static Surface *loadFile(Common::SeekableReadStream &stream);
+ static Surface *loadFile(const Common::String &name, const PixelFormat &format);
+ static Surface *loadFile(Common::SeekableReadStream &stream, const PixelFormat &format);
/**
* checks if the data can be decoded by this decoder
@@ -54,9 +56,10 @@ public:
* with delete;
*
* @param stream the memory stream which should be decoded
+ * @param format the pixel format used to generate the surface
* @return returns a new surface if the image could be decoded, otherwise 0
*/
- virtual Surface *decodeImage(Common::SeekableReadStream &stream) = 0;
+ virtual Surface *decodeImage(Common::SeekableReadStream &stream, const PixelFormat &format) = 0;
};
} // end of namespace Graphics