[Scummvm-cvs-logs] scummvm master -> 8c6b5168a14abfaec424fd033803ec1a6cc8bebc

bluegr bluegr at gmail.com
Fri Jan 8 14:41:03 CET 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
8c6b5168a1 SCI: Make GfxPalette32 conform to out formatting guidelines


Commit: 8c6b5168a14abfaec424fd033803ec1a6cc8bebc
    https://github.com/scummvm/scummvm/commit/8c6b5168a14abfaec424fd033803ec1a6cc8bebc
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-01-08T15:40:05+02:00

Commit Message:
SCI: Make GfxPalette32 conform to out formatting guidelines

We do not prepend underscores to private class functions

Changed paths:
    engines/sci/graphics/palette32.cpp
    engines/sci/graphics/palette32.h



diff --git a/engines/sci/graphics/palette32.cpp b/engines/sci/graphics/palette32.cpp
index 0c7b3f6..4a72df5 100644
--- a/engines/sci/graphics/palette32.cpp
+++ b/engines/sci/graphics/palette32.cpp
@@ -85,7 +85,7 @@ void GfxPalette32::unloadClut() {
 	_clutTable = 0;
 }
 
-inline void GfxPalette32::_clearCycleMap(const uint16 fromColor, const uint16 numColorsToClear) {
+inline void GfxPalette32::clearCycleMap(const uint16 fromColor, const uint16 numColorsToClear) {
 	bool *mapEntry = _cycleMap + fromColor;
 	const bool *lastEntry = _cycleMap + numColorsToClear;
 	while (mapEntry < lastEntry) {
@@ -93,7 +93,7 @@ inline void GfxPalette32::_clearCycleMap(const uint16 fromColor, const uint16 nu
 	}
 }
 
-inline void GfxPalette32::_setCycleMap(const uint16 fromColor, const uint16 numColorsToSet) {
+inline void GfxPalette32::setCycleMap(const uint16 fromColor, const uint16 numColorsToSet) {
 	bool *mapEntry = _cycleMap + fromColor;
 	const bool *lastEntry = _cycleMap + numColorsToSet;
 	while (mapEntry < lastEntry) {
@@ -104,7 +104,7 @@ inline void GfxPalette32::_setCycleMap(const uint16 fromColor, const uint16 numC
 	}
 }
 
-inline PalCycler *GfxPalette32::_getCycler(const uint16 fromColor) {
+inline PalCycler *GfxPalette32::getCycler(const uint16 fromColor) {
 	const int numCyclers = ARRAYSIZE(_cyclers);
 
 	for (int cyclerIndex = 0; cyclerIndex < numCyclers; ++cyclerIndex) {
@@ -176,11 +176,11 @@ int16 GfxPalette32::setCycle(const uint16 fromColor, const uint16 toColor, const
 	int cyclerIndex;
 	const int numCyclers = ARRAYSIZE(_cyclers);
 
-	PalCycler *cycler = _getCycler(fromColor);
+	PalCycler *cycler = getCycler(fromColor);
 
 	if (cycler != nullptr) {
 		//debug("Resetting existing cycler");
-		_clearCycleMap(fromColor, cycler->numColorsToCycle);
+		clearCycleMap(fromColor, cycler->numColorsToCycle);
 	} else {
 		for (cyclerIndex = 0; cyclerIndex < numCyclers; ++cyclerIndex) {
 			if (_cyclers[cyclerIndex] == nullptr) {
@@ -210,7 +210,7 @@ int16 GfxPalette32::setCycle(const uint16 fromColor, const uint16 toColor, const
 			}
 		}
 
-		_clearCycleMap(cycler->fromColor, cycler->numColorsToCycle);
+		clearCycleMap(cycler->fromColor, cycler->numColorsToCycle);
 	}
 
 	const uint16 numColorsToCycle = 1 + ((uint8) toColor) - fromColor;
@@ -222,7 +222,7 @@ int16 GfxPalette32::setCycle(const uint16 fromColor, const uint16 toColor, const
 	cycler->lastUpdateTick = g_sci->getTickCount();
 	cycler->numTimesPaused = 0;
 
-	_setCycleMap(fromColor, numColorsToCycle);
+	setCycleMap(fromColor, numColorsToCycle);
 
 	// TODO: Validate that this is the correct return value according
 	// to disassembly
@@ -230,7 +230,7 @@ int16 GfxPalette32::setCycle(const uint16 fromColor, const uint16 toColor, const
 }
 
 void GfxPalette32::doCycle(const uint16 fromColor, const int16 speed) {
-	PalCycler *cycler = _getCycler(fromColor);
+	PalCycler *cycler = getCycler(fromColor);
 	if (cycler != nullptr) {
 		cycler->lastUpdateTick = g_sci->getTickCount();
 		_doCycle(cycler, speed);
@@ -238,14 +238,14 @@ void GfxPalette32::doCycle(const uint16 fromColor, const int16 speed) {
 }
 
 void GfxPalette32::cycleOn(const uint16 fromColor) {
-	PalCycler *cycler = _getCycler(fromColor);
+	PalCycler *cycler = getCycler(fromColor);
 	if (cycler != nullptr && cycler->numTimesPaused > 0) {
 		--cycler->numTimesPaused;
 	}
 }
 
 void GfxPalette32::cyclePause(const uint16 fromColor) {
-	PalCycler *cycler = _getCycler(fromColor);
+	PalCycler *cycler = getCycler(fromColor);
 	if (cycler != nullptr) {
 		++cycler->numTimesPaused;
 	}
@@ -293,7 +293,7 @@ void GfxPalette32::cycleOff(const uint16 fromColor) {
 	for (int i = 0, len = ARRAYSIZE(_cyclers); i < len; ++i) {
 		PalCycler *cycler = _cyclers[i];
 		if (cycler != nullptr && cycler->fromColor == fromColor) {
-			_clearCycleMap(fromColor, cycler->numColorsToCycle);
+			clearCycleMap(fromColor, cycler->numColorsToCycle);
 			delete cycler;
 			_cyclers[i] = nullptr;
 			break;
@@ -305,7 +305,7 @@ void GfxPalette32::cycleAllOff() {
 	for (int i = 0, len = ARRAYSIZE(_cyclers); i < len; ++i) {
 		PalCycler *cycler = _cyclers[i];
 		if (cycler != nullptr) {
-			_clearCycleMap(cycler->fromColor, cycler->numColorsToCycle);
+			clearCycleMap(cycler->fromColor, cycler->numColorsToCycle);
 			delete cycler;
 			_cyclers[i] = nullptr;
 		}
diff --git a/engines/sci/graphics/palette32.h b/engines/sci/graphics/palette32.h
index 87bebbb..3432e4b 100644
--- a/engines/sci/graphics/palette32.h
+++ b/engines/sci/graphics/palette32.h
@@ -85,9 +85,9 @@ namespace Sci {
 		 * a fatal error has occurred and the engine will display an error and then exit.
 		 */
 		bool _cycleMap[256];
-		inline void _clearCycleMap(uint16 fromColor, uint16 numColorsToClear);
-		inline void _setCycleMap(uint16 fromColor, uint16 numColorsToClear);
-		inline PalCycler *_getCycler(uint16 fromColor);
+		inline void clearCycleMap(uint16 fromColor, uint16 numColorsToClear);
+		inline void setCycleMap(uint16 fromColor, uint16 numColorsToClear);
+		inline PalCycler *getCycler(uint16 fromColor);
 
 		/**
 		 * The fade table records the expected intensity level of each pixel in the palette that will be displayed on






More information about the Scummvm-git-logs mailing list