From 80ab6ccf441914c2cecacf6a53c74a6db5379e6a Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Fri, 27 Mar 2009 20:03:38 +0000 Subject: Cine::Palette: Remove unnecessary and needlessly complicating saving of the last loaded palette data's endian type. svn-id: r39710 --- engines/cine/pal.cpp | 9 --------- engines/cine/pal.h | 9 +-------- 2 files changed, 1 insertion(+), 17 deletions(-) (limited to 'engines') diff --git a/engines/cine/pal.cpp b/engines/cine/pal.cpp index e02fb3ae9a..8813de92b2 100644 --- a/engines/cine/pal.cpp +++ b/engines/cine/pal.cpp @@ -222,10 +222,6 @@ Palette &Palette::fillWithBlack() { return *this; } -EndianType Palette::endianType() const { - return (_bigEndian ? CINE_BIG_ENDIAN : CINE_LITTLE_ENDIAN); -} - Graphics::PixelFormat Palette::colorFormat() const { return _format; } @@ -248,10 +244,6 @@ void Palette::setColorFormat(const Graphics::PixelFormat format) { _bMax = (1 << _bBits) - 1; } -void Palette::setEndianType(const EndianType endian) { - _bigEndian = isBigEndian(endian); -} - // a.k.a. transformPaletteRange Palette &Palette::saturatedAddColor(Palette& output, byte firstIndex, byte lastIndex, signed r, signed g, signed b) { assert(firstIndex < colorCount() && lastIndex < colorCount()); @@ -292,7 +284,6 @@ Palette &Palette::load(const byte *buf, const uint size, const Graphics::PixelFo assert(format.gShift / 8 == (format.gShift + MAX(0, 8 - format.gLoss - 1)) / 8); // G must be inside one byte assert(format.bShift / 8 == (format.bShift + MAX(0, 8 - format.bLoss - 1)) / 8); // B must be inside one byte - setEndianType(endian); setColorFormat(format); _colors.clear(); diff --git a/engines/cine/pal.h b/engines/cine/pal.h index 8b73771df6..624812134c 100644 --- a/engines/cine/pal.h +++ b/engines/cine/pal.h @@ -132,11 +132,6 @@ public: Palette &fillWithBlack(); - /*! \brief The original endian type in which this palette was loaded. - * \note This will always return either CINE_BIG_ENDIAN or CINE_LITTLE_ENDIAN (So no CINE_NATIVE_ENDIAN). - */ - EndianType endianType() const; - /*! \brief The original color format in which this palette was loaded. */ Graphics::PixelFormat colorFormat() const; @@ -145,15 +140,13 @@ public: private: void setColorFormat(const Graphics::PixelFormat format); - void setEndianType(const EndianType endian); Cine::Palette::Color saturatedAddColor(Cine::Palette::Color baseColor, signed r, signed g, signed b) const; private: - // The used source format, its endianness etc. + // The used source format and some values calculated from it Graphics::PixelFormat _format; uint _rBits, _gBits, _bBits; uint _rMax, _gMax, _bMax; - bool _bigEndian; Common::Array _colors; }; -- cgit v1.2.3