aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKari Salminen2009-03-27 20:03:38 +0000
committerKari Salminen2009-03-27 20:03:38 +0000
commit80ab6ccf441914c2cecacf6a53c74a6db5379e6a (patch)
tree477ffbbb7ba0205558460d3451ffd34cdfda23fa
parentf7da5230e31ad91d6eb5a289c7218c6172e570fb (diff)
downloadscummvm-rg350-80ab6ccf441914c2cecacf6a53c74a6db5379e6a.tar.gz
scummvm-rg350-80ab6ccf441914c2cecacf6a53c74a6db5379e6a.tar.bz2
scummvm-rg350-80ab6ccf441914c2cecacf6a53c74a6db5379e6a.zip
Cine::Palette: Remove unnecessary and needlessly complicating saving of the last loaded palette data's endian type.
svn-id: r39710
-rw-r--r--engines/cine/pal.cpp9
-rw-r--r--engines/cine/pal.h9
2 files changed, 1 insertions, 17 deletions
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<int>(0, 8 - format.gLoss - 1)) / 8); // G must be inside one byte
assert(format.bShift / 8 == (format.bShift + MAX<int>(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<Color> _colors;
};