[Scummvm-cvs-logs] CVS: scummvm/scumm charset.cpp,2.139,2.140 debugger.cpp,1.147,1.148 help.cpp,1.18,1.19 imuse_internal.h,2.40,2.41 resource_v7he.cpp,1.37,1.38 script_v72he.cpp,2.284,2.285 sprite_he.cpp,1.135,1.136 string.cpp,1.289,1.290

Max Horn fingolfin at users.sourceforge.net
Sun May 8 14:52:15 CEST 2005


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28088/scumm

Modified Files:
	charset.cpp debugger.cpp help.cpp imuse_internal.h 
	resource_v7he.cpp script_v72he.cpp sprite_he.cpp string.cpp 
Log Message:
Comply to our coding conventions

Index: charset.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/charset.cpp,v
retrieving revision 2.139
retrieving revision 2.140
diff -u -d -r2.139 -r2.140
--- charset.cpp	23 Apr 2005 14:32:40 -0000	2.139
+++ charset.cpp	8 May 2005 21:49:44 -0000	2.140
@@ -251,14 +251,14 @@
 }
 
 int CharsetRendererCommon::getFontHeight() {
-	if(_vm->_useCJKMode)
+	if (_vm->_useCJKMode)
 		return MAX(_vm->_2byteHeight + 1, (int)_fontPtr[1]);
 	else
 		return _fontPtr[1];
 }
 
 int CharsetRendererV3::getFontHeight() {
-	if(_vm->_useCJKMode)
+	if (_vm->_useCJKMode)
 		return MAX(_vm->_2byteHeight + 1, 8);
 	else
 		return 8;
@@ -289,7 +289,7 @@
 		if (_vm->_heversion >= 72 && chr == code) {
 			chr = text[pos++];
 			if (chr == 84) {  // Strings of speech offset/size
-				while(chr != code)
+				while (chr != code)
 					chr = text[pos++];
 				continue;
 			}
@@ -303,7 +303,7 @@
 			break;
 		if (chr == 254 || chr == 255) {
 			//process in LE
-			if(chr == 254 && checkKSCode(text[pos], chr) && _vm->_useCJKMode) {
+			if (chr == 254 && checkKSCode(text[pos], chr) && _vm->_useCJKMode) {
 				goto loc_avoid_ks_fe;
 			}
 			chr = text[pos++];
@@ -354,7 +354,7 @@
 		if (_vm->_heversion >= 72 && chr == code) {
 			chr = str[pos++];
 			if (chr == 84) {  // Strings of speech offset/size
-				while(chr != code)
+				while (chr != code)
 					chr = str[pos++];
 				continue;
 			}
@@ -370,7 +370,7 @@
 			continue;
 		if (chr == 254 || chr == 255) {
 			//process in LE
-			if(chr == 254 && checkKSCode(str[pos], chr) && _vm->_useCJKMode) {
+			if (chr == 254 && checkKSCode(str[pos], chr) && _vm->_useCJKMode) {
 				goto loc_avoid_ks_fe;
 			}
 			chr = str[pos++];

Index: debugger.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/debugger.cpp,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -d -r1.147 -r1.148
--- debugger.cpp	24 Apr 2005 12:21:52 -0000	1.147
+++ debugger.cpp	8 May 2005 21:49:45 -0000	1.148
@@ -546,7 +546,7 @@
 
 	if ((argc == 1) && (_vm->_debugFlags > 0)) {
 		for (int i = 0; i < numChannels; i++) {
-			if(_vm->_debugFlags & debugChannels[i].flag)
+			if (_vm->_debugFlags & debugChannels[i].flag)
 				DebugPrintf("%s - %s\n", debugChannels[i].channel, 
 							 debugChannels[i].desc);
 		}
@@ -570,7 +570,7 @@
 	// Identify flag
 	const char *realFlag = argv[1] + 1;
 	for (int i = 0; i < numChannels; i++) {
-		if((scumm_stricmp(debugChannels[i].channel, realFlag)) == 0) {
+		if ((scumm_stricmp(debugChannels[i].channel, realFlag)) == 0) {
 			if (setFlag) {
 				_vm->_debugFlags |= debugChannels[i].flag;
 				DebugPrintf("Enable ");

Index: help.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/help.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- help.cpp	1 Jan 2005 16:09:13 -0000	1.18
+++ help.cpp	8 May 2005 21:49:45 -0000	1.19
@@ -60,7 +60,7 @@
 	}
 }
 
-#define ADD_BIND(k,d) do { key[i] = k; dsc[i] = d; i++; } while(0)
+#define ADD_BIND(k,d) do { key[i] = k; dsc[i] = d; i++; } while (0)
 #define ADD_TEXT(d) ADD_BIND("",d)
 #define ADD_LINE ADD_BIND("","")
 

Index: imuse_internal.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse_internal.h,v
retrieving revision 2.40
retrieving revision 2.41
diff -u -d -r2.40 -r2.41
--- imuse_internal.h	13 Apr 2005 00:11:42 -0000	2.40
+++ imuse_internal.h	8 May 2005 21:49:45 -0000	2.41
@@ -71,17 +71,17 @@
 ////////////////////////////////////////
 
 inline int clamp(int val, int min, int max) {
-	if(val < min)
+	if (val < min)
 		return min;
-	if(val > max)
+	if (val > max)
 		return max;
 	return val;
 }
 
 inline int transpose_clamp(int a, int b, int c) {
-	if(b > a)
+	if (b > a)
 		a += (b - a + 11) / 12 * 12;
-	if(c < a)
+	if (c < a)
 		a -= (a - c + 11) / 12 * 12;
 	return a;
 }

Index: resource_v7he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource_v7he.cpp,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- resource_v7he.cpp	5 May 2005 15:19:30 -0000	1.37
+++ resource_v7he.cpp	8 May 2005 21:49:45 -0000	1.38
@@ -1368,7 +1368,7 @@
 		// Length check
 		int sumlen =  MBI_INFOHDR + data_size_pad + rsrc_size_pad;
 
-		if(sumlen == filelen)
+		if (sumlen == filelen)
 			_resOffset = MBI_INFOHDR + data_size_pad;
 	}
 
@@ -1581,7 +1581,7 @@
 	palette = (byte *)malloc(ctSize * 4);
 
 	// Read just high byte of 16-bit color
-	for(int c = 0; c < ctSize; c++) {
+	for (int c = 0; c < ctSize; c++) {
 		// We just use indices 0..ctSize, so ignore color ID
 		dis.readUint16BE(); // colorID[c]
 
@@ -1608,7 +1608,7 @@
 
 	// build a mask to make sure the pixels are properly shifted out
 	bitmask = 0;
-	for(int m = 0; m < bpp; m++) {
+	for (int m = 0; m < bpp; m++) {
 		bitmask <<= 1;
 		bitmask  |= 1;
 	}

Index: script_v72he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v72he.cpp,v
retrieving revision 2.284
retrieving revision 2.285
diff -u -d -r2.284 -r2.285
--- script_v72he.cpp	8 May 2005 12:10:56 -0000	2.284
+++ script_v72he.cpp	8 May 2005 21:49:45 -0000	2.285
@@ -2055,7 +2055,7 @@
 			for (; a1_dim2start <= a1_dim2end; ++a1_dim2start, ++a2_dim2start) {
 				int a2dim1 = a2_dim1start;
 				int a1dim1 = a1_dim1start;
-				for(; a1dim1 <= a1_dim1end; ++a1dim1, ++a2dim1) {
+				for (; a1dim1 <= a1_dim1end; ++a1dim1, ++a2dim1) {
 					int val = readArray(array2, a2_dim2start, a2dim1);
 					writeArray(array1, a1_dim2start, a1dim1, val);
 				}

Index: sprite_he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sprite_he.cpp,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -d -r1.135 -r1.136
--- sprite_he.cpp	30 Apr 2005 05:34:31 -0000	1.135
+++ sprite_he.cpp	8 May 2005 21:49:46 -0000	1.136
@@ -203,7 +203,7 @@
 				y += h / 2;
 			}
 
-			if(isWizPixelNonTransparent(resId, resState, x, y, spi->curImgFlags))
+			if (isWizPixelNonTransparent(resId, resState, x, y, spi->curImgFlags))
 				return spi->id;
 		}
 	}

Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.289
retrieving revision 1.290
diff -u -d -r1.289 -r1.290
--- string.cpp	8 May 2005 14:31:27 -0000	1.289
+++ string.cpp	8 May 2005 21:49:46 -0000	1.290
@@ -255,7 +255,7 @@
 				i = 0;
 				memset(value, 0, 32);
 				c = *buffer++;
-				while(c != 44) {
+				while (c != 44) {
 					value[i] = c;
 					c = *buffer++;
 					i++;
@@ -266,7 +266,7 @@
 				i = 0;
 				memset(value, 0, 32);
 				c = *buffer++;
-				while(c != code) {
+				while (c != code) {
 					value[i] = c;
 					c = *buffer++;
 					i++;
@@ -286,7 +286,7 @@
 				i = 0;
 				memset(value, 0, 32);
 				c = *buffer++;
-				while(c != code) {
+				while (c != code) {
 					value[i] = c;
 					c = *buffer++;
 					i++;
@@ -307,7 +307,7 @@
 			}
 		} else if (c == 0xFE || c == 0xFF) {
 			// WORKAROUND to avoid korean code 0xfe treated as charset message code.
-			if(c == 0xFE && checkKSCode(*(buffer + 1), c) && _useCJKMode) {
+			if (c == 0xFE && checkKSCode(*(buffer + 1), c) && _useCJKMode) {
 				goto loc_avoid_ks_fe;
 			}
 			c = *buffer++;
@@ -387,7 +387,7 @@
 					c = 0x20; //not in S-JIS
 				} else {
 					c += *buffer++ * 256; //LE
-					if(_gameId == GID_CMI) { //HACK: This fixes korean text position in COMI (off by 6 pixel)
+					if (_gameId == GID_CMI) { //HACK: This fixes korean text position in COMI (off by 6 pixel)
 						cmi_pos_hack = true;
 						_charset->_top += 6;
 					}
@@ -407,7 +407,7 @@
 				} else
 					_charset->printChar(c);
 			}
-			if(cmi_pos_hack) {
+			if (cmi_pos_hack) {
 				cmi_pos_hack = false;
 				_charset->_top -= 6;
 			}
@@ -554,7 +554,7 @@
 					c = 0x20; //not in S-JIS
 				} else {
 					c += buf[i++] * 256;
-					if(_gameId == GID_CMI) {
+					if (_gameId == GID_CMI) {
 						cmi_pos_hack = true;
 						_charset->_top += 6;
 					}
@@ -563,7 +563,7 @@
 			_charset->printChar(c);
 			_charset->_blitAlso = false;
 
-			if(cmi_pos_hack) {
+			if (cmi_pos_hack) {
 				cmi_pos_hack = false;
 				_charset->_top -= 6;
 			}





More information about the Scummvm-git-logs mailing list