diff options
author | Matthew Hoops | 2015-03-15 19:35:13 -0400 |
---|---|---|
committer | Matthew Hoops | 2015-04-11 14:37:13 -0400 |
commit | 94b317b0cd979bd924da14d8e3925c6c324692e6 (patch) | |
tree | ecd699a0c7fccbe7f92aafd8ccb7082f2e309cce /image/codecs/qtrle.h | |
parent | 7f12db95c6c7689f7f7f8905aaf122db6de13e4f (diff) | |
download | scummvm-rg350-94b317b0cd979bd924da14d8e3925c6c324692e6.tar.gz scummvm-rg350-94b317b0cd979bd924da14d8e3925c6c324692e6.tar.bz2 scummvm-rg350-94b317b0cd979bd924da14d8e3925c6c324692e6.zip |
IMAGE: Implement QTRLE dithering
Diffstat (limited to 'image/codecs/qtrle.h')
-rw-r--r-- | image/codecs/qtrle.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/image/codecs/qtrle.h b/image/codecs/qtrle.h index b44a46c3e2..e345fbeedf 100644 --- a/image/codecs/qtrle.h +++ b/image/codecs/qtrle.h @@ -41,16 +41,29 @@ public: const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream); Graphics::PixelFormat getPixelFormat() const; + 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: byte _bitsPerPixel; - Graphics::Surface *_surface; + uint16 _width, _height; + uint32 _paddedWidth; + byte *_ditherPalette; + bool _dirtyPalette; + byte *_colorMap; + + void createSurface(); void decode1(Common::SeekableReadStream &stream, uint32 rowPtr, uint32 linesToChange); void decode2_4(Common::SeekableReadStream &stream, uint32 rowPtr, uint32 linesToChange, byte bpp); void decode8(Common::SeekableReadStream &stream, uint32 rowPtr, uint32 linesToChange); void decode16(Common::SeekableReadStream &stream, uint32 rowPtr, uint32 linesToChange); void decode24(Common::SeekableReadStream &stream, uint32 rowPtr, uint32 linesToChange); + void dither24(Common::SeekableReadStream &stream, uint32 rowPtr, uint32 linesToChange); void decode32(Common::SeekableReadStream &stream, uint32 rowPtr, uint32 linesToChange); }; |