[Scummvm-cvs-logs] SF.net SVN: scummvm:[47770] scummvm/trunk/engines/cine
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Sun Jan 31 19:24:56 CET 2010
Revision: 47770
http://scummvm.svn.sourceforge.net/scummvm/?rev=47770&view=rev
Author: lordhoto
Date: 2010-01-31 18:24:49 +0000 (Sun, 31 Jan 2010)
Log Message:
-----------
Slight fixes to comply with our coding guidelines.
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 2010-01-31 18:14:20 UTC (rev 47769)
+++ scummvm/trunk/engines/cine/pal.cpp 2010-01-31 18:24:49 UTC (rev 47770)
@@ -224,7 +224,7 @@
}
// a.k.a. transformPaletteRange
-Palette &Palette::saturatedAddColor(Palette& output, byte firstIndex, byte lastIndex, signed r, signed g, signed b) const {
+Palette &Palette::saturatedAddColor(Palette &output, byte firstIndex, byte lastIndex, signed r, signed g, signed b) const {
assert(firstIndex < colorCount() && lastIndex < colorCount());
assert(firstIndex < output.colorCount() && lastIndex < output.colorCount());
assert(output.colorFormat() == colorFormat());
@@ -250,7 +250,7 @@
return output;
}
-Palette &Palette::saturatedAddColor(Palette& output, byte firstIndex, byte lastIndex, signed rSource, signed gSource, signed bSource, const Graphics::PixelFormat &sourceFormat) const {
+Palette &Palette::saturatedAddColor(Palette &output, byte firstIndex, byte lastIndex, signed rSource, signed gSource, signed bSource, const Graphics::PixelFormat &sourceFormat) const {
// Convert the source color to the internal color format ensuring that no divide by zero will happen
const signed r = ((signed) _format.rMax()) * rSource / MAX<int>(sourceFormat.rMax(), 1);
const signed g = ((signed) _format.gMax()) * gSource / MAX<int>(sourceFormat.gMax(), 1);
@@ -259,7 +259,7 @@
return saturatedAddColor(output, firstIndex, lastIndex, r, g, b);
}
-Palette &Palette::saturatedAddNormalizedGray(Palette& output, byte firstIndex, byte lastIndex, int grayDividend, int grayDenominator) const {
+Palette &Palette::saturatedAddNormalizedGray(Palette &output, byte firstIndex, byte lastIndex, int grayDividend, int grayDenominator) const {
assert(grayDenominator != 0);
const signed r = ((signed) _format.rMax()) * grayDividend / grayDenominator;
const signed g = ((signed) _format.gMax()) * grayDividend / grayDenominator;
@@ -269,7 +269,7 @@
}
// a.k.a. transformColor
-Cine::Palette::Color &Palette::saturatedAddColor(Cine::Palette::Color baseColor, signed r, signed g, signed b) const {
+Palette::Color &Palette::saturatedAddColor(Color baseColor, signed r, signed g, signed b) const {
Cine::Palette::Color result;
result.r = CLIP<int>(baseColor.r + r, 0, _format.rMax());
result.g = CLIP<int>(baseColor.g + g, 0, _format.gMax());
Modified: scummvm/trunk/engines/cine/pal.h
===================================================================
--- scummvm/trunk/engines/cine/pal.h 2010-01-31 18:14:20 UTC (rev 47769)
+++ scummvm/trunk/engines/cine/pal.h 2010-01-31 18:24:49 UTC (rev 47770)
@@ -132,7 +132,7 @@
* \param rotationAmount Amount to rotate the sub-palette to the right. Only values 0 and 1 are currently supported!
*/
Palette &rotateRight(byte firstIndex, byte lastIndex, signed rotationAmount = 1);
- Palette &saturatedAddColor(Palette& output, byte firstIndex, byte lastIndex, signed r, signed g, signed b) const;
+ Palette &saturatedAddColor(Palette &output, byte firstIndex, byte lastIndex, signed r, signed g, signed b) const;
/*! \brief Saturated add an RGB color in given color format to current palette's subset and save the modified colors in the given output palette.
* \param output The output palette (Only this palette is modified)
@@ -145,7 +145,7 @@
* \note This function basically converts the given color to the palette's internal color format
* and adds that using the normal saturatedAddColor-function.
*/
- Palette &saturatedAddColor(Palette& output, byte firstIndex, byte lastIndex, signed rSource, signed gSource, signed bSource, const Graphics::PixelFormat &sourceFormat) const;
+ Palette &saturatedAddColor(Palette &output, byte firstIndex, byte lastIndex, signed rSource, signed gSource, signed bSource, const Graphics::PixelFormat &sourceFormat) const;
/*! \brief Saturated add a normalized gray value to current palette's subset and save the modified colors in the given output palette.
* \param output The output palette (Only this palette is modified)
@@ -156,7 +156,7 @@
* \note The normalized gray value (i.e. in range [-1, +1]) is given as a fractional number
* (i.e. the normalized gray value is calculated by dividing grayDividend by grayDenominator).
*/
- Palette &saturatedAddNormalizedGray(Palette& output, byte firstIndex, byte lastIndex, signed grayDividend, signed grayDenominator) const;
+ Palette &saturatedAddNormalizedGray(Palette &output, byte firstIndex, byte lastIndex, signed grayDividend, signed grayDenominator) const;
bool empty() const;
uint colorCount() const;
@@ -186,7 +186,7 @@
private:
void setColorFormat(const Graphics::PixelFormat format);
- Cine::Palette::Color &saturatedAddColor(Cine::Palette::Color baseColor, signed r, signed g, signed b) const;
+ Color &saturatedAddColor(Color baseColor, signed r, signed g, signed b) const;
private:
Graphics::PixelFormat _format; ///< The used source color format
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