[Scummvm-cvs-logs] SF.net SVN: scummvm:[41514] scummvm/branches/gsoc2009-draci/engines/draci/ sprite.cpp

sev at users.sourceforge.net sev at users.sourceforge.net
Sun Jun 14 15:51:07 CEST 2009


Revision: 41514
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41514&view=rev
Author:   sev
Date:     2009-06-14 13:51:07 +0000 (Sun, 14 Jun 2009)

Log Message:
-----------
Whitespce fixes

Modified Paths:
--------------
    scummvm/branches/gsoc2009-draci/engines/draci/sprite.cpp

Modified: scummvm/branches/gsoc2009-draci/engines/draci/sprite.cpp
===================================================================
--- scummvm/branches/gsoc2009-draci/engines/draci/sprite.cpp	2009-06-14 13:49:28 UTC (rev 41513)
+++ scummvm/branches/gsoc2009-draci/engines/draci/sprite.cpp	2009-06-14 13:51:07 UTC (rev 41514)
@@ -32,48 +32,46 @@
  *  Constructor for loading sprites from a raw data buffer, one byte per pixel.
  */
 Sprite::Sprite(byte *raw_data, uint16 width, uint16 height, uint16 x, uint16 y, 
-	bool columnwise) : _width(width), _height(height), _x(x), _y(y), _data(NULL) {
+			   bool columnwise) : _width(width), _height(height), _x(x), _y(y), _data(NULL) {
 	
-		_data = new byte[width * height];
+	_data = new byte[width * height];
 		
-		if (!columnwise) {
-			memcpy(_data, raw_data, width * height);
-			return;			
-		}
-		else {
-			for (uint16 i = 0; i < width; ++i) {
-				for (uint16 j = 0; j < height; ++j) {
-					_data[j * width + i] = *raw_data++;
-				}
+	if (!columnwise) {
+		memcpy(_data, raw_data, width * height);
+		return;			
+	} else {
+		for (uint16 i = 0; i < width; ++i) {
+			for (uint16 j = 0; j < height; ++j) {
+				_data[j * width + i] = *raw_data++;
 			}
 		}
 	}
+}
 
 /**
  *  Constructor for loading sprites from a sprite-formatted buffer, one byte per 
  *	pixel.
  */
 Sprite::Sprite(byte *sprite_data, uint16 length, uint16 x, uint16 y, 
-	bool columnwise) : _x(x), _y(y), _data(NULL) {
+			   bool columnwise) : _x(x), _y(y), _data(NULL) {
 
-		Common::MemoryReadStream reader(sprite_data, length);
+	Common::MemoryReadStream reader(sprite_data, length);
 
-		_width = reader.readUint16LE();
-		_height = reader.readUint16LE();
+	_width = reader.readUint16LE();
+	_height = reader.readUint16LE();
 
-		_data = new byte[_width * _height];
+	_data = new byte[_width * _height];
 		
-		if (!columnwise) {
-			reader.read(_data, _width * _height);
-		}
-		else {
-			for (uint16 i = 0; i < _width; ++i) {
-				for (uint16 j = 0; j < _height; ++j) {
-					_data[j * _width + i] = reader.readByte();
-				}
+	if (!columnwise) {
+		reader.read(_data, _width * _height);
+	} else {
+		for (uint16 i = 0; i < _width; ++i) {
+			for (uint16 j = 0; j < _height; ++j) {
+				_data[j * _width + i] = reader.readByte();
 			}
-		}		
-	}
+		}
+	}		
+}
 
 Sprite::~Sprite() { 
 	delete[] _data;


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