[Scummvm-cvs-logs] SF.net SVN: scummvm:[39245] scummvm/trunk/engines/sci/gfx

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sun Mar 8 22:05:39 CET 2009


Revision: 39245
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39245&view=rev
Author:   lordhoto
Date:     2009-03-08 21:05:39 +0000 (Sun, 08 Mar 2009)

Log Message:
-----------
Formatting.

Modified Paths:
--------------
    scummvm/trunk/engines/sci/gfx/palette.cpp
    scummvm/trunk/engines/sci/gfx/palette.h

Modified: scummvm/trunk/engines/sci/gfx/palette.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/palette.cpp	2009-03-08 20:51:30 UTC (rev 39244)
+++ scummvm/trunk/engines/sci/gfx/palette.cpp	2009-03-08 21:05:39 UTC (rev 39245)
@@ -38,8 +38,7 @@
 	_refcount = 1;
 }
 
-Palette::Palette(gfx_pixmap_color_t* colors, unsigned int s)
-{
+Palette::Palette(gfx_pixmap_color_t *colors, unsigned int s) {
 	_size = s;
 	_colors = new PaletteEntry[s];
 	_parent = 0;
@@ -58,7 +57,7 @@
 	_colors = 0;
 }
 
-Palette* Palette::getref() {
+Palette *Palette::getref() {
 	_refcount++;
 	return this;
 }
@@ -72,7 +71,9 @@
 }
 
 void Palette::resize(unsigned int s) {
-	if (s == _size) return;
+	if (s == _size)
+		return;
+
 	assert(!_parent);
 	assert(_refcount == 1);
 	assert(s >= _size);
@@ -94,7 +95,9 @@
 
 	int count = 0;
 	for (unsigned int i = 0; i < _size; ++i) {
-		if (_colors[i].refcount == PALENTRY_FREE) continue;
+		if (_colors[i].refcount == PALENTRY_FREE)
+			continue;
+
 		int pi = _colors[i].parent_index;
 		assert(pi >= 0);
 		assert(pi < (int)_parent->_size);
@@ -141,7 +144,7 @@
 	_dirty = true;
 }
 
-void Palette::makeSystemColor(unsigned int index, const PaletteEntry& color) {
+void Palette::makeSystemColor(unsigned int index, const PaletteEntry &color) {
 	assert(index < _size);
 	PaletteEntry& entry = _colors[index];
 	entry.r = color.r;
@@ -232,7 +235,8 @@
 
 	for (unsigned int i = 0; i < _size; ++i) {
 		PaletteEntry& entry = _colors[i];
-		if (entry.refcount == PALENTRY_FREE) continue;
+		if (entry.refcount == PALENTRY_FREE)
+			continue;
 
 		unsigned int pi = _parent->findNearbyColor(entry.r, entry.g, entry.b);
 #ifdef DEBUG_MERGE
@@ -251,7 +255,7 @@
 #endif
 }
 
-Palette* Palette::copy() {
+Palette *Palette::copy() {
 	assert(!_parent);
 	Palette* p = new Palette(_size);
 	p->name = "copy of " + name;

Modified: scummvm/trunk/engines/sci/gfx/palette.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/palette.h	2009-03-08 20:51:30 UTC (rev 39244)
+++ scummvm/trunk/engines/sci/gfx/palette.h	2009-03-08 21:05:39 UTC (rev 39245)
@@ -59,27 +59,27 @@
 class Palette {
 public:
 	explicit Palette(unsigned int size);
-	Palette(gfx_pixmap_color_t* colors, unsigned int size);
+	Palette(gfx_pixmap_color_t *colors, unsigned int size);
 	~Palette();
 
-	Palette* getref();
+	Palette *getref();
 	void free();
-	Palette* copy();
+	Palette *copy();
 
 	void resize(unsigned int size);
 	void setColor(unsigned int index, byte r, byte g, byte b);
-	void makeSystemColor(unsigned int index, const PaletteEntry& color);
-	const PaletteEntry& getColor(unsigned int index) const {
+	void makeSystemColor(unsigned int index, const PaletteEntry &color);
+	const PaletteEntry &getColor(unsigned int index) const {
 		assert(index < _size);
 		return _colors[index];
 	}
-	const PaletteEntry& operator[](unsigned int index) const {
+	const PaletteEntry &operator[](unsigned int index) const {
 		return getColor(index);
 	}
 	unsigned int size() const { return _size; }
 	bool isDirty() const { return _dirty; }
 	bool isShared() const { return _refcount > 1; }
-	Palette* getParent() { return _parent; }
+	Palette *getParent() { return _parent; }
 
 	void markClean() { _dirty = false; }
 
@@ -100,8 +100,6 @@
 };
 
 
-
-
 } // End of namespace Sci
 
 #endif // SCI_GFX_PALETTE_H


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