[Scummvm-cvs-logs] SF.net SVN: scummvm:[39456] scummvm/trunk/engines/cine
buddha_ at users.sourceforge.net
buddha_ at users.sourceforge.net
Mon Mar 16 22:30:15 CET 2009
Revision: 39456
http://scummvm.svn.sourceforge.net/scummvm/?rev=39456&view=rev
Author: buddha_
Date: 2009-03-16 21:30:15 +0000 (Mon, 16 Mar 2009)
Log Message:
-----------
Fix for warnings on trunk-lenny-x86_64-build (Yay \o/ Buildbot!).
Modified Paths:
--------------
scummvm/trunk/engines/cine/pal.cpp
scummvm/trunk/engines/cine/pal.h
Modified: scummvm/trunk/engines/cine/pal.cpp
===================================================================
--- scummvm/trunk/engines/cine/pal.cpp 2009-03-16 21:20:34 UTC (rev 39455)
+++ scummvm/trunk/engines/cine/pal.cpp 2009-03-16 21:30:15 UTC (rev 39456)
@@ -170,12 +170,12 @@
}
/*! \brief Is given endian type big endian? (Handles native endian type too, otherwise this would be trivial). */
-bool isBigEndian(const EndianType endianType) {
- assert(endianType == CINE_NATIVE_ENDIAN || endianType == CINE_LITTLE_ENDIAN || endianType == CINE_BIG_ENDIAN);
+bool isBigEndian(const EndianType endian) {
+ assert(endian == CINE_NATIVE_ENDIAN || endian == CINE_LITTLE_ENDIAN || endian == CINE_BIG_ENDIAN);
// Handle explicit little and big endian types here
- if (endianType != CINE_NATIVE_ENDIAN) {
- return (endianType == CINE_BIG_ENDIAN);
+ if (endian != CINE_NATIVE_ENDIAN) {
+ return (endian == CINE_BIG_ENDIAN);
}
// Handle native endian type here
@@ -211,7 +211,7 @@
return _colors.size();
}
-const EndianType Palette::endianType() const {
+EndianType Palette::endianType() const {
return (_bigEndian ? CINE_BIG_ENDIAN : CINE_LITTLE_ENDIAN);
}
@@ -231,8 +231,8 @@
_bMax = (1 << _bBits) - 1;
}
-void Palette::setEndianType(const EndianType endianType) {
- _bigEndian = isBigEndian(endianType);
+void Palette::setEndianType(const EndianType endian) {
+ _bigEndian = isBigEndian(endian);
}
// a.k.a. transformPaletteRange
@@ -259,22 +259,22 @@
return result;
}
-Palette &Palette::load(const byte *buf, const uint size, const Graphics::PixelFormat format, const uint numColors, const EndianType endianType) {
+Palette &Palette::load(const byte *buf, const uint size, const Graphics::PixelFormat format, const uint numColors, const EndianType endian) {
assert(format.bytesPerPixel * numColors <= size); // Make sure there's enough input space
assert(format.aLoss == 8); // No alpha
assert(format.rShift / 8 == (format.rShift + MAX<int>(0, 8 - format.rLoss - 1)) / 8); // R must be inside one byte
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(endianType);
+ setEndianType(endian);
setColorFormat(format);
_colors.clear();
_colors.resize(numColors);
- const int rBytePos = bytePos(format.rShift, format.bytesPerPixel, isBigEndian(endianType));
- const int gBytePos = bytePos(format.gShift, format.bytesPerPixel, isBigEndian(endianType));
- const int bBytePos = bytePos(format.bShift, format.bytesPerPixel, isBigEndian(endianType));
+ const int rBytePos = bytePos(format.rShift, format.bytesPerPixel, isBigEndian(endian));
+ const int gBytePos = bytePos(format.gShift, format.bytesPerPixel, isBigEndian(endian));
+ const int bBytePos = bytePos(format.bShift, format.bytesPerPixel, isBigEndian(endian));
for (uint i = 0; i < numColors; i++) {
// _rMax, _gMax, _bMax are also used as masks here
@@ -286,15 +286,15 @@
return *this;
}
-byte *Palette::save(byte *buf, const uint size, const EndianType endianType) const {
- return save(buf, size, colorFormat(), colorCount(), endianType);
+byte *Palette::save(byte *buf, const uint size, const EndianType endian) const {
+ return save(buf, size, colorFormat(), colorCount(), endian);
}
-byte *Palette::save(byte *buf, const uint size, const Graphics::PixelFormat format, const EndianType endianType) const {
- return save(buf, size, format, colorCount(), endianType);
+byte *Palette::save(byte *buf, const uint size, const Graphics::PixelFormat format, const EndianType endian) const {
+ return save(buf, size, format, colorCount(), endian);
}
-byte *Palette::save(byte *buf, const uint size, const Graphics::PixelFormat format, const uint numColors, const EndianType endianType, const byte firstIndex) const {
+byte *Palette::save(byte *buf, const uint size, const Graphics::PixelFormat format, const uint numColors, const EndianType endian, const byte firstIndex) const {
assert(format.bytesPerPixel * numColors <= size); // Make sure there's enough output space
assert(format.aLoss == 8); // No alpha
assert(format.rShift / 8 == (format.rShift + MAX<int>(0, 8 - format.rLoss - 1)) / 8); // R must be inside one byte
@@ -314,9 +314,9 @@
const byte gMask = ((1 << (8 - format.gLoss)) - 1) << (format.gShift % 8);
const byte bMask = ((1 << (8 - format.bLoss)) - 1) << (format.bShift % 8);
- const int rBytePos = bytePos(format.rShift, format.bytesPerPixel, isBigEndian(endianType));
- const int gBytePos = bytePos(format.gShift, format.bytesPerPixel, isBigEndian(endianType));
- const int bBytePos = bytePos(format.bShift, format.bytesPerPixel, isBigEndian(endianType));
+ const int rBytePos = bytePos(format.rShift, format.bytesPerPixel, isBigEndian(endian));
+ const int gBytePos = bytePos(format.gShift, format.bytesPerPixel, isBigEndian(endian));
+ const int bBytePos = bytePos(format.bShift, format.bytesPerPixel, isBigEndian(endian));
// Save the palette to the output in the specified format
for (uint i = firstIndex; i < firstIndex + numColors; i++) {
Modified: scummvm/trunk/engines/cine/pal.h
===================================================================
--- scummvm/trunk/engines/cine/pal.h 2009-03-16 21:20:34 UTC (rev 39455)
+++ scummvm/trunk/engines/cine/pal.h 2009-03-16 21:30:15 UTC (rev 39456)
@@ -85,34 +85,34 @@
* \param size Input buffer size in bytes
* \param format Input color format
* \param numColors Number of colors to load
- * \param endianType The endianness of the colors in the input buffer
+ * \param endian The endianness of the colors in the input buffer
*/
- Palette &load(const byte *buf, const uint size, const Graphics::PixelFormat format, const uint numColors, const EndianType endianType);
+ Palette &load(const byte *buf, const uint size, const Graphics::PixelFormat format, const uint numColors, const EndianType endian);
/*! \brief Save the whole palette to buffer in original color format using defined endianness.
* \param buf Output buffer
* \param size Output buffer size in bytes
- * \param endianType The endian type to use
+ * \param endian The endian type to use
*/
- byte *save(byte *buf, const uint size, const EndianType endianType) const;
+ byte *save(byte *buf, const uint size, const EndianType endian) const;
/*! \brief Save the whole palette to buffer in given color format using defined endianness.
* \param buf Output buffer
* \param size Output buffer size in bytes
* \param format Output color format
- * \param endianType The endian type to use
+ * \param endian The endian type to use
*/
- byte *save(byte *buf, const uint size, const Graphics::PixelFormat format, const EndianType endianType) const;
+ byte *save(byte *buf, const uint size, const Graphics::PixelFormat format, const EndianType endian) const;
/*! \brief Save (partial) palette to buffer in given color format using defined endianness.
* \param buf Output buffer
* \param size Output buffer size in bytes
* \param format Output color format
* \param numColors Number of colors to save
- * \param endianType The endian type to use
+ * \param endian The endian type to use
* \param firstIndex Starting color index (from which onwards to save the colors)
*/
- byte *save(byte *buf, const uint size, const Graphics::PixelFormat format, const uint numColors, const EndianType endianType, const byte firstIndex = 0) const;
+ byte *save(byte *buf, const uint size, const Graphics::PixelFormat format, const uint numColors, const EndianType endian, const byte firstIndex = 0) const;
Palette &rotateRight(byte firstIndex, byte lastIndex);
Palette &saturatedAddColor(Palette& output, byte firstIndex, byte lastIndex, signed r, signed g, signed b);
@@ -121,14 +121,14 @@
/*! \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).
*/
- const EndianType endianType() const;
+ EndianType endianType() const;
/*! \brief The original color format in which this palette was loaded. */
Graphics::PixelFormat colorFormat() const;
private:
void setColorFormat(const Graphics::PixelFormat format);
- void setEndianType(const EndianType endianType);
+ void setEndianType(const EndianType endian);
Cine::Palette::Color saturatedAddColor(Cine::Palette::Color baseColor, signed r, signed g, signed b) const;
private:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list