From 7f12db95c6c7689f7f7f8905aaf122db6de13e4f Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Tue, 30 Dec 2014 15:49:27 -0500 Subject: IMAGE: Implement QuickTime dithering in rpza --- image/codecs/rpza.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'image/codecs/rpza.h') diff --git a/image/codecs/rpza.h b/image/codecs/rpza.h index d1dbbdb676..d62b385330 100644 --- a/image/codecs/rpza.h +++ b/image/codecs/rpza.h @@ -39,10 +39,22 @@ public: ~RPZADecoder(); const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream); - Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0); } + Graphics::PixelFormat getPixelFormat() const { return _format; } + + bool containsPalette() const { return _ditherPalette != 0; } + const byte *getPalette() { _dirtyPalette = false; return _ditherPalette; } + bool hasDirtyPalette() const { return _dirtyPalette; } + bool canDither(DitherType type) const; + void setDither(DitherType type, const byte *palette); private: + Graphics::PixelFormat _format; Graphics::Surface *_surface; + byte *_ditherPalette; + bool _dirtyPalette; + byte *_colorMap; + uint16 _width, _height; + uint16 _blockWidth, _blockHeight; }; } // End of namespace Image -- cgit v1.2.3