[Scummvm-cvs-logs] CVS: scummvm/saga actor.cpp,1.160,1.161 animation.cpp,1.51,1.52 events.cpp,1.61,1.62 font.cpp,1.32,1.33 game.cpp,1.83,1.84 gfx.cpp,1.55,1.56 image.cpp,1.24,1.25 interface.cpp,1.123,1.124 isomap.cpp,1.57,1.58 ite_introproc.cpp,1.60,1.61 itedata.cpp,1.3,1.4 music.cpp,1.61,1.62 objectmap.cpp,1.43,1.44 puzzle.cpp,1.12,1.13 render.cpp,1.69,1.70 rscfile.cpp,1.27,1.28 saga.cpp,1.121,1.122 saveload.cpp,1.20,1.21 scene.cpp,1.129,1.130 script.cpp,1.71,1.72 sfuncs.cpp,1.145,1.146 sndres.cpp,1.47,1.48 sound.cpp,1.31,1.32 sprite.cpp,1.60,1.61 sthread.cpp,1.90,1.91

Eugene Sandulenko sev at users.sourceforge.net
Fri Jul 29 10:59:14 CEST 2005


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

Modified Files:
	actor.cpp animation.cpp events.cpp font.cpp game.cpp gfx.cpp 
	image.cpp interface.cpp isomap.cpp ite_introproc.cpp 
	itedata.cpp music.cpp objectmap.cpp puzzle.cpp render.cpp 
	rscfile.cpp saga.cpp saveload.cpp scene.cpp script.cpp 
	sfuncs.cpp sndres.cpp sound.cpp sprite.cpp sthread.cpp 
Log Message:
Whitespaces


Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/actor.cpp,v
retrieving revision 1.160
retrieving revision 1.161
diff -u -d -r1.160 -r1.161
--- actor.cpp	29 Jul 2005 17:42:33 -0000	1.160
+++ actor.cpp	29 Jul 2005 17:57:40 -0000	1.161
@@ -191,7 +191,7 @@
 	_pathListIndex = _pathNodeListIndex = _newPathNodeListIndex = -1;
 	_pathDirectionListCount = 0;
 	_pathDirectionListAlloced = 0;
-		
+
 	_centerActor = _protagonist = NULL;
 	_protagState = 0;
 	_lastTickMsec = 0;
@@ -200,7 +200,7 @@
 	_xCellCount = _vm->getDisplayWidth();
 
 	_pathCell = (int8 *)malloc(_yCellCount * _xCellCount * sizeof(*_pathCell));
-	
+
 	_pathRect.left = 0;
 	_pathRect.right = _vm->getDisplayWidth();
 	_pathRect.top = _vm->getDisplayInfo().pathStartY;
@@ -212,9 +212,9 @@
 		if (_actorContext == NULL) {
 			error("Actor::Actor() resource context not found");
 		}
-	
+
 		_vm->_resource->loadResource(_actorContext, _vm->getResourceDescription()->actorsStringsResourceId, stringsPointer, stringsLength);
-	
+
 		_vm->loadStrings(_actorsStrings, stringsPointer, stringsLength);
 		free(stringsPointer);
 	} else {
@@ -327,7 +327,7 @@
 
 	framesCount = resourceLength / 16;
 	debug(9, "Frame resource contains %d frames", framesCount);
-	
+
 	framesPointer = (ActorFrameSequence *)malloc(sizeof(ActorFrameSequence) * framesCount);
 	if (framesPointer == NULL) {
 		memoryError("Actor::loadActorResources");
@@ -392,7 +392,7 @@
 	if (((hitZone->getFlags() & kHitZoneTerminus) && !stopped) || (!(hitZone->getFlags() & kHitZoneTerminus) && stopped)) {
 		return;
 	}
-	
+
 	if (!exit) {
 		if (hitZone->getFlags() & kHitZoneAutoWalk) {
 			actor->currentAction = kActionWalkDir;
@@ -432,7 +432,7 @@
 			angle = (location.x + 2) & 15;
 			distance = location.y;
 
-			location.u() = (angleLUT[angle][0] * distance) >> 8; 
+			location.u() = (angleLUT[angle][0] * distance) >> 8;
 			location.v() = (angleLUT[angle][1] * distance) >> 8;
 		} else {
 			angle = location.x & 15;
@@ -459,7 +459,7 @@
 	Location delta;
 	//debug (8, "Actor::actorFaceTowardsPoint actorId=%i", actorId);
 	actor = getActor(actorId);
-	
+
 	toLocation.delta(actor->location, delta);
 
 	if (_vm->_scene->getFlags() & kSceneFlagISO) {
@@ -493,7 +493,7 @@
 
 ObjectData *Actor::getObj(uint16 objId) {
 	ObjectData *obj;
-	
+
 	if (!validObjId(objId))
 		error("Actor::getObj Wrong objId 0x%X", objId);
 
@@ -529,14 +529,14 @@
 }
 
 bool Actor::validFollowerLocation(const Location &location) {
-	Point point;	
+	Point point;
 	location.toScreenPointXY(point);
-	
+
 	if ((point.x < 5) || (point.x >= _vm->getDisplayWidth() - 5) ||
 		(point.y < 0) || (point.y > _vm->getSceneHeight())) {
 		return false;
 	}
-	
+
 	return (_vm->_scene->canWalk(point));
 }
 
@@ -552,7 +552,7 @@
 	Location possibleLocation;
 	Point delta;
 	const SceneEntry *sceneEntry;
-	
+
 	if (_vm->getGameType() == GType_IHNM) {
 		warning("Actors aren't implemented for IHNM yet");
 		return;
@@ -588,9 +588,9 @@
 			actor->actionCycle = (_vm->_rnd.getRandomNumber(7) & 0x7) * 4; // 1/8th chance
 		}
 	}
-	
+
 	assert(_protagonist);
-	
+
 	if ((actorsEntrance >= 0) && (_vm->_scene->_entryList.entryListCount > 0)) {
 		if (_vm->_scene->_entryList.entryListCount <= actorsEntrance) {
 			actorsEntrance = 0; //OCEAN bug
@@ -619,19 +619,19 @@
 	calcScreenPosition(_protagonist);
 
 	for (i = 0; i < _actorsCount; i++) {
-		actor = _actors[i];		
+		actor = _actors[i];
 		if (actor->flags & (kFollower)) {
 			actor->facingDirection = actor->actionDirection = _protagonist->facingDirection;
 			actor->currentAction = kActionWait;
 			actor->walkStepsCount = actor->walkStepIndex = 0;
 			actor->location.z = _protagonist->location.z;
-				
+
 
 			if (_vm->_scene->getFlags() & kSceneFlagISO) {
 				_vm->_isoMap->placeOnTileMap(_protagonist->location, actor->location, 3, followerDirection & 0x07);
 			} else {
 				followerDirection &= 0x07;
-				
+
 				possibleLocation = _protagonist->location;
 
 
@@ -643,7 +643,7 @@
 					tempLocation = possibleLocation;
 					tempLocation.x += delta.x;
 					tempLocation.y += delta.y;
-				
+
 					if (validFollowerLocation( tempLocation)) {
 						possibleLocation = tempLocation;
 					} else {
@@ -686,7 +686,7 @@
 
 	if (frameType >= actor->framesCount)
 		error("Actor::getActorFrameRange Wrong frameType 0x%X actorId 0x%X", frameType, actorId);
-	
+
 	if ((actor->facingDirection < kDirUp) || (actor->facingDirection > kDirUpLeft))
 		error("Actor::getActorFrameRange Wrong direction 0x%X actorId 0x%X", actor->facingDirection, actorId);
 
@@ -716,7 +716,7 @@
 					removeFirst = true;
 			} else {
 				removeFirst = true;
-			}		
+			}
 			_activeSpeech.playing = false;
 			if (_activeSpeech.actorIds[0] != 0) {
 				actor = getActor(_activeSpeech.actorIds[0]);
@@ -748,7 +748,7 @@
 
 	if (_vm->_script->_skipSpeeches) {
 		_activeSpeech.stringsCount = 0;
-		_vm->_script->wakeUpThreads(kWaitTypeSpeech);		
+		_vm->_script->wakeUpThreads(kWaitTypeSpeech);
 	}
 
 	if (_activeSpeech.stringsCount == 0) {
@@ -799,7 +799,7 @@
 		}
 
 		_activeSpeech.speechBox.setWidth(width);
-		
+
 		if (_activeSpeech.actorIds[0] != 0) {
 			actor = getActor(_activeSpeech.actorIds[0]);
 			_activeSpeech.speechBox.setHeight(height);
@@ -818,9 +818,9 @@
 		}
 		_activeSpeech.drawRect.setWidth(width);
 		_activeSpeech.drawRect.setHeight(height);
-	}		
+	}
 
-	_activeSpeech.playing = true;			
+	_activeSpeech.playing = true;
 }
 
 void Actor::handleActions(int msec, bool setup) {
@@ -841,7 +841,7 @@
 		actor = _actors[i];
 		if (!actor->inScene)
 			continue;
-		
+
 		if ((_vm->getGameType() == GType_ITE) && (i == ACTOR_DRAGON_INDEX)) {
 			moveDragon(actor);
 			continue;
@@ -894,7 +894,7 @@
 		case kActionWalkToLink:
 			if (_vm->_scene->getFlags() & kSceneFlagISO) {
 				actor->partialTarget.delta(actor->location, delta);
-					
+
 				while ((delta.u() == 0) && (delta.v() == 0)) {
 
 					if ((actor == _protagonist) && (_vm->mouseButtonPressed())) {
@@ -936,7 +936,7 @@
 						addDelta.u() += (addDelta.u() > 0) ? (delta.v() / 2) : (-delta.v() / 2);
 						addDelta.u() /= delta.v();
 					}
-				} else {  
+				} else {
 					addDelta.u() = clamp( -speed, delta.u(), speed );
 					if (addDelta.u() == delta.u()) {
 						addDelta.v() = delta.v();
@@ -977,7 +977,7 @@
 					speed = 1;
 				}
 
-				if ((actor->actionDirection == kDirUp) || (actor->actionDirection == kDirDown)) {					
+				if ((actor->actionDirection == kDirUp) || (actor->actionDirection == kDirDown)) {
 					addDelta.y = clamp(-speed, delta.y, speed);
 					if (addDelta.y == delta.y) {
 						addDelta.x = delta.x;
@@ -987,7 +987,7 @@
 						addDelta.x /= delta.y;
 						actor->facingDirection = actor->actionDirection;
 					}
-				} else {						
+				} else {
 					addDelta.x = clamp(-2 * speed, delta.x, 2 * speed);
 					if (addDelta.x == delta.x) {
 						addDelta.y = delta.y;
@@ -1080,7 +1080,7 @@
 			actor->actionCycle++;
 
 			frameRange = getActorFrameRange(actor->id, actor->cycleFrameSequence);
-				
+
 			if (actor->currentAction == kActionPongFrames) {
 				if (actor->actionCycle >= frameRange->frameCount * 2 - 2) {
 					if (actor->actorFlags & kActorContinuous) {
@@ -1132,7 +1132,7 @@
 				actor->location = actor->finalTarget;
 				actor->currentAction = kActionFreeze;
 				_vm->_script->wakeUpActorThread(kWaitTypeWalk, actor);
-			}			
+			}
 			break;
 
 		case kActionClimb:
@@ -1237,7 +1237,7 @@
 		commonObjectData->location.toScreenPointXYZ(commonObjectData->screenPosition);
 	}
 
-	result = commonObjectData->screenPosition.x > -64 && 
+	result = commonObjectData->screenPosition.x > -64 &&
 			commonObjectData->screenPosition.x < _vm->getDisplayWidth() + 64 &&
 			commonObjectData->screenPosition.y > -64 &&
 			commonObjectData->screenPosition.y < _vm->getSceneHeight() + 64;
@@ -1295,7 +1295,7 @@
 		actor = _actors[i];
 		if (!actor->inScene)
 			continue;
-		
+
 		if (calcScreenPosition(actor)) {
 			_drawOrderList.pushBack(actor, compareFunction);
 		}
@@ -1308,7 +1308,7 @@
 
 		if (obj->sceneNumber != _vm->_scene->currentSceneNumber())
 			 continue;
-		
+
 		if (calcScreenPosition(obj)) {
 			_drawOrderList.pushBack(obj, compareFunction);
 		}
@@ -1321,7 +1321,7 @@
 //			warning("not protagonist");
 			return false;
 		}
-		frameNumber = 8;			
+		frameNumber = 8;
 		spriteList = &_vm->_sprite->_mainSprites;
 	} else if (validActorId(commonObjectData->id)) {
 		spriteList = &((ActorData *)commonObjectData)->spriteList;
@@ -1364,7 +1364,7 @@
 		if (!getSpriteParams(drawObject, frameNumber, spriteList)) {
 			continue;
 		}
-		
+
 		if (_vm->_scene->getFlags() & kSceneFlagISO) {
 			_vm->_isoMap->drawSprite(backBuffer, *spriteList, frameNumber, drawObject->location, drawObject->screenPosition, drawObject->screenScale);
 		} else {
@@ -1400,7 +1400,7 @@
 	if (_activeSpeech.actorsCount > 1) {
 		height = _vm->_font->getHeight(kMediumFont);
 		width = _vm->_font->getStringWidth(kMediumFont, _activeSpeech.strings[0], 0, kFontNormal);
-			
+
 		for (i = 0; i < _activeSpeech.actorsCount; i++) {
 			actor = getActor(_activeSpeech.actorIds[i]);
 			calcScreenPosition(actor);
@@ -1408,7 +1408,7 @@
 			textPoint.x = clamp( 10, actor->screenPosition.x - width / 2, _vm->getDisplayWidth() - 10 - width);
 			textPoint.y = clamp( 10, actor->screenPosition.y - 58, _vm->getSceneHeight() - 10 - height);
 
-			_vm->_font->textDraw(kMediumFont, backBuffer, _activeSpeech.strings[0], textPoint, 
+			_vm->_font->textDraw(kMediumFont, backBuffer, _activeSpeech.strings[0], textPoint,
 				_activeSpeech.speechColor[i], _activeSpeech.outlineColor[i], _activeSpeech.getFontFlags(i));
 		}
 	} else {
@@ -1429,7 +1429,7 @@
 	int16 prefV;
 	int16 newU;
 	int16 newV;
-	
+
 	assert(_protagonist);
 
 	actor->flags &= ~(kFaster | kFastest);
@@ -1470,7 +1470,7 @@
 			return actorWalkTo(actor->id, newLocation);
 		}
 
-	} else {		
+	} else {
 		prefer1.x = (100 * _protagonist->screenScale) >> 8;
 		prefer1.y = (50 * _protagonist->screenScale) >> 8;
 
@@ -1485,14 +1485,14 @@
 		if (prefer1.y < 8) {
 			prefer1.y = 8;
 		}
-		
+
 		prefer2.x = prefer1.x * 2;
 		prefer2.y = prefer1.y * 2;
 		prefer3.x = prefer1.x + prefer1.x / 2;
 		prefer3.y = prefer1.y + prefer1.y / 2;
 
 		actor->location.delta(protagonistLocation, delta);
-		
+
 		protagonistBGMaskType = 0;
 		if (_vm->_scene->isBGMaskPresent() && _vm->_scene->validBGMaskPoint(_protagonist->screenPosition)) {
 			protagonistBGMaskType = _vm->_scene->getBGMaskType(_protagonist->screenPosition);
@@ -1634,7 +1634,7 @@
 			return false;
 		}
 	} else {
-		
+
 		actor->location.toScreenPointXY(pointFrom);
 		pointFrom.x &= ~1;
 
@@ -1681,7 +1681,7 @@
 			if (!(actor->actorFlags & kActorNoCollide)) {
 				collision.x = ACTOR_COLLISION_WIDTH * actor->screenScale / (256 * 2);
 				collision.y = ACTOR_COLLISION_HEIGHT * actor->screenScale / (256 * 2);
-				
+
 				_barrierCount = 0;
 
 				for (i = 0; (i < _actorsCount) && (_barrierCount < ACTOR_BARRIERS_MAX); i++) {
@@ -1704,7 +1704,7 @@
 					if (testBox2.contains(pointFrom)) {
 						if (pointFrom.x > anotherActorScreenPosition.x + 4) {
 							testBox.right = pointFrom.x - 1;
-						} else if (pointFrom.x < anotherActorScreenPosition.x - 4) {	
+						} else if (pointFrom.x < anotherActorScreenPosition.x - 4) {
 							testBox.left = pointFrom.x + 2;
 						} else if (pointFrom.y > anotherActorScreenPosition.y) {
 							testBox.bottom = pointFrom.y;
@@ -1755,7 +1755,7 @@
 
 			if (pointBest == pointFrom) {
 				actor->walkStepsCount = 0;
-			}			
+			}
 		} else {
 			actor->walkStepsCount = 0;
 			actor->addWalkStepPoint(pointTo);
@@ -1771,7 +1771,7 @@
 			if (actor->flags & kProtagonist) {
 				_actors[1]->actorFlags &= ~kActorNoFollow; // TODO: mark all actors with kFollower flag, not only 1 and 2
 				_actors[2]->actorFlags &= ~kActorNoFollow;
-			}			
+			}
 			actor->currentAction = (actor->walkStepsCount >= ACTOR_MAX_STEPS_COUNT) ? kActionWalkToLink : kActionWalkToPoint;
 			actor->walkFrameSequence = kFrameWalk;
 		}
@@ -1795,7 +1795,7 @@
 	for (i = 0; i < stringsCount; i++) {
 		_activeSpeech.strings[i] = strings[i];
 	}
-	 
+
 	_activeSpeech.stringsCount = stringsCount;
 	_activeSpeech.speechFlags = speechFlags;
 	_activeSpeech.actorsCount = 1;
@@ -1813,18 +1813,18 @@
 	_activeSpeech.speechBox.right = actor->screenPosition.x + dist;
 
 	if (_activeSpeech.speechBox.left < 10) {
-		_activeSpeech.speechBox.right += 10 - _activeSpeech.speechBox.left; 
-		_activeSpeech.speechBox.left = 10; 
+		_activeSpeech.speechBox.right += 10 - _activeSpeech.speechBox.left;
+		_activeSpeech.speechBox.left = 10;
 	}
 	if (_activeSpeech.speechBox.right > _vm->getDisplayWidth() - 10) {
 		_activeSpeech.speechBox.left -= _activeSpeech.speechBox.right - _vm->getDisplayWidth() - 10;
-		_activeSpeech.speechBox.right = _vm->getDisplayWidth() - 10; 
-	}	
+		_activeSpeech.speechBox.right = _vm->getDisplayWidth() - 10;
+	}
 }
 
 void Actor::nonActorSpeech(const Common::Rect &box, const char **strings, int stringsCount, int sampleResourceId, int speechFlags) {
 	int i;
-	
+
 	_vm->_script->wakeUpThreads(kWaitTypeSpeech);
 
 	for (i = 0; i < stringsCount; i++) {
@@ -1842,7 +1842,7 @@
 
 void Actor::simulSpeech(const char *string, uint16 *actorIds, int actorIdsCount, int speechFlags, int sampleResourceId) {
 	int i;
-	
+
 	if (_vm->getGameType() == GType_IHNM) {
 		warning("Actors aren't implemented for IHNM yet");
 		return;
@@ -1863,7 +1863,7 @@
 	_activeSpeech.sampleResourceId = sampleResourceId;
 	_activeSpeech.playing = false;
 	_activeSpeech.slowModeCharIndex = 0;
-	
+
 	// caller should call thread->wait(kWaitTypeSpeech) by itself
 }
 
@@ -1890,7 +1890,7 @@
 
 	if ((actor->actionCycle < 0) ||
 		((actor->actionCycle == 0) && (actor->dragonMoveType >= ACTOR_DRAGON_TURN_MOVES))) {
-		
+
 		moveType = kDragonMoveInvalid;
 		if (actor->location.distance(_protagonist->location) < 24) {
 			if (_dragonHunt && (_protagonist->currentAction != kActionFall)) {
@@ -1911,7 +1911,7 @@
 		} else {
 			_dragonHunt = true;
 		}
-	
+
 		if (actor->walkStepIndex + 2 > actor->walkStepsCount) {
 
 			_vm->_isoMap->findDragonTilePath(actor, actor->location, _protagonist->location, actor->actionDirection);
@@ -2065,7 +2065,7 @@
 				break;
 			}
 		}
-		
+
 		actor->dragonMoveType = moveType;
 
 		if (moveType >= ACTOR_DRAGON_TURN_MOVES) {
@@ -2111,7 +2111,7 @@
 		dragonMove = &dragonMoveTable[actor->dragonMoveType];
 		actor->dragonBaseFrame = dragonMove->baseFrame;
 
-		
+
 		actor->location.u() = actor->partialTarget.u() - dragonMove->offset[actor->actionCycle][0];
 		actor->location.v() = actor->partialTarget.v() - dragonMove->offset[actor->actionCycle][1];
 
@@ -2130,7 +2130,7 @@
 	int maskType;
 	int i;
 	Rect intersect;
-	
+
 #ifdef ACTOR_DEBUG
 	_debugPointsCount = 0;
 #endif
@@ -2148,7 +2148,7 @@
 				setPathCell(iteratorPoint, _vm->_scene->getDoorState(maskType) ? kPathCellBarrier : kPathCellEmpty);
 			} else {
 				setPathCell(iteratorPoint, kPathCellBarrier);
-			}			
+			}
 		}
 	}
 
@@ -2164,7 +2164,7 @@
 			}
 		}
 	}
-	
+
 #ifdef ACTOR_DEBUG
 	for (iteratorPoint.y = 0; iteratorPoint.y < _yCellCount; iteratorPoint.y++) {
 		for (iteratorPoint.x = 0; iteratorPoint.x < _xCellCount; iteratorPoint.x++) {
@@ -2180,7 +2180,7 @@
 		actor->addWalkStepPoint(toPoint);
 		return;
 	}
-	
+
 	i = fillPathArray(fromPoint, toPoint, bestPoint);
 
 	if (fromPoint == bestPoint) {
@@ -2204,7 +2204,7 @@
 	int s1;
 	int s2;
 	int i;
-	
+
 	point = point1;
 	delta.x = ABS(point1.x - point2.x);
 	delta.y = ABS(point1.y - point2.y);
@@ -2254,7 +2254,7 @@
 	int i;
 	Point bestPath;
 	int pointCounter;
-	int startDirection;	
+	int startDirection;
 	PathDirectionData *pathDirection;
 	PathDirectionData *newPathDirection;
 	const PathDirectionData *samplePathDirection;
@@ -2265,7 +2265,7 @@
 	pointCounter = 0;
 	bestRating = quickDistance(fromPoint, toPoint);
 	bestPath = fromPoint;
-	
+
 	for (startDirection = 0; startDirection < 4; startDirection++) {
 		newPathDirection = addPathDirectionListData();
 		newPathDirection->x = fromPoint.x;
@@ -2275,12 +2275,12 @@
 
 	if (validPathCellPoint(fromPoint)) {
 		setPathCell(fromPoint, kDirUp);
-		
+
 #ifdef ACTOR_DEBUG
 		addDebugPoint(fromPoint, 24+36);
 #endif
-	}	
-	
+	}
+
 	i = 0;
 
 	do {
@@ -2289,7 +2289,7 @@
 			samplePathDirection = &pathDirectionLUT[pathDirection->direction][directionCount];
 			nextPoint.x = samplePathDirection->x + pathDirection->x;
 			nextPoint.y = samplePathDirection->y + pathDirection->y;
-			
+
 			if (!validPathCellPoint(nextPoint)) {
 				continue;
 			}
@@ -2350,10 +2350,10 @@
 	}
 
 	pathToNode();
-	removeNodes();	
+	removeNodes();
 	nodeToPath();
 	removePathPoints();
-	
+
 	for (i = 0; i <= _pathNodeListIndex; i++) {
 		actor->addWalkStepPoint(_pathNodeList[i].point);
 	}
@@ -2365,7 +2365,7 @@
 	int i;
 	Point *point;
 
-	point= &_pathList[_pathListIndex];	
+	point= &_pathList[_pathListIndex];
 	direction = 0;
 
 	_pathNodeListIndex = -1;
@@ -2381,13 +2381,13 @@
 			direction++;
 		}
 		if ((point1.x + delta.x != point2.x) || (point1.y + delta.y != point2.y)) {
-			addPathNodeListPoint(point1);			
+			addPathNodeListPoint(point1);
 			direction--;
 			i++;
 			point++;
 		}
 	}
-	addPathNodeListPoint(*_pathList);			
+	addPathNodeListPoint(*_pathList);
 }
 
 int pathLine(Point *pointList, const Point &point1, const Point &point2) {
@@ -2466,7 +2466,7 @@
 	int i, j, k;
 	PathNode *iNode, *jNode, *kNode, *fNode;
 	fNode = &_pathNodeList[_pathNodeListIndex];
-	
+
 	if (scanPathLine(_pathNodeList[0].point, fNode->point)) {
 		_pathNodeList[1] = *fNode;
 		_pathNodeListIndex = 1;
@@ -2523,7 +2523,7 @@
 void Actor::condenseNodeList() {
 	int i, j, count;
 	PathNode *iNode, *jNode;
-	
+
 	count = _pathNodeListIndex;
 
 	for (i = 1, iNode = _pathNodeList + 1; i < _pathNodeListIndex; i++, iNode++) {
@@ -2557,14 +2557,14 @@
 
 	_newPathNodeListIndex = -1;
 	addNewPathNodeListPoint(_pathNodeList[0]);
-		
+
 	for (i = 1, node = _pathNodeList + 1; i < _pathNodeListIndex; i++, node++) {
 		addNewPathNodeListPoint(*node);
 
 		for (j = 5; j > 0; j--) {
 			start = node->link - j;
 			end = node->link + j;
-		
+
 			if (start < 0 || end > _pathListIndex) {
 				continue;
 			}
@@ -2574,14 +2574,14 @@
 			if ((point1.x == PATH_NODE_EMPTY) || (point2.x == PATH_NODE_EMPTY)) {
 				continue;
 			}
-			
+
 			if (scanPathLine(point1, point2)) {
 				for (l = 1; l <= _newPathNodeListIndex; l++) {
 					if (start <= _newPathNodeList[l].link) {
 						_newPathNodeListIndex = l;
 						_newPathNodeList[_newPathNodeListIndex].point = point1;
 						_newPathNodeList[_newPathNodeListIndex].link = start;
-						incrementNewPathNodeListIndex();						
+						incrementNewPathNodeListIndex();
 						break;
 					}
 				}
@@ -2595,7 +2595,7 @@
 			}
 		}
 	}
-	
+
 	addNewPathNodeListPoint(_pathNodeList[_pathNodeListIndex]);
 
 	for (i = 0, j = 0; i <= _newPathNodeListIndex; i++) {
@@ -2623,7 +2623,7 @@
 
 void Actor::saveState(Common::OutSaveFile *out) {
 	uint16 i;
-	
+
 	out->writeSint16LE(getProtagState());
 
 	for (i = 0; i < _actorsCount; i++) {

Index: animation.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/animation.cpp,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- animation.cpp	25 Jul 2005 16:22:32 -0000	1.51
+++ animation.cpp	29 Jul 2005 17:57:40 -0000	1.52
@@ -97,7 +97,7 @@
 	anim->frameTime = DEFAULT_FRAME_TIME;
 	anim->flags = 0;
 	anim->linkId = -1;
-	anim->state = ANIM_PAUSE;	
+	anim->state = ANIM_PAUSE;
 }
 
 void Anim::link(int16 animId1, int16 animId2) {
@@ -120,7 +120,7 @@
 	AnimationData *anim;
 
 	anim = getAnimation(animId);
-	
+
 	anim->cycles = cycles;
 }
 
@@ -162,7 +162,7 @@
 
 		if (anim->currentFrame > anim->maxFrame) {
 			anim->currentFrame = anim->loopFrame;
-						
+
 			if (anim->flags & ANIM_STOPPING || anim->currentFrame == -1) {
 				anim->state = ANIM_PAUSE;
 			}
@@ -237,7 +237,7 @@
 	AnimationData *anim;
 
 	anim = getAnimation(animId);
-	
+
 	anim->cycles += cycles;
 	play(animId, 0, true);
 }
@@ -281,7 +281,7 @@
 	AnimationData *anim;
 
 	anim = getAnimation(animId);
-	
+
 	return anim->currentFrame;
 }
 
@@ -323,7 +323,7 @@
 		error("VALIDATE_WRITE_POINTER: writePointer=%x buf=%x", writePointer, buf); \
 	}
 #else
-#define VALIDATE_WRITE_POINTER 
+#define VALIDATE_WRITE_POINTER
 #endif
 
 
@@ -351,7 +351,7 @@
 		case SAGA_FRAME_NOOP: // Does nothing
 			readS.readByte();
 			readS.readByte();
-			readS.readByte();			
+			readS.readByte();
 			continue;
 			break;
 		case SAGA_FRAME_LONG_UNCOMPRESSED_RUN: // Long Unencoded Run
@@ -377,7 +377,7 @@
 			break;
 		case SAGA_FRAME_ROW_END: // End of row
 			xVector = readS.readSint16BE();
-			
+
 			if (longData)
 				newRow = readS.readSint16BE();
 			else
@@ -451,17 +451,17 @@
 	int i;
 	bool longData = isLongData();
 
-	MemoryReadStreamEndian readS(anim->resourceData, anim->resourceLength, _vm->isBigEndian()); 
+	MemoryReadStreamEndian readS(anim->resourceData, anim->resourceLength, _vm->isBigEndian());
 
 	readS.seek(12);
-	
+
 	readS._bigEndian = !_vm->isBigEndian(); // RLE has inversion BE<>LE
 
 	for (currentFrame = 0; currentFrame <= anim->maxFrame; currentFrame++) {
 		anim->frameOffsets[currentFrame] = readS.pos();
 
 		// For some strange reason, the animation header is in little
-		// endian format, but the actual RLE encoded frame data, 
+		// endian format, but the actual RLE encoded frame data,
 		// including the frame header, is in big endian format. */
 		do {
 			markByte = readS.readByte();

Index: events.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/events.cpp,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- events.cpp	19 Jul 2005 19:05:42 -0000	1.61
+++ events.cpp	29 Jul 2005 17:57:40 -0000	1.62
@@ -52,7 +52,7 @@
 	freeList();
 }
 
-// Function to process event list once per frame. 
+// Function to process event list once per frame.
 // First advances event times, then processes each event with the appropriate
 //  handler depending on the type of event.
 int Events::handleEvents(long msec) {
@@ -93,20 +93,20 @@
 			break;
 		}
 
-		// Process the event appropriately based on result code from 
+		// Process the event appropriately based on result code from
 		// handler
 		if ((result == EVENT_DELETE) || (result == EVENT_INVALIDCODE)) {
 			// If there is no event chain, delete the base event.
 			if (event_p->chain == NULL) {
 				eventi=_eventList.eraseAndPrev(eventi);
 			} else {
-				// If there is an event chain present, move the next event 
-				// in the chain up, adjust it by the previous delta time, 
+				// If there is an event chain present, move the next event
+				// in the chain up, adjust it by the previous delta time,
 				// and reprocess the event  */
 				delta_time = event_p->time;
 				EVENT *from_chain=event_p->chain;
 				memcpy(event_p, from_chain,sizeof(*event_p));
-				free(from_chain);  
+				free(from_chain);
 
 				event_p->time += delta_time;
 				--eventi;
@@ -184,7 +184,7 @@
 			rect.top = (_vm->getDisplayHeight() - h) / 2;
 			rect.setWidth(w);
 			rect.setHeight(h);
-			
+
 			backGroundSurface->transitionDissolve( maskBuffer, rect, 1, event_pc);
 			break;
 		default:
@@ -410,7 +410,7 @@
 		case EVENT_EXEC_BLOCKING:
 		case EVENT_EXEC_NONBLOCKING:
 			debug(6, "Exec module number %d script entry number %d", event->param, event->param2);
-		
+
 			sthread = _vm->_script->createThread(event->param, event->param2);
 			if (sthread == NULL) {
 				_vm->_console->DebugPrintf("Thread creation failed.\n");

Index: font.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/font.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- font.cpp	19 Jul 2005 19:05:42 -0000	1.32
+++ font.cpp	29 Jul 2005 17:57:40 -0000	1.33
@@ -34,7 +34,7 @@
 Font::Font(SagaEngine *vm) : _vm(vm), _initialized(false) {
 	int i;
 
-	// Load font module resource context 
+	// Load font module resource context
 
 	assert(_vm->getFontsCount() > 0);
 
@@ -89,7 +89,7 @@
 
 	// Create new font structure
 	font = (FontData *)malloc(sizeof(*font));
-	
+
 	// Read font header
 	font->normal.header.charHeight = readS.readUint16();
 	font->normal.header.charWidth = readS.readUint16();
@@ -129,9 +129,9 @@
 
 	// Create outline font style
 	createOutline(font);
-	
-	// Set font data 
-	_fonts[_loadedFonts++] = font;	
+
+	// Set font data
+	_fonts[_loadedFonts++] = font;
 }
 
 
@@ -152,7 +152,7 @@
 	unsigned char charRep;
 
 
-	// Populate new font style character data 
+	// Populate new font style character data
 	for (i = 0; i < FONT_CHARCOUNT; i++) {
 		newByteWidth = 0;
 		oldByteWidth = 0;
@@ -186,10 +186,10 @@
 	font->outline.header.charHeight += 2;
 	font->outline.header.rowLength = newRowLength;
 
-	// Allocate new font representation storage 
+	// Allocate new font representation storage
 	font->outline.font = (unsigned char *)calloc(newRowLength, font->outline.header.charHeight);
 
-	
+
 	// Generate outline font representation
 	for (i = 0; i < FONT_CHARCOUNT; i++) {
 		for (row = 0; row < font->normal.header.charHeight; row++) {
@@ -233,7 +233,7 @@
 				}
 			}
 		}
-	}	
+	}
 }
 
 // Returns the horizontal length in pixels of the graphical representation
@@ -287,7 +287,7 @@
 
 	font = _fonts[fontId];
 
-	if (flags & kFontOutline) { 
+	if (flags & kFontOutline) {
 		offsetPoint.x--;
 		offsetPoint.y--;
 		outFont(font->outline, ds, text, count, offsetPoint, effectColor, flags);
@@ -329,7 +329,7 @@
 	textPointer = (const byte *) text;
 	ct = count;
 
-	// Draw string one character at a time, maximum of 'draw_str'_ct 
+	// Draw string one character at a time, maximum of 'draw_str'_ct
 	// characters, or no limit if 'draw_str_ct' is 0
 	for (; *textPointer && (!count || ct); textPointer++, ct--) {
 		c_code = *textPointer & 0xFFU;
@@ -470,7 +470,7 @@
 	textPoint.x = (fitWidth / 2);
 	textPoint.y = 0;
 
-	if (fitWidth >= textWidth) {		
+	if (fitWidth >= textWidth) {
 		return h;
 	}
 

Index: game.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/game.cpp,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- game.cpp	26 Jul 2005 19:40:57 -0000	1.83
+++ game.cpp	29 Jul 2005 17:57:40 -0000	1.84
@@ -45,7 +45,7 @@
 static PanelButton ITE_MainPanelButtons[] = {
 	{kPanelButtonVerb,		52,4,	57,10,	kVerbWalkTo,'w',0,	0,1,0},
 	{kPanelButtonVerb,		52,15,	57,10,	kVerbLookAt,'l',0,	2,3,0},
-	{kPanelButtonVerb,		52,26,	57,10,	kVerbPickUp,'p',0,	4,5,0}, 
+	{kPanelButtonVerb,		52,26,	57,10,	kVerbPickUp,'p',0,	4,5,0},
 	{kPanelButtonVerb,		52,37,	57,10,	kVerbTalkTo,'t',0,	0,1,0},
 	{kPanelButtonVerb,		110,4,	56,10,	kVerbOpen,'o',0,	6,7,0},
 	{kPanelButtonVerb,		110,15,	56,10,	kVerbClose,'c',0,	8,9,0},
@@ -53,7 +53,7 @@
 	{kPanelButtonVerb,		110,37,	56,10,	kVerbGive,'g',0,	12,13,0},
 	{kPanelButtonArrow,		306,6,	8,5,	-1,'U',0,			0,4,2},
 	{kPanelButtonArrow,		306,41,	8,5,	1,'D',0,			1,5,3},
-	
+
 	{kPanelButtonInventory,	181 + 32*0,6,	27,18,	0,'-',0,	0,0,0},
 	{kPanelButtonInventory,	181 + 32*1,6,	27,18,	1,'-',0,	0,0,0},
 	{kPanelButtonInventory,	181 + 32*2,6,	27,18,	2,'-',0,	0,0,0},
@@ -71,7 +71,7 @@
 	{kPanelButtonConverseText,	52,6 + CONVERSE_TEXT_HEIGHT * 2, CONVERSE_MAX_TEXT_WIDTH,CONVERSE_TEXT_HEIGHT,	2,'3',0,	0,0,0},
 	{kPanelButtonConverseText,	52,6 + CONVERSE_TEXT_HEIGHT * 3, CONVERSE_MAX_TEXT_WIDTH,CONVERSE_TEXT_HEIGHT,	3,'4',0,	0,0,0},
 	{kPanelButtonArrow,			257,6,	9,6,	-1,'u',0,	0,4,2},
-	{kPanelButtonArrow,			257,41,	9,6,	1,'d',0,	1,5,3}, 
+	{kPanelButtonArrow,			257,41,	9,6,	1,'d',0,	1,5,3},
 };
 
 static PanelButton ITE_OptionPanelButtons[] = {
@@ -116,10 +116,10 @@
 
 static GameDisplayInfo ITE_DisplayInfo = {
 	320, 200,		// logical width&height
-	
+
 	35,				// scene path y offset
 	137,			// scene height
-	
+
 	0,				// status x offset
 	137,			// status y offset
 	320,			// status width
@@ -134,7 +134,7 @@
 	147,			// verb text color
 	15,				// verb text shadow color
 	96,				// verb text active color
-	
+
 	5, 4,			// left portrait x, y offset
 	274, 4,			// right portrait x, y offset
 
@@ -149,7 +149,7 @@
 	0, 148,			// converse panel offsets
 	ARRAYSIZE(ITE_ConversePanelButtons),
 	ITE_ConversePanelButtons,
-	
+
 	8, 0,			// save file index
 	8,				// optionSaveFileVisible
 	8, 8,			// option panel offsets
@@ -197,7 +197,7 @@
 static GameFontDescription ITEDEMO_GameFonts[] = {
 	{0},
 	{1}
-}; 
+};
 
 static GameSoundInfo ITEDEMO_GameSound = {
 	kSoundVOC,
@@ -219,7 +219,7 @@
 static GameFontDescription ITEWINDEMO_GameFonts[] = {
 	{2},
 	{0}
-}; 
+};
 
 static GameSoundInfo ITEWINDEMO1_GameSound = {
 	kSoundPCM,
@@ -366,9 +366,9 @@
 };
 
 static GameSoundInfo ITEDISK_GameSound = {
-	kSoundVOC, 
-	-1, 
-	-1, 
+	kSoundVOC,
+	-1,
+	-1,
 	false,
 	false,
 	true
@@ -508,7 +508,7 @@
 
 static GameDisplayInfo IHNM_DisplayInfo = { //TODO: fill it all
 	640, 480,	// logical width&height
-	
+
 	0,			// scene path y offset
 	304,		// scene height
 
@@ -542,7 +542,7 @@
 	0, 0,		// converse panel offsets
 	ARRAYSIZE(IHNM_ConversePanelButtons),
 	IHNM_ConversePanelButtons,
-	
+
 	-1, -1,		// save file index
 	0,			// optionSaveFileVisible
 	0, 0,		// option panel offsets
@@ -870,7 +870,7 @@
 		ITELinPatch_Files,
 		GF_WYRMKEEP | GF_CD_FX
 	},
-	
+
 	// Inherit the earth - Win32 Demo version
 	{
 		"ite-demo",
@@ -891,7 +891,7 @@
 		ITEWinPatch2_Files,
 		GF_WYRMKEEP | GF_CD_FX
 	},
-	
+
 	// Inherit the earth - early Win32 Demo version
 	{
 		"ite-demo",
@@ -934,7 +934,7 @@
 		NULL,
 		GF_WYRMKEEP | GF_CD_FX
 	},
-	
+
 	// Inherit the earth - Wyrmkeep Linux CD version
 	// should be before GID_ITE_CD_G
 	// sound unchecked
@@ -1169,8 +1169,8 @@
 	_gameNumber = gameNumber;
 	_gameDescription = &gameDescriptions[gameNumber];
 	_gameDisplayInfo = *_gameDescription->gameDisplayInfo;
-	_displayClip.right = _gameDisplayInfo.logicalWidth; 
-	_displayClip.bottom = _gameDisplayInfo.logicalHeight; 
+	_displayClip.right = _gameDisplayInfo.logicalWidth;
+	_displayClip.bottom = _gameDisplayInfo.logicalHeight;
 
 	if (!_resource->createContexts()) {
 		return false;
@@ -1232,7 +1232,7 @@
 				// makes tstr1 lowercase as well
 				tstr1 = Common::String(file->displayName().c_str());
 				tstr.toLowercase();
-				
+
 				if (filesList.contains(tstr) || filesList.contains(tstr1)) {
 					if (Common::md5_file(file->path().c_str(), md5sum, NULL, FILE_MD5_BYTES)) {
 						for (int j = 0; j < 16; j++) {
@@ -1274,7 +1274,7 @@
 			}
 		}
 
-		// Try the next game, couldn't find all files for the current 
+		// Try the next game, couldn't find all files for the current
 		// game
 		if (file_missing) {
 			continue;

Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/gfx.cpp,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- gfx.cpp	19 Jul 2005 19:05:43 -0000	1.55
+++ gfx.cpp	29 Jul 2005 17:57:40 -0000	1.56
@@ -80,7 +80,7 @@
 void Surface::blit(const Common::Rect &destRect, const byte *sourceBuffer) {
 	const byte *readPointer;
 	byte *writePointer;
-	int row;	
+	int row;
 	ClipData clipData;
 
 	clipData.sourceRect.left = 0;
@@ -94,13 +94,13 @@
 	clipData.destRect.right = w;
 	clipData.destRect.top = 0;
 	clipData.destRect.bottom = h;
-	
+
 	if (!clipData.calcClip()) {
 		return;
 	}
-   
+
 	// Transfer buffer data to surface
-	readPointer = (sourceBuffer + clipData.drawSource.x) + 
+	readPointer = (sourceBuffer + clipData.drawSource.x) +
 						(clipData.sourceRect.right * clipData.drawSource.y);
 
 	writePointer = ((byte *)pixels + clipData.drawDest.x) + (pitch * clipData.drawDest.y);
@@ -205,7 +205,7 @@
 
 	fpercent = 1.0 - fpercent;
 
-	// Use the correct percentage change per frame for each palette entry 
+	// Use the correct percentage change per frame for each palette entry
 	for (i = 0, ppal = _currentPal; i < PAL_ENTRIES; i++, ppal += 4) {
 		new_entry = (int)(src_pal[i].red * fpercent);
 

Index: image.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/image.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- image.cpp	19 Jul 2005 19:05:44 -0000	1.24
+++ image.cpp	29 Jul 2005 17:57:40 -0000	1.25
@@ -187,7 +187,7 @@
 			break;
 
 		case 0x40: // 0100 0000
-			// Repeat decoded sequence from output stream: 
+			// Repeat decoded sequence from output stream:
 			// Max runlength 10
 
 			runcount = ((mark_byte >> 3) & 0x07U) + 3;
@@ -372,7 +372,7 @@
 			dstptr4[x] = srcptr4[temp];
 		}
 
-		// This is to avoid generating invalid pointers - 
+		// This is to avoid generating invalid pointers -
 		// usually innocuous, but undefined
 		if (y < quadruple_rows - 4) {
 			dstptr1 += rowjump_dest;

Index: interface.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/interface.cpp,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -d -r1.123 -r1.124
--- interface.cpp	29 Jul 2005 17:42:33 -0000	1.123
+++ interface.cpp	29 Jul 2005 17:57:40 -0000	1.124
@@ -68,21 +68,21 @@
 	byte *resource;
 	size_t resourceLength;
 	int i;
-	
+
 
 	// Load interface module resource file context
 	_interfaceContext = _vm->_resource->getContext(GAME_RESOURCEFILE);
 	if (_interfaceContext == NULL) {
 		error("Interface::Interface() resource context not found");
 	}
-	
+
 	_mainPanel.buttons = _vm->getDisplayInfo().mainPanelButtons;
 	_mainPanel.buttonsCount = _vm->getDisplayInfo().mainPanelButtonsCount;
 
 	for (i = 0; i < kVerbTypesMax; i++) {
 		_verbTypeToPanelButton[i] = NULL;
 	}
-	
+
 	for (i = 0; i < _mainPanel.buttonsCount; i++) {
 		if (_mainPanel.buttons[i].type == kPanelButtonVerb) {
 			_verbTypeToPanelButton[_mainPanel.buttons[i].id] = &_mainPanel.buttons[i];
@@ -92,7 +92,7 @@
 	_vm->_resource->loadResource(_interfaceContext, _vm->getResourceDescription()->mainPanelResourceId, resource, resourceLength);
 	_vm->decodeBGImage(resource, resourceLength, &_mainPanel.image,
 		&_mainPanel.imageLength, &_mainPanel.imageWidth, &_mainPanel.imageHeight);
-	
+
 	free(resource);
 
 	_conversePanel.buttons = _vm->getDisplayInfo().conversePanelButtons;
@@ -125,7 +125,7 @@
 	_mainPanel.currentButton = NULL;
 	_inventoryUpButton = _mainPanel.getButton(_vm->getDisplayInfo().inventoryUpButtonIndex);
 	_inventoryDownButton = _mainPanel.getButton(_vm->getDisplayInfo().inventoryDownButtonIndex);
-	
+
 
 	_conversePanel.x = _vm->getDisplayInfo().conversePanelXOffset;
 	_conversePanel.y = _vm->getDisplayInfo().conversePanelYOffset;
@@ -199,7 +199,7 @@
 
 Interface::~Interface(void) {
 	free(_inventory);
-	 
+
 	_mainPanel.sprites.freeMem();
 	_defPortraits.freeMem();
 	_scenePortraits.freeMem();
@@ -235,7 +235,7 @@
 void Interface::rememberMode() {
 	assert (_savedMode == -1);
 
-	_savedMode = _panelMode; 
+	_savedMode = _panelMode;
 }
 
 void Interface::restoreMode() {
@@ -255,12 +255,12 @@
 	} else {
 		if (mode == kPanelConverse) {
 			_inMainMode = false;
-		}		
+		}
 		_saveReminderState = 0;
 	}
 
 	_panelMode = mode;
-	
+
 	switch (_panelMode) {
 	case kPanelMain:
 		if (_vm->getGameType() == GType_IHNM)
@@ -402,10 +402,10 @@
 			if (panelButton->ascii == ascii) {
 				if (panelButton->type == kPanelButtonVerb) {
 					_vm->_script->setVerb(panelButton->id);
-				}			
+				}
 				if (panelButton->type == kPanelButtonArrow) {
 					inventoryChangePos(panelButton->id);
-				}			
+				}
 				return true;
 			}
 		}
@@ -464,7 +464,7 @@
 
 void Interface::textInputRepeatCallback(void *refCon) {
 	((Interface *)refCon)->textInputRepeat();
-}                                                                               
+}
 
 void Interface::textInputStartRepeat(uint16 ascii) {
 	if (!_textInputRepeatPhase) {
@@ -502,7 +502,7 @@
 
 	strncpy(_statusText, text, STATUS_TEXT_LEN);
 	_statusOnceColor = statusColor;
-	drawStatusBar();	
+	drawStatusBar();
 }
 
 void Interface::loadScenePortraits(int resourceId) {
@@ -547,7 +547,7 @@
 	int i;
 
 	Point leftPortraitPoint;
-	Point rightPortraitPoint;	
+	Point rightPortraitPoint;
 	Rect rect;
 
 	backBuffer = _vm->_gfx->getBackBuffer();
@@ -565,7 +565,7 @@
 	drawStatusBar();
 
 	if (_panelMode == kPanelMain) {
-		_mainPanel.getRect(rect);		
+		_mainPanel.getRect(rect);
 		backBuffer->blit(rect, _mainPanel.image);
 
 		for (i = 0; i < kVerbTypesMax; i++) {
@@ -573,7 +573,7 @@
 				drawVerbPanel(backBuffer, _verbTypeToPanelButton[i]);
 			}
 		}
-	} else if (_panelMode == kPanelConverse) {	
+	} else if (_panelMode == kPanelConverse) {
 		_conversePanel.getRect(rect);
 		backBuffer->blit(rect, _conversePanel.image);
 		converseDisplayTextLines(backBuffer);
@@ -606,7 +606,7 @@
 
 void Interface::calcOptionSaveSlider() {
 	int totalFiles = _vm->getSaveFilesCount();
-	int visibleFiles = _vm->getDisplayInfo().optionSaveFileVisible; 
+	int visibleFiles = _vm->getDisplayInfo().optionSaveFileVisible;
 	int height = _optionSaveFileSlider->height;
 	int sliderHeight;
 	int pos;
@@ -654,7 +654,7 @@
 
 	textPoint.x = rect.left;
 	textPoint.y = rect.top + 1;
-	
+
 	_vm->_font->textDraw(kMediumFont, ds, text, textPoint,
 		_vm->getDisplayInfo().verbTextColor, _vm->getDisplayInfo().verbTextShadowColor, kFontShadow);
 }
@@ -677,20 +677,20 @@
 	_optionPanel.getRect(rect);
 	backBuffer->blit(rect, _optionPanel.image);
 
-	for (i = 0; i < _optionPanel.buttonsCount; i++) {		
+	for (i = 0; i < _optionPanel.buttonsCount; i++) {
 		panelButton = &_optionPanel.buttons[i];
 		if (panelButton->type == kPanelButtonOption) {
 			drawPanelButtonText(backBuffer, &_optionPanel, panelButton);
-		}		
+		}
 		if (panelButton->type == kPanelButtonOptionText) {
-			drawPanelText(backBuffer, &_optionPanel, panelButton);			
-		}		
-	}	
+			drawPanelText(backBuffer, &_optionPanel, panelButton);
+		}
+	}
 
 	if (_optionSaveRectTop.height() > 0) {
 		backBuffer->drawRect(_optionSaveRectTop, kITEColorDarkGrey);
 	}
-	
+
 	drawButtonBox(backBuffer, _optionSaveRectSlider, kSlider, _optionSaveFileSlider->state > 0);
 
 	if (_optionSaveRectBottom.height() > 0) {
@@ -704,7 +704,7 @@
 	for (j = 0; j < _vm->getDisplayInfo().optionSaveFileVisible; j++) {
 		bgColor = kITEColorDarkGrey0C;
 		fgColor = kITEColorBrightWhite;
-		
+
 		idx = j + _optionSaveFileTop;
 		if (idx == _optionSaveFileTitleNumber) {
 			SWAP(bgColor, fgColor);
@@ -732,21 +732,21 @@
 
 	_quitPanel.getRect(rect);
 	drawButtonBox(backBuffer, rect, kButton, false);
-	for (i = 0; i < _quitPanel.buttonsCount; i++) {		
+	for (i = 0; i < _quitPanel.buttonsCount; i++) {
 		panelButton = &_quitPanel.buttons[i];
 		if (panelButton->type == kPanelButtonQuit) {
 			drawPanelButtonText(backBuffer, &_quitPanel, panelButton);
-		}		
+		}
 		if (panelButton->type == kPanelButtonQuitText) {
 			drawPanelText(backBuffer, &_quitPanel, panelButton);
-		}		
+		}
 	}
 }
 
 void Interface::handleQuitUpdate(const Point& mousePoint) {
 	bool releasedButton;
 
-	_quitPanel.currentButton = quitHitTest(mousePoint);	
+	_quitPanel.currentButton = quitHitTest(mousePoint);
 	releasedButton = (_quitPanel.currentButton != NULL) && (_quitPanel.currentButton->state > 0) && (!_vm->mouseButtonPressed());
 
 	if (!_vm->mouseButtonPressed()) {
@@ -754,7 +754,7 @@
 	}
 
 	if (releasedButton) {
-		setQuit(_quitPanel.currentButton); 
+		setQuit(_quitPanel.currentButton);
 	}
 }
 
@@ -792,21 +792,21 @@
 
 	_loadPanel.getRect(rect);
 	drawButtonBox(backBuffer, rect, kButton, false);
-	for (i = 0; i < _loadPanel.buttonsCount; i++) {		
+	for (i = 0; i < _loadPanel.buttonsCount; i++) {
 		panelButton = &_loadPanel.buttons[i];
 		if (panelButton->type == kPanelButtonLoad) {
 			drawPanelButtonText(backBuffer, &_loadPanel, panelButton);
-		}		
+		}
 		if (panelButton->type == kPanelButtonLoadText) {
 			drawPanelText(backBuffer, &_loadPanel, panelButton);
-		}		
+		}
 	}
 }
 
 void Interface::handleLoadUpdate(const Point& mousePoint) {
 	bool releasedButton;
 
-	_loadPanel.currentButton = loadHitTest(mousePoint);	
+	_loadPanel.currentButton = loadHitTest(mousePoint);
 	releasedButton = (_loadPanel.currentButton != NULL) && (_loadPanel.currentButton->state > 0) && (!_vm->mouseButtonPressed());
 
 	if (!_vm->mouseButtonPressed()) {
@@ -814,7 +814,7 @@
 	}
 
 	if (releasedButton) {
-		setLoad(_loadPanel.currentButton); 
+		setLoad(_loadPanel.currentButton);
 	}
 }
 
@@ -833,7 +833,7 @@
 void Interface::setLoad(PanelButton *panelButton) {
 	_loadPanel.currentButton = NULL;
 	switch (panelButton->id) {
-		case kTextOK:			
+		case kTextOK:
 			setMode(kPanelMain);
 			break;
 	}
@@ -863,7 +863,7 @@
 		if (_statusTextInputPos >= STATUS_TEXT_INPUT_MAX) {
 			break;
 		}
-		if (((ascii >= 'a') && (ascii <='z')) || 
+		if (((ascii >= 'a') && (ascii <='z')) ||
 			((ascii >= '0') && (ascii <='9')) ||
 			((ascii >= 'A') && (ascii <='Z')) ||
 			(ascii == ' ')) {
@@ -897,7 +897,7 @@
 	case 127: // del
 		if (_textInputPos <= _textInputStringLength) {
 			if (_textInputPos != 1) {
-				strncpy(tempString, _textInputString, _textInputPos - 1);							
+				strncpy(tempString, _textInputString, _textInputPos - 1);
 			}
 			if (_textInputPos != _textInputStringLength) {
 				strncat(tempString, &_textInputString[_textInputPos], _textInputStringLength - _textInputPos);
@@ -917,7 +917,7 @@
 		}
 		break;
 	default:
-		if (((ascii >= 'a') && (ascii <='z')) || 
+		if (((ascii >= 'a') && (ascii <='z')) ||
 			((ascii >= '0') && (ascii <='9')) ||
 			((ascii >= 'A') && (ascii <='Z')) ||
 			(ascii == ' ')) {
@@ -938,7 +938,7 @@
 				if ((_textInputStringLength != 0) && (_textInputPos != _textInputStringLength)) {
 					strncat(tempString, &_textInputString[_textInputPos - 1], _textInputStringLength - _textInputPos + 1);
 				}
-				
+
 				strcpy(_textInputString, tempString);
 				_textInputStringLength = strlen(_textInputString);
 				_textInputPos++;
@@ -959,23 +959,23 @@
 	ch[1] = 0;
 	panel->calcPanelButtonRect(panelButton, rect);
 	drawButtonBox(ds, rect, kEdit, _textInput);
-	rect.left += 4; 
+	rect.left += 4;
 	rect.top += 4;
 	rect.setHeight(_vm->_font->getHeight(kSmallFont));
 
-	i = 0;	
+	i = 0;
 	while ((ch[0] = _textInputString[i++]) != 0) {
 		rect.setWidth(_vm->_font->getStringWidth(kSmallFont, ch, 0, kFontNormal));
 		if ((i == _textInputPos) && _textInput) {
-			fgColor = kITEColorBlack;	
+			fgColor = kITEColorBlack;
 			ds->fillRect(rect, kITEColorWhite);
 		} else {
-			fgColor = kITEColorWhite;	
+			fgColor = kITEColorWhite;
 		}
 		textPoint.x = rect.left;
 		textPoint.y = rect.top + 1;
 
-		_vm->_font->textDraw(kSmallFont, ds, ch, textPoint, fgColor, 0, kFontNormal); 
+		_vm->_font->textDraw(kSmallFont, ds, ch, textPoint, fgColor, 0, kFontNormal);
 		rect.left += rect.width();
 	}
 	if (_textInput && (_textInputPos >= i)) {
@@ -995,14 +995,14 @@
 
 	_savePanel.getRect(rect);
 	drawButtonBox(backBuffer, rect, kButton, false);
-	for (i = 0; i < _savePanel.buttonsCount; i++) {		
+	for (i = 0; i < _savePanel.buttonsCount; i++) {
 		panelButton = &_savePanel.buttons[i];
 		if (panelButton->type == kPanelButtonSave) {
 			drawPanelButtonText(backBuffer, &_savePanel, panelButton);
-		}		
+		}
 		if (panelButton->type == kPanelButtonSaveText) {
 			drawPanelText(backBuffer, &_savePanel, panelButton);
-		}		
+		}
 	}
 
 	drawTextInput(backBuffer, &_savePanel, _saveEdit);
@@ -1011,11 +1011,11 @@
 void Interface::handleSaveUpdate(const Point& mousePoint) {
 	bool releasedButton;
 
-	_savePanel.currentButton = saveHitTest(mousePoint);	
+	_savePanel.currentButton = saveHitTest(mousePoint);
 
 	validateSaveButtons();
 
-	releasedButton = (_savePanel.currentButton != NULL) && 
+	releasedButton = (_savePanel.currentButton != NULL) &&
 		(_savePanel.currentButton->state > 0) && (!_vm->mouseButtonPressed());
 
 	if (!_vm->mouseButtonPressed()) {
@@ -1023,17 +1023,17 @@
 	}
 
 	if (releasedButton) {
-		setSave(_savePanel.currentButton); 
+		setSave(_savePanel.currentButton);
 	}
 }
 
 void Interface::handleSaveClick(const Point& mousePoint) {
 	_savePanel.currentButton = saveHitTest(mousePoint);
-	
+
 	validateSaveButtons();
 
-	_savePanel.zeroAllButtonState();	
-	
+	_savePanel.zeroAllButtonState();
+
 	if (_savePanel.currentButton == NULL) {
 		_textInput = false;
 		return;
@@ -1079,11 +1079,11 @@
 
 void Interface::handleOptionUpdate(const Point& mousePoint) {
 	int16 mouseY;
-	Rect rect;	
+	Rect rect;
 	int totalFiles = _vm->getSaveFilesCount();
-	int visibleFiles = _vm->getDisplayInfo().optionSaveFileVisible; 
+	int visibleFiles = _vm->getDisplayInfo().optionSaveFileVisible;
 	bool releasedButton;
-	
+
 	if (_vm->mouseButtonPressed()) {
 		if (_optionSaveFileSlider->state > 0) {
 			_optionPanel.calcPanelButtonRect(_optionSaveFileSlider, rect);
@@ -1102,7 +1102,7 @@
 		}
 	}
 
-	_optionPanel.currentButton = optionHitTest(mousePoint);	
+	_optionPanel.currentButton = optionHitTest(mousePoint);
 
 	validateOptionButtons();
 
@@ -1113,7 +1113,7 @@
 	}
 
 	if (releasedButton) {
-		setOption(_optionPanel.currentButton); 
+		setOption(_optionPanel.currentButton);
 	}
 }
 
@@ -1129,8 +1129,8 @@
 	if (_optionPanel.currentButton == NULL) {
 		return;
 	}
-	
-	if (_optionPanel.currentButton == _optionSaveFileSlider) {		
+
+	if (_optionPanel.currentButton == _optionSaveFileSlider) {
 		if ((_optionSaveRectTop.height() > 0) && (mousePoint.y < _optionSaveRectTop.bottom)) {
 			_optionSaveFileTop -= _vm->getDisplayInfo().optionSaveFileVisible;
 		} else {
@@ -1150,7 +1150,7 @@
 		if (_optionPanel.currentButton == _optionSaveFilePanel) {
 			_optionPanel.calcPanelButtonRect(_optionSaveFilePanel, rect);
 			_optionSaveFileTitleNumber = (mousePoint.y - rect.top) / (_vm->_font->getHeight(kSmallFont) + 1);
-			
+
 			if (_optionSaveFileTitleNumber >= _vm->getDisplayInfo().optionSaveFileVisible) {
 				_optionSaveFileTitleNumber = _vm->getDisplayInfo().optionSaveFileVisible - 1;
 			}
@@ -1175,7 +1175,7 @@
 		case kTextQuitGame:
 			setMode(kPanelQuit);
 			break;
-		case kTextLoad:			
+		case kTextLoad:
 			if (_vm->getSaveFilesCount() > 0) {
 				if (_vm->isSaveListFull() || (_optionSaveFileTitleNumber > 0)) {
 					fileName = _vm->calcSaveFileName(_vm->getSaveFile(_optionSaveFileTitleNumber)->slotNumber);
@@ -1196,7 +1196,7 @@
 }
 
 void Interface::update(const Point& mousePoint, int updateFlag) {
-	
+
 	if (_vm->_scene->isInDemo() || _fadeMode == kFadeOut || !_active) {
 		return;
 	}
@@ -1224,7 +1224,7 @@
 
 			if (updateFlag & UPDATE_MOUSECLICK) {
 				if (mousePoint.y < _vm->getSceneHeight()) {
-					_vm->_script->playfieldClick(mousePoint, (updateFlag & UPDATE_LEFTBUTTONCLICK) != 0);										
+					_vm->_script->playfieldClick(mousePoint, (updateFlag & UPDATE_LEFTBUTTONCLICK) != 0);
 				} else {
 					handleMainClick(mousePoint);
 				}
@@ -1368,10 +1368,10 @@
 	if (_saveReminderState > 0) {
 		rect.left = _vm->getDisplayInfo().saveReminderXOffset;
 		rect.top = _vm->getDisplayInfo().saveReminderYOffset;
-	
+
 		rect.right = rect.left + _vm->getDisplayInfo().saveReminderWidth;
 		rect.bottom = rect.top + _vm->getDisplayInfo().saveReminderHeight;
-		_vm->_sprite->draw(backBuffer, _vm->getDisplayClip(),  _vm->_sprite->_mainSprites, 
+		_vm->_sprite->draw(backBuffer, _vm->getDisplayClip(),  _vm->_sprite->_mainSprites,
 			_saveReminderState == 1 ? _vm->getDisplayInfo().saveReminderFirstSpriteNumber : _vm->getDisplayInfo().saveReminderSecondSpriteNumber,
 			rect, 256);
 
@@ -1404,7 +1404,7 @@
 				_vm->_actor->_protagonist->currentAction = kActionWait;
 				_vm->_script->doVerb();
 			}
-		}		
+		}
 	} else {
 		if (_saveReminderState > 0) {
 			Rect rect;
@@ -1431,10 +1431,10 @@
 			}
 		}
 		if (panelButton) {
-			setVerbState(panelButton->id, 1);			
+			setVerbState(panelButton->id, 1);
 		}
 	}
-	
+
 	if (panelButton) {
 		_mainPanel.currentButton = panelButton;
 		return;
@@ -1449,7 +1449,7 @@
 	}
 
 	panelButton = _mainPanel.hitTest(mousePoint, kPanelAllButtons);
-	
+
 	bool changed = false;
 
 	if ((panelButton != NULL) && (panelButton->type == kPanelButtonArrow)) {
@@ -1459,14 +1459,14 @@
 		}
 		changed = true;
 	} else {
-		_vm->_script->whichObject(mousePoint);	
+		_vm->_script->whichObject(mousePoint);
 	}
 
 	changed = changed || (panelButton != _mainPanel.currentButton);
 	_mainPanel.currentButton = panelButton;
 	if (changed) {
 		draw();
-	}		
+	}
 
 }
 
@@ -1483,7 +1483,7 @@
 	_inventoryBox = key - '1';
 	_inventoryPos = _inventoryStart + _inventoryBox;
 	if (_inventoryPos >= _inventoryCount)
-		_inventoryPos = -1;	
+		_inventoryPos = -1;
 }
 
 void Interface::updateInventory(int pos) {
@@ -1498,18 +1498,18 @@
 	if (_inventoryStart < 0) {
 		_inventoryStart = 0;
 	}
-	
+
 	_inventoryEnd = (_inventoryCount - 1  - cols) / cols * cols;
 	if (_inventoryEnd < 0) {
 		_inventoryEnd = 0;
-	}	
+	}
 }
 
 void Interface::addToInventory(int objectId) {
 	if (_inventoryCount >= _inventorySize) {
 		return;
 	}
-		
+
 	for (int i = _inventoryCount; i > 0; i--) {
 		_inventory[i] = _inventory[i - 1];
 	}
@@ -1565,10 +1565,10 @@
 	ObjectData *obj;
 	ci = _inventoryStart;
 	if (_inventoryStart != 0) {
-		drawPanelButtonArrow(backBuffer, &_mainPanel, _inventoryUpButton);		
+		drawPanelButtonArrow(backBuffer, &_mainPanel, _inventoryUpButton);
 	}
 	if (_inventoryStart != _inventoryEnd) {
-		drawPanelButtonArrow(backBuffer, &_mainPanel, _inventoryDownButton);		
+		drawPanelButtonArrow(backBuffer, &_mainPanel, _inventoryDownButton);
 	}
 
 	for (i = 0; i < _mainPanel.buttonsCount; i++) {
@@ -1579,12 +1579,12 @@
 
 		// TODO: Different colour for IHNM, probably.
 		backBuffer->drawRect(rect, kITEColorDarkGrey);
-		
+
 		if (ci < _inventoryCount) {
 			obj = _vm->_actor->getObj(_inventory[ci]);
 			_vm->_sprite->draw(backBuffer, _vm->getDisplayClip(), _vm->_sprite->_mainSprites, obj->spriteListResourceId, rect, 256);
 		}
-		
+
 		ci++;
 	}
 }
@@ -1593,12 +1593,12 @@
 	PanelButton * panelButton = getPanelButtonByVerbType(verb);
 	if (state == 2) {
 		state = (_mainPanel.currentButton == panelButton) ? 1 : 0;
-	} 
+	}
 	panelButton->state = state;
 	draw();
 }
 
-void Interface::drawButtonBox(Surface *ds, const Rect& rect, ButtonKind kind, bool down) {	
+void Interface::drawButtonBox(Surface *ds, const Rect& rect, ButtonKind kind, bool down) {
 	byte cornerColor;
 	byte frameColor;
 	byte fillColor;
@@ -1705,13 +1705,13 @@
 	switch(panelButton->id) {
 		case kTextReadingSpeed:
 			textId = kTextFast;
-			break;			
+			break;
 		case kTextMusic:
 			textId = kTextOn;
-			break;			
+			break;
 		case kTextSound:
 			textId = kTextOn;
-			break;			
+			break;
 	}
 	text = _vm->getTextString(textId);
 
@@ -1730,7 +1730,7 @@
 	panel->calcPanelButtonRect(panelButton, rect);
 	drawButtonBox(ds, rect, kButton, panelButton->state > 0);
 
-	_vm->_font->textDraw(kMediumFont, ds, text, point, 
+	_vm->_font->textDraw(kMediumFont, ds, text, point,
 		textColor, _vm->getDisplayInfo().verbTextShadowColor, kFontShadow);
 }
 
@@ -1747,7 +1747,7 @@
 	} else {
 		spriteNumber = panelButton->upSpriteNumber;
 	}
-		
+
 	point.x = panel->x + panelButton->xOffset;
 	point.y = panel->y + panelButton->yOffset;
 
@@ -1759,14 +1759,14 @@
 	int textWidth;
 	Point point;
 	int textId;
-	
+
 	textId = verbTypeToTextStringsIdLUT[panelButton->id];
-	
+
 	if (textId == -1)
 		error("textId == -1");
 
 	text = _vm->getTextString(textId);
-	
+
 	textWidth = _vm->_font->getStringWidth(kSmallFont, text, 0, kFontNormal);
 
 	point.x = _mainPanel.x + panelButton->xOffset + 1 + (panelButton->width - 1 - textWidth) / 2;
@@ -1774,7 +1774,7 @@
 
 	_vm->_font->textDraw(kSmallFont, ds, text, point, textColor, textShadowColor, (textShadowColor != 0) ? kFontShadow : kFontNormal);
 }
-	
+
 
 // Converse stuff
 void Interface::converseInit(void) {
@@ -1820,7 +1820,7 @@
 
 			if ((c == ' ' || c == '\0') && (_vm->_font->getStringWidth(kSmallFont, _converseWorkString, i, kFontNormal) <= CONVERSE_MAX_TEXT_WIDTH)) {
 				break;
-			}				
+			}
 		}
 		if (i < 0) {
 			return true;
@@ -1843,7 +1843,7 @@
 		_converseTextCount++;
 		count++;
 
-		if (len == i) 
+		if (len == i)
 			break;
 
 		strncpy(_converseWorkString, &_converseWorkString[i + 1], len - i);
@@ -1855,7 +1855,7 @@
 }
 
 void Interface::converseDisplayText() {
-	int end;	
+	int end;
 
 	_converseStartPos = 0;
 
@@ -1887,21 +1887,21 @@
 	byte bulletBackgnd;
 	const char *str;
 	char bullet[2] = {
-		(char)0xb7, 0 
+		(char)0xb7, 0
 	};
 	Rect rect(8, CONVERSE_TEXT_LINES * CONVERSE_TEXT_HEIGHT);
 	Point textPoint;
-	
+
 	assert(_conversePanel.buttonsCount >= 6);
 
 	bulletForegnd = kITEColorGreen;
 	bulletBackgnd = kITEColorBlack;
-	
-	rect.moveTo(_conversePanel.x + _conversePanel.buttons[0].xOffset, 
+
+	rect.moveTo(_conversePanel.x + _conversePanel.buttons[0].xOffset,
 		_conversePanel.y + _conversePanel.buttons[0].yOffset);
 
 	ds->drawRect(rect, kITEColorDarkGrey); //fill bullet place
-	
+
 	for (int i = 0; i < CONVERSE_TEXT_LINES; i++) {
 		relPos = _converseStartPos + i;
 
@@ -1975,7 +1975,7 @@
 	bool changed;
 
 	PanelButton *last = _conversePanel.currentButton;
-	
+
 	if (!_vm->mouseButtonPressed()) {			// remove pressed flag
 		if (_converseUpButton) {
 			_converseUpButton->state = 0;
@@ -1985,7 +1985,7 @@
 
 	_conversePanel.currentButton = converseHitTest(mousePoint);
 	changed = last != _conversePanel.currentButton;
-	
+
 
 	if (_conversePanel.currentButton == NULL) {
 		_conversePos = -1;
@@ -1998,14 +1998,14 @@
 	if (_conversePanel.currentButton->type == kPanelButtonConverseText) {
 		converseSetTextLines(_conversePanel.currentButton->id);
 	}
-	
+
 	if (_conversePanel.currentButton->type == kPanelButtonArrow) {
 		if (_conversePanel.currentButton->state == 1) {
 			//TODO: insert timeout catchup
 			converseChangePos(_conversePanel.currentButton->id);
 		}
 		draw();
-	}	
+	}
 }
 
 
@@ -2023,7 +2023,7 @@
 	if (_conversePanel.currentButton->type == kPanelButtonArrow) {
 		_conversePanel.currentButton->state = 1;
 		converseChangePos(_conversePanel.currentButton->id);
-	}	
+	}
 
 }
 
@@ -2041,7 +2041,7 @@
 	for (int i = 0; i < _inventoryCount; i++) {
 		_inventory[i] = in->readUint16LE();
 	}
-	
+
 	updateInventory(0);
 }
 
@@ -2083,7 +2083,7 @@
 	for (i = 0; i < PAL_ENTRIES; i++) {
 		cPal[i].red = *pal++;
 		cPal[i].green = *pal++;
-		cPal[i].blue = *pal++;	
+		cPal[i].blue = *pal++;
 	}
 
 	rect.setWidth(imageWidth);

Index: isomap.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/isomap.cpp,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- isomap.cpp	19 Jul 2005 19:05:45 -0000	1.57
+++ isomap.cpp	29 Jul 2005 17:57:41 -0000	1.58
@@ -113,7 +113,7 @@
 	_tileData = (byte*)malloc(resourceLength);
 	_tileDataLength = resourceLength;
 	memcpy(_tileData, resourcePointer, resourceLength);
-	
+
 	MemoryReadStreamEndian readS(_tileData, _tileDataLength, _vm->isBigEndian());
 	readS.readUint16(); // skip
 	_tilesCount = readS.readUint16();
@@ -244,7 +244,7 @@
 		multiTileEntryData->currentState = readS.readByte();
 		readS.readByte();//skip
 	}
-	
+
 	offsetDiff = (readS.pos() - 2);
 
 	for (i = 0; i < _multiCount; i++) {
@@ -281,7 +281,7 @@
 	Point playerPoint;
 	Point minScrollPos;
 	Point maxScrollPos;
-	
+
 
 	tileCoordsToScreenPoint(_vm->_actor->_centerActor->location, playerPoint);
 
@@ -348,16 +348,16 @@
 	rv = (tileIndex >> 11) & 0x03;
 	mu = absU - ru;
 	mv = absV - rv;
-	
+
 	tileIndex = 0;
 	for (i = 0; i < _multiCount; i++) {
 		multiTileEntryData = &_multiTable[i];
 
-		if ((multiTileEntryData->u == mu) && 
-			(multiTileEntryData->v == mv) && 
+		if ((multiTileEntryData->u == mu) &&
+			(multiTileEntryData->v == mv) &&
 			(multiTileEntryData->h == absH)) {
 			state = multiTileEntryData->currentState;
-			
+
 			offset = (ru + state * multiTileEntryData->uSize) * multiTileEntryData->vSize + rv;
 			offset *= sizeof(*_multiTableData);
 			offset += multiTileEntryData->offset;
@@ -373,12 +373,12 @@
 			return tileIndex;
 		}
 	}
-		
+
 	return 1;
 }
 
 void IsoMap::draw(Surface *ds) {
-	
+
 	_tileClip = _vm->_scene->getSceneClip();
 	ds->drawRect(_tileClip, 0);
 	drawTiles(ds, NULL);
@@ -432,7 +432,7 @@
 	Point tileScroll;
 	Point metaTileY;
 	Point metaTileX;
-	int16 u0, v0, 
+	int16 u0, v0,
 		  u1, v1,
 		  u2, v2,
 		  uc, vc;
@@ -452,7 +452,7 @@
 
 	u0 = ((view1.y + 64) * 2 + view1.x) >> 4;
 	v0 = ((view1.y + 64) * 2 - view1.x) >> 4;
-	
+
 	metaTileY.x = (u0 - v0) * 128 - (view1.x * 16 + fineScroll.x);
 	metaTileY.y = (view1.y * 16 - fineScroll.y) - (u0 + v0) * 64;
 
@@ -467,15 +467,15 @@
 			uc = u2 & (SAGA_TILEMAP_W - 1);
 			vc = v2 & (SAGA_TILEMAP_W - 1);
 
-			if (uc != u2 || vc != v2) {					
+			if (uc != u2 || vc != v2) {
 				metaTileIndex = 0;
-				switch ( _tileMap.edgeType) {				
-				case kEdgeTypeBlack: 
+				switch ( _tileMap.edgeType) {
+				case kEdgeTypeBlack:
 					continue;
-				case kEdgeTypeFill0: 
+				case kEdgeTypeFill0:
 					break;
 				case kEdgeTypeFill1:
-					metaTileIndex = 1; 
+					metaTileIndex = 1;
 					break;
 				case kEdgeTypeRpt:
 					uc = clamp( 0, u2, SAGA_TILEMAP_W - 1);
@@ -513,13 +513,13 @@
 
 			if (uc != u2 || vc != v2) {
 				metaTileIndex = 0;
-				switch ( _tileMap.edgeType) {				
-				case kEdgeTypeBlack: 
+				switch ( _tileMap.edgeType) {
+				case kEdgeTypeBlack:
 					continue;
-				case kEdgeTypeFill0: 
+				case kEdgeTypeFill0:
 					break;
 				case kEdgeTypeFill1:
-					metaTileIndex = 1; 
+					metaTileIndex = 1;
 					break;
 				case kEdgeTypeRpt:
 					uc = clamp( 0, u2, SAGA_TILEMAP_W - 1);
@@ -572,7 +572,7 @@
 		if (platformIndex >= 0) {
 			drawSpritePlatform( ds, platformIndex, platformPoint, location, absU, absV, high );
 		}
-	}	
+	}
 }
 
 void IsoMap::drawMetaTile(Surface *ds, uint16 metaTileIndex, const Point &point, int16 absU, int16 absV) {
@@ -599,7 +599,7 @@
 		if (platformIndex >= 0) {
 			drawPlatform( ds, platformIndex, platformPoint, absU, absV, high );
 		}
-	}	
+	}
 }
 
 void IsoMap::drawSpritePlatform(Surface *ds, uint16 platformIndex, const Point &point, const Location &location, int16 absU, int16 absV, int16 absH) {
@@ -639,8 +639,8 @@
 		s = s0;
 
 		for (u = SAGA_PLATFORM_W - 1,
-			copyLocation.u() = location.u() - ((SAGA_PLATFORM_W - 1) << 4); 
-			 u >= 0 && s.x + 32 > _tileClip.left && s.y - SAGA_MAX_TILE_H < _tileClip.bottom; 
+			copyLocation.u() = location.u() - ((SAGA_PLATFORM_W - 1) << 4);
+			 u >= 0 && s.x + 32 > _tileClip.left && s.y - SAGA_MAX_TILE_H < _tileClip.bottom;
 			 u--, copyLocation.u() += 16, s.x -= 16, s.y += 8 ) {
 			if (s.x < _tileClip.right && s.y > _tileClip.top) {
 
@@ -673,7 +673,7 @@
 	if ((point.y <= _tileClip.top) || (point.y - SAGA_MAX_TILE_H - SAGA_PLATFORM_W * SAGA_TILE_NOMINAL_H >= _tileClip.bottom)) {
 		return;
 	}
-		
+
 	s0 = point;
 	s0.y -= (((SAGA_PLATFORM_W - 1) + (SAGA_PLATFORM_W - 1)) * 8);
 
@@ -695,7 +695,7 @@
 			u >= 0 && s.x + 32 > _tileClip.left && s.y - SAGA_MAX_TILE_H < _tileClip.bottom;
 			u--, s.x -= 16, s.y += 8 ) {
 			if (s.x < _tileClip.right && s.y > _tileClip.top) {
-				
+
 				tileIndex = tilePlatform->tiles[u][v];
 				if (tileIndex > 1) {
 					if (tileIndex & SAGA_MULTI_TILE) {
@@ -774,17 +774,17 @@
 					break;
 				case kMaskRuleUMIN:
 					if (location->u() < THRESH0) {
-						return; 
+						return;
 					}
 					break;
-				case kMaskRuleUMID:	
+				case kMaskRuleUMID:
 					if (location->u() < THRESH8) {
 						return;
 					}
 					break;
 				case kMaskRuleUMAX:
 					if (location->u() < THRESH16) {
-						return; 
+						return;
 					}
 					break;
 				case kMaskRuleVMIN:
@@ -794,12 +794,12 @@
 					break;
 				case kMaskRuleVMID:
 					if (location->v() < THRESH8) {
-						return; 
+						return;
 					}
 					break;
 				case kMaskRuleVMAX:
 					if (location->v() < THRESH16) {
-						return; 
+						return;
 					}
 					break;
 				case kMaskRuleYMIN:
@@ -860,7 +860,7 @@
 				col += bgRunCount;
 				fgRunCount = *readPointer++;
 				widthCount += fgRunCount;
-				
+
 				count = 0;
 				while ((col < _tileClip.left) && (count < fgRunCount)) {
 					count++;
@@ -887,7 +887,7 @@
 
 				fgRunCount = *readPointer++;
 				widthCount += fgRunCount;
-				
+
 				readPointer += fgRunCount;
 			}
 		}
@@ -897,11 +897,11 @@
 
 bool IsoMap::checkDragonPoint(int16 u, int16 v, uint16 direction) {
 	DragonPathCell *pathCell;
-	
+
 	if ((u < 1) || (u >= SAGA_DRAGON_SEARCH_DIAMETER - 1) || (v < 1) || (v >= SAGA_DRAGON_SEARCH_DIAMETER - 1)) {
 			return false;
 	}
-		
+
 	pathCell = _dragonSearchArray.getPathCell(u, v);
 
 	if (pathCell->visited) {
@@ -916,11 +916,11 @@
 void IsoMap::pushDragonPoint(int16 u, int16 v, uint16 direction) {
 	DragonTilePoint *tilePoint;
 	DragonPathCell *pathCell;
-	
+
 	if ((u < 1) || (u >= SAGA_DRAGON_SEARCH_DIAMETER - 1) || (v < 1) || (v >= SAGA_DRAGON_SEARCH_DIAMETER - 1)) {
 			return;
 	}
-		
+
 	pathCell = _dragonSearchArray.getPathCell(u, v);
 
 	if (pathCell->visited) {
@@ -947,14 +947,14 @@
 	int16 mid;
 	TilePoint *tilePoint;
 	PathCell *pathCell;
-	
+
 	upper = _queueCount;
 	lower = 0;
 
 	if ((u < 1) || (u >= SAGA_SEARCH_DIAMETER - 1) || (v < 1) || (v >= SAGA_SEARCH_DIAMETER - 1)) {
 			return;
 	}
-		
+
 	pathCell = _searchArray.getPathCell(u, v);
 
 	if ((pathCell->visited) && (pathCell->cost <= cost)) {
@@ -1015,12 +1015,12 @@
 	if ((uc != mtileU) || (vc != mtileV)) {
 		metaTileIndex = 0;
 		switch ( _tileMap.edgeType) {
-		case kEdgeTypeBlack: 
+		case kEdgeTypeBlack:
 			return 0;
-		case kEdgeTypeFill0: 
+		case kEdgeTypeFill0:
 			break;
 		case kEdgeTypeFill1:
-			metaTileIndex = 1; 
+			metaTileIndex = 1;
 			break;
 		case kEdgeTypeRpt:
 			uc = clamp( 0, mtileU, SAGA_TILEMAP_W - 1);
@@ -1099,7 +1099,7 @@
 	}
 
 #define TEST_TILE_END	}
-	
+
 	TEST_TILE_PROLOG(0, 0)
 		if (skipCenter) {
 			if ((mask & 0x0660) && (fgdMask & SAGA_IMPASSABLE)) {
@@ -1109,7 +1109,7 @@
 				bgdMask = 0;
 			}
 		}
-		
+
 		FILL_MASK(0, 0xcc00)
 		FILL_MASK(1, 0x6600)
 		FILL_MASK(2, 0x3300)
@@ -1203,7 +1203,7 @@
 		u = (actor->location.u() >> 4) - uBase;
 		v = (actor->location.v() >> 4) - vBase;
 		if ((u >= 0) && (u < SAGA_SEARCH_DIAMETER) &&
-			(v >= 0) && (v < SAGA_SEARCH_DIAMETER) && 
+			(v >= 0) && (v < SAGA_SEARCH_DIAMETER) &&
 			((u != SAGA_SEARCH_CENTER) || (v != SAGA_SEARCH_CENTER))) {
 			_searchArray.getPathCell(u, v)->visited = 1;
 		}
@@ -1212,7 +1212,7 @@
 	_queueCount = 0;
 	pushPoint(SAGA_SEARCH_CENTER, SAGA_SEARCH_CENTER, 0, 0);
 
-	while (_queueCount > 0) {	
+	while (_queueCount > 0) {
 
 		_queueCount--;
 		tilePoint = *_searchArray.getQueue(_queueCount);
@@ -1366,7 +1366,7 @@
 
 	for (u = 0; u < SAGA_DRAGON_SEARCH_CENTER; u++) {
 		for (v = 0; v < SAGA_DRAGON_SEARCH_CENTER; v++) {
-			
+
 			pcell = _dragonSearchArray.getPathCell(u, v);
 
 			u1 = uBase + u;
@@ -1403,7 +1403,7 @@
 
 
 		dist = ABS(tilePoint->u - uFinish) + ABS(tilePoint->v - vFinish);
-		
+
 		if (dist < bestDistance) {
 
 			bestU = tilePoint->u;
@@ -1522,7 +1522,7 @@
 
 	memset( &_searchArray, 0, sizeof(_searchArray));
 
-	if (!(actor->actorFlags & kActorNoCollide) && 
+	if (!(actor->actorFlags & kActorNoCollide) &&
 		(_vm->_scene->currentSceneResourceId() != RID_ITE_OVERMAP_SCENE)) {
 			for (i = 0; i < _vm->_actor->_actorsCount; i++) {
 				other = _vm->_actor->_actors[i];
@@ -1532,7 +1532,7 @@
 				u = (other->location.u() >> 4) - uBase;
 				v = (other->location.v() >> 4) - vBase;
 				if ((u >= 1) && (u < SAGA_SEARCH_DIAMETER) &&
-					(v >= 1) && (v < SAGA_SEARCH_DIAMETER) && 
+					(v >= 1) && (v < SAGA_SEARCH_DIAMETER) &&
 					((u != SAGA_SEARCH_CENTER) || (v != SAGA_SEARCH_CENTER))) {
 						_searchArray.getPathCell(u, v)->visited = 1;
 					}
@@ -1543,7 +1543,7 @@
 	pushPoint(SAGA_SEARCH_CENTER, SAGA_SEARCH_CENTER, 0, 0);
 
 
-	while (_queueCount > 0) {	
+	while (_queueCount > 0) {
 
 		_queueCount--;
 		tilePoint = *_searchArray.getQueue(_queueCount);
@@ -1562,7 +1562,7 @@
 			}
 		}
 
-		testPossibleDirections(uBase + tilePoint.u, vBase + tilePoint.v, terraComp, 
+		testPossibleDirections(uBase + tilePoint.u, vBase + tilePoint.v, terraComp,
 			(tilePoint.u == SAGA_SEARCH_CENTER && tilePoint.v == SAGA_SEARCH_CENTER));
 
 		for (dir = 0; dir < 8; dir++) {
@@ -1620,7 +1620,7 @@
 	if ((doorNumber < 0) || (doorNumber >= _multiCount)) {
 		error("setTileDoorState: doorNumber >= _multiCount");
 	}
-	
+
 	multiTileEntryData = &_multiTable[doorNumber];
 	multiTileEntryData->currentState = doorState;
 }

Index: ite_introproc.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/ite_introproc.cpp,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- ite_introproc.cpp	19 Jul 2005 19:05:45 -0000	1.60
+++ ite_introproc.cpp	29 Jul 2005 17:57:41 -0000	1.61
@@ -581,7 +581,7 @@
 	};
 
 	int n_dialogues = ARRAYSIZE(dialogue[lang]);
- 
+
 	switch (param) {
 	case SCENE_BEGIN:
 		// Start 'dissolve' transition to new scene background
@@ -674,7 +674,7 @@
 	};
 
 	int n_dialogues = ARRAYSIZE(dialogue[lang]);
- 
+
 	switch (param) {
 	case SCENE_BEGIN:
 		// Start 'dissolve' transition to new scene background
@@ -741,7 +741,7 @@
 
 	switch (param) {
 	case SCENE_BEGIN:
-		// Begin title screen background animation 
+		// Begin title screen background animation
 		_vm->_anim->setCycles(0, -1);
 
 		event.type = ONESHOT_EVENT;
@@ -761,7 +761,7 @@
 		event.param2 = MUSIC_NORMAL;
 		event.op = EVENT_PLAY;
 		event.time = 0;
-		
+
 		q_event = _vm->_events->chain(q_event, &event);
 
 		// Pause animation before logo
@@ -875,7 +875,7 @@
 
 		q_event = _vm->_events->queue(&event);
 
-		// Begin title screen background animation 
+		// Begin title screen background animation
 		_vm->_anim->setFrameTime(0, 100);
 
 		event.type = ONESHOT_EVENT;
@@ -953,7 +953,7 @@
 
 		q_event = _vm->_events->queue(&event);
 
-		// Begin title screen background animation 
+		// Begin title screen background animation
 		_vm->_anim->setCycles(0, -1);
 
 		event.type = ONESHOT_EVENT;

Index: itedata.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/itedata.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- itedata.cpp	17 Jun 2005 14:09:06 -0000	1.3
+++ itedata.cpp	29 Jul 2005 17:57:59 -0000	1.4
@@ -28,11 +28,11 @@
 namespace Saga {
 
 ActorTableData ITE_ActorTable[ITE_ACTORCOUNT] = {
-	// Original used so called permanent actors for first three and that was designed by 
-	// EXTENDED object flag. They contained frames in more than one resource. We use 
+	// Original used so called permanent actors for first three and that was designed by
+	// EXTENDED object flag. They contained frames in more than one resource. We use
 	// different technique here see "Apppending to sprite list" in loadActorResources()
 
-//       flags     name scene    x     y    z  spr  frm scp  col 
+//       flags     name scene    x     y    z  spr  frm scp  col
 //    ------------ ---- ----  ---- ----- ---- ---- ---- --- ---- -- -- --
 	{ kProtagonist | kExtended,
 					 0,   1,    0,    0,   0,  37, 135,  0,   1,  0, 0, 0},	// map party

Index: music.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/music.cpp,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- music.cpp	26 Jul 2005 19:40:57 -0000	1.61
+++ music.cpp	29 Jul 2005 17:57:59 -0000	1.62
@@ -71,10 +71,10 @@
 
 RAWInputStream::RAWInputStream(SagaEngine *vm, ResourceContext *context, uint32 resourceId, bool looping)
 	: _context(context), _finished(false), _looping(looping), _bufferEnd(_buf + BUFFER_SIZE) {
-	
+
 	ResourceData * resourceData;
 
-	resourceData = vm->_resource->getResourceData(context, resourceId);	
+	resourceData = vm->_resource->getResourceData(context, resourceId);
 	_file = context->getFile(resourceData);
 	_musicInfo = vm->getMusicInfo();
 
@@ -112,7 +112,7 @@
 
 	uint32 lengthLeft;
 	byte *ptr = (byte *) _buf;
-	
+
 
 	_file->seek(_filePos, SEEK_SET);
 
@@ -127,12 +127,12 @@
 		if (len & 1)
 			len--;
 
-		if (_context->isBigEndian) {			
+		if (_context->isBigEndian) {
 			uint16 *ptr16 = (uint16 *)ptr;
 			for (uint32 i = 0; i < (len / 2); i++)
 				ptr16[i] = TO_BE_16(ptr16[i]);
 		}
-			
+
 		lengthLeft -= len;
 		ptr += len;
 
@@ -309,7 +309,7 @@
 
 void Music::musicVolumeGaugeCallback(void *refCon) {
 	((Music *)refCon)->musicVolumeGauge();
-}                                                                               
+}
 
 void Music::musicVolumeGauge() {
 	int volume;
@@ -411,7 +411,7 @@
 		// I've listened to music from both the FM and the GM
 		// file, and I've tentatively reached the conclusion
 		// that they are both General MIDI. My guess is that
-		// the FM file has been reorchestrated to sound better 
+		// the FM file has been reorchestrated to sound better
 		// on Adlib and other FM synths.
 		//
 		// Sev says the Adlib music does not sound like in the
@@ -440,8 +440,8 @@
 
 	_player->setGM(true);
 
-	_vm->_resource->loadResource(context, resourceId, resourceData, resourceSize); 
-	
+	_vm->_resource->loadResource(context, resourceId, resourceData, resourceSize);
+
 	if (resourceSize < 4) {
 		error("Music::play() wrong music resource size");
 	}
@@ -450,7 +450,7 @@
 		parser = xmidiParser;
 	} else {
 		if (smfParser->loadMusic(resourceData, resourceSize)) {
-			parser = smfParser;			
+			parser = smfParser;
 		} else {
 			error("Music::play() wrong music resource");
 		}

Index: objectmap.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/objectmap.cpp,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- objectmap.cpp	19 Jul 2005 19:05:46 -0000	1.43
+++ objectmap.cpp	29 Jul 2005 17:57:59 -0000	1.44
@@ -21,7 +21,7 @@
  *
  */
 
-// Object map / Object click-area module 
+// Object map / Object click-area module
 
 // Polygon Hit Test code ( HitTestPoly() ) adapted from code (C) Eric Haines
 // appearing in Graphics Gems IV, "Point in Polygon Strategies."
@@ -61,7 +61,7 @@
 	for (i = 0; i < _clickAreasCount; i++) {
 		clickArea = &_clickAreas[i];
 		clickArea->pointsCount = readStream->readUint16LE();
-		
+
 		assert(clickArea->pointsCount);
 
 		clickArea->points = (Point *)malloc(clickArea->pointsCount * sizeof(*(clickArea->points)));
@@ -113,7 +113,7 @@
 
 			if (pointsCount == 2) {
 				// Hit-test a box region
-				if ((testPoint.x >= points[0].x) && 
+				if ((testPoint.x >= points[0].x) &&
 					(testPoint.x <= points[1].x) &&
 					(testPoint.y >= points[0].y) &&
 					(testPoint.y <= points[1].y)) {
@@ -124,7 +124,7 @@
 					// Hit-test a polygon
 					if (hitTestPoly(points, pointsCount, testPoint)) {
 						return true;
-					}				
+					}
 				}
 			}
 		}
@@ -147,7 +147,7 @@
 				location.v() = clickArea->points[j].y;
 				location.z = 0;
 				vm->_isoMap->tileCoordsToScreenPoint(location, points[j]);
-			}			
+			}
 		} else {
 			points = clickArea->points;
 		}
@@ -169,7 +169,7 @@
 }
 
 
-// Loads an object map resource ( objects ( clickareas ( points ) ) ) 
+// Loads an object map resource ( objects ( clickareas ( points ) ) )
 void ObjectMap::load(const byte *resourcePointer, size_t resourceLength) {
 	int i;
 
@@ -234,11 +234,11 @@
 
 	hitZoneIndex = hitTest(pickPoint);
 
-	for (i = 0; i < _hitZoneListCount; i++) {		
+	for (i = 0; i < _hitZoneListCount; i++) {
 		_hitZoneList[i]->draw(_vm, ds, (hitZoneIndex == i) ? color2 : color);
 	}
 
-	if (hitZoneIndex != -1) {		
+	if (hitZoneIndex != -1) {
 		snprintf(txtBuf, sizeof(txtBuf), "hitZone %d", hitZoneIndex);
 		textPoint.x = 2;
 		textPoint.y = 2;

Index: puzzle.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/puzzle.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- puzzle.cpp	15 Jul 2005 15:23:19 -0000	1.12
+++ puzzle.cpp	29 Jul 2005 17:57:59 -0000	1.13
@@ -202,7 +202,7 @@
 		  Point(0, 0), Point(0, 31), Point(31, 31), Point(31, 0), Point(0, 0), Point(0, 0));
 }
 
-void Puzzle::initPieceInfo(int i, int16 curX, int16 curY, byte offX, byte offY, int16 trgX, 
+void Puzzle::initPieceInfo(int i, int16 curX, int16 curY, byte offX, byte offY, int16 trgX,
 						   int16 trgY, uint8 flag, uint8 count, Point point0, Point point1,
 						   Point point2, Point point3, Point point4, Point point5) {
 	_pieceInfo[i].curX = curX;
@@ -280,7 +280,7 @@
 	ActorData *puzzle = _vm->_actor->getActor(_vm->_actor->actorIndexToId(ITE_ACTOR_PUZZLE));
 	Surface *backBuffer = _vm->_gfx->getBackBuffer();
 
-	_vm->_sprite->draw(backBuffer, _vm->_scene->getSceneClip(), puzzle->spriteList, _puzzlePiece, 
+	_vm->_sprite->draw(backBuffer, _vm->_scene->getSceneClip(), puzzle->spriteList, _puzzlePiece,
 			   Point(_pieceInfo[_puzzlePiece].curX, _pieceInfo[_puzzlePiece].curY), 256);
 }
 
@@ -318,7 +318,7 @@
 
 		if (!_active)
 			return; // we won
- 
+
 		drawCurrentPiece();
 		_puzzlePiece = -1;
 

Index: render.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/render.cpp,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- render.cpp	29 Jul 2005 17:42:33 -0000	1.69
+++ render.cpp	29 Jul 2005 17:57:59 -0000	1.70
@@ -111,7 +111,7 @@
 	if (_flags & RF_MAP)
 		_vm->_interface->mapPanelDrawCrossHair();
 
-	if ((_vm->_interface->getMode() == kPanelOption) || 
+	if ((_vm->_interface->getMode() == kPanelOption) ||
 		(_vm->_interface->getMode() == kPanelQuit) ||
 		(_vm->_interface->getMode() == kPanelLoad) ||
 		(_vm->_interface->getMode() == kPanelSave)) {
@@ -137,7 +137,7 @@
 	// Display rendering information
 	if (_flags & RF_SHOW_FPS) {
 		sprintf(txtBuffer, "%d", _fps);
-		textPoint.x = backBufferSurface->w - _vm->_font->getStringWidth(kSmallFont, txtBuffer, 0, kFontOutline); 
+		textPoint.x = backBufferSurface->w - _vm->_font->getStringWidth(kSmallFont, txtBuffer, 0, kFontOutline);
 		textPoint.y = 2;
 
 		_vm->_font->textDraw(kSmallFont, backBufferSurface, txtBuffer, textPoint, kITEColorBrightWhite, kITEColorBlack, kFontOutline);
@@ -145,7 +145,7 @@
 
 	// Display "paused game" message, if applicable
 	if (_flags & RF_RENDERPAUSE) {
-		textPoint.x = (backBufferSurface->w - _vm->_font->getStringWidth(kBigFont, pauseString, 0, kFontOutline)) / 2; 
+		textPoint.x = (backBufferSurface->w - _vm->_font->getStringWidth(kBigFont, pauseString, 0, kFontOutline)) / 2;
 		textPoint.y = 90;
 
 		_vm->_font->textDraw(kBigFont, backBufferSurface, pauseString, textPoint, kITEColorBrightWhite, kITEColorBlack, kFontOutline);
@@ -166,7 +166,7 @@
 		backBufferSurface->drawPalette();
 	}
 
-	_system->copyRectToScreen((byte *)backBufferSurface->pixels, backBufferSurface->w, 0, 0, 
+	_system->copyRectToScreen((byte *)backBufferSurface->pixels, backBufferSurface->w, 0, 0,
 							  backBufferSurface->w, backBufferSurface->h);
 
 	_system->updateScreen();

Index: rscfile.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/rscfile.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- rscfile.cpp	26 Jul 2005 19:40:58 -0000	1.27
+++ rscfile.cpp	29 Jul 2005 17:57:59 -0000	1.28
@@ -42,7 +42,7 @@
 	size_t i;
 	int j;
 	bool result;
-	byte tableInfo[RSC_TABLEINFO_SIZE];	
+	byte tableInfo[RSC_TABLEINFO_SIZE];
 	uint32 resourceTableOffset;
 	GamePatchDescription *patchDescription;
 	ResourceData *resourceData;
@@ -52,9 +52,9 @@
 	if (!context->file->open(context->fileName)) {
 		return false;
 	}
-	
+
 	context->isBigEndian = _vm->isBigEndian();
-	
+
 	if (context->file->size() < RSC_MIN_FILESIZE) {
 		return false;
 	}
@@ -102,7 +102,7 @@
 	}
 
 	free(tableBuffer);
-	
+
 	//process patch files
 	if (result) {
 		for (j = 0; j < _vm->getGameDescription()->patchsCount; j++) {
@@ -151,7 +151,7 @@
 				break;
 			}
 		}
-		
+
 		if (!loadContext(context)) {
 			return false;
 		}
@@ -181,7 +181,7 @@
 }
 
 uint32 Resource::convertResourceId(uint32 resourceId) {
-	
+
 	if ((_vm->getGameType() ==  GType_ITE) && (_vm->getFeatures() & GF_MAC_RESOURCES)) {
 		if (resourceId > 1537) {
 			return resourceId - 2;
@@ -201,9 +201,9 @@
 	ResourceData *resourceData;
 
 	debug(8, "loadResource %d", resourceId);
-	
+
 	resourceData = getResourceData(context, resourceId);
-	
+
 	file = context->getFile(resourceData);
 
 	resourceOffset = resourceData->offset;

Index: saga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/saga.cpp,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -d -r1.121 -r1.122
--- saga.cpp	19 Jul 2005 19:05:47 -0000	1.121
+++ saga.cpp	29 Jul 2005 17:57:59 -0000	1.122
@@ -269,7 +269,7 @@
 		debug(1, "Music disabled.");
 	}
 
-	
+
 	_render = new Render(this, _system);
 	if (!_render->initialized()) {
 		return FAILURE;
@@ -294,7 +294,7 @@
 
 	_previousTicks = _system->getMillis();
 
-	if (ConfMan.hasKey("start_scene")) {		
+	if (ConfMan.hasKey("start_scene")) {
 		_scene->changeScene(ConfMan.getInt("start_scene"), 0, kTransitionNoFade);
 	}
 	else
@@ -350,7 +350,7 @@
 		_render->drawScene();
 		_system->delayMillis(10);
 	}
-	
+
 	return 0;
 }
 
@@ -358,7 +358,7 @@
 	uint16 stringsCount;
 	size_t offset;
 	int i;
-	
+
 	if (stringsLength == 0) {
 		error("SagaEngine::loadStrings() Error loading strings list resource");
 	}
@@ -366,13 +366,13 @@
 	stringsTable.stringsPointer = (byte*)malloc(stringsLength);
 	memcpy(stringsTable.stringsPointer, stringsPointer, stringsLength);
 
-	
+
 	MemoryReadStreamEndian scriptS(stringsTable.stringsPointer, stringsLength, isBigEndian()); //TODO: get endianess from context
 
 	offset = scriptS.readUint16();
 	stringsCount = offset / 2;
 	stringsTable.strings = (const char **)malloc(stringsCount * sizeof(*stringsTable.strings));
-	i = 0;	
+	i = 0;
 	scriptS.seek(0);
 	while (i < stringsCount) {
 		offset = scriptS.readUint16();
@@ -400,8 +400,8 @@
 		obj = _actor->getObj(objectId);
 		return _script->_mainStrings.getString(obj->nameIndex);
 		break;
-	case kGameObjectActor: 
-		actor = _actor->getActor(objectId);			
+	case kGameObjectActor:
+		actor = _actor->getActor(objectId);
 		return _actor->_actorsStrings.getString(actor->nameIndex);
 		break;
 	case kGameObjectHitZone:
@@ -430,20 +430,20 @@
 		textString = "I can't pick that up.";
 		soundResourceId = RID_BOAR_VOICE_007;
 		break;
-	case kVerbLookAt:	
-		textString = "I see nothing special about it."; 
+	case kVerbLookAt:
+		textString = "I see nothing special about it.";
 		soundResourceId = RID_BOAR_VOICE_006;
 		break;
-	case kVerbOpen:		
+	case kVerbOpen:
 		textString = "There's no place to open it.";
 		soundResourceId = RID_BOAR_VOICE_000;
 		break;
-	case kVerbClose:	
-		textString = "There's no opening to close."; 
+	case kVerbClose:
+		textString = "There's no opening to close.";
 		soundResourceId = RID_BOAR_VOICE_002;
 		break;
-	case kVerbUse:		
-		textString = "I don't know how to do that."; 
+	case kVerbUse:
+		textString = "I don't know how to do that.";
 		soundResourceId = RID_BOAR_VOICE_005;
 		break;
 	}

Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/saveload.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- saveload.cpp	8 Jul 2005 15:09:58 -0000	1.20
+++ saveload.cpp	29 Jul 2005 17:57:59 -0000	1.21
@@ -46,7 +46,7 @@
 	 "[New Save Game]", 0
 };
 
-//TODO: 
+//TODO:
 // - delete savegame
 
 char* SagaEngine::calcSaveFileName(uint slotNumber) {
@@ -63,7 +63,7 @@
 		return &_saveFiles[_saveFilesCount - idx - 1];
 	} else {
 		return (idx == 0) ? &emptySlot : &_saveFiles[_saveFilesCount - idx];
-	}	
+	}
 }
 
 bool SagaEngine::locateSaveFile(char *saveName, uint &titleNumber) {
@@ -109,7 +109,7 @@
 	int i;
 	Common::InSaveFile *in;
 	char *name;
-	
+
 	name = calcSaveFileName(MAX_SAVES);
 	name[strlen(name) - 2] = 0;
 	_saveFileMan->listSavefiles(name, _saveMarks, MAX_SAVES);
@@ -121,10 +121,10 @@
 		}
 		_saveFiles[i].name[0] = 0;
 		_saveFiles[i].slotNumber = (uint)-1;
-	}	
-	
+	}
+
 	_saveFilesCount = 0;
-	
+
 	i = 0;
 	while (i < MAX_SAVES) {
 		if (_saveMarks[i]) {
@@ -177,7 +177,7 @@
 	_interface->saveState(out);
 
 	_actor->saveState(out);
-	
+
 	out->writeSint16LE(_script->_commonBufferSize);
 
 	out->write(_script->_commonBuffer, _script->_commonBufferSize);
@@ -203,7 +203,7 @@
 	if (_saveHeader.type != MKID('SAGA')) {
 		error("SagaEngine::load wrong format");
 	}
-			
+
 	// Surrounding scene
 	sceneNumber = in->readSint32LE();
 
@@ -213,7 +213,7 @@
 	_interface->loadState(in);
 
 	_actor->loadState(in);
-	
+
 	commonBufferSize = in->readSint16LE();
 	in->read(_script->_commonBuffer, commonBufferSize);
 

Index: scene.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/scene.cpp,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -d -r1.129 -r1.130
--- scene.cpp	29 Jul 2005 17:42:33 -0000	1.129
+++ scene.cpp	29 Jul 2005 17:57:59 -0000	1.130
@@ -49,7 +49,7 @@
 namespace Saga {
 
 static int initSceneDoors[SCENE_DOORS_MAX] = {
-	0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff 
+	0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
 };
 
 static SAGAResourceTypes ITESceneResourceTypes[26] = {
@@ -152,7 +152,7 @@
 
 	debug(3, "First scene set to %d.", _firstScene);
 
-	debug(3, "LUT has %d entries.", _sceneCount);		
+	debug(3, "LUT has %d entries.", _sceneCount);
 
 	_sceneLoaded = false;
 	_sceneNumber = 0;
@@ -186,7 +186,7 @@
 				_vm->_font->textDrawRect(entry->fontId, ds, entry->text, entry->rect, entry->color, entry->effectColor, entry->flags);
 			} else {
 				_vm->_font->textDraw(entry->fontId, ds, entry->text, entry->point, entry->color, entry->effectColor, entry->flags);
-			}			
+			}
 		}
 	}
 }
@@ -226,7 +226,7 @@
 	// Load the head in scene queue
 	queueIterator = _sceneQueue.begin();
 	if (queueIterator == _sceneQueue.end()) {
-		return; 
+		return;
 	}
 
 	sceneQueue = queueIterator.operator->();
@@ -253,7 +253,7 @@
 	if (queueIterator == _sceneQueue.end()) {
 		return;
 	}
-	
+
 	queueIterator = _sceneQueue.erase(queueIterator);
 
 	if (queueIterator == _sceneQueue.end()) {
@@ -313,7 +313,7 @@
     const char *title;
     const char *image;
 } sceneSubstitutes[] = {
-    { 
+    {
 		7,
 		"Tycho says he knows much about the northern lands. Can Rif convince "
 		"the Dog to share this knowledge?",
@@ -365,7 +365,7 @@
 	// This is used for latter demos where all places on world map except
 	// Tent Faire are substituted with LBM picture and short description
 	for (int i = 0; i < ARRAYSIZE(sceneSubstitutes); i++) {
-	
+
 		if (sceneSubstitutes[i].sceneId == sceneNumber) {
 			Surface *backBuffer = _vm->_gfx->getBackBuffer();
 			Surface bbmBuffer;
@@ -388,15 +388,15 @@
 				}
 				free(colors);
 				_vm->_gfx->setPalette(cPal);
-				
+
 				_vm->_interface->setStatusText("Click or Press Return to continue. Press Q to quit.");
 				_vm->_font->textDrawRect(kMediumFont, backBuffer, sceneSubstitutes[i].title,
 					 Common::Rect(0, 7, _vm->getDisplayWidth(), 27), 1, 15, kFontOutline);
 				_vm->_font->textDrawRect(kMediumFont, backBuffer, sceneSubstitutes[i].message,
 					 Common::Rect(24, _vm->getSceneHeight() - 33, _vm->getDisplayWidth() - 11,
 								  _vm->getSceneHeight()), 1, 15, kFontOutline);
+				return;
 			}
-			return;
 		}
 	}
 
@@ -415,7 +415,7 @@
 }
 
 void Scene::getSlopes(int &beginSlope, int &endSlope) {
-	beginSlope = _vm->getSceneHeight() - _sceneDescription.beginSlope; 
+	beginSlope = _vm->getSceneHeight() - _sceneDescription.beginSlope;
 	endSlope = _vm->getSceneHeight() - _sceneDescription.endSlope;
 }
 
@@ -556,7 +556,7 @@
 		_resourceListCount = loadSceneParams->sceneDescription->resourceListCount;
 		break;
 	}
-	
+
 	debug(3, "Loading scene number %u:", _sceneNumber);
 
 	// Load scene descriptor and resource list resources
@@ -597,15 +597,15 @@
 	}
 
 	_sceneLoaded = true;
-	
+
 	q_event = NULL;
 
-	//fix placard bug 
+	//fix placard bug
 	//i guess we should remove RF_PLACARD flag - and use _interface->getMode()
 	event.type = ONESHOT_EVENT;
 	event.code = GRAPHICS_EVENT;
 	event.op = EVENT_CLEARFLAG;
-	event.param = RF_PLACARD; 
+	event.param = RF_PLACARD;
 
 	q_event = _vm->_events->chain(q_event, &event);
 
@@ -818,12 +818,12 @@
 
 	MemoryReadStreamEndian readS(resourceListData, resourceListDataLength, _sceneContext->isBigEndian);
 
-	// Allocate memory for scene resource list 
+	// Allocate memory for scene resource list
 	_resourceListCount = resourceListDataLength / SAGA_RESLIST_ENTRY_LEN;
 	debug(3, "Scene resource list contains %i entries", _resourceListCount);
 	_resourceList = (SceneResourceData *)calloc(_resourceListCount, sizeof(*_resourceList));
 
-	// Load scene resource list from raw scene 
+	// Load scene resource list from raw scene
 	// resource table
 	debug(3, "Loading scene resource list");
 
@@ -861,7 +861,7 @@
 		}
 		resourceData = _resourceList[i].buffer;
 		resourceDataLength = _resourceList[i].size;
-		
+
 		if (_resourceList[i].resourceType >= typesCount) {
 			error("Scene::processSceneResources() wrong resource type %i", _resourceList[i].resourceType);
 		}
@@ -928,7 +928,7 @@
 			break;
 		case SAGA_OBJECT_MAP:
 			debug(3, "Loading object map resource...");
-			_objectMap->load(resourceData, resourceDataLength);			
+			_objectMap->load(resourceData, resourceDataLength);
 			break;
 		case SAGA_ACTION_MAP:
 			debug(3, "Loading action map resource...");
@@ -969,7 +969,7 @@
 			debug(3, "Loading isometric metatiles resource.");
 
 			_vm->_isoMap->loadMetaTiles(resourceData, resourceDataLength);
-			break;			
+			break;
 		case SAGA_ANIM:
 			{
 				uint16 animId = _resourceList[i].resourceType - 14;
@@ -991,7 +991,7 @@
 			debug(3, "Loading isometric multi resource.");
 
 			_vm->_isoMap->loadMulti(resourceData, resourceDataLength);
-			break;			
+			break;
 		case SAGA_PAL_ANIM:
 			debug(3, "Loading palette animation resource.");
 			_vm->_palanim->loadPalAnim(resourceData, resourceDataLength);
@@ -1094,7 +1094,7 @@
 	_vm->_anim->reset();
 
 	_vm->_palanim->freePalAnim();
-	
+
 	_objectMap->freeMem();
 	_actionMap->freeMem();
 	_entryList.freeMem();
@@ -1132,9 +1132,9 @@
 }
 
 
-void Scene::loadSceneEntryList(const byte* resourcePointer, size_t resourceLength) {	
+void Scene::loadSceneEntryList(const byte* resourcePointer, size_t resourceLength) {
 	int i;
-	
+
 	_entryList.entryListCount = resourceLength / 8;
 
 	MemoryReadStreamEndian readS(resourcePointer, resourceLength, _sceneContext->isBigEndian);

Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/script.cpp,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- script.cpp	19 Jul 2005 19:05:49 -0000	1.71
+++ script.cpp	29 Jul 2005 17:57:59 -0000	1.72
@@ -66,12 +66,12 @@
 	_leftButtonVerb = kVerbNone;
 	_rightButtonVerb = kVerbNone;
 	_pointerObject = ID_NOTHING;
-	
+
 	_staticSize = 0;
 	_commonBufferSize = COMMON_BUFFER_SIZE;
 	_commonBuffer = (byte*)malloc(_commonBufferSize);
 	memset(_commonBuffer, 0, _commonBufferSize);
-	
+
 	debug(8, "Initializing scripting subsystem");
 	// Load script resource file context
 	_scriptContext = _vm->_resource->getContext(GAME_SCRIPTFILE);
@@ -86,7 +86,7 @@
 
 	debug(3, "Loading module LUT from resource %i", _vm->getResourceDescription()->moduleLUTResourceId);
 	_vm->_resource->loadResource(resourceContext, _vm->getResourceDescription()->moduleLUTResourceId, resourcePointer, resourceLength);
-	
+
 
 	// Create logical script LUT from resource
 	if (resourceLength % S_LUT_ENTRYLEN_ITECD == 0) {
@@ -101,7 +101,7 @@
 	_modulesCount = resourceLength / _modulesLUTEntryLen;
 
 	debug(3, "LUT has %i entries", _modulesCount);
-	
+
 	// Allocate space for logical LUT
 	_modules = (ModuleData *)malloc(_modulesCount * sizeof(*_modules));
 	if (_modules == NULL) {
@@ -121,8 +121,8 @@
 		if (_modules[i].voicesResourceId > 0) {
 			_voiceLUTPresent = true;
 		}
-		
-		
+
+
 		// Skip the unused portion of the structure
 		for (j = scriptS.pos(); j < prevTell + _modulesLUTEntryLen; j++) {
 			if (scriptS.readByte() != 0)
@@ -156,12 +156,12 @@
 Script::~Script() {
 
 	debug(8, "Shutting down scripting subsystem.");
-	
+
 	_mainStrings.freeMem();
 
 	freeModules();
 	free(_modules);
-	
+
 	free(_commonBuffer);
 }
 
@@ -240,21 +240,21 @@
 	if (module.entryPointsCount > SCRIPT_MAX) {
 		error("Script::loadModuleBase()Script limit exceeded");
 	}
-	
+
 	module.entryPoints = (EntryPoint *)malloc(module.entryPointsCount * sizeof(*module.entryPoints));
 	if (module.entryPoints == NULL) {
 		memoryError("Script::loadModuleBase");
 	}
 
 	// Read in the entrypoint table
-	
-	module.staticSize = scriptS.readUint16();	
+
+	module.staticSize = scriptS.readUint16();
 	while (scriptS.pos() < module.entryPointsTableOffset)
 		scriptS.readByte();
 
 	for (i = 0; i < module.entryPointsCount; i++) {
 		// First uint16 is the offset of the entrypoint name from the start
-		// of the bytecode resource, second uint16 is the offset of the 
+		// of the bytecode resource, second uint16 is the offset of the
 		// bytecode itself for said entrypoint
 		module.entryPoints[i].nameOffset = scriptS.readUint16();
 		module.entryPoints[i].offset = scriptS.readUint16();
@@ -271,7 +271,7 @@
 
 	module.voiceLUT.voicesCount = resourceLength / 2;
 	if (module.voiceLUT.voicesCount != module.strings.stringsCount) {
-		error("Script::loadModuleVoiceLUT() Voice LUT entries do not match strings entries");		
+		error("Script::loadModuleVoiceLUT() Voice LUT entries do not match strings entries");
 	}
 
 	module.voiceLUT.voices = (uint16 *)malloc(module.voiceLUT.voicesCount * sizeof(*module.voiceLUT.voices));
@@ -293,12 +293,11 @@
 	const char *object2Name;
 	char statusString[STATUS_TEXT_LEN];
 
-
 	if (_leftButtonVerb == kVerbNone) {
 		_vm->_interface->setStatusText("");
 		return;
 	}
-	
+
 	verbName = _mainStrings.getString(_leftButtonVerb - 1);
 
 	if (objectTypeId(_currentObject[0]) == kGameObjectNone) {
@@ -314,7 +313,7 @@
 		return;
 	}
 
-	
+
 	if (objectTypeId(_currentObject[1]) != kGameObjectNone) {
 		object2Name = _vm->getObjectName(_currentObject[1]);
 	} else {
@@ -426,7 +425,7 @@
 	}
 
 	if (scriptEntrypointNumber > 0) {
-		
+
 		event.type = ONESHOT_EVENT;
 		event.code = SCRIPT_EVENT;
 		event.op = EVENT_EXEC_NONBLOCKING;
@@ -442,8 +441,8 @@
 
 	} else {
 		_vm->getExcuseInfo(_pendingVerb, excuseText, excuseSampleResourceId);
-		if (excuseText) 
-			_vm->_actor->actorSpeech(ID_PROTAG, &excuseText, 1, excuseSampleResourceId, 0);			
+		if (excuseText)
+			_vm->_actor->actorSpeech(ID_PROTAG, &excuseText, 1, excuseSampleResourceId, 0);
 	}
 
 	if ((_currentVerb == kVerbWalkTo) || (_currentVerb == kVerbLookAt)) {
@@ -515,7 +514,7 @@
 		else
 			showVerb();
 	}
-	
+
 }
 
 void Script::playfieldClick(const Point& mousePoint, bool leftButton) {
@@ -558,13 +557,13 @@
 		 hitZone = _vm->_scene->_objectMap->getHitZone(objectIdToIndex(_pendingObject[0]));
 	} else {
 		if ((_pendingVerb == kVerbUse) && (objectTypeId(_pendingObject[1]) == kGameObjectHitZone)) {
-			hitZone = _vm->_scene->_objectMap->getHitZone(objectIdToIndex(_pendingObject[1]));			
+			hitZone = _vm->_scene->_objectMap->getHitZone(objectIdToIndex(_pendingObject[1]));
 		}
 	}
 
 	if (hitZone != NULL) {
 		if (hitZone->getFlags() & kHitZoneNoWalk) {
-			_vm->_actor->actorFaceTowardsPoint(ID_PROTAG, pickLocation); 
+			_vm->_actor->actorFaceTowardsPoint(ID_PROTAG, pickLocation);
 			doVerb();
 			return;
 		}
@@ -573,7 +572,7 @@
 			if (!hitZone->getSpecialPoint(specialPoint)) {
 				error("Script::playfieldClick SpecialPoint not found");
 			}
-			
+
 			// tiled stuff
 			if (_vm->_scene->getFlags() & kSceneFlagISO) {
 				pickLocation.u() = specialPoint.x;
@@ -658,7 +657,7 @@
 				}
 			}
 
-			if (newObjectId == ID_NOTHING) {		
+			if (newObjectId == ID_NOTHING) {
 
 				pickPoint = mousePoint;
 
@@ -703,7 +702,7 @@
 
 					if ((_leftButtonVerb == kVerbUse) && (hitZone->getRightButtonVerb() & 0x80)) {
 						objectFlags = kObjUseWith;
-					}					
+					}
 				}
 			}
 		} else {
@@ -712,7 +711,7 @@
 			} else {
 				panelButton = _vm->_interface->inventoryHitTest(mousePoint);
 				if (panelButton) {
-					objectId = _vm->_interface->getInventoryContentByPanelButton(panelButton);		
+					objectId = _vm->_interface->getInventoryContentByPanelButton(panelButton);
 					if (objectId != 0) {
 						obj = _vm->_actor->getObj(objectId);
 						newRightButtonVerb = kVerbLookAt;

Index: sfuncs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sfuncs.cpp,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -d -r1.145 -r1.146
--- sfuncs.cpp	29 Jul 2005 16:37:06 -0000	1.145
+++ sfuncs.cpp	29 Jul 2005 17:57:59 -0000	1.146
@@ -291,8 +291,8 @@
 	} else {
 		thread->_returnValue = 0;
 	}
-	
-	
+
+
 }
 
 // Script function #4 (0x04) nonblocking
@@ -328,10 +328,10 @@
 	actorId = thread->pop();
 	actorLocation.x = thread->pop();
 	actorLocation.y = thread->pop();
-	
+
 	actor = _vm->_actor->getActor(actorId);
 	actorLocation.z = actor->location.z;
-	
+
 	actor->flags &= ~kFollower;
 
 	if (_vm->_actor->actorWalkTo(actorId, actorLocation)) {
@@ -368,16 +368,16 @@
 			if (scriptEntryPointNumber <= 0) {
 				return;
 			}
-			moduleNumber = 0; 
+			moduleNumber = 0;
 			break;
-		case kGameObjectActor: 
-			actor = _vm->_actor->getActor(objectId);			
+		case kGameObjectActor:
+			actor = _vm->_actor->getActor(objectId);
 			scriptEntryPointNumber = actor->scriptEntrypointNumber;
 			if (scriptEntryPointNumber <= 0) {
 				return;
 			}
 			if (actor->flags & (kProtagonist | kFollower)) {
-				moduleNumber = 0; 
+				moduleNumber = 0;
 			} else {
 				moduleNumber = _vm->_scene->getScriptModuleNumber();
 			}
@@ -390,7 +390,7 @@
 				hitZone = _vm->_scene->_actionMap->getHitZone(objectIdToIndex(objectId));
 			}
 			scriptEntryPointNumber = hitZone->getScriptNumber();
-			moduleNumber = _vm->_scene->getScriptModuleNumber();			
+			moduleNumber = _vm->_scene->getScriptModuleNumber();
 			break;
 		default:
 			error("Script::sfScriptDoAction wrong object type");
@@ -449,7 +449,7 @@
 
 // Script function #11 (0x0B) nonblocking
 // If the parameter is true, the user interface is disabled while script
-// continues to run. If the parameter is false, the user interface is 
+// continues to run. If the parameter is false, the user interface is
 // reenabled.
 // Param1: boolean
 void Script::sfLockUser(SCRIPTFUNC_PARAMS) {
@@ -474,7 +474,7 @@
 		_vm->_interface->setMode(kPanelConverse);
 	else
 		_vm->_interface->converseDisplayText();
-		
+
 	_vm->_interface->setMode(kPanelNull);
 }
 
@@ -524,7 +524,7 @@
 	targetObject = thread->pop();
 
 	debug(1, "sfSetFollower(%d, %d) [%d]", actorId, targetObject, _vm->_actor->actorIdToIndex(actorId));
-	
+
 	actor = _vm->_actor->getActor(actorId);
 	actor->targetObject = targetObject;
 	if (targetObject != ID_NOTHING) {
@@ -624,7 +624,7 @@
 		} else {
 			thread->_returnValue = atoi(_vm->_interface->_statusTextInputString);
 		}
-		
+
 		_vm->_interface->_statusTextInputState = kStatusTextInputFirstRun;
 	}
 }
@@ -682,7 +682,7 @@
 }
 
 // Script function #26 (0x1A) nonblocking
-// Starts the specified animation 
+// Starts the specified animation
 void Script::sfStartBgdAnimSpeed(SCRIPTFUNC_PARAMS) {
 	int16 animId = thread->pop();
 	int16 cycles = thread->pop();
@@ -791,7 +791,7 @@
 
 	if (_vm->_scene->getSceneResourceId(sceneNumber) == _vm->_scene->currentSceneResourceId())
 		thread->_returnValue = 1;
-	else 
+	else
 		thread->_returnValue = 0;
 }
 
@@ -888,7 +888,7 @@
 
 	for (i = 0; i < actorsCount; i++)
 		actorsIds[i] = thread->pop();
-	
+
 	string = thread->_strings->getString(stringId);
 
 	if (thread->_voiceLUT->voices) {
@@ -1069,7 +1069,7 @@
 
 	_vm->_actor->actorWalkTo(actorId, actorLocation);
 
-	actor->walkFrameSequence = walkFrameSequence;	
+	actor->walkFrameSequence = walkFrameSequence;
 }
 
 // Script function #43 (0x2B) nonblocking
@@ -1095,7 +1095,7 @@
 	frameType =  thread->pop();
 	frameOffset =  thread->pop();
 
-	debug(1, "sfPlaceActor(id = %d, x=%d, y=%d, dir=%d, frameType=%d, frameOffset=%d)", actorId, actorLocation.x, 
+	debug(1, "sfPlaceActor(id = %d, x=%d, y=%d, dir=%d, frameType=%d, frameOffset=%d)", actorId, actorLocation.x,
 		  actorLocation.y, actorDirection, frameType, frameOffset);
 
 	if (_vm->getGameType() == GType_IHNM) {
@@ -1110,7 +1110,7 @@
 
 	if (frameType >= 0) {
 		frameRange = _vm->_actor->getActorFrameRange(actorId, frameType);
-	
+
 		if (frameRange->frameCount <= frameOffset) {
 			error("Wrong frameOffset 0x%X", frameOffset);
 		}
@@ -1126,8 +1126,8 @@
 }
 
 // Script function #44 (0x2C) nonblocking
-// Checks to see if the user has interrupted a currently playing 
-// game cinematic. Pushes a zero or positive value if the game 
+// Checks to see if the user has interrupted a currently playing
+// game cinematic. Pushes a zero or positive value if the game
 // has not been interrupted.
 void Script::sfCheckUserInterrupt(SCRIPTFUNC_PARAMS) {
 	thread->_returnValue = (_skipSpeeches == true);
@@ -1167,7 +1167,7 @@
 		actor->actorFlags |= kActorBackwards;
 	}
 
-	actor->actorFlags = (actor->actorFlags & ~kActorFacingMask) | (walkFlags & kActorFacingMask);	
+	actor->actorFlags = (actor->actorFlags & ~kActorFacingMask) | (walkFlags & kActorFacingMask);
 }
 
 // Script function #46 (0x2E)
@@ -1218,7 +1218,7 @@
 
 	for (i = 0; i < actorsCount; i++)
 		actorsIds[i] = thread->pop();
-	
+
 	string = thread->_strings->getString(stringId);
 
 	if (thread->_voiceLUT->voices) {
@@ -1449,7 +1449,7 @@
 	actorId = thread->pop();
 	location.x = thread->pop();
 	location.y = thread->pop();
-	thread->pop();		
+	thread->pop();
 	actionCycle = thread->pop();
 	flags = thread->pop();
 
@@ -1595,7 +1595,7 @@
 	text = thread->_strings->getString(stringId);
 	width = _vm->_font->getStringWidth(kMediumFont, text, 0, kFontOutline);
 	rect.top = point.y - 6;
-	rect.setHeight(12);	
+	rect.setHeight(12);
 	rect.left = point.x - width / 2;
 	rect.setWidth(width);
 
@@ -1612,7 +1612,7 @@
 	actorId = thread->pop();
 	actor = _vm->_actor->getActor(actorId);
 
-	thread->_returnValue = actor->location.x >> 2; 
+	thread->_returnValue = actor->location.x >> 2;
 }
 
 // Script function #61 (0x3D)
@@ -1624,7 +1624,7 @@
 	actorId = thread->pop();
 	actor = _vm->_actor->getActor(actorId);
 
-	thread->_returnValue = actor->location.y >> 2; 
+	thread->_returnValue = actor->location.y >> 2;
 }
 
 // Script function #62 (0x3E)
@@ -1867,7 +1867,7 @@
 	//cheating
 	protectHash = thread->pop();
 	thread->push(protectHash);
-	thread->_returnValue = protectHash;	
+	thread->_returnValue = protectHash;
 }
 
 // Script function #75 (0x4b)
@@ -1986,7 +1986,7 @@
 void Script::sfDebugShowData(SCRIPTFUNC_PARAMS) {
 	int16 param = thread->pop();
 	char buf[50];
-	
+
 	snprintf(buf, 50, "Reached breakpoint %d", param);
 
 	_vm->_interface->setStatusText(buf);

Index: sndres.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sndres.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- sndres.cpp	26 Jul 2005 19:40:58 -0000	1.47
+++ sndres.cpp	29 Jul 2005 17:58:00 -0000	1.48
@@ -62,7 +62,7 @@
 		error("SndRes::SndRes resource context not found");
 	}
 
-	
+
 }
 
 void SndRes::playSound(uint32 resourceId, int volume, bool loop) {
@@ -119,14 +119,14 @@
 	if (context->table[resourceId].patchData != NULL) {
 		if (context->table[resourceId].patchData->_patchDescription->soundInfo != NULL) {
 			soundInfo = context->table[resourceId].patchData->_patchDescription->soundInfo;
-		}		
-	} 
+		}
+	}
 
 	MemoryReadStream readS(soundResource, soundResourceLength);
 
 	resourceType = soundInfo->resourceType;
 	buffer.isBigEndian = soundInfo->isBigEndian;
-	
+
 	if (soundResourceLength >= 8) {
 		if (!memcmp(&soundResource, "Creative", 8)) {
 			resourceType = kSoundVOC;
@@ -217,7 +217,7 @@
 	bool voiceFile = false;
 	double msDouble;
 	SoundBuffer buffer;
-	
+
 	if (!load(_voiceContext, resourceId, buffer, true)) {
 		return -1;
 	}

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sound.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- sound.cpp	26 Jul 2005 19:40:58 -0000	1.31
+++ sound.cpp	29 Jul 2005 17:58:00 -0000	1.32
@@ -30,7 +30,7 @@
 
 namespace Saga {
 
-Sound::Sound(SagaEngine *vm, Audio::Mixer *mixer, int enabled) : 
+Sound::Sound(SagaEngine *vm, Audio::Mixer *mixer, int enabled) :
 	_vm(vm), _mixer(mixer), _enabled(enabled), _voxStream(0) {
 }
 
@@ -57,7 +57,7 @@
 	if (!buffer.isSigned)
 		flags |= Audio::Mixer::FLAG_UNSIGNED;
 
-	_mixer->playRaw(handle, buffer.buffer, buffer.size, buffer.frequency, flags, -1, volume);	
+	_mixer->playRaw(handle, buffer.buffer, buffer.size, buffer.frequency, flags, -1, volume);
 }
 
 void Sound::playSound(SoundBuffer &buffer, int volume, bool loop) {

Index: sprite.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sprite.cpp,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- sprite.cpp	19 Jul 2005 19:05:51 -0000	1.60
+++ sprite.cpp	29 Jul 2005 17:58:00 -0000	1.61
@@ -88,7 +88,7 @@
 
 	spriteList.infoList = (SpriteInfo *)realloc(spriteList.infoList, newSpriteCount * sizeof(*spriteList.infoList));
 	if (spriteList.infoList == NULL) {
-		memoryError("Sprite::loadList");		
+		memoryError("Sprite::loadList");
 	}
 
 	spriteList.spriteCount = newSpriteCount;
@@ -181,7 +181,7 @@
 	jo = 0;
 	io = 0;
 	if (spritePointer.x < clipRect.left) {
-		jo = clipRect.left - spritePointer.x; 
+		jo = clipRect.left - spritePointer.x;
 	}
 	if (spritePointer.y < clipRect.top) {
 		io = clipRect.top - spritePointer.y;
@@ -214,7 +214,7 @@
 	Point spritePointer;
 
 	getScaledSpriteBuffer(spriteList, spriteNumber, scale, width, height, xAlign, yAlign, spriteBuffer);
-	
+
 	spritePointer.x = screenCoord.x + xAlign;
 	spritePointer.y = screenCoord.y + yAlign;
 	drawClip(ds, clipRect, spritePointer, width, height, spriteBuffer);
@@ -227,7 +227,7 @@
 	int xAlign, spw;
 	int yAlign, sph;
 	Point spritePointer;
-	
+
 
 	getScaledSpriteBuffer(spriteList, spriteNumber, scale, width, height, xAlign, yAlign, spriteBuffer);
 	spw = (screenRect.width() - width) / 2;
@@ -268,7 +268,7 @@
 	i = testPoint.y - spritePointer.y;
 	j = testPoint.x - spritePointer.x;
 	srcRowPointer = spriteBuffer + j + i * width;
-	return *srcRowPointer != 0; 
+	return *srcRowPointer != 0;
 }
 
 void Sprite::drawOccluded(Surface *ds, const Rect &clipRect, SpriteList &spriteList, int spriteNumber, const Point &screenCoord, int scale, int depth) {
@@ -306,7 +306,7 @@
 
 	clipData.destPoint.x = screenCoord.x + xAlign;
 	clipData.destPoint.y = screenCoord.y + yAlign;
-	
+
 	clipData.sourceRect.left = 0;
 	clipData.sourceRect.top = 0;
 	clipData.sourceRect.right = width;
@@ -320,7 +320,7 @@
 
 	// Finally, draw the occluded sprite
 	sourceRowPointer = spriteBuffer + clipData.drawSource.x + (clipData.drawSource.y * width);
-	
+
 	destRowPointer = (byte *)ds->pixels + clipData.drawDest.x + (clipData.drawDest.y * ds->pitch);
 	maskRowPointer = maskBuffer + clipData.drawDest.x + (clipData.drawDest.y * maskWidth);
 
@@ -355,7 +355,7 @@
 	if (outLength > _decodeBufLen) { // TODO: may we should make dynamic growing?
 		error("Sprite::decodeRLEBuffer outLength > _decodeBufLen");
 	}
-	
+
 	outPointer = _decodeBuf;
 	outPointerEnd = _decodeBuf + outLength;
 	outPointerEnd--;
@@ -401,7 +401,7 @@
 
 			for (int j = 0; j < width; j++) {
 				*dst++ = *src++;
-				
+
 				hskip += skip;
 				if (hskip < skip) // overflow
 					dst--;

Index: sthread.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sthread.cpp,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- sthread.cpp	24 Jul 2005 13:41:49 -0000	1.90
+++ sthread.cpp	29 Jul 2005 17:58:00 -0000	1.91
@@ -44,18 +44,18 @@
 	if (_modules[scriptModuleNumber].entryPointsCount <= scriptEntryPointNumber) {
 		error("Script::createThread wrong scriptEntryPointNumber");
 	}
-		
+
 	newThread = _threadList.pushFront().operator->();
 	newThread->_flags = kTFlagNone;
 	newThread->_stackSize = DEFAULT_THREAD_STACK_SIZE;
 	newThread->_stackBuf = (uint16 *)malloc(newThread->_stackSize * sizeof(*newThread->_stackBuf));
-	newThread->_stackTopIndex = newThread->_stackSize - 2; 
+	newThread->_stackTopIndex = newThread->_stackSize - 2;
 	newThread->_instructionOffset = _modules[scriptModuleNumber].entryPoints[scriptEntryPointNumber].offset;
 	newThread->_commonBase = _commonBuffer;
 	newThread->_staticBase = _commonBuffer + _modules[scriptModuleNumber].staticOffset;
 	newThread->_moduleBase = _modules[scriptModuleNumber].moduleBase;
 	newThread->_moduleBaseSize = _modules[scriptModuleNumber].moduleBaseSize;
-	
+
 	newThread->_strings = &_modules[scriptModuleNumber].strings;
 	newThread->_voiceLUT = &_modules[scriptModuleNumber].voiceLUT;
 
@@ -77,7 +77,7 @@
 void Script::wakeUpThreads(int waitType) {
 	ScriptThread *thread;
 	ScriptThreadList::iterator threadIterator;
-	
+
 	for (threadIterator = _threadList.begin(); threadIterator != _threadList.end(); ++threadIterator) {
 		thread = threadIterator.operator->();
 		if ((thread->_flags & kTFlagWaiting) && (thread->_waitType == waitType)) {
@@ -116,13 +116,13 @@
 		if (thread->_flags & (kTFlagFinished | kTFlagAborted)) {
 			if (thread->_flags & kTFlagFinished)
 				setPointerVerb();
-			
+
 			threadIterator = _threadList.erase(threadIterator);
 			continue;
 		}
 
 		if (thread->_flags & kTFlagWaiting) {
-			
+
 			if (thread->_waitType == kWaitTypeDelay) {
 				if (thread->_sleepTime < msec) {
 					thread->_sleepTime = 0;
@@ -131,13 +131,13 @@
 				}
 
 				if (thread->_sleepTime == 0)
-					thread->_flags &= ~kTFlagWaiting;			
+					thread->_flags &= ~kTFlagWaiting;
 			} else {
 				if (thread->_waitType == kWaitTypeWalk) {
 					ActorData *actor;
 					actor = (ActorData *)thread->_threadObj;
 					if (actor->currentAction == kActionWait) {
-						thread->_flags &= ~kTFlagWaiting;			
+						thread->_flags &= ~kTFlagWaiting;
 					}
 				}
 			}
@@ -192,7 +192,7 @@
 
 	int operandChar;
 	int i;
-	
+
 	MemoryReadStream scriptS(thread->_moduleBase, thread->_moduleBaseSize);
 
 	scriptS.seek(thread->_instructionOffset);
@@ -211,7 +211,7 @@
 								debug(8, operandName);								\
 								_vm->_console->DebugPrintf("%s\n", operandName);	\
 							}
-						
+
 //		debug(8, "Executing thread offset: %lu (%x) stack: %d", thread->_instructionOffset, operandChar, thread->pushedSize());
 		operandName="";
 		switch (operandChar) {
@@ -241,7 +241,7 @@
 			debug(8, "0x%X", iparam1);
 			break;
 
-// DATA INSTRUCTIONS  
+// DATA INSTRUCTIONS
 		CASEOP(opGetFlag)
 			addr = thread->baseAddress(scriptS.readByte());
 			iparam1 = scriptS.readSint16LE();
@@ -291,7 +291,7 @@
 			*(uint16*)addr =  thread->pop();
 			break;
 
-// FUNCTION CALL INSTRUCTIONS    
+// FUNCTION CALL INSTRUCTIONS
 		CASEOP(opCall)
 			argumentsCount = scriptS.readByte();
 			iparam1 = scriptS.readByte();
@@ -311,13 +311,13 @@
 			// NOTE2: program counter is 32bit - so we should "emulate" it size - because kAddressStack relies on it
 			thread->push(0);
 			thread->_instructionOffset = iparam1;
-			
+
 			break;
 		CASEOP(opCcall)
 		CASEOP(opCcallV)
 			argumentsCount = scriptS.readByte();
 			functionNumber = scriptS.readUint16LE();
-			if (functionNumber >= ((_vm->getGameType() == GType_IHNM) ? 
+			if (functionNumber >= ((_vm->getGameType() == GType_IHNM) ?
 								   IHNM_SCRIPT_FUNCTION_MAX : ITE_SCRIPT_FUNCTION_MAX)) {
 				error("Script::runThread() Invalid script function number (%d)", functionNumber);
 			}
@@ -372,7 +372,7 @@
 			}
 			break;
 
-// BRANCH INSTRUCTIONS    
+// BRANCH INSTRUCTIONS
 		CASEOP(opJmp)
 			jmpOffset1 = scriptS.readUint16LE();
 			thread->_instructionOffset = jmpOffset1;
@@ -424,7 +424,7 @@
 			while (1) {
 				iparam2 = scriptS.readSint16LE();
 				thread->_instructionOffset = scriptS.readUint16LE();
-				
+
 				iparam1 -= iparam2;
 				if (iparam1 < 0) {
 					break;
@@ -470,7 +470,7 @@
 			*(uint16*)addr -= 1;
 			break;
 
-// ARITHMETIC INSTRUCTIONS    
+// ARITHMETIC INSTRUCTIONS
 		CASEOP(opAdd)
 			iparam2 = thread->pop();
 			iparam1 = thread->pop();
@@ -502,7 +502,7 @@
 			thread->push(iparam1);
 			break;
 
-// COMPARISION INSTRUCTIONS    
+// COMPARISION INSTRUCTIONS
 		CASEOP(opEq)
 			iparam2 = thread->pop();
 			iparam1 = thread->pop();
@@ -535,7 +535,7 @@
 			thread->push((iparam1 <= iparam2) ? 1 : 0);
 			break;
 
-// SHIFT INSTRUCTIONS    
+// SHIFT INSTRUCTIONS
 		CASEOP(opRsh)
 			iparam2 = thread->pop();
 			iparam1 = thread->pop();
@@ -549,7 +549,7 @@
 			thread->push(iparam1);
 			break;
 
-// BITWISE INSTRUCTIONS   
+// BITWISE INSTRUCTIONS
 		CASEOP(opAnd)
 			iparam2 = thread->pop();
 			iparam1 = thread->pop();
@@ -569,7 +569,7 @@
 			thread->push(iparam1);
 			break;
 
-// LOGICAL INSTRUCTIONS     
+// LOGICAL INSTRUCTIONS
 		CASEOP(opLAnd)
 			iparam2 = thread->pop();
 			iparam1 = thread->pop();
@@ -582,11 +582,11 @@
 			break;
 		CASEOP(opLXor)
 			iparam2 = thread->pop();
-			iparam1 = thread->pop();			
+			iparam1 = thread->pop();
 			thread->push(((iparam1 && !iparam2) || (!iparam1 && iparam2)) ? 1 : 0);
 			break;
 
-// GAME INSTRUCTIONS  
+// GAME INSTRUCTIONS
 		CASEOP(opSpeak) {
 				int stringsCount;
 				uint16 actorId;
@@ -604,13 +604,13 @@
 				actorId =  scriptS.readUint16LE();
 				speechFlags = scriptS.readByte();
 				scriptS.readUint16LE(); // x,y skip
-				
+
 				if (stringsCount == 0)
 					error("opSpeak stringsCount == 0");
 
 				if (stringsCount > ACTOR_SPEECH_STRING_MAX)
 					error("opSpeak stringsCount=0x%X exceed ACTOR_SPEECH_STRING_MAX", stringsCount);
-				
+
 				iparam1 = first = thread->stackTop();
 				for (i = 0; i < stringsCount; i++) {
 					 iparam1 = thread->pop();
@@ -619,7 +619,7 @@
 				// now data contains last string index
 
 				if (_vm->getGameId() == GID_ITE_DISK_G) { // special ITE dos
-					if ((_vm->_scene->currentSceneNumber() == ITE_DEFAULT_SCENE) && 
+					if ((_vm->_scene->currentSceneNumber() == ITE_DEFAULT_SCENE) &&
 						(iparam1 >= 288) && (iparam1 <= (RID_SCENE1_VOICE_138 - RID_SCENE1_VOICE_009 + 288))) {
 						sampleResourceId = RID_SCENE1_VOICE_009 + iparam1 - 288;
 					}
@@ -629,7 +629,7 @@
 					}
 				}
 
-				_vm->_actor->actorSpeech(actorId, strings, stringsCount, sampleResourceId, speechFlags);				
+				_vm->_actor->actorSpeech(actorId, strings, stringsCount, sampleResourceId, speechFlags);
 
 				if (!(speechFlags & kSpeakAsync)) {
 					thread->wait(kWaitTypeSpeech);
@@ -686,7 +686,7 @@
 
 		if (thread->_flags & (kTFlagFinished | kTFlagAborted)) {
 			error("Wrong flags %d in thread", thread->_flags);
-		} 
+		}
 
 		// Set instruction offset only if a previous instruction didn't branch
 		if (savedInstructionOffset == thread->_instructionOffset) {
@@ -697,7 +697,7 @@
 			}
 
 			scriptS.seek(thread->_instructionOffset);
-		}	
+		}
 	}
 	return false;
 }





More information about the Scummvm-git-logs mailing list