[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.126,1.127 akos.cpp,1.77,1.78 bomp.cpp,2.6,2.7 charset.cpp,2.42,2.43 debugger.cpp,1.59,1.60 dialogs.cpp,1.52,1.53 gfx.cpp,2.153,2.154 imuse_digi.cpp,1.14,1.15 nut_renderer.cpp,1.29,1.30 script.cpp,1.110,1.111 script_v2.cpp,2.135,2.136 script_v5.cpp,1.113,1.114 script_v6.cpp,1.156,1.157 script_v8.cpp,2.178,2.179 scummvm.cpp,2.223,2.224 sound.cpp,1.132,1.133 string.cpp,1.133,1.134

Max Horn fingolfin at users.sourceforge.net
Fri Jun 6 17:50:02 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv31146

Modified Files:
	actor.cpp akos.cpp bomp.cpp charset.cpp debugger.cpp 
	dialogs.cpp gfx.cpp imuse_digi.cpp nut_renderer.cpp script.cpp 
	script_v2.cpp script_v5.cpp script_v6.cpp script_v8.cpp 
	scummvm.cpp sound.cpp string.cpp 
Log Message:
follow our coding conventions

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -d -r1.126 -r1.127
--- actor.cpp	7 Jun 2003 00:13:24 -0000	1.126
+++ actor.cpp	7 Jun 2003 00:49:35 -0000	1.127
@@ -1387,7 +1387,7 @@
 			return;
 
 		walkbox = walkdata.destbox;
-	} while(1);
+	} while (1);
 
 	moving |= MF_LAST_LEG;
 	calcMovementFactor(walkdata.destx, walkdata.desty);

Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- akos.cpp	5 Jun 2003 06:59:53 -0000	1.77
+++ akos.cpp	7 Jun 2003 00:49:35 -0000	1.78
@@ -924,7 +924,7 @@
 	int32 skip_x, skip_y, cur_x, cur_y;
 	const byte transparency = (_vm->_features & GF_HUMONGOUS) ? 0 : 255;
 	
-	if(!_mirror) {
+	if (!_mirror) {
 		clip_left = (_actorX - xmoveCur - _width) + 1;
 	} else {
 		clip_left = _actorX + xmoveCur;
@@ -948,17 +948,17 @@
 		clip_left = 0;
 	}
 
-	if(clip_right > maxw) {
+	if (clip_right > maxw) {
 		cur_x -= clip_right - maxw;
 		clip_right = maxw;
 	}
 
-	if(clip_top < 0) {
+	if (clip_top < 0) {
 		skip_y -= clip_top;
 		clip_top = 0;
 	}
 
-	if(clip_bottom > maxh) {
+	if (clip_bottom > maxh) {
 		cur_y -= clip_bottom - maxh;
 		clip_bottom = maxh;
 	}
@@ -999,7 +999,7 @@
 	out_height++;
 
 	cur_x -= skip_x;
-	if(cur_x < 0) {
+	if (cur_x < 0) {
 		cur_x = -cur_x;
 	}
 	cur_x++;

Index: bomp.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/bomp.cpp,v
retrieving revision 2.6
retrieving revision 2.7
diff -u -d -r2.6 -r2.7
--- bomp.cpp	1 Jun 2003 14:30:24 -0000	2.6
+++ bomp.cpp	7 Jun 2003 00:49:35 -0000	2.7
@@ -97,7 +97,7 @@
 }
 
 void bompApplyMask(byte *line_buffer, byte *mask, byte maskbit, int32 size, byte transparency) {
-	while(1) {
+	while (1) {
 		do {
 			if (size-- == 0) 
 				return;
@@ -129,7 +129,7 @@
 	}
 }
 void bompApplyShadow0(const byte *line_buffer, byte *dst, int32 size, byte transparency) {
-	while(size-- > 0) {
+	while (size-- > 0) {
 		byte tmp = *line_buffer++;
 		if (tmp != transparency) {
 			*dst = tmp;
@@ -139,7 +139,7 @@
 }
 
 void bompApplyShadow1(const byte *shadowPalette, const byte *line_buffer, byte *dst, int32 size, byte transparency) {
-	while(size-- > 0) {
+	while (size-- > 0) {
 		byte tmp = *line_buffer++;
 		if (tmp != transparency) {
 			if (tmp == 13) {
@@ -152,7 +152,7 @@
 }
 
 void bompApplyShadow3(const byte *shadowPalette, const byte *line_buffer, byte *dst, int32 size, byte transparency) {
-	while(size-- > 0) {
+	while (size-- > 0) {
 		byte tmp = *line_buffer++;
 		if (tmp != transparency) {
 			if (tmp < 8) {
@@ -424,7 +424,7 @@
 	byte * tmp_scaling = scaling;
 	byte a = 0;
 
-	while((count--) != 0) {
+	while ((count--) != 0) {
 		tmp = *(tmp_ptr + 3);
 		a <<= 1;
 		if (scale < tmp) {
@@ -477,7 +477,7 @@
 
 	count = (size + 7) >> 3;
 	byte ret_value = 0;
-	while(count--) {
+	while (count--) {
 		tmp = *scaling++;
 		assert(tmp < sizeof(_bompBitsTable));
 		ret_value += _bompBitsTable[tmp];

Index: charset.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/charset.cpp,v
retrieving revision 2.42
retrieving revision 2.43
diff -u -d -r2.42 -r2.43
--- charset.cpp	7 Jun 2003 00:13:24 -0000	2.42
+++ charset.cpp	7 Jun 2003 00:49:35 -0000	2.43
@@ -79,7 +79,7 @@
 
 // do spacing for variable width old-style font
 int CharsetRendererClassic::getCharWidth(byte chr) {
-	if(chr >= 0x80 && _vm->_CJKMode)
+	if (chr >= 0x80 && _vm->_CJKMode)
 		return 6;
 	int spacing = 0;
 
@@ -605,7 +605,7 @@
 
 	_vm->_charsetColorMap[1] = _color;
 	
-	if(is2byte) {
+	if (is2byte) {
 		_dropShadow = true;
 		charPtr = g_scumm->get2byteCharPtr(chr);
 		width = g_scumm->_2byteWidth;
@@ -691,7 +691,7 @@
 			+ vs->xstart + drawTop * _vm->_screenWidth + _left;
 	}
 
-	if(is2byte) {
+	if (is2byte) {
 		drawBits1(vs, dst, charPtr, mask, drawTop, origWidth, origHeight);
 	} else {
 		byte bpp = *_fontPtr;
@@ -776,7 +776,7 @@
 		maskpos = 0;
 
 		for (x = 0; x < width; x++) {
-			if((x % 8) == 0)
+			if ((x % 8) == 0)
 				bits = *src++;
 			if (bits & revBitMask[x % 8]) {
 				if (_dropShadow) {
@@ -866,7 +866,7 @@
 	int width = _current->getCharWidth(chr);
 	int height = _current->getCharHeight(chr);
 
-	if(chr >= 256 && _vm->_CJKMode)
+	if (chr >= 256 && _vm->_CJKMode)
 		width = 16;
 
 	_hasMask = true;

Index: debugger.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/debugger.cpp,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- debugger.cpp	2 Jun 2003 05:38:45 -0000	1.59
+++ debugger.cpp	7 Jun 2003 00:49:35 -0000	1.60
@@ -225,7 +225,7 @@
 
 		if (i == 0)
 			continue;
-	} while(RunCommand(buf));
+	} while (RunCommand(buf));
 
 #endif
 }
@@ -246,7 +246,7 @@
 		param[num_params++] = input;
 	}
 
-	for(i=0; i < _dcmd_count; i++) {
+	for (i=0; i < _dcmd_count; i++) {
 		if (!strcmp(_dcmds[i].name, param[0])) {
 			bool result = (this->*_dcmds[i].function)(num_params, param);
 			free(input);
@@ -255,7 +255,7 @@
 	}
 
 	// It's not a command, so things get a little tricky for variables. Do fuzzy matching to ignore things like subscripts.
-	for(i = 0; i < _dvar_count; i++) {
+	for (i = 0; i < _dvar_count; i++) {
 		if (!strncmp(_dvars[i].name, param[0], strlen(_dvars[i].name))) {
 			if (num_params > 1) {
 				// Alright, we need to check the TYPE of the variable to deref and stuff... the array stuff is a bit ugly :)
@@ -1003,7 +1003,7 @@
 	unsigned int matchlen = 0;
 	char match[30]; // the max. command name is 30 chars
 
-	for(int i=0; i < _dcmd_count; i++) {
+	for (int i=0; i < _dcmd_count; i++) {
 		if (!strncmp(_dcmds[i].name, input, inputlen)) {
 			unsigned int commandlen = strlen(_dcmds[i].name);
 			if (commandlen == inputlen) { // perfect match

Index: dialogs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/dialogs.cpp,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- dialogs.cpp	7 Jun 2003 00:13:24 -0000	1.52
+++ dialogs.cpp	7 Jun 2003 00:49:35 -0000	1.53
@@ -327,7 +327,7 @@
 
 	_scumm->listSavegames(avail_saves, ARRAYSIZE(avail_saves), mgr);
 	for (; i < ARRAYSIZE(avail_saves); i++) {
-		if(avail_saves[i])
+		if (avail_saves[i])
 			_scumm->getSavegameName(i, name, mgr);
 		else
 			name[0] = 0;

Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.153
retrieving revision 2.154
diff -u -d -r2.153 -r2.154
--- gfx.cpp	7 Jun 2003 00:16:22 -0000	2.153
+++ gfx.cpp	7 Jun 2003 00:49:35 -0000	2.154
@@ -1383,12 +1383,12 @@
 	int x, z;
 	byte color, run, common[4];
 
-	for(z = 0; z < 4; z++) {
+	for (z = 0; z < 4; z++) {
 		common[z] = *src++;
 	}
 
 	x = 0;
-	while(x < size){
+	while (x < size){
 		color = *src++;
 		if (color < 0x40) {
 			for (z = 0; z <= color; z++) {
@@ -1414,37 +1414,37 @@
 	byte color = 0;
 	int run = 0, x = 0, y = 0, z;
 
-	while(x < 8) {
+	while (x < 8) {
 		color = *src++;
 		
-		if(color & 0x80) {
+		if (color & 0x80) {
 			run = color & 0x3f;
 
-			if(color & 0x40) {
+			if (color & 0x40) {
 				color = *src++;
 
-				if(run == 0) {
+				if (run == 0) {
 					run = *src++;
 				}
-				for(z = 0; z < run; z++) {
+				for (z = 0; z < run; z++) {
 					*(dst + y * _vm->_screenWidth + x) = (z&1) ? (color & 0xf) : (color >> 4);
 
 					y++;
-					if(y >= height) {
+					if (y >= height) {
 						y = 0;
 						x++;
 					}
 				}
 			} else {
-				if(run == 0) {
+				if (run == 0) {
 					run = *src++;
 				}
 
-				for(z = 0; z < run; z++) {
+				for (z = 0; z < run; z++) {
 					*(dst + y * _vm->_screenWidth + x) = *(dst + y * _vm->_screenWidth + x - 1);
 
 					y++;
-					if(y >= height) {
+					if (y >= height) {
 						y = 0;
 						x++;
 					}
@@ -1452,15 +1452,15 @@
 			}
 		} else {
 			run = color >> 4;
-			if(run == 0) {
+			if (run == 0) {
 				run = *src++;
 			}
 			
-			for(z = 0; z < run; z++) {
+			for (z = 0; z < run; z++) {
 				*(dst + y * _vm->_screenWidth + x) = color & 0xf;
 
 				y++;
-				if(y >= height) {
+				if (y >= height) {
 					y = 0;
 					x++;
 				}

Index: imuse_digi.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse_digi.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- imuse_digi.cpp	31 May 2003 15:04:51 -0000	1.14
+++ imuse_digi.cpp	7 Jun 2003 00:49:36 -0000	1.15
@@ -33,7 +33,7 @@
 
 static void imus_digital_handler(void *engine) {
 	// Avoid race condition
-	if(engine && ((Scumm *)engine)->_imuseDigital)
+	if (engine && ((Scumm *)engine)->_imuseDigital)
 		((Scumm *)engine)->_imuseDigital->handler();
 }
 
@@ -747,7 +747,7 @@
 			}
 
 			if (_channel[l]._bits == 12) {
-				for(i = 0; i < (mixer_size / 4); i++) {
+				for (i = 0; i < (mixer_size / 4); i++) {
 					byte sample1 = buf[i * 4 + 0];
 					byte sample2 = buf[i * 4 + 1];
 					byte sample3 = buf[i * 4 + 2];
@@ -760,7 +760,7 @@
 					buf[i * 4 + 3] = (byte)(sample_b & 0xff);
 				}
 			} else if (_channel[l]._bits == 8) {
-				for(i = 0; i < (mixer_size / 2); i++) {
+				for (i = 0; i < (mixer_size / 2); i++) {
 					buf[i * 2 + 0] = (byte)(((int8)(buf[i * 2 + 0] ^ 0x80) * _channel[l]._volumeRight) >> 8) ^ 0x80;
 					buf[i * 2 + 1] = (byte)(((int8)(buf[i * 2 + 1] ^ 0x80) * _channel[l]._volume) >> 8) ^ 0x80;
 				}
@@ -783,11 +783,11 @@
 	debug(5, "IMuseDigital::startSound(%d)", sound);
 	int32 l;
 
-	for(l = 0; l < MAX_DIGITAL_CHANNELS; l++) {
-		if(_channel[l]._used == false) {
+	for (l = 0; l < MAX_DIGITAL_CHANNELS; l++) {
+		if (_channel[l]._used == false) {
 			byte *ptr = _scumm->getResourceAddress(rtSound, sound);
 			byte *s_ptr = ptr;
-			if(ptr == NULL) {
+			if (ptr == NULL) {
 				warning("IMuseDigital::startSound(%d) NULL resource pointer", sound);
 				return;
 			}
@@ -1064,7 +1064,7 @@
 		case 0: // play music (state)
 			debug(5, "IMuseDigital::doCommand 0x1000 (%d)", b);
 			if (_scumm->_gameId == GID_DIG) {
-				for(l = 0;; l++) {
+				for (l = 0;; l++) {
 					if (_digStateMusicMap[l].room == -1) {
 						return 1;
 					}
@@ -1084,7 +1084,7 @@
 					return 0;
 				}
 
-				for(l = 0;; l++) {
+				for (l = 0;; l++) {
 					if (_comiStateMusicTable[l].index == -1) {
 						return 1;
 					}
@@ -1097,14 +1097,14 @@
 					}
 				}
 			} else if (_scumm->_gameId == GID_FT) {
-				for(l = 0;; l++) {
+				for (l = 0;; l++) {
 					if (_ftStateMusicTable[l].index == -1) {
 						return 1;
 					}
 					if (_ftStateMusicTable[l].index == b) {
 						debug(5, "Play imuse music: %s, %s", _ftStateMusicTable[l].name, _ftStateMusicTable[l].audioname);
 						if (_ftStateMusicTable[l].audioname[0] != 0) {
-							for(r = 0; r < _scumm->_numAudioNames; r++) {
+							for (r = 0; r < _scumm->_numAudioNames; r++) {
 								if (strcmp(_ftStateMusicTable[l].audioname, &_scumm->_audioNames[r * 9]) == 0) {
 									startSound(r);
 									doCommand(12, r, 1536, _ftStateMusicTable[l].volume, 0, 0, 0, 0);
@@ -1118,7 +1118,7 @@
 		case 1: // play music (seq)
 			debug(5, "IMuseDigital::doCommand 0x1001 (%d)", b);
 			if (_scumm->_gameId == GID_DIG) {
-				for(l = 0;; l++) {
+				for (l = 0;; l++) {
 					if (_digSeqMusicTable[l].index == -1) {
 						return 1;
 					}
@@ -1131,7 +1131,7 @@
 					}
 				}
 			} else if (_scumm->_gameId == GID_CMI) {
-				for(l = 0;; l++) {
+				for (l = 0;; l++) {
 					if (_comiSeqMusicTable[l].index == -1) {
 						return 1;
 					}
@@ -1144,14 +1144,14 @@
 					}
 				}
 			} else if (_scumm->_gameId == GID_FT) {
-				for(l = 0;; l++) {
+				for (l = 0;; l++) {
 					if (_ftSeqMusicTable[l].index == -1) {
 						return 1;
 					}
 					if (_ftSeqMusicTable[l].index == b) {
 						debug(5, "Play imuse music: %s, %s", _ftSeqMusicTable[l].name, _ftSeqMusicTable[l].audioname);
 						if (_ftSeqMusicTable[l].audioname[0] != 0) {
-							for(r = 0; r < _scumm->_numAudioNames; r++) {
+							for (r = 0; r < _scumm->_numAudioNames; r++) {
 								if (strcmp(_ftSeqMusicTable[l].audioname, &_scumm->_audioNames[r * 9]) == 0) {
 									startSound(r);
 									doCommand(12, r, 1536, _ftSeqMusicTable[l].volume, 0, 0, 0, 0);

Index: nut_renderer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/nut_renderer.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- nut_renderer.cpp	7 Jun 2003 00:33:46 -0000	1.29
+++ nut_renderer.cpp	7 Jun 2003 00:49:36 -0000	1.30
@@ -29,13 +29,13 @@
 	_loaded(false),
 	_nbChars(0) {
 	
-	for(int i = 0; i < 256; i++)
+	for (int i = 0; i < 256; i++)
 		_chars[i].src = NULL;
 }
 
 NutRenderer::~NutRenderer() {
-	for(int i = 0; i < _nbChars; i++) {
-		if(_chars[i].src)
+	for (int i = 0; i < _nbChars; i++) {
+		if (_chars[i].src)
 			delete []_chars[i].src;
 	}
 }
@@ -134,15 +134,15 @@
 		return 0;
 	}
 
-	if(c >= 0x80 && _vm->_CJKMode) {
-		if(_vm->_gameId == GID_CMI)
+	if (c >= 0x80 && _vm->_CJKMode) {
+		if (_vm->_gameId == GID_CMI)
 			return 8;
-		if(_vm->_gameId == GID_DIG)
+		if (_vm->_gameId == GID_DIG)
 			return 6;
 		return 0;
 	}
 
-	if(c >= _nbChars)
+	if (c >= _nbChars)
 		error("invalid character in NutRenderer::getCharWidth : %d (%d)", c, _nbChars);
 
 	return _chars[c].width;
@@ -155,15 +155,15 @@
 		return 0;
 	}
 
-	if(c >= 0x80 && _vm->_CJKMode) {
-		if(_vm->_gameId == GID_CMI)
+	if (c >= 0x80 && _vm->_CJKMode) {
+		if (_vm->_gameId == GID_CMI)
 			return 16;
-		if(_vm->_gameId == GID_DIG)
+		if (_vm->_gameId == GID_DIG)
 			return 10;
 		return 0;
 	}
 
-	if(c >= _nbChars)
+	if (c >= _nbChars)
 		error("invalid character in NutRenderer::getCharHeight : %d (%d)", c, _nbChars);
 
 	return _chars[c].height;
@@ -199,7 +199,7 @@
 		if (useMask)
 			mask = _vm->getMaskBuffer(x, y, 0);
 		
-		if(c >= 256 && _vm->_CJKMode)
+		if (c >= 256 && _vm->_CJKMode)
 			draw2byte(dst, mask, c, x, y, color);
 		else
 			drawChar(dst, mask, (byte)c, x, y, color);
@@ -260,7 +260,7 @@
 		maskmask = revBitMask[x & 7];
 		maskpos = 0;
 		for (int tx = 0; tx < width; tx++) {
-			if((tx % 8) == 0)
+			if ((tx % 8) == 0)
 				bits = *src++;
 			if (x + tx < 0 || x + tx >= _vm->_screenWidth || y + ty < 0 || y + ty >= _vm->_screenHeight)
 				continue;

Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -d -r1.110 -r1.111
--- script.cpp	7 Jun 2003 00:13:25 -0000	1.110
+++ script.cpp	7 Jun 2003 00:49:36 -0000	1.111
@@ -546,7 +546,7 @@
 			int bit = var & 0xF;
 			var = (var >> 4) & 0xFF;
 			checkRange(_numVariables - 1, 0, var, "Variable %d out of range(wzb)");
-			if(value)
+			if (value)
 				_scummVars[var] |= ( 1 << bit );
 			else
 				_scummVars[var] &= ~( 1 << bit );

Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.135
retrieving revision 2.136
diff -u -d -r2.135 -r2.136
--- script_v2.cpp	7 Jun 2003 00:13:25 -0000	2.135
+++ script_v2.cpp	7 Jun 2003 00:49:36 -0000	2.136
@@ -1338,7 +1338,7 @@
 		return;	// Silently fail for now
 	name = objptr + *(objptr + 14);
 
-	while(name[size++])
+	while (name[size++])
 		;
 
 	if (i > size) {

Index: script_v5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v5.cpp,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -d -r1.113 -r1.114
--- script_v5.cpp	7 Jun 2003 00:13:25 -0000	1.113
+++ script_v5.cpp	7 Jun 2003 00:49:36 -0000	1.114
@@ -1506,7 +1506,7 @@
 		// FIXME - this probably can be removed eventually, I don't think the following
 		// check will ever be triggered, but then I could be wrong and it's better
 		// to play it safe.
-		if((_opcode & 0x3F) != (_opcode & 0x1F))
+		if ((_opcode & 0x3F) != (_opcode & 0x1F))
 			error("Oops, this shouldn't happen: o5_resourceRoutines opcode %d", _opcode);
 	}
 

Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -d -r1.156 -r1.157
--- script_v6.cpp	7 Jun 2003 00:13:25 -0000	1.156
+++ script_v6.cpp	7 Jun 2003 00:49:36 -0000	1.157
@@ -2693,24 +2693,24 @@
 		 */
 
 
-		if((args[1] == 27) && (_lastKeyHit == 27)) {
+		if ((args[1] == 27) && (_lastKeyHit == 27)) {
 			push(1); // abort
 			return;
 		}
 
-		if( ((args[1] == 328) || (args[1] == 336) || (args[1] == 13)) &&
+		if ( ((args[1] == 328) || (args[1] == 336) || (args[1] == 13)) &&
 			((VAR(VAR_LEFTBTN_HOLD)) || (_lastKeyHit == 13) || (_lastKeyHit == 274) ||
 			(_lastKeyHit == 273)) ) {
 			push(1); // thrust
 			return;
 		}
 
-		if(((args[1] == 97) || (args[1] == 331)) && (_lastKeyHit == 276)) {
+		if (((args[1] == 97) || (args[1] == 331)) && (_lastKeyHit == 276)) {
 			push(1); // left
 			return;
 		}
 		
-		if(((args[1] == 115) || (args[1] == 333)) && (_lastKeyHit == 275)) {
+		if (((args[1] == 115) || (args[1] == 333)) && (_lastKeyHit == 275)) {
 			push(1); // right
 			return;
 		}
@@ -2845,7 +2845,7 @@
 	defineArray(0, 5, 0, _numLocalObjects + 1);
 	writeArray(0, 0, 0, _numLocalObjects);
 	
-	while(i < _numLocalObjects) {
+	while (i < _numLocalObjects) {
 		writeArray(0, 0, i, _objs[i].obj_nr);
 		i++;
 	}

Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.178
retrieving revision 2.179
diff -u -d -r2.178 -r2.179
--- script_v8.cpp	2 Jun 2003 23:54:51 -0000	2.178
+++ script_v8.cpp	7 Jun 2003 00:49:36 -0000	2.179
@@ -786,7 +786,7 @@
 
 	createBoxMatrix();
 
-	for(i = 1; i < _numActors; i++) {
+	for (i = 1; i < _numActors; i++) {
 		a = &_actors[i];
 		if (a && a->isInCurrentRoom())
 			a->adjustActorPos();

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.223
retrieving revision 2.224
diff -u -d -r2.223 -r2.224
--- scummvm.cpp	7 Jun 2003 00:13:25 -0000	2.223
+++ scummvm.cpp	7 Jun 2003 00:49:36 -0000	2.224
@@ -673,7 +673,7 @@
 
 	// Load CJK font
 	_CJKMode = false;
-	if((_gameId == GID_DIG || _gameId == GID_CMI) && (_language == KO_KOR || _language == JA_JPN || _language == ZH_TWN)) {
+	if ((_gameId == GID_DIG || _gameId == GID_CMI) && (_language == KO_KOR || _language == JA_JPN || _language == ZH_TWN)) {
 		File fp;
 		const char *fontFile = NULL;
 		switch(_language) {
@@ -686,13 +686,13 @@
 			fontFile = (_gameId == GID_DIG) ? "kanji16.fnt" : "japanese.fnt";
 			break;
 		case ZH_TWN:
-			if(_gameId == GID_CMI) {
+			if (_gameId == GID_CMI) {
 				_CJKMode = true;
 				fontFile = "chinese.fnt";
 			}
 			break;
 		}
-		if(_CJKMode && fp.open(fontFile, getGameDataPath(), 1)) {
+		if (_CJKMode && fp.open(fontFile, getGameDataPath(), 1)) {
 			debug(2, "Loading CJK Font");
 			fp.seek(2,SEEK_CUR);
 			_2byteWidth = fp.readByte(); //FIXME: is this correct?
@@ -1432,7 +1432,7 @@
 	//
 	if (_version == 1) {
 		_IM00_offs = 0;
-		for(i = 0; i < 4; i++){
+		for (i = 0; i < 4; i++){
 			gdi._C64Colors[i] = roomptr[6 + i];
 		}
 		gdi.decodeC64Gfx(roomptr + READ_LE_UINT16(roomptr + 10), gdi._C64CharMap, 2048);
@@ -1921,7 +1921,7 @@
 
 	_virtualMouse.x = _mouse.x + virtscr[0].xstart;
 
-	if(_features & GF_NEW_CAMERA)
+	if (_features & GF_NEW_CAMERA)
 		_virtualMouse.y = _mouse.y + camera._cur.y - (_screenHeight / 2);
 	else
 		_virtualMouse.y = _mouse.y;
@@ -2399,7 +2399,7 @@
 	int delta = 0;
 	int diff = _system->get_msecs();
 
-	for(;;) {
+	for (;;) {
 #ifdef __PALM_OS__
 	if (_quit)	// palmfixme : need to check for autosave on exit
 		return;

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -d -r1.132 -r1.133
--- sound.cpp	7 Jun 2003 00:13:25 -0000	1.132
+++ sound.cpp	7 Jun 2003 00:49:36 -0000	1.133
@@ -58,7 +58,7 @@
 		_scumm->ensureResourceLoaded(rtSound, sound);
 		addSoundToQueue2(sound);
 	} else {
-		// WARNING ! This may break something, maybe this sould be put inside if(_gameID == GID_FT) ? 
+		// WARNING ! This may break something, maybe this sould be put inside if (_gameID == GID_FT) ? 
 		// But why addSoundToQueue should not queue sound ?
 		_scumm->ensureResourceLoaded(rtSound, sound);
 		addSoundToQueue2(sound);
@@ -128,7 +128,7 @@
 	assert(code == ~version + 0x1234);
 	bool quit = 0;
 	byte *ret_sound = 0; size = 0, loops = 0;
-	while(!quit) {
+	while (!quit) {
 		int len = READ_LE_UINT32(ptr + offset);
 		offset += 4;
 		code = len & 0xFF;
@@ -141,8 +141,8 @@
 				len -= 2;
 				rate = 1000000L / (256L - time_constant);
 				debug(9, "VOC Data Bloc : %d, %d, %d", rate, packing, len);
-				if(packing == 0) {
-					if(size) {
+				if (packing == 0) {
+					if (size) {
 						ret_sound = (byte *)realloc(ret_sound, size + len);
 					} else {
 						ret_sound = (byte *)malloc(len);
@@ -964,7 +964,7 @@
 	byte *ptr = *dst = (byte *)malloc(s_size);
 
 	uint32 tmp;
-	while(loop_size--) {
+	while (loop_size--) {
 		byte v1 = *src++;
 		byte v2 = *src++;
 		byte v3 = *src++;
@@ -1098,7 +1098,7 @@
 			}
 
 			ptr += 12;
-			while(tag != MKID_BE('DATA')) {
+			while (tag != MKID_BE('DATA')) {
 				tag = READ_BE_UINT32(ptr);  ptr += 4;
 				switch(tag) {
 				case MKID_BE('FRMT'):
@@ -1227,7 +1227,7 @@
 	}
 
 	ptr += 12;
-	while(tag != MKID_BE('DATA')) {
+	while (tag != MKID_BE('DATA')) {
 		tag = READ_BE_UINT32(ptr); ptr += 4;
 		switch(tag) {
 			case MKID_BE('FRMT'):

Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -d -r1.133 -r1.134
--- string.cpp	7 Jun 2003 00:13:25 -0000	1.133
+++ string.cpp	7 Jun 2003 00:49:36 -0000	1.134
@@ -242,7 +242,7 @@
 		if (c != 0xFF) {
 			_charset->_left = _charset->_nextLeft;
 			_charset->_top = _charset->_nextTop;
-			if(c & 0x80 && _CJKMode)
+			if (c & 0x80 && _CJKMode)
 				c += *buffer++ * 256;
 			if (_version <= 3) {
 				_charset->printChar(c);
@@ -431,7 +431,7 @@
 				if (_string[a].no_talk_anim == 0)
 					_charset->_blitAlso = true;
 			}
-			if(c >= 0x80 && _CJKMode)
+			if (c >= 0x80 && _CJKMode)
 				c += buf[i++] * 256;
 			_charset->printChar(c);
 			_charset->_blitAlso = false;
@@ -735,7 +735,7 @@
 			if (c != 0 && c != 0xFF) {
 				_charset->_left = _charset->_nextLeft;
 				_charset->_top = _charset->_nextTop;
- 				if(c >= 0x80 && _CJKMode)
+ 				if (c >= 0x80 && _CJKMode)
  					c += *buf++ * 256;
 				_charset->printChar(c);
 				_charset->_nextLeft = _charset->_left;
@@ -775,7 +775,7 @@
 	} else {
 		return;
 	}
-	if(file.isOpen() == false) {
+	if (file.isOpen() == false) {
 		_existLanguageFile = false;
 		return;
 	}





More information about the Scummvm-git-logs mailing list