[Scummvm-cvs-logs] scummvm master -> 50a93c2e711f169089f6cfc0e09b82be0cce3210

lordhoto lordhoto at gmail.com
Wed Jul 25 21:08:40 CEST 2012


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:
50a93c2e71 GRAPHICS: Small formatting fixes in iff.cpp.


Commit: 50a93c2e711f169089f6cfc0e09b82be0cce3210
    https://github.com/scummvm/scummvm/commit/50a93c2e711f169089f6cfc0e09b82be0cce3210
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-07-25T12:07:19-07:00

Commit Message:
GRAPHICS: Small formatting fixes in iff.cpp.

Changed paths:
    graphics/iff.cpp



diff --git a/graphics/iff.cpp b/graphics/iff.cpp
index 7434a6b..4011126 100644
--- a/graphics/iff.cpp
+++ b/graphics/iff.cpp
@@ -68,7 +68,7 @@ void ILBMDecoder::loadBitmap(uint32 mode, byte *buffer, Common::ReadStream *stre
 		Graphics::PackBitsReadStream packStream(*stream);
 
 		// setup a buffer to hold enough data to build a line in the output
-		uint32 scanlineWidth = ((_header.width + 15)/16) << 1;
+		uint32 scanlineWidth = ((_header.width + 15) / 16) << 1;
 		byte *scanline = new byte[scanlineWidth * _header.depth];
 
 		for (uint i = 0; i < _header.height; ++i) {
@@ -82,7 +82,7 @@ void ILBMDecoder::loadBitmap(uint32 mode, byte *buffer, Common::ReadStream *stre
 			out += outPitch;
 		}
 
-		delete []scanline;
+		delete[] scanline;
 		break;
 	}
 
@@ -121,15 +121,12 @@ void ILBMDecoder::planarToChunky(byte *out, uint32 outPitch, byte *in, uint32 in
 		// then output the pixel according to the requested packing
 		if (!packPlanes) {
 			out[x] = pix;
-		} else
-		if (nPlanes == 1) {
-			out[x/8] |= (pix << (x & 7));
-		} else
-		if (nPlanes == 2) {
-			out[x/4] |= (pix << ((x & 3) << 1));
-		} else
-		if (nPlanes == 4) {
-			out[x/2] |= (pix << ((x & 1) << 2));
+		} else if (nPlanes == 1) {
+			out[x / 8] |= (pix << (x & 7));
+		} else if (nPlanes == 2) {
+			out[x / 4] |= (pix << ((x & 3) << 1));
+		} else if (nPlanes == 4) {
+			out[x / 2] |= (pix << ((x & 1) << 2));
 		}
 	}
 
@@ -187,7 +184,7 @@ struct PBMLoader {
 		_surface = &surface;
 		_colors = colors;
 		Common::IFFParser parser(&input);
-		Common::Functor1Mem< Common::IFFChunk&, bool, PBMLoader > c(this, &PBMLoader::callback);
+		Common::Functor1Mem<Common::IFFChunk &, bool, PBMLoader> c(this, &PBMLoader::callback);
 		parser.parse(c);
 	}
 
@@ -251,7 +248,7 @@ uint32 PackBitsReadStream::read(void *dataPtr, uint32 dataSize) {
 			for (uint32 j = 0; j < lenW; j++) {
 				*out++ = _input->readByte();
 			}
-			for ( ; lenR > lenW; lenR--) {
+			for (; lenR > lenW; lenR--) {
 				_input->readByte();
 			}
 		} else {  // len > 128






More information about the Scummvm-git-logs mailing list