[Scummvm-cvs-logs] SF.net SVN: scummvm:[40760] scummvm/trunk/engines/kyra

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Thu May 21 15:13:09 CEST 2009


Revision: 40760
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40760&view=rev
Author:   lordhoto
Date:     2009-05-21 13:13:09 +0000 (Thu, 21 May 2009)

Log Message:
-----------
Remove trailing tabs/whitespaces.

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/gui_lol.cpp
    scummvm/trunk/engines/kyra/items_lol.cpp
    scummvm/trunk/engines/kyra/lol.cpp
    scummvm/trunk/engines/kyra/lol.h
    scummvm/trunk/engines/kyra/saveload_lol.cpp
    scummvm/trunk/engines/kyra/scene_lol.cpp
    scummvm/trunk/engines/kyra/screen.cpp
    scummvm/trunk/engines/kyra/screen_lol.cpp
    scummvm/trunk/engines/kyra/script_lol.cpp
    scummvm/trunk/engines/kyra/script_tim.cpp
    scummvm/trunk/engines/kyra/script_tim.h
    scummvm/trunk/engines/kyra/sequences_hof.cpp
    scummvm/trunk/engines/kyra/sequences_lol.cpp
    scummvm/trunk/engines/kyra/sound.cpp
    scummvm/trunk/engines/kyra/sound_towns.cpp
    scummvm/trunk/engines/kyra/sprites_lol.cpp
    scummvm/trunk/engines/kyra/text_lol.cpp
    scummvm/trunk/engines/kyra/text_lol.h
    scummvm/trunk/engines/kyra/timer.cpp
    scummvm/trunk/engines/kyra/wsamovie.cpp

Modified: scummvm/trunk/engines/kyra/gui_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/gui_lol.cpp	2009-05-21 13:02:56 UTC (rev 40759)
+++ scummvm/trunk/engines/kyra/gui_lol.cpp	2009-05-21 13:13:09 UTC (rev 40760)
@@ -1180,7 +1180,7 @@
 	if (flg & 1) {
 		if (!(_characters[c].flags & 8) || (flg & 0x20)) {
 			runItemScript(c, _itemInHand, 0x400, 0, 0);
-			runLevelScriptCustom(_currentBlock, 0x400, c, _itemInHand, 0, 0);			
+			runLevelScriptCustom(_currentBlock, 0x400, c, _itemInHand, 0, 0);
 		} else {
 			_txt->printMessage(2, getLangString(0x402c), _characters[c].name);
 		}
@@ -1466,7 +1466,7 @@
 int LoLEngine::clickedSpellTargetCharacter(Button *button) {
 	int t = button->arg;
 	_txt->printMessage(0, "%s.\r", _characters[t].name);
-	
+
 	if ((_spellProperties[_activeSpell.spell].flags & 0xff) == 1) {
 		_activeSpell.target = t;
 		castHealOnSingleCharacter(&_activeSpell);
@@ -1525,7 +1525,7 @@
 
 int LoLEngine::clickedRestParty(Button *button) {
 	gui_toggleButtonDisplayMode(77, 1);
-	
+
 	Button b;
 	memset(&b, 0, sizeof(Button));
 	b.data0Val2 = b.data1Val2 = b.data2Val2 = 0xfe;
@@ -1539,7 +1539,7 @@
 	int tHa = -1;
 	int needPoisoningFlags = 0;
 	int needHealingFlags = 0;
-	int needMagicGainFlags = 0;	
+	int needMagicGainFlags = 0;
 
 	for (int i = 0; i < 4; i++) {
 		LoLCharacter *c = &_characters[i];
@@ -1553,7 +1553,7 @@
 			tMp = c->magicPointsMax;
 
 		if (c->flags & 0x80) {
-			needPoisoningFlags |= (1 << i);			
+			needPoisoningFlags |= (1 << i);
 			if (c->hitPointsCur > tHa)
 				tHa = c->hitPointsCur;
 		} else {
@@ -1572,7 +1572,7 @@
 	if (needHealingFlags || needMagicGainFlags) {
 		_screen->fillRect(112, 0, 288, 120, 1);
 		gui_drawAllCharPortraitsWithStats();
-		
+
 		_txt->printMessage(0x8000, getLangString(0x4057));
 		gui_toggleButtonDisplayMode(77, 0);
 
@@ -1626,11 +1626,11 @@
 			} else if (f) {
 				gui_triggerEvent(f);
 				break;
-			}					
-						
-			if (!_partyAwake) {					
+			}
+
+			if (!_partyAwake) {
 				if (_system->getMillis() > delay3) {
-					for (int i = 0; i < 4; i++) {							
+					for (int i = 0; i < 4; i++) {
 						if (!(needPoisoningFlags & (1 << i)))
 							continue;
 						inflictDamage(i, 1, 0x8000, 1, 0x80);
@@ -1639,42 +1639,42 @@
 					}
 					delay3 = _system->getMillis() + a * _tickLength;
 				}
-					
+
 				if (_system->getMillis() > delay1) {
-					for (int i = 0; i < 4; i++) {							
+					for (int i = 0; i < 4; i++) {
 						if (!(needHealingFlags & (1 << i)))
 							continue;
 						increaseCharacterHitpoints(i, 1, false);
 						gui_drawCharPortraitWithStats(i);
 						if (_characters[i].hitPointsCur == _characters[i].hitPointsMax)
 							needHealingFlags &= ~(1 << i);
-					}						
+					}
 					delay1 = _system->getMillis() + h * _tickLength;
 				}
 
 				if (_system->getMillis() > delay2) {
-					for (int i = 0; i < 4; i++) {							
+					for (int i = 0; i < 4; i++) {
 						if (!(needMagicGainFlags & (1 << i)))
 							continue;
-						_characters[i].magicPointsCur++;														
+						_characters[i].magicPointsCur++;
 						gui_drawCharPortraitWithStats(i);
 						if (_characters[i].magicPointsCur == _characters[i].magicPointsMax)
 							needMagicGainFlags &= ~(1 << i);
-					}						
+					}
 					delay2 = _system->getMillis() + m * _tickLength;
 				}
 				_screen->updateScreen();
 			}
-		
+
 		} while (!_partyAwake && (needHealingFlags || needMagicGainFlags));
-		
+
 		for (int i = 0; i < 4; i++) {
 			int frm = 0;
 			int upd = 0;
 			bool setframe = true;
 
 			if (_characters[i].flags & 0x1000) {
-				_characters[i].flags &= 0xefff;				
+				_characters[i].flags &= 0xefff;
 
 				if (_partyAwake) {
 					if (_characters[i].damageSuffered) {

Modified: scummvm/trunk/engines/kyra/items_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/items_lol.cpp	2009-05-21 13:02:56 UTC (rev 40759)
+++ scummvm/trunk/engines/kyra/items_lol.cpp	2009-05-21 13:13:09 UTC (rev 40760)
@@ -324,10 +324,10 @@
 	else
 		_itemsInPlay[item].shpCurFrame_flg &= 0xbfff;
 
-	
+
 	assignItemToBlock(&_levelBlockProperties[block].assignedObjects, item);
 	reassignDrawObjects(_currentDirection, item, &_levelBlockProperties[block], false);
-	
+
 	if (b)
 		runLevelScriptCustom(block, 0x80, -1, item, 0, 0);
 
@@ -383,7 +383,7 @@
 	t->attackerId = attackerId;
 	t->flags = 7;
 	t->wallFlags = 2;
-	t->c = c;	
+	t->c = c;
 
 	if (attackerId != -1) {
 		if (attackerId & 0x8000) {
@@ -456,13 +456,13 @@
 	} else if (objectOnNextBlock == 2) {
 		if (_itemProperties[_itemsInPlay[t->item].itemPropertyIndex].flags & 0x4000) {
 			int o = _levelBlockProperties[_itemsInPlay[t->item].block].assignedObjects;
-			
+
 			while (o & 0x8000) {
 				ItemInPlay *i = findObject(o);
 				o = i->nextAssignedObject;
 				runItemScript(t->attackerId, t->item, 0x8000, o, 0);
 			}
-			
+
 			return;
 
 		} else {

Modified: scummvm/trunk/engines/kyra/lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/lol.cpp	2009-05-21 13:02:56 UTC (rev 40759)
+++ scummvm/trunk/engines/kyra/lol.cpp	2009-05-21 13:13:09 UTC (rev 40760)
@@ -642,7 +642,7 @@
 	if (!inputFlag) {
 		// This fixes a bug with some interactive sequences (like the inn where you mee Timothy).
 		// In the original code Mouse position variables are only updated when mouse button
-		// or keyboard events get triggered. 
+		// or keyboard events get triggered.
 
 		// TODO/FIXME: Check whether this is the correct way to do it in KYRA, too. In this case a
 		// fix could be added to KyraEngine_v1::checkInput() and the virtual stuff would not be
@@ -973,7 +973,7 @@
 				*dst++ = *src++;
 			}
 			cmd = *src++;
-			
+
 		} else {
 			s[0] = *src++;
 			Util::decodeString1(s, d);
@@ -1259,7 +1259,7 @@
 	} else {
 		c->hitPointsCur = newVal;
 		if (c->hitPointsCur < 1)
-			c->flags |= 8;		
+			c->flags |= 8;
 	}
 
 	if (_updateFlags & 2)
@@ -1268,7 +1268,7 @@
 	Screen::FontId cf = _screen->setFont(Screen::FID_6_FNT);
 	int cp = _screen->setCurPage(0);
 
-	int s = 8192 / pointsMax;	
+	int s = 8192 / pointsMax;
 	pointsMax = (s * pointsMax) >> 8;
 	pointsCur = (s * pointsCur) >> 8;
 	newVal = (s * newVal) >> 8;
@@ -1279,7 +1279,7 @@
 
 	if (newVal != pointsCur) {
 		step = (newVal >= pointsCur) ? 2 : -2;
-		
+
 		for (int i = pointsCur; i != newVal || newVal != newValScl;) {
 			if (ABS(i - newVal) < ABS(step))
 				step >>= 1;
@@ -1295,7 +1295,7 @@
 			if (i == newVal) {
 				newVal = newValScl;
 				step = -step;
-			}			
+			}
 
 			delayUntil(_smoothScrollTimer);
 		}
@@ -1559,7 +1559,7 @@
 void LoLEngine::transformRegion(int x1, int y1, int x2, int y2, int w, int h, int srcPage, int dstPage) {
 	uint16 *p1 = (uint16*) _tempBuffer5120;
 	uint16 *p2 = (uint16*) (_tempBuffer5120 + 640);
-	
+
 	for (int i = 0; i < w; i++)
 		p1[i] = i;
 
@@ -2126,7 +2126,7 @@
 		_txt->printMessage(2, getLangString(0x4257));
 		return 0;
 	}
-	
+
 	if (charNum < 0) {
 		_activeSpell.charNum = (charNum * -1) - 1;
 		if (_spellProcs[spellType]->isValid())
@@ -2145,7 +2145,7 @@
 		if (_spellProcs[spellType]->isValid())
 			(*_spellProcs[spellType])(&_activeSpell);
 	}
-	
+
 	return 1;
 }
 
@@ -2247,7 +2247,7 @@
 	uint16 wFrames[6];
 	const uint16 width = mov->width();
 	const uint16 height = mov->height();
-	
+
 	for (int i = 0; i < 6; i++) {
 		wX[i] = (_rnd.getRandomNumber(0x7fff) % 64) + ((176 - width) >> 1) + 80;
 		wY[i] = (_rnd.getRandomNumber(0x7fff) % 32) + ((120 - height) >> 1) - 16;
@@ -2261,7 +2261,7 @@
 		for (int ii = 0; ii <= spellLevel; ii++) {
 			if (wFrames[ii] >= i || wFrames[ii] + 13 <= i)
 				continue;
-			
+
 			if ((i - wFrames[ii]) == 1)
 				snd_playSoundEffect(162, -1);
 
@@ -2405,9 +2405,9 @@
 
 void LoLEngine::processMagicIce(int charNum, int spellLevel) {
 	int cp = _screen->setCurPage(2);
-	
+
 	disableSysTimer(2);
-	
+
 	gui_drawScene(0);
 	_screen->copyPage(0, 12);
 
@@ -2428,7 +2428,7 @@
 
 	////////// TODO
 	generateBrightnessPalette(_screen->_currentPalette, _screen->getPalette(1), _brightness, _lampEffect);
-	
+
 	////////// TODO
 
 	_screen->setCurPage(cp);
@@ -2456,7 +2456,7 @@
 		error("Fog: Unable to load fog.wsa");
 
 	snd_playSoundEffect(145, -1);
-	
+
 	for (int curFrame = 0; curFrame < numFrames; curFrame++) {
 		_smoothScrollTimer = _system->getMillis() + 3 * _tickLength;
 		_screen->copyPage(12, 2);
@@ -2465,7 +2465,7 @@
 		_screen->updateScreen();
 		delayUntil(_smoothScrollTimer);
 	}
-	
+
 	mov->close();
 	delete mov;
 
@@ -2486,7 +2486,7 @@
 	int cp = _screen->setCurPage(2);
 	_screen->copyPage(0, 12);
 	snd_playSoundEffect(74, -1);
-	
+
 	uint16 destIds[6];
 	uint8 destModes[6];
 	int8 destTicks[6];
@@ -2501,7 +2501,7 @@
 		o &= 0x7fff;
 		if (_monsters[o].mode != 13) {
 			destIds[t++] = o;
-			
+
 			if (!(_monsters[o].flags & 0x2000)) {
 				_envSfxUseQueue = true;
 				inflictMagicalDamage(o | 0x8000, charNum, damage, 0, 0);
@@ -2562,7 +2562,7 @@
 			assigned = true;
 			slot = i;
 		}
-		
+
 		if (_availableSpells[i] == spell) {
 			_txt->printMessage(2, getLangString(0x42d0));
 			return;
@@ -2617,7 +2617,7 @@
 	_screen->copyPage(0, 12);
 	int vX = _updateSpellBookCoords[slot << 1] + 32;
 	int vY = _updateSpellBookCoords[(slot << 1) + 1] + 5;
-	
+
 	char wsaFile[13];
 	snprintf(wsaFile, 13, "write%0d%c.wsa", spell, (_lang == 1) ? 'f' : (_lang == 0 ? 'e' : 'g'));
 	snd_playSoundEffect(_updateSpellBookAnimData[(spell << 2) + 3], -1);
@@ -2681,7 +2681,7 @@
 void LoLEngine::playSpellAnimation(WSAMovie_v2 *mov, int firstFrame, int lastFrame, int frameDelay, int x, int y, SpellProcCallback callback, uint8 *pal1, uint8 *pal2, int fadeDelay, bool restoreScreen) {
 	int w = 0;
 	int h = 0;
-	
+
 	if (mov) {
 		w = mov->width();
 		h = mov->height();
@@ -2720,7 +2720,7 @@
 
 		int del = _smoothScrollTimer - _system->getMillis();
 		do {
-			
+
 			int step = del > _tickLength ? _tickLength : del;
 
 			if (!pal1 || !pal2) {
@@ -2877,7 +2877,7 @@
 
 			snd_queueEnvironmentalSoundEffect(m->properties->sounds[2], m->block);
 			checkSceneUpdateNeed(m->block);
-			
+
 			if (m->hitPoints <= 0) {
 				m->hitPoints = 0;
 				if (!(attacker & 0x8000))
@@ -2985,7 +2985,7 @@
 		return 0;
 
 	if (!(attacker & 0x8000)) {
-		dmg = (dmg * _characters[attacker].totalMightModifier) >> 8;	
+		dmg = (dmg * _characters[attacker].totalMightModifier) >> 8;
 		if (!dmg)
 			return 0;
 	}
@@ -3134,7 +3134,7 @@
 
 	case 4:
 		if (!(deathFlag & 0x80))
-			return;			
+			return;
 		monster->hitPoints += damage;
 		if (monster->hitPoints > monster->properties->hitPoints)
 			monster->hitPoints = monster->properties->hitPoints;
@@ -3173,7 +3173,7 @@
 		return 0;
 
 	int r = 0;
-	
+
 	if (typeFlag == 0x40) {
 		_characters[charNum].flags |= 0x40;
 		setCharacterUpdateEvent(charNum, 3, 3600, 1);
@@ -3189,7 +3189,7 @@
 
 	} else if (typeFlag == 0x1000) {
 		_characters[charNum].flags |= 0x1000;
-		setCharacterUpdateEvent(charNum, 7, 120, 1);		
+		setCharacterUpdateEvent(charNum, 7, 120, 1);
 		r = 1;
 	}
 

Modified: scummvm/trunk/engines/kyra/lol.h
===================================================================
--- scummvm/trunk/engines/kyra/lol.h	2009-05-21 13:02:56 UTC (rev 40759)
+++ scummvm/trunk/engines/kyra/lol.h	2009-05-21 13:13:09 UTC (rev 40760)
@@ -339,7 +339,7 @@
 
 	int getCharSelection();
 	int selectionCharAccept();
-	
+
 	void showStarcraftLogo();
 
 	int _charSelection;
@@ -615,7 +615,7 @@
 	int olol_getGlobalVar(EMCState *script);
 	int olol_setGlobalVar(EMCState *script);
 	int olol_triggerDoorSwitch(EMCState *script);
-	int olol_checkEquippedItemScriptFlags(EMCState *script);	
+	int olol_checkEquippedItemScriptFlags(EMCState *script);
 	int olol_setDoorState(EMCState *script);
 	int olol_updateBlockAnimations(EMCState *script);
 	int olol_mapShapeToBlock(EMCState *script);
@@ -701,7 +701,7 @@
 	int olol_prepareSpecialScene(EMCState *script);
 	int olol_restoreAfterSpecialScene(EMCState *script);
 	int olol_assignCustomSfx(EMCState *script);
-	int olol_checkBlockForMonster(EMCState *script);	
+	int olol_checkBlockForMonster(EMCState *script);
 	int olol_transformRegion(EMCState *script);
 	int olol_calcCoordinatesAddDirectionOffset(EMCState *script);
 	int olol_resetPortraitsAndDisableSysTimer(EMCState *script);

Modified: scummvm/trunk/engines/kyra/saveload_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/saveload_lol.cpp	2009-05-21 13:02:56 UTC (rev 40759)
+++ scummvm/trunk/engines/kyra/saveload_lol.cpp	2009-05-21 13:13:09 UTC (rev 40760)
@@ -53,7 +53,7 @@
 	_screen->updateScreen();
 
 	Common::SeekableSubReadStreamEndian in(saveFile, saveFile->pos(), saveFile->size(), !header.originalSave, true);
-		
+
 	for (int i = 0; i < 4; i++) {
 		LoLCharacter *c = &_characters[i];
 		c->flags = in.readUint16BE();
@@ -148,7 +148,7 @@
 		t->destDirection = in.readByte();
 		t->hitOffsX = in.readSByte();
 		t->hitOffsY = in.readSByte();
-		t->currentSubFrame = in.readByte();	
+		t->currentSubFrame = in.readByte();
 	}
 
 	for (int i = 0; i < 1024; i++) {
@@ -228,7 +228,7 @@
 			m->flags = in.readByte();
 			m->wallFlags = in.readByte();
 		}
-		l->monsterDifficulty = in.readByte();	
+		l->monsterDifficulty = in.readByte();
 	}
 
 	calcCharPortraitXpos();
@@ -345,7 +345,7 @@
 		out->writeUint16BE(t->y);
 		out->writeSByte(t->level);
 		out->writeUint16BE(t->itemPropertyIndex);
-		out->writeUint16BE(t->shpCurFrame_flg);	
+		out->writeUint16BE(t->shpCurFrame_flg);
 		out->writeByte(t->destDirection);
 		out->writeSByte(t->hitOffsX);
 		out->writeSByte(t->hitOffsY);
@@ -363,7 +363,7 @@
 		out->write(l->flags, 1024);
 
 		for (int ii = 0; ii < 30; ii++) {
-			MonsterInPlay *m = &l->monsters[ii];			
+			MonsterInPlay *m = &l->monsters[ii];
 			out->writeUint16BE(m->nextAssignedObject);
 			out->writeUint16BE(m->nextDrawObject);
 			out->writeByte(m->flyingHeight);
@@ -372,7 +372,7 @@
 			out->writeUint16BE(m->y);
 			out->writeSByte(m->shiftStep);
 			out->writeUint16BE(m->destX);
-			out->writeUint16BE(m->destY);	
+			out->writeUint16BE(m->destY);
 			out->writeByte(m->destDirection);
 			out->writeSByte(m->hitOffsX);
 			out->writeSByte(m->hitOffsY);
@@ -403,13 +403,13 @@
 			out->writeUint16BE(m->x);
 			out->writeUint16BE(m->y);
 			out->writeByte(m->flyingHeight);
-			out->writeByte(m->direction);			
+			out->writeByte(m->direction);
 			out->writeByte(m->distance);
 			out->writeSByte(m->field_D);
 			out->writeByte(m->c);
 			out->writeByte(m->flags);
 			out->writeByte(m->wallFlags);
-		}			
+		}
 		out->writeByte(l->monsterDifficulty);
 	}
 

Modified: scummvm/trunk/engines/kyra/scene_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/scene_lol.cpp	2009-05-21 13:02:56 UTC (rev 40759)
+++ scummvm/trunk/engines/kyra/scene_lol.cpp	2009-05-21 13:13:09 UTC (rev 40760)
@@ -1243,7 +1243,7 @@
 		del = _tickLength -	(_system->getMillis() - ctime);
 		if (del > 0)
 			delay(del, false, true);
-	}	
+	}
 
 	_screen->copyRegionSpecial(2, 320, 200, 112, 0, 0, 320, 200, 112, 0, 176, 120, 0);
 	_screen->updateScreen();
@@ -1257,7 +1257,7 @@
 void LoLEngine::shakeScene(int duration, int width, int height, int restore) {
 	_screen->copyRegion(112, 0, 112, 0, 176, 120, 0, 6, Screen::CR_NO_P_CHECK);
 	uint32 endTime = _system->getMillis() + duration * _tickLength;
-	
+
 	while (endTime > _system->getMillis()) {
 		_smoothScrollTimer = _system->getMillis() + 2 * _tickLength;
 
@@ -1287,7 +1287,7 @@
 
 		_screen->copyRegion(x1, y1, x2, y2, w, h, 6, 0, Screen::CR_NO_P_CHECK);
 		_screen->updateScreen();
-		
+
 		delayUntil(_smoothScrollTimer);
 	}
 

Modified: scummvm/trunk/engines/kyra/screen.cpp
===================================================================
--- scummvm/trunk/engines/kyra/screen.cpp	2009-05-21 13:02:56 UTC (rev 40759)
+++ scummvm/trunk/engines/kyra/screen.cpp	2009-05-21 13:13:09 UTC (rev 40760)
@@ -73,7 +73,7 @@
 	_useOverlays = false;
 	_useSJIS = false;
 	_use16ColorMode = _vm->gameFlags().use16ColorMode;
-	
+
 	_sjisTempPage = _sjisFontData = 0;
 
 	if (_vm->gameFlags().useHiResOverlay) {
@@ -419,12 +419,12 @@
 
 int Screen::fadePalStep(const uint8 *palette, int diff) {
 	const int colors = (_vm->gameFlags().platform == Common::kPlatformAmiga ? 32 : (_use16ColorMode ? 16 : 256)) * 3;
-	
+
 	uint8 fadePal[768];
 	memcpy(fadePal, _screenPalette, colors);
 
 	bool needRefresh = false;
-	
+
 	for (int i = 0; i < colors; ++i) {
 		int c1 = palette[i];
 		int c2 = fadePal[i];
@@ -1227,7 +1227,7 @@
 		&Screen::drawShapePlotType37,		// used by LoL (monsters)
 		0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 		&Screen::drawShapePlotType48,		// used by LoL (slime spots on the floor)
-		0, 0, 0, 
+		0, 0, 0,
 		&Screen::drawShapePlotType52,		// used by LoL (projectiles)
 		0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 		0
@@ -1823,7 +1823,7 @@
 
 void Screen::drawShapePlotType37(uint8 *dst, uint8 cmd) {
 	cmd = _dsTable2[cmd];
-	
+
 	if (cmd == 255) {
 		cmd = _dsTable5[*dst];
 	} else {

Modified: scummvm/trunk/engines/kyra/screen_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/screen_lol.cpp	2009-05-21 13:02:56 UTC (rev 40759)
+++ scummvm/trunk/engines/kyra/screen_lol.cpp	2009-05-21 13:13:09 UTC (rev 40760)
@@ -41,7 +41,7 @@
 
 	for (int i = 0; i < 8; i++)
 		_levelOverlays[i] = new uint8[256];
-	
+
 	_fadeFlag = 2;
 	_curDimIndex = 0;
 
@@ -207,7 +207,7 @@
 				if (c <= m) {
 					m = c;
 					l = x;
-				}				
+				}
 			}
 			x++;
 		} while (--ii);
@@ -215,7 +215,7 @@
 		*d++ = l & 0xff;
 	}
 
-	return ovl;	
+	return ovl;
 }
 
 void Screen_LoL::drawGridBox(int x, int y, int w, int h, int col) {
@@ -227,7 +227,7 @@
 		if (x <= 0)
 			return;
 		w = x;
-		x = 0;		
+		x = 0;
 	}
 
 	int tmp = x + w;
@@ -242,7 +242,7 @@
 		if (y <= 0)
 			return;
 		h = y;
-		y = 0;		
+		y = 0;
 	}
 
 	tmp = y + h;
@@ -256,7 +256,7 @@
 
 	w >>= 1;
 	int w2 = w;
-	
+
 	while (h--) {
 		if (w) {
 			while (w--) {
@@ -281,7 +281,7 @@
 void Screen_LoL::fadeClearSceneWindow(int delay) {
 	if (_fadeFlag == 1)
 		return;
-	
+
 	uint8 *tpal = new uint8[768];
 
 	memcpy(tpal, _currentPalette, 768);
@@ -423,7 +423,7 @@
 
 		for (int i = 0; i < w; i++)
 			*s++ = *d++;
-		
+
 		s += pitchS;
 		d += pitchD;
 	}
@@ -527,7 +527,7 @@
 void Screen_LoL::copyRegionSpecial(int page1, int w1, int h1, int x1, int y1, int page2, int w2, int h2, int x2, int y2, int w3, int h3, int mode, ...) {
 	if (!w3 || !h3)
 		return;
-	
+
 	uint8 *table1 = 0;
 	uint8 *table2 = 0;
 
@@ -552,7 +552,7 @@
 	int ibh_1 = _internBlockHeight;
 	int dx_1 = _internDimDstX;
 	int dy_1 = _internDimDstY;
-	
+
 	_internDimX = _internDimY = 0;
 	_internDimW = w2;
 	_internDimH = h2;
@@ -560,7 +560,7 @@
 	calcBoundariesIntern(x2, y2, ibw_1, ibh_1);
 	if (_internBlockWidth == -1)
 		return;
-	
+
 	int iu5_2 = _internDimU5;
 	int iu6_2 = _internDimU6;
 	int ibw_2 = _internBlockWidth;
@@ -583,7 +583,7 @@
 				s++;
 				d++;
 			}
-			
+
 			for (int ii = (i & 1) ^ 1; ii < ibw_2; ii += 2 ) {
 				*d = *s;
 				d += 2;
@@ -598,7 +598,7 @@
 					cmd = table2[(offs << 8) | *d];
 				*d++ = cmd;
 			}
-			
+
 		} else if (mode == 3) {
 			s = s - iu5_2 + ibw_1;
 			s = s - iu5_2 - 1;
@@ -753,7 +753,7 @@
 }
 
 void Screen_LoL::loadSpecialColors(uint8 *destPalette) {
-	memcpy(destPalette + 0x240, _screenPalette + 0x240, 12);	
+	memcpy(destPalette + 0x240, _screenPalette + 0x240, 12);
 }
 
 void Screen_LoL::copyColor(int dstColorIndex, int srcColorIndex) {
@@ -817,7 +817,7 @@
 
 bool Screen_LoL::fadePalSpecial(uint8 *pal1, uint8 *pal2, uint32 elapsedTime, uint32 targetTime) {
 	uint8 tpal[768];
-	uint8 *p1 = _palettes[1];	
+	uint8 *p1 = _palettes[1];
 
 	bool res = false;
 	for (int i = 0; i < 768; i++) {

Modified: scummvm/trunk/engines/kyra/script_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_lol.cpp	2009-05-21 13:02:56 UTC (rev 40759)
+++ scummvm/trunk/engines/kyra/script_lol.cpp	2009-05-21 13:13:09 UTC (rev 40760)
@@ -136,12 +136,12 @@
 	int mode = stackPos(0);
 	if (mode > 5 && mode < 10)
 		mode = (mode - 6 - _currentDirection) & 3;
-	
+
 	Button b;
 	memset(&b, 0, sizeof(Button));
 	b.data0Val2 = b.data1Val2 = b.data2Val2 = 0xfe;
 	b.data0Val3 = b.data1Val3 = b.data2Val3 = 0x01;
-	
+
 	switch (mode) {
 	case 0:
 		clickedUpArrow(&b);
@@ -1058,7 +1058,7 @@
 
 int LoLEngine::olol_playAttackSound(EMCState *script) {
 	debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_playAttackSound(%p) (%d)", (const void *)script, stackPos(0));
-	
+
 	static const uint8 sounds[] = { 12, 62, 63 };
 	int d = stackPos(0);
 
@@ -1369,7 +1369,7 @@
 
 	for (int i = 0; i < 30; i++) {
 		if (_monsters[i].hitPoints > 0 && _monsters[i].mode != 13)
-			res++;		
+			res++;
 	}
 
 	return res;
@@ -1398,7 +1398,7 @@
 
 int LoLEngine::olol_getInflictedDamage(EMCState *script) {
 	debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_getInflictedDamage(%p) (%d)", (const void *)script, stackPos(0));
-	int mx = stackPos(0);	
+	int mx = stackPos(0);
 	return mx ? _rnd.getRandomNumberRng(2, mx) : 0;
 }
 
@@ -1439,13 +1439,13 @@
 
 int LoLEngine::olol_distanceAttack(EMCState *script) {
 	debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_distanceAttack(%p) (%d, %d, %d, %d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(6), stackPos(7), stackPos(8));
-	
+
 	uint16 fX = stackPos(3);
 	uint16 fY = stackPos(4);
 
 	if (!(stackPos(8) & 0x8000))
 		fX = fY = 0x80;
-		
+
 	uint16 x = 0;
 	uint16 y = 0;
 	calcCoordinates(x, y, stackPos(2), fX, fY);
@@ -1580,7 +1580,7 @@
 	removeInputTop();
 	if (f == 0 || (f & 0x800))
 		return 0;
-	
+
 	int evt = stackPos(0);
 	if (evt) {
 		gui_triggerEvent(evt);
@@ -1588,7 +1588,7 @@
 	} else {
 		removeInputTop();
 	}
-	
+
 	return 1;
 }
 
@@ -1616,7 +1616,7 @@
 
 	for (int i = 0; i < 30; i++) {
 		if (((1 << _monsters[i].type) & types) && _monsters[i].mode < 14)
-			res++;		
+			res++;
 	}
 
 	return res;
@@ -1704,7 +1704,7 @@
 
 		return _emcLastItem;
 	}
-	
+
 	return 0;
 }
 
@@ -1786,7 +1786,7 @@
 	uint16 o = _levelBlockProperties[block].assignedObjects;
 	while (o & 0x8000) {
 		if (id == 0xffff || id == o)
-			return o & 0x7fff;		
+			return o & 0x7fff;
 		o = findObject(o)->nextAssignedObject;
 	}
 	return -1;
@@ -1830,7 +1830,7 @@
 		_scriptCharacterCycle = 0;
 	else
 		_scriptCharacterCycle++;
-	
+
 	while (_scriptCharacterCycle < 4) {
 		if (_characters[_scriptCharacterCycle].flags & 1)
 			return _scriptCharacterCycle;
@@ -1850,7 +1850,7 @@
 	if (charNum == -1)
 		gui_drawAllCharPortraitsWithStats();
 	else
-		gui_drawCharPortraitWithStats(charNum);	
+		gui_drawCharPortraitWithStats(charNum);
 	return 1;
 }
 

Modified: scummvm/trunk/engines/kyra/script_tim.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_tim.cpp	2009-05-21 13:02:56 UTC (rev 40759)
+++ scummvm/trunk/engines/kyra/script_tim.cpp	2009-05-21 13:13:09 UTC (rev 40760)
@@ -83,7 +83,7 @@
 		COMMAND(cmd_return(1)),
 		COMMAND(cmd_return(1)),
 		COMMAND(cmd_return(n1))
-	};	
+	};
 #undef cmd_return
 #undef COMMAND_UNIMPL
 #undef COMMAND
@@ -113,7 +113,7 @@
 		delete[] _animations[i].parts;
 	}
 
-	delete[] _animations;	
+	delete[] _animations;
 }
 
 TIM *TIMInterpreter::load(const char *filename, const Common::Array<const TIMOpcode *> *opcodes) {
@@ -126,7 +126,7 @@
 
 	IFFParser iff(*stream);
 	Common::IFFChunk *chunk = 0;
-	
+
 	TIM *tim = new TIM;
 	assert(tim);
 	memset(tim, 0, sizeof(TIM));
@@ -217,7 +217,7 @@
 			update();
 			checkSpeechProgress();
 
-			bool running = true;			
+			bool running = true;
 			int cnt = 0;
 			while (cur.ip && cur.nextTime <= _system->getMillis() && running) {
 				if (cnt++ > 0) {
@@ -460,7 +460,7 @@
 				screen()->checkedPageUpdate(8, 4);
 			screen()->updateScreen();
 		}
-		
+
 		if (wsaFlags & 4) {
 			snprintf(file, 32, "%s.CPS", filename);
 
@@ -840,7 +840,7 @@
 		_animations[i].parts = new AnimPart[TIM::kAnimParts];
 		memset(_animations[i].parts, 0, TIM::kAnimParts * sizeof(AnimPart));
 	}
-	
+
 	_drawPage2 = 0;
 
 	memset(_dialogueButtonString, 0, 3 * sizeof(const char*));
@@ -948,8 +948,8 @@
 
 		if (numStr == 1) {
 			_dialogueButtonXoffs = 0;
-			_dialogueButtonPosX = d->sx + d->w - 77;			
-		} else {			
+			_dialogueButtonPosX = d->sx + d->w - 77;
+		} else {
 			_dialogueButtonXoffs = d->w / numStr;
 			_dialogueButtonPosX = d->sx + (_dialogueButtonXoffs >> 1) - 37;
 		}
@@ -1049,7 +1049,7 @@
 
 void TIMInterpreter_LoL::playAnimationPart(int animIndex, int firstFrame, int lastFrame, int delay) {
 	Animation *anim = &_animations[animIndex];
-	
+
 	int step = (lastFrame >= firstFrame) ? 1 : -1;
 	for (int i = firstFrame; i != (lastFrame + step) ; i += step) {
 		uint32 next = _system->getMillis() + delay * _vm->_tickLength;
@@ -1098,10 +1098,10 @@
 	if (_dialogueNumButtons == 0) {
 		int e = _vm->checkInput(0, false) & 0xFF;
 		_vm->removeInputTop();
-		
+
 		if (e) {
 			_vm->gui_notifyButtonListChanged();
-		
+
 			if (e == 43 || e == 61) {
 				_vm->snd_stopSpeech(true);
 				//_dlgTimer = 0;
@@ -1146,7 +1146,7 @@
 			case 200:
 			case 202:
 				x = _dialogueButtonPosX;
-				
+
 				for (int i = 0; i < _dialogueNumButtons; i++) {
 					if (_vm->posWithinRect(_vm->_mouseX, _vm->_mouseY, x, _dialogueButtonPosY, x + 74, _dialogueButtonPosY + 9)) {
 						_dialogueHighlightedButton = i;
@@ -1165,7 +1165,7 @@
 
 	if (df != _dialogueHighlightedButton)
 		drawDialogueButtons();
-	
+
 	if (res == 0)
 		return 0;
 
@@ -1213,7 +1213,7 @@
 		}
 	}
 }
-	
+
 char *TIMInterpreter_LoL::getTableString(int id) {
 	return _vm->getLangString(id);
 }
@@ -1283,7 +1283,7 @@
 	_animations[5].wsa = 0;
 
 	if (_currentTim->procParam)
-		advanceToOpcode(21);	
+		advanceToOpcode(21);
 
 	return res;
 }

Modified: scummvm/trunk/engines/kyra/script_tim.h
===================================================================
--- scummvm/trunk/engines/kyra/script_tim.h	2009-05-21 13:02:56 UTC (rev 40759)
+++ scummvm/trunk/engines/kyra/script_tim.h	2009-05-21 13:13:09 UTC (rev 40760)
@@ -140,7 +140,7 @@
 	virtual uint16 processDialogue() { return 1; }
 
 	virtual void setupBackgroundAnimationPart(int animIndex, int part, int firstFrame, int lastFrame, int cycles, int nextPart, int partDelay, int f, int sfxIndex, int sfxFrame) {}
-	virtual void startBackgroundAnimation(int animIndex, int part) {}	
+	virtual void startBackgroundAnimation(int animIndex, int part) {}
 	virtual void stopBackgroundAnimation(int animIndex) {}
 	virtual void updateBackgroundAnimation(int animIndex) {}
 	virtual void playAnimationPart(int animIndex, int firstFrame, int lastFrame, int delay) {}
@@ -155,7 +155,7 @@
 protected:
 	virtual KyraEngine_v1 *vm();
 	virtual Screen_v2 *screen();
-	
+
 	KyraEngine_v1 *_vm;
 	Screen_v2 *_screen;
 	OSystem *_system;
@@ -228,7 +228,7 @@
 
 	Animation *initAnimStruct(int index, const char *filename, int x, int y, int frameDelay, int, uint16 wsaCopyParams);
 	int freeAnimStruct(int index);
-	
+
 	void drawDialogueBox(int numStr, const char *s1, const char *s2, const char *s3);
 	uint16 processDialogue();
 	void resetDialogueState(TIM *tim);
@@ -237,15 +237,15 @@
 	void startBackgroundAnimation(int animIndex, int part);
 	void stopBackgroundAnimation(int animIndex);
 	void updateBackgroundAnimation(int animIndex);
-	void playAnimationPart(int animIndex, int firstFrame, int lastFrame, int delay);	
-		
+	void playAnimationPart(int animIndex, int firstFrame, int lastFrame, int delay);
+
 private:
 	KyraEngine_v1 *vm();
 	Screen_v2 *screen();
 
 	void update();
 	void checkSpeechProgress();
-		
+
 	char *getTableString(int id);
 	void advanceToOpcode(int opcode);
 

Modified: scummvm/trunk/engines/kyra/sequences_hof.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sequences_hof.cpp	2009-05-21 13:02:56 UTC (rev 40759)
+++ scummvm/trunk/engines/kyra/sequences_hof.cpp	2009-05-21 13:13:09 UTC (rev 40760)
@@ -2478,7 +2478,7 @@
 			curframe = firstframe;
 
 		_seqWsaChatFrameTimeout = _seqEndTime = _system->getMillis() + _seqFrameDelay * _tickLength;
-		if (wsa)			
+		if (wsa)
 			wsa->displayFrame(curframe % wsa->frames(), 2, wsaXpos, wsaYpos, 0);
 
 		_screen->copyPage(2, 12);

Modified: scummvm/trunk/engines/kyra/sequences_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sequences_lol.cpp	2009-05-21 13:02:56 UTC (rev 40759)
+++ scummvm/trunk/engines/kyra/sequences_lol.cpp	2009-05-21 13:13:09 UTC (rev 40760)
@@ -170,7 +170,7 @@
 		memset(_screen->getPalette(1), 0, 768);
 
 		_sound->setSoundList(&_soundData[kMusicIntro]);
-	
+
 		// We have three sound.dat files, one for the intro, one for the
 		// end sequence and one for ingame, each contained in a different
 		// PAK file. Therefore a new call to loadSoundFile() is required
@@ -182,7 +182,7 @@
 			_sound->loadSoundFile("LOREINTR");
 	} else {
 		delete _chargenWSA; _chargenWSA = 0;
-		
+
 		uint8 *pal = _screen->getPalette(0);
 		memset(pal, 0, 768);
 		_screen->setScreenPalette(pal);
@@ -667,7 +667,7 @@
 		_sound->voicePlay("star2");
 		while(_sound->voiceIsPlaying("star2") && !(shouldQuit() || inputFlag)) {
 			inputFlag = checkInput(0) & 0xff;
-			delay(_tickLength);			
+			delay(_tickLength);
 		}
 	}
 

Modified: scummvm/trunk/engines/kyra/sound.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound.cpp	2009-05-21 13:02:56 UTC (rev 40759)
+++ scummvm/trunk/engines/kyra/sound.cpp	2009-05-21 13:13:09 UTC (rev 40760)
@@ -149,10 +149,10 @@
 		out->queueBuffer(vocBuffer, size);
 		totalPlayTime += size;
 	}
-	
+
 	totalPlayTime = (totalPlayTime * 1000) / 22050;
 	out->finish();
-	
+
 	_soundChannels[h].file = *fileList.begin();
 	_mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_soundChannels[h].channelHandle, out);
 	return totalPlayTime;

Modified: scummvm/trunk/engines/kyra/sound_towns.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_towns.cpp	2009-05-21 13:02:56 UTC (rev 40759)
+++ scummvm/trunk/engines/kyra/sound_towns.cpp	2009-05-21 13:13:09 UTC (rev 40760)
@@ -2720,7 +2720,7 @@
 				finOut += _tlTable[_channels[ii].out ? (_channels[ii].vol & 0x0f) : 0];
 		}
 
-		finOut /= 3;		
+		finOut /= 3;
 		buffer[i << 1] += finOut;
 		buffer[(i << 1) + 1] += finOut;
 	}
@@ -4140,7 +4140,7 @@
 bool SoundTownsPC98_v2::init() {
 	_driver = new TownsPC98_OpnDriver(_mixer, _vm->gameFlags().platform == Common::kPlatformPC98 ?
 		TownsPC98_OpnDriver::OD_TYPE86 : TownsPC98_OpnDriver::OD_TOWNS);
-	
+
 	if (_vm->gameFlags().platform == Common::kPlatformFMTowns) {
 		_vm->checkCD();
 		// FIXME: While checking for 'track1.XXX(X)' looks like

Modified: scummvm/trunk/engines/kyra/sprites_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sprites_lol.cpp	2009-05-21 13:02:56 UTC (rev 40759)
+++ scummvm/trunk/engines/kyra/sprites_lol.cpp	2009-05-21 13:13:09 UTC (rev 40760)
@@ -80,7 +80,7 @@
 	uint8 *tmpPal2 = new uint8[256];
 	uint16 *tmpPal3 = new uint16[256];
 	memset (tmpPal1, 0, 64);
-	memset (tmpPal2, 0, 256);	
+	memset (tmpPal2, 0, 256);
 
 	for (int i = 0; i < 64; i++) {
 		tmpPal1[i] = *p;
@@ -342,7 +342,7 @@
 			i->nextAssignedObject = 0;
 			return;
 		}
-		
+
 		i = findObject(*blockItemIndex);
 		blockItemIndex = &i->nextAssignedObject;
 	}
@@ -356,7 +356,7 @@
 		if (*blockItemIndex == id) {
 			i = findObject(id);
 			*blockItemIndex = i->nextDrawObject;
-			i->nextDrawObject = 0;			
+			i->nextDrawObject = 0;
 			return;
 		}
 
@@ -605,10 +605,10 @@
 				}
 
 				if (shp)
-					fy += (shp[2] >> 2);			
+					fy += (shp[2] >> 2);
 
 			} else {
-				shp = (_itemProperties[i->itemPropertyIndex].flags & 0x40) ? _gameShapes[_itemProperties[i->itemPropertyIndex].shpIndex] : 
+				shp = (_itemProperties[i->itemPropertyIndex].flags & 0x40) ? _gameShapes[_itemProperties[i->itemPropertyIndex].shpIndex] :
 					_itemShapes[_gameShapeMap[_itemProperties[i->itemPropertyIndex].shpIndex << 1]];
 			}
 
@@ -625,7 +625,7 @@
 	int curFrm = getMonsterCurFrame(m, flg & 0xffef);
 	uint8 *shp = 0;
 
-	if (curFrm == -1) {		
+	if (curFrm == -1) {
 		shp = _monsterShapes[m->properties->shapeIndex << 4];
 		calcDrawingLayerParameters(m->x + _monsterShiftOffs[m->shiftStep << 1], m->y + _monsterShiftOffs[(m->shiftStep << 1) + 1], _shpDmX, _shpDmY, _dmScaleW, _dmScaleH, shp, 0);
 	} else {
@@ -741,7 +741,7 @@
 		default:
 			return tmp;
 		}
-			
+
 		break;
 	case 2:
 		///////
@@ -801,7 +801,7 @@
 		setLevelShapesDim(tile, x1, x2, 13);
 		uint16 s = _visibleBlocks[tile]->drawObjects;
 
-		int t = (i << 7) + 1;		
+		int t = (i << 7) + 1;
 		while (s) {
 			if (s & 0x8000) {
 				s = _monsters[s & 0x7fff].nextDrawObject;
@@ -815,7 +815,7 @@
 						if (item->flyingHeight > 1)
 							fy -= ((item->flyingHeight - 1) * 6);
 
-						uint8 *shp = (_itemProperties[item->itemPropertyIndex].flags & 0x40) ? _gameShapes[_itemProperties[item->itemPropertyIndex].shpIndex] : 
+						uint8 *shp = (_itemProperties[item->itemPropertyIndex].flags & 0x40) ? _gameShapes[_itemProperties[item->itemPropertyIndex].shpIndex] :
 							_itemShapes[_gameShapeMap[_itemProperties[item->itemPropertyIndex].shpIndex << 1]];
 
 						drawItemOrMonster(shp, 0, item->x, item->y, fx, fy, 0, t, 0);
@@ -1052,7 +1052,7 @@
 			f &= 6;
 		}
 	}
-	
+
 	if ((f & 1) && (monster->flags & 0x10))
 		setMonsterMode(monster, 7);
 
@@ -1081,7 +1081,7 @@
 		moveMonster(monster);
 		break;
 
-	case 3:			
+	case 3:
 		if (updateMonsterAdjustBlocks(monster))
 			setMonsterMode(monster, 7);
 		for (int i = 0; i < 4; i++) {
@@ -1233,7 +1233,7 @@
 	} else {
 		s = monster->curDistWeapon++;
 		if (monster->curDistWeapon == monster->properties->numDistWeapons)
-			monster->curDistWeapon = 0;	
+			monster->curDistWeapon = 0;
 	}
 
 	int flyingObject = monster->properties->distWeapons[s];
@@ -1273,7 +1273,7 @@
 				if (getMonsterDistance(monster->block, _monsters[i].block) < 7)
 					setMonsterMode(monster, 7);
 			}
-			_txt->printMessage(2, getLangString(0x401a));			
+			_txt->printMessage(2, getLangString(0x401a));
 
 		} else if (flyingObject == 4) {
 			launchMagicViper();
@@ -1296,7 +1296,7 @@
 		int dir = calcMonsterDirection(monster->x & 0xff00, monster->y & 0xff00, _partyPosX & 0xff00, _partyPosY & 0xff00);
 		int x1 = _partyPosX;
 		int y1 = _partyPosY;
-		
+
 		calcSpriteRelPosition(monster->x, monster->y, x1, y1, dir >> 1);
 
 		int t = (x1 < 0) ? -x1 : x1;
@@ -1313,7 +1313,7 @@
 					inflictDamage(dst, dmg, m, 0, 0);
 					applyMonsterAttackSkill(monster, dst, dmg);
 				}
-					
+
 				setMonsterMode(monster, 8);
 				checkSceneUpdateNeed(monster->block);
 
@@ -1321,7 +1321,7 @@
 				setMonsterDirection(monster, dir);
 				checkSceneUpdateNeed(monster->block);
 			}
-			return;			
+			return;
 		}
 	}
 
@@ -1460,12 +1460,12 @@
 	uint16 my = monster->y;
 	uint16 *c = (t & 1) ? &my : &mx;
 	bool centered = (*c & 0x7f) ? false : true;
-				
+
 	bool posFlag = true;
 	if (monster->properties->maxWidth <= 63) {
 		if (centered) {
 			bool r = false;
-			
+
 			if (monster->nextAssignedObject & 0x8000) {
 				r = true;
 			} else {
@@ -1474,7 +1474,7 @@
 
 				if (id != monster->id) {
 					r = true;
-				} else {					
+				} else {
 					for (int i = 0; i < 3; i++) {
 						t = (t + 1) & 3;
 						id = _levelBlockProperties[calcNewBlockPosition(monster->block, t)].assignedObjects;
@@ -1494,7 +1494,7 @@
 
 	if (centered && posFlag)
 		return;
-	
+
 	if (posFlag) {
 		if (*c & 0x80)
 			*c -= 32;
@@ -1506,10 +1506,10 @@
 		else
 			*c -= 32;
 	}
-	
+
 	if (walkMonsterCheckDest(mx, my, monster, 4))
 		return;
-		
+
 	int fx = _partyPosX;
 	int fy = _partyPosY;
 	calcSpriteRelPosition(mx, my, fx, fy, monster->direction >> 1);
@@ -1524,11 +1524,11 @@
 void LoLEngine::moveStrayingMonster(MonsterInPlay *monster) {
 	int x = 0;
 	int y = 0;
-	
+
 	if (monster->fightCurTick) {
 		uint8 d = (monster->direction - monster->fightCurTick) & 6;
 		uint8 id = monster->id;
-	
+
 		for (int i = 0; i < 7; i++) {
 			getNextStepCoords(monster->x, monster->y, x, y, d);
 

Modified: scummvm/trunk/engines/kyra/text_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/text_lol.cpp	2009-05-21 13:02:56 UTC (rev 40759)
+++ scummvm/trunk/engines/kyra/text_lol.cpp	2009-05-21 13:13:09 UTC (rev 40760)
@@ -35,7 +35,7 @@
 TextDisplayer_LoL::TextDisplayer_LoL(LoLEngine *vm, Screen_LoL *screen) : _vm(vm), _screen(screen),
 	_scriptParameter(0), _animWidth(0), _animColor1(0), _animColor2(0), _animFlag(true), _lineCount(0),
 	_printFlag(false), _lineWidth(0), _numCharsTotal(0), _numCharsLeft(0), _numCharsPrinted(0) {
-	
+
 	memset(_stringParameters, 0, 15 * sizeof(char*));
 	_buffer = new char[600];
 	memset(_buffer, 0, 600);
@@ -160,8 +160,8 @@
 	int oldDim = 0;
 
 	if (dim == 3) {
-		if (_vm->_updateFlags & 2) {			
-			oldDim = clearDim(4);			
+		if (_vm->_updateFlags & 2) {
+			oldDim = clearDim(4);
 			_textDimData[4].color1 = 254;
 			_textDimData[4].color2 = _screen->_curDim->unkA;
 		} else {
@@ -175,7 +175,7 @@
 		}
 	} else {
 		oldDim = _screen->curDimIndex();
-		_screen->setScreenDim(dim);		
+		_screen->setScreenDim(dim);
 		_textDimData[dim].color1 = 254;
 		_textDimData[dim].color2 = _screen->_curDim->unkA;
 	}
@@ -222,7 +222,7 @@
 	vsnprintf((char*) _buffer, 240, str, args);
 
 	va_end(args);
-	
+
 	displayText(_buffer);
 
 	_screen->setScreenDim(od);
@@ -311,7 +311,7 @@
 
 		case 'n':
 			strcpy(dst, _vm->_characters[script ? script->stack[script->sp + paramIndex] : paramList[paramIndex]].name);
-			dst += strlen(dst);	
+			dst += strlen(dst);
 			break;
 
 		case 's':
@@ -328,7 +328,7 @@
 			break;
 
 		case '\0':
-		default:				
+		default:
 			continue;
 		}
 	}
@@ -337,20 +337,20 @@
 
 void TextDisplayer_LoL::displayText(char *str, ...) {
 	_printFlag = false;
-	
+
 	_lineWidth = 0;
 	_numCharsLeft = 0;
 	_numCharsPrinted = 0;
 
 	_tempString1 = str;
 	_tempString2 = 0;
-	
+
 	_currentLine[0] = 0;
 
 	memset(_ctrl, 0, 3);
 
 	char c = parseCommand();
-	
+
 	va_list args;
 	va_start(args, str);
 
@@ -369,7 +369,7 @@
 			} else {
 				break;
 			}
-			
+
 			_ctrl[0] = _ctrl[2];
 			_ctrl[2] = _ctrl[1] = 0;
 			c = parseCommand();
@@ -434,9 +434,9 @@
 
 			if ((_textDimData[sdx].column + _lineWidth) > (sd->w << 3))
 				printLine(_currentLine);
-			
+
 			break;
-		}		
+		}
 
 		c = parseCommand();
 	}
@@ -490,21 +490,21 @@
 
 	int fh = (_screen->getFontHeight() + _screen->_charOffset);
 	int lines = (sd->h - _screen->_charOffset) / fh;
-	
+
 	while (_textDimData[sdx].line >= lines) {
 		if (lines <= _lineCount && _animFlag) {
 			_lineCount = 0;
 			textPageBreak();
 			_numCharsPrinted = 0;
 		}
-		
+
 		int h1 = ((sd->h / fh) - 1) * fh;
 		int h2 = sd->h - fh;
 
 		if (h2)
 			_screen->copyRegion(sd->sx << 3, sd->sy + fh, sd->sx << 3, sd->sy, sd->w << 3, h2, _screen->_curPage, _screen->_curPage, Screen::CR_NO_P_CHECK);
 
-		_screen->fillRect(sd->sx << 3, sd->sy + h1, (sd->sx + sd->w - 1) << 3, sd->sy + sd->h - 1, _textDimData[sdx].color2);	
+		_screen->fillRect(sd->sx << 3, sd->sy + h1, (sd->sx + sd->w - 1) << 3, sd->sy + sd->h - 1, _textDimData[sdx].color2);
 		if (_textDimData[sdx].line)
 			_textDimData[sdx].line--;
 	}
@@ -529,10 +529,10 @@
 			//cut off line after last space
 			c = str[n1];
 			lw -= _screen->getCharWidth(c);
-			
+
 			if (!n2 && lw <= w)
 				n2 = n1;
-			
+
 			if (n2 && c == ' ') {
 				s = n1;
 				_printFlag = false;
@@ -554,11 +554,11 @@
 
 	c = str[s];
 	str[s] = 0;
-	
+
 	_screen->printText(str, x1, y, _textDimData[sdx].color1, _textDimData[sdx].color2);
 	_textDimData[sdx].column += lw;
 	_numCharsPrinted += strlen(str);
-	
+
 	str[s] = c;
 
 	if (c == ' ')
@@ -618,7 +618,7 @@
 		} else {
 			x += 6;
 			y = dim->sy + dim->h - 2;
-		}		
+		}
 	} else {
 		y = dim->sy + dim->h - 10;
 	}
@@ -638,7 +638,7 @@
 
 		while (!inputFlag) {
 			_vm->update();
-		
+
 			if (_vm->_speechFlag) {
 				if (((_vm->_system->getMillis() > speechPartTime) || (_vm->snd_characterSpeaking() != 2)) && speechPartTime) {
 					loop = false;

Modified: scummvm/trunk/engines/kyra/text_lol.h
===================================================================
--- scummvm/trunk/engines/kyra/text_lol.h	2009-05-21 13:02:56 UTC (rev 40759)
+++ scummvm/trunk/engines/kyra/text_lol.h	2009-05-21 13:13:09 UTC (rev 40760)
@@ -42,7 +42,7 @@
 
 	void setAnimParameters(const char *str, int x, uint8 col1, uint8 col2);
 	void setAnimFlag(bool flag) { _animFlag = flag; }
-	
+
 	void setupField(bool mode);
 	void expandField();
 
@@ -51,7 +51,7 @@
 
 	void printDialogueText(int dim, char *str, EMCState *script, const uint16 *paramList, int16 paramIndex);
 	void printMessage(uint16 type, const char *str, ...);
-	
+
 	int16 _scriptParameter;
 
 private:
@@ -60,7 +60,7 @@
 	void readNextPara();
 	void printLine(char *str);
 	void preprocessString(char *str, EMCState *script, const uint16 *paramList, int16 paramIndex);
-	void textPageBreak();	
+	void textPageBreak();
 
 	void clearCurDim();
 
@@ -79,7 +79,7 @@
 	uint32 _numCharsTotal;
 	uint32 _numCharsLeft;
 	uint32 _numCharsPrinted;
-	
+
 	const char *_animString;
 	int16 _animWidth;
 	uint8 _animColor1;

Modified: scummvm/trunk/engines/kyra/timer.cpp
===================================================================
--- scummvm/trunk/engines/kyra/timer.cpp	2009-05-21 13:02:56 UTC (rev 40759)
+++ scummvm/trunk/engines/kyra/timer.cpp	2009-05-21 13:13:09 UTC (rev 40760)
@@ -200,12 +200,12 @@
 
 void TimerManager::pauseSingleTimer(uint8 id, bool p) {
 	Iterator timer = Common::find_if(_timers.begin(), _timers.end(), TimerEqual(id));
-	
+
 	if (timer == _timers.end()) {
 		warning("TimerManager::pauseSingleTimer: No timer %d", id);
 		return;
 	}
-	
+
 	if (p) {
 		timer->pauseStartTime = _system->getMillis();
 		timer->enabled |= 2;
@@ -216,7 +216,7 @@
 		timer->nextRun += elapsedTime;
 		resetNextRun();
 		timer->pauseStartTime = 0;
-	}	
+	}
 }
 
 bool TimerManager::isEnabled(uint8 id) const {

Modified: scummvm/trunk/engines/kyra/wsamovie.cpp
===================================================================
--- scummvm/trunk/engines/kyra/wsamovie.cpp	2009-05-21 13:02:56 UTC (rev 40759)
+++ scummvm/trunk/engines/kyra/wsamovie.cpp	2009-05-21 13:13:09 UTC (rev 40760)
@@ -381,7 +381,7 @@
 			if (palBuf)
 				_vm->screen()->loadPalette(wsaData + 8 + ((_numFrames << 2) & 0xFFFF), palBuf, 0x30);
 		}
-	
+
 		_flags |= WF_XOR;
 	}
 


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