diff options
author | Kari Salminen | 2009-03-16 21:10:15 +0000 |
---|---|---|
committer | Kari Salminen | 2009-03-16 21:10:15 +0000 |
commit | 97887377f0784bab34f2cb69638174b3243d380c (patch) | |
tree | 994771fea0851b9825e693cc4e0c7c8ab418268e /engines/cine/pal.h | |
parent | 9dc2f16f16e4a76a6c957af6bbfc8272736e1512 (diff) | |
download | scummvm-rg350-97887377f0784bab34f2cb69638174b3243d380c.tar.gz scummvm-rg350-97887377f0784bab34f2cb69638174b3243d380c.tar.bz2 scummvm-rg350-97887377f0784bab34f2cb69638174b3243d380c.zip |
Cine::Palette: Make saturatedAddColor-methods more like their old counterparts transformPaletteRange and transformColor.
svn-id: r39454
Diffstat (limited to 'engines/cine/pal.h')
-rw-r--r-- | engines/cine/pal.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/engines/cine/pal.h b/engines/cine/pal.h index e32990a88d..50033be6e0 100644 --- a/engines/cine/pal.h +++ b/engines/cine/pal.h @@ -74,6 +74,11 @@ void transformPaletteRange(byte *srcPal, byte *dstPal, int startColor, int stopC // TODO: Make use of // TODO: Test class Palette { +private: + struct Color { + uint8 r, g, b; + }; + public: /*! \brief Load palette from buffer with given color format, endianness and number of colors. * \param buf Input buffer @@ -110,7 +115,7 @@ public: byte *save(byte *buf, const uint size, const Graphics::PixelFormat format, const uint numColors, const EndianType endianType, const byte firstIndex = 0) const; Palette &rotateRight(byte firstIndex, byte lastIndex); - Palette &saturatedAddColor(byte firstIndex, byte lastIndex, signed r, signed g, signed b); + Palette &saturatedAddColor(Palette& output, byte firstIndex, byte lastIndex, signed r, signed g, signed b); uint colorCount() const; /*! \brief The original endian type in which this palette was loaded. @@ -124,13 +129,9 @@ public: private: void setColorFormat(const Graphics::PixelFormat format); void setEndianType(const EndianType endianType); - void saturatedAddColor(byte index, signed r, signed g, signed b); + Cine::Palette::Color saturatedAddColor(Cine::Palette::Color baseColor, signed r, signed g, signed b) const; private: - struct Color { - uint8 r, g, b; - }; - // The used source format, its endianness etc. Graphics::PixelFormat _format; uint _rBits, _gBits, _bBits; |