[Scummvm-cvs-logs] scummvm master -> 784796779893f5fa280f634139aceff7324514df

Strangerke Strangerke at scummvm.org
Sun Nov 10 23:01:12 CET 2013


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
7847967798 TSAGE: Janitorial - Remove trailing spaces and tabs


Commit: 784796779893f5fa280f634139aceff7324514df
    https://github.com/scummvm/scummvm/commit/784796779893f5fa280f634139aceff7324514df
Author: Strangerke (strangerke at scummvm.org)
Date: 2013-11-10T14:00:15-08:00

Commit Message:
TSAGE: Janitorial - Remove trailing spaces and tabs

Changed paths:
    engines/tsage/blue_force/blueforce_scenes4.h
    engines/tsage/converse.cpp
    engines/tsage/core.cpp
    engines/tsage/globals.cpp
    engines/tsage/graphics.cpp
    engines/tsage/graphics.h
    engines/tsage/ringworld/ringworld_scenes5.cpp
    engines/tsage/ringworld2/ringworld2_dialogs.cpp
    engines/tsage/ringworld2/ringworld2_logic.cpp
    engines/tsage/ringworld2/ringworld2_scenes0.cpp
    engines/tsage/ringworld2/ringworld2_scenes0.h
    engines/tsage/ringworld2/ringworld2_scenes1.cpp
    engines/tsage/ringworld2/ringworld2_scenes1.h
    engines/tsage/ringworld2/ringworld2_scenes2.cpp
    engines/tsage/ringworld2/ringworld2_scenes3.cpp
    engines/tsage/ringworld2/ringworld2_speakers.cpp
    engines/tsage/sound.cpp
    engines/tsage/sound.h
    engines/tsage/user_interface.cpp



diff --git a/engines/tsage/blue_force/blueforce_scenes4.h b/engines/tsage/blue_force/blueforce_scenes4.h
index d6d795a..895970e 100644
--- a/engines/tsage/blue_force/blueforce_scenes4.h
+++ b/engines/tsage/blue_force/blueforce_scenes4.h
@@ -119,7 +119,7 @@ public:
 	int _action1Count, _talkCount, _field1FBA;
 	int _cuffedDriverFl, _field1FBE;
 	int _field1FC0;
-	int _field1FC2, _harrisonMovedFl; 
+	int _field1FC2, _harrisonMovedFl;
 
 	Scene410();
 	virtual void postInit(SceneObjectList *OwnerList = NULL);
diff --git a/engines/tsage/converse.cpp b/engines/tsage/converse.cpp
index 6881518..2298d28 100644
--- a/engines/tsage/converse.cpp
+++ b/engines/tsage/converse.cpp
@@ -727,7 +727,7 @@ void StripManager::synchronize(Serializer &s) {
 }
 
 void StripManager::remove() {
-	if (g_vm->getGameID() == GType_Ringworld2) { 
+	if (g_vm->getGameID() == GType_Ringworld2) {
 		for (uint i = 0; i < _speakerList.size(); ++i) {
 			if (_activeSpeaker != _speakerList[i])
 				_speakerList[i]->stopSpeaking();
@@ -741,7 +741,7 @@ void StripManager::remove() {
 	}
 
 	if (_activeSpeaker) {
-		if (g_vm->getGameID() == GType_Ringworld2) 
+		if (g_vm->getGameID() == GType_Ringworld2)
 			static_cast<Ringworld2::VisualSpeaker *>(_activeSpeaker)->_speakerMode = 0xff;
 		_activeSpeaker->remove();
 	}
@@ -822,7 +822,7 @@ void StripManager::signal() {
 			break;
 		}
 	}
-	
+
 	_field2E8 = obj44._id;
 	Common::StringArray choiceList;
 
@@ -836,7 +836,7 @@ void StripManager::signal() {
 			int f16Index = _lookupList[obj44._field16[0] - 1];
 			int entryId = obj44._field16[f16Index];
 
-			Obj0A &entry = obj44._list[idx]; 
+			Obj0A &entry = obj44._list[idx];
 			if (entry._id == entryId) {
 				// Get the next one
 				choiceList.push_back((const char *)&_script[0] + entry._scriptOffset);
@@ -864,7 +864,7 @@ void StripManager::signal() {
 
 			// Get the next one
 			const char *choiceStr = (const char *)&_script[0] + obj44._list[idx]._scriptOffset;
-			
+
 			if (!*choiceStr) {
 				// Choice is empty
 				assert(g_vm->getGameID() == GType_Ringworld2);
@@ -872,7 +872,7 @@ void StripManager::signal() {
 				if (obj44._list[1]._id) {
 					// it's a reference to another list slot
 					int listId = obj44._list[idx]._id;
-					
+
 					int obj44Idx = 0;
 					while (_obj44List[obj44Idx]._id != listId)
 						++obj44Idx;
@@ -882,7 +882,7 @@ void StripManager::signal() {
 						// seems to be set to the R2_GLOBALS._stripManager_lookupList, so manually set it
 						if (!_lookupList)
 							_lookupList = R2_GLOBALS._stripManager_lookupList;
-						
+
 						int f16Index = _lookupList[_obj44List[obj44Idx]._field16[0] - 1];
 						listId = _obj44List[obj44Idx]._field16[f16Index];
 
@@ -948,7 +948,7 @@ void StripManager::signal() {
 
 		if (g_vm->getGameID() == GType_Ringworld2) {
 			Ringworld2::VisualSpeaker *speaker = static_cast<Ringworld2::VisualSpeaker *>(_activeSpeaker);
-			
+
 			if (speaker) {
 				speaker->_speakerMode = obj44._speakerMode;
 				if (!choiceList[strIndex].empty())
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index fd36d4f..877d866 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -1800,7 +1800,7 @@ void SceneItem::display(int resNum, int lineNum, ...) {
 		g_globals->_sceneText.remove();
 	}
 
-	if ((g_vm->getGameID() != GType_Ringworld) && (g_vm->getGameID() != GType_Ringworld2) 
+	if ((g_vm->getGameID() != GType_Ringworld) && (g_vm->getGameID() != GType_Ringworld2)
 			&& T2_GLOBALS._uiElements._active) {
 		// Show user interface
 		T2_GLOBALS._uiElements.show();
@@ -2511,7 +2511,7 @@ void SceneObject::postInit(SceneObjectList *OwnerList) {
 	if (!OwnerList)
 		OwnerList = g_globals->_sceneObjects;
 
-	bool isExisting = OwnerList->contains(this); 
+	bool isExisting = OwnerList->contains(this);
 	if (!isExisting || ((_flags & OBJFLAG_REMOVE) != 0)) {
 		_percent = 100;
 		_priority = 255;
@@ -2708,7 +2708,7 @@ GfxSurface SceneObject::getFrame() {
 		Graphics::Surface s = frame.lockSurface();
 		byte *p = (byte *)s.getPixels();
 		byte *endP = p + s.w * s.h;
-		
+
 		while (p < endP) {
 			if (*p != frame._transColor)
 				*p = R2_GLOBALS._fadePaletteMap[_shade - 1][*p];
@@ -2742,8 +2742,8 @@ void SceneObject::draw() {
 		switch (_effect) {
 		case EFFECT_SHADOW_MAP: {
 			assert(_shadowMap);
-			
-			GLOBALS.gfxManager().getSurface().copyFrom(frame, frame.getBounds(), 
+
+			GLOBALS.gfxManager().getSurface().copyFrom(frame, frame.getBounds(),
 				destRect, priorityRegion,  _shadowMap);
 			return;
 		}
@@ -2859,7 +2859,7 @@ void BackgroundSceneObject::setup2(int visage, int stripFrameNum, int frameNum,
 void BackgroundSceneObject::copySceneToBackground() {
 	GLOBALS._sceneManager._scene->_backSurface.copyFrom(g_globals->gfxManager().getSurface(), 0, 0);
 
-	// WORKAROUND: Since savegames don't store the active screen data, once we copy the 
+	// WORKAROUND: Since savegames don't store the active screen data, once we copy the
 	// foreground objects to the background, we have to prevent the scene being saved.
 	if (g_vm->getGameID() == GType_Ringworld2)
 		((Ringworld2::SceneExt *)GLOBALS._sceneManager._scene)->_preventSaving = true;
@@ -4346,7 +4346,7 @@ void SceneHandler::process(Event &event) {
 			// Scan the item list to find one the mouse is within
 			SynchronizedList<SceneItem *>::iterator i;
 			for (i = g_globals->_sceneItems.begin(); i != g_globals->_sceneItems.end(); ++i) {
-				SceneItem *item = *i;				
+				SceneItem *item = *i;
 				if (item->contains(event.mousePos)) {
 					// Pass the action to the item
 					bool handled = item->startAction(g_globals->_events.getCursor(), event);
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp
index d195980..6503e92 100644
--- a/engines/tsage/globals.cpp
+++ b/engines/tsage/globals.cpp
@@ -3,7 +3,7 @@
  * ScummVM is the legal property of its developers, whose names
  * are too numerous to list here. Please refer to the COPYRIGHT
  * file distributed with this source distribution.
- * 
+ *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp
index f00dcf0..b6beb03 100644
--- a/engines/tsage/graphics.cpp
+++ b/engines/tsage/graphics.cpp
@@ -560,9 +560,9 @@ static GfxSurface ResizeSurface(GfxSurface &src, int xSize, int ySize, int trans
 
 /**
  * Copys an area from one GfxSurface to another.
- * 
+ *
  */
-void GfxSurface::copyFrom(GfxSurface &src, Rect srcBounds, Rect destBounds, 
+void GfxSurface::copyFrom(GfxSurface &src, Rect srcBounds, Rect destBounds,
 		Region *priorityRegion, const byte *shadowMap) {
 	GfxSurface srcImage;
 	if (srcBounds.isEmpty())
@@ -814,8 +814,8 @@ void GfxElement::drawFrame() {
 
 		// Draw the edge frame
 		// Outer frame border
-		surface.hLine(tempRect.left + 2, tempRect.top, tempRect.right - 2, 0); 
-		surface.hLine(tempRect.left + 2, tempRect.bottom, tempRect.right - 2, 0); 
+		surface.hLine(tempRect.left + 2, tempRect.top, tempRect.right - 2, 0);
+		surface.hLine(tempRect.left + 2, tempRect.bottom, tempRect.right - 2, 0);
 		surface.vLine(tempRect.left, tempRect.top + 2, tempRect.bottom - 2, 0);
 		surface.vLine(tempRect.right, tempRect.top + 2, tempRect.bottom - 2, 0);
 		*((byte *)surface.getBasePtr(tempRect.left + 1, tempRect.top + 1)) = 0;
@@ -824,8 +824,8 @@ void GfxElement::drawFrame() {
 		*((byte *)surface.getBasePtr(tempRect.right - 1, tempRect.bottom - 1)) = 0;
 
 		// Inner frame border
-		surface.hLine(tempRect.left + 2, tempRect.top + 1, tempRect.right - 2, R2_GLOBALS._frameEdgeColor); 
-		surface.hLine(tempRect.left + 2, tempRect.bottom - 1, tempRect.right - 2, R2_GLOBALS._frameEdgeColor); 
+		surface.hLine(tempRect.left + 2, tempRect.top + 1, tempRect.right - 2, R2_GLOBALS._frameEdgeColor);
+		surface.hLine(tempRect.left + 2, tempRect.bottom - 1, tempRect.right - 2, R2_GLOBALS._frameEdgeColor);
 		surface.vLine(tempRect.left + 1, tempRect.top + 2, tempRect.bottom - 2, R2_GLOBALS._frameEdgeColor);
 		surface.vLine(tempRect.right - 1, tempRect.top + 2, tempRect.bottom - 2, R2_GLOBALS._frameEdgeColor);
 		*((byte *)surface.getBasePtr(tempRect.left + 2, tempRect.top + 2)) = R2_GLOBALS._frameEdgeColor;
diff --git a/engines/tsage/graphics.h b/engines/tsage/graphics.h
index d31bac0..365929e 100644
--- a/engines/tsage/graphics.h
+++ b/engines/tsage/graphics.h
@@ -105,7 +105,7 @@ public:
 	void setBounds(const Rect &bounds) { _bounds = bounds; }
 	const Rect &getBounds() const { return _bounds; }
 
-	void copyFrom(GfxSurface &src, Rect srcBounds, Rect destBounds, 
+	void copyFrom(GfxSurface &src, Rect srcBounds, Rect destBounds,
 		Region *priorityRegion = NULL, const byte *shadowMap = NULL);
 	void copyFrom(GfxSurface &src, Rect destBounds, Region *priorityRegion = NULL) {
 		copyFrom(src, src.getBounds(), destBounds, priorityRegion);
diff --git a/engines/tsage/ringworld/ringworld_scenes5.cpp b/engines/tsage/ringworld/ringworld_scenes5.cpp
index 725370c..1b6cd78 100644
--- a/engines/tsage/ringworld/ringworld_scenes5.cpp
+++ b/engines/tsage/ringworld/ringworld_scenes5.cpp
@@ -35,7 +35,7 @@ namespace Ringworld {
  *
  *--------------------------------------------------------------------------*/
 Scene4000::Hotspot8::Hotspot8() : SceneObject() {
-	_ctr = 0;	
+	_ctr = 0;
 }
 
 void Scene4000::Action1::signal() {
diff --git a/engines/tsage/ringworld2/ringworld2_dialogs.cpp b/engines/tsage/ringworld2/ringworld2_dialogs.cpp
index 7c97aa0..12147f7 100644
--- a/engines/tsage/ringworld2/ringworld2_dialogs.cpp
+++ b/engines/tsage/ringworld2/ringworld2_dialogs.cpp
@@ -234,7 +234,7 @@ void CharacterDialog::show() {
 		SceneExt *scene = (SceneExt *)R2_GLOBALS._sceneManager._scene;
 		scene->saveCharacter(oldCharacter);
 
-		// Play the correctfrequency, if any, of the character being switched to's scanner device 
+		// Play the correctfrequency, if any, of the character being switched to's scanner device
 		if (R2_GLOBALS._player._characterScene[R2_NONE] != 300) {
 			switch (R2_GLOBALS._scannerFrequencies[R2_GLOBALS._player._characterIndex] - 1) {
 			case 0:
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp
index b495a7e..75aeb9e 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.cpp
+++ b/engines/tsage/ringworld2/ringworld2_logic.cpp
@@ -389,7 +389,7 @@ void SceneExt::remove() {
 	Scene::remove();
 	R2_GLOBALS._uiElements._active = true;
 
-	if (R2_GLOBALS._events.getCursor() >= EXITCURSOR_N && 
+	if (R2_GLOBALS._events.getCursor() >= EXITCURSOR_N &&
 			R2_GLOBALS._events.getCursor() <= SHADECURSOR_DOWN)
 		R2_GLOBALS._events.setCursor(CURSOR_WALK);
 }
@@ -437,9 +437,9 @@ bool SceneExt::display(CursorType action, Event &event) {
 			SceneItem::display2(5, 0);
 		break;
 	case R2_SONIC_STUNNER:
-		if ((R2_GLOBALS._scannerFrequencies[R2_QUINN] == 2) 
+		if ((R2_GLOBALS._scannerFrequencies[R2_QUINN] == 2)
 			|| ((R2_GLOBALS._scannerFrequencies[R2_QUINN] == 1) &&
-				(R2_GLOBALS._scannerFrequencies[R2_SEEKER] == 2) && 
+				(R2_GLOBALS._scannerFrequencies[R2_SEEKER] == 2) &&
 				(R2_GLOBALS._sceneManager._previousScene == 300))) {
 			R2_GLOBALS._sound4.stop();
 			R2_GLOBALS._sound3.play(46);
@@ -1099,7 +1099,7 @@ void Ringworld2InvObjectList::selectDefault(int objectNumber) {
 	Common::String line = Common::String::format("%.5s%.5s%.5s%.5s%s %s %s %s.",
 		msg1.c_str(), msg2.c_str(), msg3.c_str(), msg4.c_str(),
 		msg1.c_str() + 5, msg2.c_str() + 5, msg3.c_str() + 5, msg4.c_str() + 5);
-		
+
 	SceneItem::display(-1, -1, line.c_str(),
 		SET_WIDTH, 280,
 		SET_X, 160,
@@ -1465,7 +1465,7 @@ void SceneAreaObject::process(Event &event) {
 				_savedCursorNum = R2_GLOBALS._events.getCursor();
 				R2_GLOBALS._events.setCursor(CURSOR_INVALID);
 			}
-				
+
 			if (event.eventType == EVENT_BUTTON_DOWN) {
 				event.handled = true;
 				R2_GLOBALS._events.setCursor(_savedCursorNum);
@@ -1800,9 +1800,9 @@ AnimationPlayer::~AnimationPlayer() {
 
 void AnimationPlayer::synchronize(Serializer &s) {
 	EventHandler::synchronize(s);
-	
-	// TODO: Implement saving for animation player state. Currently, I disable saving 
-	// when an animation is active, so saving it's state would a "nice to have". 
+
+	// TODO: Implement saving for animation player state. Currently, I disable saving
+	// when an animation is active, so saving it's state would a "nice to have".
 }
 
 void AnimationPlayer::remove() {
@@ -2267,7 +2267,7 @@ void ScannerDialog::Button::process(Event &event) {
 		setFrame(2);
 		_buttonDown = false;
 		event.handled = true;
-		
+
 		reset();
 	}
 }
diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
index 6a438d7..bd4ad73 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
@@ -723,7 +723,7 @@ void Scene125::signal() {
 					&_starchart3, &_starchart4, NULL);
 			} else {
 				// Show starchart without Ringworld
-				setAction(&_sequenceManager, this, 129, &R2_GLOBALS._player, &_starchart1, &_starchart2, 
+				setAction(&_sequenceManager, this, 129, &R2_GLOBALS._player, &_starchart1, &_starchart2,
 					&_starchart3, NULL);
 			}
 			break;
@@ -1885,7 +1885,7 @@ void Scene180::signal() {
 		R2_GLOBALS._scene180Mode = 0;
 		_helpEnabled = false;
 
-		// WORKAROUND: The original changed to scene 100 here, Quinn's Bedroom, 
+		// WORKAROUND: The original changed to scene 100 here, Quinn's Bedroom,
 		// but instead we're changing to the previously unused scene 50, which shows
 		// a closeup of Quinn in the floatation bed first
 		R2_GLOBALS._sceneManager.changeScene(50);
@@ -2350,7 +2350,7 @@ Scene205::Scene205(): SceneExt() {
 	GfxFont font;
 	font.setFontNumber(4);
 	_fontHeight = font.getHeight();
-	
+
 	for (int i = 0; i < 3; i++) {
 		_starList1[i] = nullptr;
 		_starList2[i] = nullptr;
@@ -2702,7 +2702,7 @@ void Scene250::signal() {
 	case 2:
 		if (_destButtonY - 12 == _currButtonY)
 			_sceneMode = 4;
-		else 
+		else
 			_sceneMode = 3;
 
 		signal();
@@ -5153,7 +5153,7 @@ bool Scene500::Locker2::startAction(CursorType action, Event &event) {
 
 /*--------------------------------------------------------------------------*/
 
-void Scene500::PanelDialog::setDetails(int visage, int strip, int frameNumber, 
+void Scene500::PanelDialog::setDetails(int visage, int strip, int frameNumber,
 		const Common::Point &pt) {
 	SceneAreaObject::setDetails(visage, strip, frameNumber, pt);
 	SceneAreaObject::setDetails(500, 43, 32, 45);
@@ -5221,7 +5221,7 @@ void Scene500::PanelDialog::Button::synchronize(Serializer &s) {
 }
 
 void Scene500::PanelDialog::Button::process(Event &event) {
-	if ((event.eventType == EVENT_BUTTON_DOWN) && 
+	if ((event.eventType == EVENT_BUTTON_DOWN) &&
 			(R2_GLOBALS._events.getCursor() == CURSOR_USE) &&
 			_bounds.contains(event.mousePos) && !_buttonDown) {
 		_buttonDown = true;
@@ -5277,7 +5277,7 @@ void Scene500::PanelDialog::Button::doButtonPress() {
 				scene->_suits.animate(ANIM_MODE_6, scene);
 			}
 			break;
-		
+
 		case 3:
 			if (R2_GLOBALS.getFlag(35)) {
 				scene->_sceneMode = 509;
@@ -5291,7 +5291,7 @@ void Scene500::PanelDialog::Button::doButtonPress() {
 				scene->_suit.setup(502, R2_GLOBALS._landerSuitNumber + 2, 1);
 
 				scene->setAction(&scene->_sequenceManager1, scene, 508,
-					&R2_GLOBALS._player, &scene->_suits, &scene->_suit, 
+					&R2_GLOBALS._player, &scene->_suits, &scene->_suit,
 					&scene->_transparentDoor, NULL);
 				R2_GLOBALS.setFlag(35);
 			}
@@ -5612,7 +5612,7 @@ bool Scene600::CompartmentHotspot::startAction(CursorType action, Event &event)
 	if ((action != R2_NEGATOR_GUN) || (!R2_GLOBALS.getFlag(5)) || (R2_GLOBALS.getFlag(8)))
 		return SceneHotspot::startAction(action, event);
 
-	SceneItem::display(600, 32, SET_WIDTH, 280, SET_X, 160, SET_POS_MODE, ALIGN_CENTER, 
+	SceneItem::display(600, 32, SET_WIDTH, 280, SET_X, 160, SET_POS_MODE, ALIGN_CENTER,
 		SET_Y, 20, SET_EXT_BGCOLOR, 7, LIST_END);
 	return true;
 }
@@ -5622,13 +5622,13 @@ bool Scene600::EngineCompartment::startAction(CursorType action, Event &event) {
 		return SceneHotspot::startAction(action, event);
 
 	if ((R2_GLOBALS.getFlag(5)) && (!R2_GLOBALS.getFlag(8))) {
-		SceneItem::display(600, 32, SET_WIDTH, 280, SET_X, 160, SET_POS_MODE, ALIGN_CENTER, 
+		SceneItem::display(600, 32, SET_WIDTH, 280, SET_X, 160, SET_POS_MODE, ALIGN_CENTER,
 			SET_Y, 20, SET_EXT_BGCOLOR, 7, LIST_END);
 		return true;
 	}
 
 	if (!R2_GLOBALS.getFlag(5)) {
-		SceneItem::display(600, 30, SET_WIDTH, 280, SET_X, 160, SET_POS_MODE, ALIGN_CENTER, 
+		SceneItem::display(600, 30, SET_WIDTH, 280, SET_X, 160, SET_POS_MODE, ALIGN_CENTER,
 			SET_Y, 20, SET_EXT_BGCOLOR, 7, LIST_END);
 		return true;
 	}
@@ -5639,19 +5639,19 @@ bool Scene600::EngineCompartment::startAction(CursorType action, Event &event) {
 	R2_GLOBALS._player.disableControl();
 
 	Scene600 *scene = (Scene600 *)R2_GLOBALS._sceneManager._scene;
-	
+
 	scene->_stasisArea.setup(603, 3, 1, 239, 54, 10);
 	scene->_stasisField.postInit();
 	scene->_computer.postInit();
 
 	scene->_sceneMode = 612;
 	scene->setAction(&scene->_sequenceManager1, scene, 612, &scene->_stasisField, &scene->_computer, &R2_GLOBALS._player, NULL);
-	
+
 	// WORKAROUND: For ScummVM, we use a SceneActor rather than BackgroundSceneObject
 	// for the stasis field since it doesn't work properly. We override the priority for
 	// the stasis field here so that the stasis field dissolve will show up
 	scene->_stasisField.fixPriority(12);
-	
+
 	return true;
 }
 
@@ -6068,7 +6068,7 @@ void Scene600::signal() {
 }
 
 void Scene600::process(Event &event) {
-	if (R2_GLOBALS._player._canWalk && (!R2_GLOBALS.getFlag(6)) && (event.eventType == EVENT_BUTTON_DOWN) 
+	if (R2_GLOBALS._player._canWalk && (!R2_GLOBALS.getFlag(6)) && (event.eventType == EVENT_BUTTON_DOWN)
 			&& (R2_GLOBALS._events.getCursor() == CURSOR_WALK)) {
 		if (!_doorway.contains(event.mousePos) || (_doorway._frame <= 1)) {
 			if (R2_GLOBALS.getFlag(5)) {
@@ -6124,7 +6124,7 @@ void Scene600::dispatch() {
  *--------------------------------------------------------------------------*/
 
 #define CABLE700_X 26
-#define CABLE700_Y -5 
+#define CABLE700_Y -5
 
 Scene700::Scene700() {
 	_rotation = NULL;
@@ -6643,10 +6643,10 @@ bool Scene800::DeviceSlot::startAction(CursorType action, Event &event) {
 		scene->_sceneMode = 804;
 
 		if (R2_INVENTORY.getObjectScene(R2_OPTICAL_FIBRE) == 800) {
-			scene->setAction(&scene->_sequenceManager1, scene, 814, &R2_GLOBALS._player, 
+			scene->setAction(&scene->_sequenceManager1, scene, 814, &R2_GLOBALS._player,
 				&scene->_reader, &scene->_opticalFibre, NULL);
 		} else {
-			scene->setAction(&scene->_sequenceManager1, scene, 804, &R2_GLOBALS._player, 
+			scene->setAction(&scene->_sequenceManager1, scene, 804, &R2_GLOBALS._player,
 				&scene->_reader, NULL);
 		}
 		return true;
@@ -7310,7 +7310,7 @@ bool Scene850::Clamp::startAction(CursorType action, Event &event) {
 		R2_GLOBALS._player.disableControl();
 		scene->_spark.postInit();
 		scene->_sceneMode = 850;
-		scene->setAction(&scene->_sequenceManager1, scene, 850, &R2_GLOBALS._player, this, 
+		scene->setAction(&scene->_sequenceManager1, scene, 850, &R2_GLOBALS._player, this,
 			&scene->_spark, NULL);
 		return true;
 	}
@@ -7324,7 +7324,7 @@ bool Scene850::Panel::startAction(CursorType action, Event &event) {
 	else {
 		R2_GLOBALS._player.disableControl();
 		scene->_sceneMode = 852;
-		scene->setAction(&scene->_sequenceManager1, scene, 852, &R2_GLOBALS._player, 
+		scene->setAction(&scene->_sequenceManager1, scene, 852, &R2_GLOBALS._player,
 			this, &scene->_spark, NULL);
 		return true;
 	}
diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.h b/engines/tsage/ringworld2/ringworld2_scenes0.h
index aa3182c..0e68b67 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes0.h
+++ b/engines/tsage/ringworld2/ringworld2_scenes0.h
@@ -529,7 +529,7 @@ class Scene500: public SceneExt {
 			int _buttonId;
 			bool _buttonDown;
 
-			void doButtonPress();		
+			void doButtonPress();
 		public:
 			Button();
 			virtual Common::String getClassName() { return "Scene500_Button"; }
diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
index 59bc593..f88e170 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
@@ -100,7 +100,7 @@ void Scene1000::remove() {
 void Scene1000::signal() {
 	ScenePalette scenePalette1, scenePalette2;
 	uint32 black = 0;
-	
+
 	switch (_sceneMode++) {
 	case 0:
 		// TODO: Sort out values
@@ -117,7 +117,7 @@ void Scene1000::signal() {
 
 		_animationPlayer.dispatch();
 		_forceCheckAnimationFl = true;
-		
+
 		R2_GLOBALS._scenePalette.fade((const byte *)&black, true, 0);
 		for (int percent = 0; percent < 100; percent += 5)
 			R2_GLOBALS._scenePalette.fade((const byte *)&black, true, percent);
@@ -334,7 +334,7 @@ void Scene1000::signal() {
 
 	case 60:
 		R2_GLOBALS._sound1.play(333);
-		
+
 		for (int percent = 100; percent >= 0; percent -= 5)
 			R2_GLOBALS._scenePalette.fade((const byte *)&black, true, percent);
 
@@ -443,7 +443,7 @@ void Scene1000::signal() {
 		R2_GLOBALS._scenePalette.fade((const byte *)&black, 1, 0);
 		for (int percent = 0; percent < 100; percent += 5)
 			R2_GLOBALS._scenePalette.fade((const byte *)&black, true, percent);
-		break;		
+		break;
 
 	case 101:
 		R2_GLOBALS._sound1.fadeOut2(NULL);
@@ -5987,7 +5987,7 @@ void Scene1337::subCF31D() {
 				subC340B(&_arrunkObj1337[1]._arr1[tmpVal], &_arrunkObj1337[1]._arr2[i]);
 				found = true;
 				break;
-			} 
+			}
 		}
 	}
 
@@ -7513,7 +7513,7 @@ void Scene1550::DishControlsWindow::remove() {
 	}
 }
 
-void Scene1550::DishControlsWindow::setup2(int visage, int stripFrameNum, int frameNum, 
+void Scene1550::DishControlsWindow::setup2(int visage, int stripFrameNum, int frameNum,
 		int posX, int posY) {
 	// Call inherited setup
 	ModalWindow::setup2(visage, stripFrameNum, frameNum, posX, posY);
@@ -7612,7 +7612,7 @@ bool Scene1550::Gyroscope::startAction(CursorType action, Event &event) {
 	else
 		scene->_sceneMode = 1589;
 
-	scene->setAction(&scene->_sequenceManager1, scene, scene->_sceneMode, &R2_GLOBALS._player, 
+	scene->setAction(&scene->_sequenceManager1, scene, scene->_sceneMode, &R2_GLOBALS._player,
 		&scene->_gyroscope, NULL);
 	return true;
 }
@@ -7629,7 +7629,7 @@ bool Scene1550::DiagnosticsDisplay::startAction(CursorType action, Event &event)
 	else
 		scene->_sceneMode = 1587;
 
-	scene->setAction(&scene->_sequenceManager1, scene, scene->_sceneMode, &R2_GLOBALS._player, 
+	scene->setAction(&scene->_sequenceManager1, scene, scene->_sceneMode, &R2_GLOBALS._player,
 		&scene->_diagnosticsDisplay, NULL);
 	return true;
 }
@@ -7722,7 +7722,7 @@ void Scene1550::synchronize(Serializer &s) {
 }
 
 void Scene1550::postInit(SceneObjectList *OwnerList) {
-	if ((R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].x == 9) && 
+	if ((R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].x == 9) &&
 			(R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].y == 11))
 		// Exiting the intact spaceship
 		loadScene(1234);
@@ -7759,7 +7759,7 @@ void Scene1550::postInit(SceneObjectList *OwnerList) {
 
 	R2_GLOBALS._player._moveDiff = Common::Point(5, 3);
 
-	if ((R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].x == 9) && 
+	if ((R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].x == 9) &&
 			(R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].y == 11))
 		R2_GLOBALS._player.setPosition(Common::Point(157, 135));
 	else
@@ -7972,10 +7972,10 @@ void Scene1550::signal() {
 		_companion.changeZoom(-1);
 		_sceneMode = 1592;
 		if (R2_GLOBALS._player._characterIndex == R2_QUINN)
-			setAction(&_sequenceManager1, this, 1592, &R2_GLOBALS._player, &_companion, 
+			setAction(&_sequenceManager1, this, 1592, &R2_GLOBALS._player, &_companion,
 				&_junk[0], &_joystick, NULL);
 		else
-			setAction(&_sequenceManager1, this, 1593, &R2_GLOBALS._player, &_companion, 
+			setAction(&_sequenceManager1, this, 1593, &R2_GLOBALS._player, &_companion,
 				&_junk[0], &_joystick, NULL);
 		break;
 	case 61:
@@ -8208,7 +8208,7 @@ void Scene1550::dispatch() {
 		R2_GLOBALS._player._shade = 0;
 
 		// NOTE: Original game contains a switch based on an uninitialized variable.
-		// We're leaving this code here, but ifdef'ed out, in case we can ever figure out 
+		// We're leaving this code here, but ifdef'ed out, in case we can ever figure out
 		// what the original programmers intended the value to come from
 #if 0
 		int missingVariable = 0;
@@ -8756,7 +8756,7 @@ void Scene1550::enterArea() {
 		}
 	}
 
-	if ((R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].x == 9) && 
+	if ((R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].x == 9) &&
 			(R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].y == 11)) {
 		if (_screenNumber != 1234) {
 			R2_GLOBALS._sceneManager._fadeMode = FADEMODE_IMMEDIATE;
@@ -8814,7 +8814,7 @@ void Scene1550::enterArea() {
 	}
 
 	// Scene setup dependent on the type of cell specified in the scene map
-	switch (scene1550AreaMap[(R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].y * 30) + 
+	switch (scene1550AreaMap[(R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].y * 30) +
 		R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].x]) {
 	case 0:
 		// Standard cell
@@ -8951,8 +8951,8 @@ void Scene1550::enterArea() {
 	int di = 0;
 	int tmpIdx = 0;
 	for (int i = 0; i < 127 * 4; i += 4) {
-		if ((R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].x == R2_GLOBALS._scene1550JunkLocations[i]) && 
-				(R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].y == R2_GLOBALS._scene1550JunkLocations[i + 1]) && 
+		if ((R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].x == R2_GLOBALS._scene1550JunkLocations[i]) &&
+				(R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].y == R2_GLOBALS._scene1550JunkLocations[i + 1]) &&
 				(R2_GLOBALS._scene1550JunkLocations[i + 2] != 0)) {
 			tmpIdx = R2_GLOBALS._scene1550JunkLocations[i + 3];
 			_junk[di].postInit();
@@ -8996,7 +8996,7 @@ void Scene1550::enterArea() {
 
 	// Loop for detecting and setting up certain special areas within the map
 	for (int i = 0; i < 15 * 3; i += 3) {
-		if ((R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].x == scene1550SpecialAreas[i]) 
+		if ((R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].x == scene1550SpecialAreas[i])
 				&& (R2_GLOBALS._s1550PlayerArea[R2_GLOBALS._player._characterIndex].y == scene1550SpecialAreas[i + 1])) {
 			int areaType = scene1550SpecialAreas[i + 2];
 			switch (areaType) {
@@ -9427,8 +9427,8 @@ void Scene1575::synchronize(Serializer &s) {
 }
 
 // TODO: Remove this method stub with proper sub-method call
-double unk(double v1, double v2) { 
-	return sqrt(v1 * v1 + v2 * v2); 
+double unk(double v1, double v2) {
+	return sqrt(v1 * v1 + v2 * v2);
 }
 
 void Scene1575::postInit(SceneObjectList *OwnerList) {
@@ -9908,7 +9908,7 @@ void Scene1580::postInit(SceneObjectList *OwnerList) {
 	_hatchButton.setPosition(Common::Point(291, 147));
 	_hatchButton.fixPriority(100);
 	_hatchButton.setDetails(1550, 81, -1, -1, 1, (SceneItem *) NULL);
-		
+
 	if (R2_INVENTORY.getObjectScene(R2_THRUSTER_VALVE) == 1580) {
 		_thrusterValve.postInit();
 		_thrusterValve.setup(1580, 6, 2);
@@ -10359,7 +10359,7 @@ void Scene1700::enterArea() {
 	_westPlatform.remove();
 	_rimTransportDoor.remove();
 	_rimTransport.remove();
-	
+
 	if (_sceneMode != 40) {
 		_ledgeHopper.remove();
 		_hatch.remove();
@@ -10695,7 +10695,7 @@ void Scene1700::signal() {
 	case 40:
 		R2_GLOBALS._player.disableControl();
 		_sceneMode = 1704;
-		setAction(&_sequenceManager, this, 1704, &R2_GLOBALS._player, &_companion, 
+		setAction(&_sequenceManager, this, 1704, &R2_GLOBALS._player, &_companion,
 			&_hatch, &_ledgeHopper, &_playerShadow, &_companionShadow, NULL);
 		break;
 	case 50:
@@ -10830,7 +10830,7 @@ void Scene1750::SpeedSlider::remove() {
 }
 
 void Scene1750::SpeedSlider::process(Event &event) {
-	if ((event.eventType == EVENT_BUTTON_DOWN) && (R2_GLOBALS._events.getCursor() == CURSOR_USE) && 
+	if ((event.eventType == EVENT_BUTTON_DOWN) && (R2_GLOBALS._events.getCursor() == CURSOR_USE) &&
 			(_bounds.contains(event.mousePos))) {
 		_mouseDown = true;
 		event.eventType = EVENT_NONE;
@@ -11060,7 +11060,7 @@ void Scene1750::dispatch() {
 					_rotation->setDelay(15 - _speedCurrent);
 					_rotation->_idxChange = 2;
 				}
-			} 
+			}
 		}
 
 		if (_speedDelta)
@@ -11716,10 +11716,10 @@ bool Scene1850::Robot::startAction(CursorType action, Event &event) {
 			scene->_airbag.postInit();
 
 			if (R2_GLOBALS.getFlag(32))
-				scene->setAction(&scene->_sequenceManager1, scene, 1876, 
+				scene->setAction(&scene->_sequenceManager1, scene, 1876,
 					&R2_GLOBALS._player, &scene->_airbag, NULL);
 			else
-				scene->setAction(&scene->_sequenceManager1, scene, 1875, 
+				scene->setAction(&scene->_sequenceManager1, scene, 1875,
 					&R2_GLOBALS._player, &scene->_airbag, NULL);
 
 			return true;
@@ -11742,7 +11742,7 @@ bool Scene1850::Robot::startAction(CursorType action, Event &event) {
 
 			R2_GLOBALS._player.disableControl();
 			scene->_sceneMode = 1878;
-			scene->setAction(&scene->_sequenceManager1, scene, 1878, &R2_GLOBALS._player, 
+			scene->setAction(&scene->_sequenceManager1, scene, 1878, &R2_GLOBALS._player,
 				&scene->_robot, &scene->_airbag, NULL);
 		}
 
@@ -12161,7 +12161,7 @@ void Scene1850::signal() {
 		break;
 	case 16:
 		_sceneMode = 1870;
-		setAction(&_sequenceManager1, this, 1870, &R2_GLOBALS._player, &_companion, 
+		setAction(&_sequenceManager1, this, 1870, &R2_GLOBALS._player, &_companion,
 			&_screen, &_helmet, NULL);
 		break;
 	case 20:
@@ -12170,7 +12170,7 @@ void Scene1850::signal() {
 	case 21:
 		R2_GLOBALS._player.disableControl();
 		_sceneMode = 1877;
-		setAction(&_sequenceManager1, this, 1877, &R2_GLOBALS._player, &_companion, 
+		setAction(&_sequenceManager1, this, 1877, &R2_GLOBALS._player, &_companion,
 			&_robot, NULL);
 		break;
 	case 30:
@@ -12212,7 +12212,7 @@ void Scene1850::signal() {
 
 				_sceneMode = 1879;
 
-				_displayScreen.setAction(&_sequenceManager2, this, 1879, &_robot, 
+				_displayScreen.setAction(&_sequenceManager2, this, 1879, &_robot,
 					&_displayScreen, &_airbag, NULL);
 		} else {
 			_displayScreen.setAction(&_sequenceManager2, NULL, 1867, &_displayScreen, NULL);
@@ -12520,7 +12520,7 @@ void Scene1875::Button::process(Event &event) {
 
 	Scene1875 *scene = (Scene1875 *)R2_GLOBALS._sceneManager._scene;
 
-	if ((event.eventType == EVENT_BUTTON_DOWN) && (R2_GLOBALS._events.getCursor() == CURSOR_USE) 
+	if ((event.eventType == EVENT_BUTTON_DOWN) && (R2_GLOBALS._events.getCursor() == CURSOR_USE)
 			&& (_bounds.contains(event.mousePos)) && !_buttonDown) {
 		setStrip(2);
 		switch (_buttonId) {
@@ -12581,7 +12581,7 @@ void Scene1875::postInit(SceneObjectList *OwnerList) {
 	} else {
 		if (R2_GLOBALS._sceneManager._previousScene == 3150) {
 			R2_GLOBALS._sound1.play(116);
-		} 
+		}
 
 		R2_GLOBALS._player.enableControl();
 		R2_GLOBALS._player._canWalk = false;
@@ -12929,7 +12929,7 @@ bool Scene1925::Button::startAction(CursorType action, Event &event) {
 		scene->_sceneMode = 1930;
 
 	R2_GLOBALS._player.disableControl(CURSOR_WALK);
-	scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode, &R2_GLOBALS._player, 
+	scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode, &R2_GLOBALS._player,
 		&scene->_door, NULL);
 	return true;
 }
@@ -12946,7 +12946,7 @@ bool Scene1925::Ladder::startAction(CursorType action, Event &event) {
 	if ((R2_GLOBALS._player._position.x == 110) && (R2_GLOBALS._player._position.y == 100)) {
 		scene->_westExit._enabled = false;
 		scene->_sceneMode = 1925;
-		scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode, 
+		scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode,
 			&R2_GLOBALS._player, &scene->_door, NULL);
 		return true;
 	}
@@ -12985,7 +12985,7 @@ void Scene1925::ExitUp::changeScene() {
 		scene->_westExit._enabled = false;
 		scene->_newSceneMode = 1927;
 		scene->_sceneMode = 1925;
-		scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode, 
+		scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode,
 			&R2_GLOBALS._player, &scene->_door, NULL);
 		return;
 	}
@@ -13016,7 +13016,7 @@ void Scene1925::ExitDown::changeScene() {
 		scene->_westExit._enabled = false;
 		scene->_newSceneMode = 1926;
 		scene->_sceneMode = 1925;
-		scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode, 
+		scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode,
 			&R2_GLOBALS._player, &scene->_door, NULL);
 		return;
 	}
@@ -13576,7 +13576,7 @@ void Scene1950::KeypadWindow::KeypadButton::init(int indx) {
 }
 
 void Scene1950::KeypadWindow::KeypadButton::process(Event &event) {
-	if ((event.eventType == EVENT_BUTTON_DOWN) && (R2_GLOBALS._events.getCursor() == CURSOR_USE) 
+	if ((event.eventType == EVENT_BUTTON_DOWN) && (R2_GLOBALS._events.getCursor() == CURSOR_USE)
 			&& (_bounds.contains(event.mousePos)) && !_pressed) {
 		R2_GLOBALS._sound2.play(227);
 		if (!_toggled) {
@@ -13849,7 +13849,7 @@ void Scene1950::Vampire::signal() {
 bool Scene1950::Vampire::startAction(CursorType action, Event &event) {
 	Scene1950 *scene = (Scene1950 *)R2_GLOBALS._sceneManager._scene;
 
-	if (!R2_GLOBALS._vampireData[scene->_vampireIndex - 1]._isAlive || 
+	if (!R2_GLOBALS._vampireData[scene->_vampireIndex - 1]._isAlive ||
 			(action != R2_PHOTON_STUNNER))
 		return SceneActor::startAction(action, event);
 
@@ -14744,7 +14744,7 @@ void Scene1950::enterArea() {
 		_vampireIndex = 1;
 		break;
 	case 13:
-		_vampireIndex = 2; 
+		_vampireIndex = 2;
 		break;
 	case 16:
 		_vampireIndex = 3;
@@ -15165,7 +15165,7 @@ void Scene1950::signal() {
 		enterArea();
 		break;
 	case 1975:
-		SceneItem::display(1950, 21, SET_WIDTH, 280, SET_X, 160, SET_POS_MODE, 1, 
+		SceneItem::display(1950, 21, SET_WIDTH, 280, SET_X, 160, SET_POS_MODE, 1,
 			SET_Y, 20, SET_EXT_BGCOLOR, 7, LIST_END);
 	// No break on purpose
 	case 13:
diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.h b/engines/tsage/ringworld2/ringworld2_scenes1.h
index 0a37900..98cd172 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes1.h
+++ b/engines/tsage/ringworld2/ringworld2_scenes1.h
@@ -111,7 +111,7 @@ public:
 	SceneActor _shotImpact4;
 	SceneActor _shotImpact5;
 	SceneActor _laserShot;
-	SceneActor _animation;	// Used for cliff collapse and ship theft	
+	SceneActor _animation;	// Used for cliff collapse and ship theft
 	SceneActor _leftImpacts;
 	SceneActor _runningGuy1;
 	SceneActor _runningGuy2;
diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.cpp b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
index f9e5b09..4022e1f 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes2.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
@@ -135,7 +135,7 @@ void Scene2000::initPlayer() {
 			_persons[i].show();
 	}
 
-	if ((R2_GLOBALS._player._characterScene[R2_QUINN] == R2_GLOBALS._player._characterScene[R2_SEEKER]) 
+	if ((R2_GLOBALS._player._characterScene[R2_QUINN] == R2_GLOBALS._player._characterScene[R2_SEEKER])
 			&& (R2_GLOBALS._spillLocation[R2_QUINN] == R2_GLOBALS._spillLocation[R2_SEEKER])) {
 		_companion.postInit();
 		if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
@@ -2313,7 +2313,7 @@ void Scene2455::postInit(SceneObjectList *OwnerList) {
 		_scrithKey.setup(2456, 3, 1);
 		_scrithKey.setPosition(Common::Point(176, 165));
 		_scrithKey.setDetails(2455, 16, 1, -1, 1, (SceneItem *)NULL);
-	} else if ((R2_INVENTORY.getObjectScene(R2_ALCOHOL_LAMP_3) == 2455) || 
+	} else if ((R2_INVENTORY.getObjectScene(R2_ALCOHOL_LAMP_3) == 2455) ||
 			(R2_INVENTORY.getObjectScene(R2_ALCOHOL_LAMP_2) == 2455)) {
 		_lamp.postInit();
 		_lamp.setup(2456, 3, 3);
@@ -2811,9 +2811,9 @@ bool Scene2535::RebreatherTank::startAction(CursorType action, Event &event) {
 
 	if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
 		R2_GLOBALS._player.disableControl();
-		
+
 		scene->_sceneMode = (R2_INVENTORY.getObjectScene(R2_REBREATHER_TANK) == 2535) ? 2536 : 2537;
-		scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode, 
+		scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode,
 			&R2_GLOBALS._player, &scene->_rebreatherTank, NULL);
 	} else {
 		SceneItem::display(2530, 33, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
@@ -4105,7 +4105,7 @@ void Scene2750::signal() {
 }
 
 void Scene2750::process(Event &event) {
-	if ((R2_GLOBALS._player._canWalk) && (event.eventType == EVENT_BUTTON_DOWN) 
+	if ((R2_GLOBALS._player._canWalk) && (event.eventType == EVENT_BUTTON_DOWN)
 			&& (R2_GLOBALS._events.getCursor() == R2_NEGATOR_GUN)) {
 		if (_walkRect1.contains(event.mousePos)) {
 			if (!_walkRect1.contains(R2_GLOBALS._player._position)) {
@@ -4498,7 +4498,7 @@ void Scene2800::postInit(SceneObjectList *OwnerList) {
 		R2_GLOBALS._player.enableControl();
 	} else {
 		_sceneMode = 2801;
-		R2_GLOBALS._player.setAction(&_sequenceManager, this, 2801, &R2_GLOBALS._player, 
+		R2_GLOBALS._player.setAction(&_sequenceManager, this, 2801, &R2_GLOBALS._player,
 			&_nej, &_guard, NULL);
 	}
 }
@@ -4617,7 +4617,7 @@ bool Scene2900::KnobLeft::startAction(CursorType action, Event &event) {
 
 	switch (action) {
 	case CURSOR_USE:
-		if (scene->_majorMinorFlag || scene->_altitudeChanging || 
+		if (scene->_majorMinorFlag || scene->_altitudeChanging ||
 				scene->_xAmount != scene->_xComparison) {
 			// Let your altitude stablize first
 			SceneItem::display2(2900, 17);
@@ -4654,7 +4654,7 @@ bool Scene2900::KnobRight::startAction(CursorType action, Event &event) {
 
 	switch (action) {
 	case CURSOR_USE:
-		if (scene->_majorMinorFlag || scene->_altitudeChanging || 
+		if (scene->_majorMinorFlag || scene->_altitudeChanging ||
 				scene->_xAmount != scene->_xComparison) {
 			// Let your altitude stablize first
 			SceneItem::display2(2900, 17);
@@ -4848,7 +4848,7 @@ int Scene2900::Map::adjustRect(Common::Rect &r1, const Common::Rect &r2) {
 	return -1;
 }
 
-void Scene2900::Map::drawBlock(const byte *data, int xp, int yp, 
+void Scene2900::Map::drawBlock(const byte *data, int xp, int yp,
 		const Rect &bounds, const Rect &updateRect) {
 	Rect blockRect(xp, yp, xp + 160, yp + 100);
 	const byte *src = data;
@@ -4973,7 +4973,7 @@ void Scene2900::postInit(SceneObjectList *OwnerList) {
 	R2_GLOBALS._gfxColors.foreground = 228;
 	R2_GLOBALS._fontColors.background = 12;
 	R2_GLOBALS._fontColors.foreground = 22;
-	
+
 	_map.load(2950);
 
 	loadScene(2900);
@@ -4983,7 +4983,7 @@ void Scene2900::postInit(SceneObjectList *OwnerList) {
 	_leftEdge.setup(2900, 6, 1, 22, 0, 25);
 	_rightEdge.setup(2900, 6, 1, 280, 0, 25);
 	_knob.setup(2900, 1, 3, 228, 199, 25);
-	
+
 	_altimeterContent.postInit();
 	_altimeterContent.setVisage(2900);
 	_altimeterContent.setStrip(2);
@@ -4996,7 +4996,7 @@ void Scene2900::postInit(SceneObjectList *OwnerList) {
 	_knobLeftContent.setFrame(1);
 	_knobLeftContent.setPosition(Common::Point(209, 199));
 	_knobLeftContent.fixPriority(200);
-	
+
 	_knobRightContent.postInit();
 	_knobRightContent.setVisage(2900);
 	_knobRightContent.setStrip(1);
@@ -5029,7 +5029,7 @@ void Scene2900::postInit(SceneObjectList *OwnerList) {
 	R2_GLOBALS._player._moveDiff = Common::Point(2, 2);
 	R2_GLOBALS._player.disableControl();
 
-	if (R2_GLOBALS._sceneManager._previousScene == 2350 && 
+	if (R2_GLOBALS._sceneManager._previousScene == 2350 &&
 			R2_GLOBALS._balloonPosition.x == 0 && R2_GLOBALS._balloonPosition.y == 0) {
 		R2_GLOBALS._balloonAltitude = 5;
 		_map.setPosition(Common::Point(_balloonLocation.x - 120, _balloonLocation.y - 100));
@@ -5048,7 +5048,7 @@ void Scene2900::postInit(SceneObjectList *OwnerList) {
 			_balloonLocation.x -= 70;
 		else if ((R2_GLOBALS._balloonAltitude % 8) == 7)
 			_balloonLocation.x += 70;
-		
+
 		if (_balloonLocation.x <= 120)
 			_balloonScreenPos.x = _balloonLocation.x + 40;
 		else if (_balloonLocation.x >= 680)
@@ -5085,7 +5085,7 @@ void Scene2900::remove() {
 
 	R2_GLOBALS._sound1.fadeOut2(NULL);
 	R2_GLOBALS._sound2.stop();
-	
+
 	R2_GLOBALS._interfaceY = UI_INTERFACE_Y;
 	SceneExt::remove();
 }
diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.cpp b/engines/tsage/ringworld2/ringworld2_scenes3.cpp
index 208e94d..0f553a6 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes3.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes3.cpp
@@ -97,7 +97,7 @@ void Scene3100::postInit(SceneObjectList *OwnerList) {
 			_deadBodies.postInit();
 			R2_GLOBALS._sound1.play(274);
 			_sound1.fadeSound(130);
-			setAction(&_sequenceManager, this, 3102, &_hammerHead, &R2_GLOBALS._player, 
+			setAction(&_sequenceManager, this, 3102, &_hammerHead, &R2_GLOBALS._player,
 				&_ghoul, &_technicians, &_deadBodies, NULL);
 		} else {
 			_guard.postInit();
@@ -126,7 +126,7 @@ void Scene3100::postInit(SceneObjectList *OwnerList) {
 		_ghoul.postInit();
 		_fadeSound = true;
 
-		setAction(&_sequenceManager, this, 3101, &R2_GLOBALS._player, &_hammerHead, 
+		setAction(&_sequenceManager, this, 3101, &R2_GLOBALS._player, &_hammerHead,
 			&_miranda, &_ghoul, NULL);
 	} else {
 		_guard.postInit();
@@ -274,8 +274,8 @@ bool Scene3125::Computer::startAction(CursorType action, Event &event) {
 		R2_GLOBALS._player.disableControl();
 		scene->_ghoul4.postInit();
 		scene->_sceneMode = 3126;
-		scene->setAction(&scene->_sequenceManager, scene, 3126, &R2_GLOBALS._player, 
-			&scene->_ghoul1, &scene->_ghoul2, &scene->_ghoul3, &scene->_door, 
+		scene->setAction(&scene->_sequenceManager, scene, 3126, &R2_GLOBALS._player,
+			&scene->_ghoul1, &scene->_ghoul2, &scene->_ghoul3, &scene->_door,
 			&scene->_ghoul4, NULL);
 		break;
 	case CURSOR_LOOK:
@@ -424,8 +424,8 @@ bool Scene3150::Toilet::startAction(CursorType action, Event &event) {
 		scene->setAction(&scene->_sequenceManager, scene, 3158, &R2_GLOBALS._player, &scene->_water, NULL);
 		return true;
 	case R2_FOOD_TRAY:
-		if ((R2_INVENTORY.getObjectScene(R2_LIGHT_BULB) != 3150) && 
-				(R2_INVENTORY.getObjectScene(R2_SUPERCONDUCTOR_WIRE) == 3150) 
+		if ((R2_INVENTORY.getObjectScene(R2_LIGHT_BULB) != 3150) &&
+				(R2_INVENTORY.getObjectScene(R2_SUPERCONDUCTOR_WIRE) == 3150)
 				&& (R2_GLOBALS.getFlag(75))) {
 			scene->_foodTray.postInit();
 			scene->_foodTray._effect = EFFECT_SHADED2;
@@ -685,7 +685,7 @@ void Scene3150::postInit(SceneObjectList *OwnerList) {
 		break;
 		}
 	default:
-		if ((R2_GLOBALS._mirandaJailState == 1) && (R2_INVENTORY.getObjectScene(R2_ANCIENT_SCROLLS) == 2000) 
+		if ((R2_GLOBALS._mirandaJailState == 1) && (R2_INVENTORY.getObjectScene(R2_ANCIENT_SCROLLS) == 2000)
 				&& (R2_GLOBALS._player._oldCharacterScene[R2_QUINN] == 3100)) {
 			// Moving story on to Miranda getting food delivered
 			++R2_GLOBALS._mirandaJailState;
@@ -1105,7 +1105,7 @@ void Scene3245::postInit(SceneObjectList *OwnerList) {
 		SceneItem::display(1200, 7, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, LIST_END);
 		signal();
 	} else {
-		setAction(&_sequenceManager, this, 3244 + R2_GLOBALS._scientistConvIndex, 
+		setAction(&_sequenceManager, this, 3244 + R2_GLOBALS._scientistConvIndex,
 			&_ralf, &_tomko, NULL);
 	}
 }
@@ -1225,7 +1225,7 @@ void Scene3250::postInit(SceneObjectList *OwnerList) {
 			_ghoul2._effect = EFFECT_SHADED;
 			_ghoul3.postInit();
 			_ghoul3._effect = EFFECT_SHADED;
-			setAction(&_sequenceManager, this, 3254, &R2_GLOBALS._player, &_rightDoor, 
+			setAction(&_sequenceManager, this, 3254, &R2_GLOBALS._player, &_rightDoor,
 				&_ghoul1, &_ghoul2, &_ghoul3, &_leftDoor, NULL);
 		} else {
 			_sceneMode = 3252;
@@ -1329,7 +1329,7 @@ void Scene3255::signal() {
 		_ghoul1.postInit();
 		_ghoul2.postInit();
 		_ghoul3.postInit();
-		setAction(&_sequenceManager, this, 3258, &R2_GLOBALS._player, &_quinn, 
+		setAction(&_sequenceManager, this, 3258, &R2_GLOBALS._player, &_quinn,
 			&_door, &_ghoul1, &_ghoul2, &_ghoul3, NULL);
 		break;
 	case 3256:
@@ -1719,7 +1719,7 @@ void Scene3350::signal() {
 		break;
 	case 3351:
 		_sceneMode = 3352;
-		setAction(&_sequenceManager, this, 3352, &_seeker, &R2_GLOBALS._player, 
+		setAction(&_sequenceManager, this, 3352, &_seeker, &R2_GLOBALS._player,
 			&_miranda, &_seeker, &_webbster, NULL);
 		break;
 	case 3352:
@@ -1884,7 +1884,7 @@ bool Scene3375::Door::startAction(CursorType action, Event &event) {
 	R2_GLOBALS._player.disableControl(CURSOR_ARROW);
 
 	scene->_sceneMode = 3375;
-	scene->setAction(&scene->_sequenceManager, scene, 3375, &R2_GLOBALS._player, 
+	scene->setAction(&scene->_sequenceManager, scene, 3375, &R2_GLOBALS._player,
 		&scene->_companion1, &scene->_companion2, &scene->_webbster, &scene->_door, NULL);
 
 	return true;
@@ -2304,8 +2304,8 @@ bool Scene3385::Door::startAction(CursorType action, Event &event) {
 		R2_GLOBALS._sound2.play(314);
 
 	scene->_sceneMode = 3386;
-	scene->setAction(&scene->_sequenceManager, scene, 3386, &R2_GLOBALS._player, 
-		&scene->_companion1, &scene->_companion2, &scene->_webbster, &scene->_door, 
+	scene->setAction(&scene->_sequenceManager, scene, 3386, &R2_GLOBALS._player,
+		&scene->_companion1, &scene->_companion2, &scene->_webbster, &scene->_door,
 		NULL);
 
 	return true;
@@ -2318,8 +2318,8 @@ void Scene3385::SouthExit::changeScene() {
 	scene->_sceneMode = 3387;
 
 	if (R2_GLOBALS._sceneManager._previousScene == 3375)
-		scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode, 
-		&R2_GLOBALS._player, &scene->_companion1, &scene->_companion2, 
+		scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode,
+		&R2_GLOBALS._player, &scene->_companion1, &scene->_companion2,
 		&scene->_webbster, NULL);
 	else
 		scene->signal();
@@ -2541,8 +2541,8 @@ bool Scene3395::Door::startAction(CursorType action, Event &event) {
 		R2_GLOBALS._sound2.play(314);
 
 	scene->_sceneMode = 3396;
-	scene->setAction(&scene->_sequenceManager, scene, 3396, &R2_GLOBALS._player, 
-		&scene->_companion1, &scene->_companion2, &scene->_webbster, &scene->_door, 
+	scene->setAction(&scene->_sequenceManager, scene, 3396, &R2_GLOBALS._player,
+		&scene->_companion1, &scene->_companion2, &scene->_webbster, &scene->_door,
 		NULL);
 
 	return true;
@@ -4635,7 +4635,7 @@ void Scene3600::signal() {
 			_sceneMode = 3603;
 		else
 			_sceneMode = 3601;
-		setAction(&_sequenceManager1, this, _sceneMode, &_seeker, &_quinn, 
+		setAction(&_sequenceManager1, this, _sceneMode, &_seeker, &_quinn,
 			&_miranda, &_webbster, &_teal, NULL);
 		break;
 	case 3321:
@@ -4646,7 +4646,7 @@ void Scene3600::signal() {
 		_teal.setStrip(1);
 		_consoleLights.postInit();
 		_sceneMode = 3604;
-		setAction(&_sequenceManager1, this, _sceneMode, &_teal, &_consoleLights, 
+		setAction(&_sequenceManager1, this, _sceneMode, &_teal, &_consoleLights,
 			&_quinn, &_seeker, &_miranda, &_webbster, NULL);
 		break;
 	case 3322:
@@ -4828,7 +4828,7 @@ void Scene3600::signal() {
 	case 3620:
 	// No break on purpose
 	case 3623:
-		if ((_protector._position.x == 226) && (_protector._position.y == 152) 
+		if ((_protector._position.x == 226) && (_protector._position.y == 152)
 				&& _action1._field1E && (_protector._visage == 3127) && (!R2_GLOBALS.getFlag(71))) {
 			R2_GLOBALS._sound2.stop();
 			R2_GLOBALS._sound2.play(331);
@@ -4979,7 +4979,7 @@ void Scene3700::postInit(SceneObjectList *OwnerList) {
 	R2_GLOBALS._sound1.play(332);
 
 	_sceneMode = 3700;
-	setAction(&_sequenceManager, this, 3700, &_quinn, &_seeker, &_miranda, 
+	setAction(&_sequenceManager, this, 3700, &_quinn, &_seeker, &_miranda,
 		&_webbster, &_teleportPad, NULL);
 }
 
@@ -5221,7 +5221,7 @@ void Scene3800::enterArea() {
 			_harness.postInit();
 			_quinnShadow.hide();
 			_sceneMode = 3800;
-			setAction(&_sequenceManager1, this, 3800, &R2_GLOBALS._player, 
+			setAction(&_sequenceManager1, this, 3800, &R2_GLOBALS._player,
 				&_balloon, &_harness, NULL);
 			break;
 		case 3900:
@@ -5391,7 +5391,7 @@ void Scene3800::signal() {
 }
 
 void Scene3800::process(Event &event) {
-	if ((R2_GLOBALS._player._uiEnabled) && (event.eventType == EVENT_BUTTON_DOWN) 
+	if ((R2_GLOBALS._player._uiEnabled) && (event.eventType == EVENT_BUTTON_DOWN)
 			&& (_skylineRect.contains(event.mousePos))) {
 		event.handled = true;
 		switch (R2_GLOBALS._events.getCursor()) {
@@ -5500,7 +5500,7 @@ void Scene3900::Exit5::changeScene() {
 }
 
 void Scene3900::postInit(SceneObjectList *OwnerList) {
-	if ((R2_GLOBALS._desertPreviousDirection == 2) 
+	if ((R2_GLOBALS._desertPreviousDirection == 2)
 			&& (R2_GLOBALS._sceneManager._previousScene != 2700))
 		loadScene(3825);
 	else
diff --git a/engines/tsage/ringworld2/ringworld2_speakers.cpp b/engines/tsage/ringworld2/ringworld2_speakers.cpp
index 45c0078..5fd935f 100644
--- a/engines/tsage/ringworld2/ringworld2_speakers.cpp
+++ b/engines/tsage/ringworld2/ringworld2_speakers.cpp
@@ -221,7 +221,7 @@ void VisualSpeaker::setText(const Common::String &msg) {
 	_sceneText.fixPriority(256);
 
 	// If subtitles are turned off, don't show the text
-	if ((R2_GLOBALS._speechSubtitles & SPEECH_VOICE) &&  
+	if ((R2_GLOBALS._speechSubtitles & SPEECH_VOICE) &&
 			!(R2_GLOBALS._speechSubtitles & SPEECH_TEXT)) {
 		_sceneText.hide();
 	}
@@ -1220,7 +1220,7 @@ void SpeakerQuinn300::animateSpeaker() {
 		((SceneItem *)_action)->_sceneRegionId = 0;
 
 		switch (_object2->_visage) {
-		case 10: 
+		case 10:
 			_object1.setup((v - 1) / 4 + 4010, ((v - ((v - 1) / 4 * 4) - 1) % 8) * 2 + 1, 1);
 			break;
 		case 302:
diff --git a/engines/tsage/sound.cpp b/engines/tsage/sound.cpp
index 3925e67..88bc7f2 100644
--- a/engines/tsage/sound.cpp
+++ b/engines/tsage/sound.cpp
@@ -141,8 +141,8 @@ void SoundManager::syncSounds() {
 		if (voice_mute)
 			subtitles = true;
 
-		R2_GLOBALS._speechSubtitles = 
-			(voice_mute ? 0 : SPEECH_VOICE) | 
+		R2_GLOBALS._speechSubtitles =
+			(voice_mute ? 0 : SPEECH_VOICE) |
 			(!subtitles ? 0 : SPEECH_TEXT);
 	}
 }
@@ -2560,7 +2560,7 @@ bool PlayStream::setFile(const Common::String &filename) {
 
 	// Load header
 	_resData.load(_file);
-	
+
 	// Load the index
 	_index = new uint16[_resData._indexSize / 2];
 	for (uint i = 0; i < (_resData._indexSize / 2); ++i)
@@ -2583,7 +2583,7 @@ bool PlayStream::play(int voiceNum, EventHandler *endAction) {
 		_file.read(&header[0], 4);
 		if (strncmp(header, "FEED", 4))
 			error("Invalid stream data");
-		
+
 		// Get basic details of first sound chunk
 		uint chunkSize = _file.readUint16LE() - 16;
 		_file.skip(4);
@@ -2597,7 +2597,7 @@ bool PlayStream::play(int voiceNum, EventHandler *endAction) {
 		byte *data = (byte *)malloc(chunkSize);
 		_file.read(data, chunkSize);
 		_audioStream->queueBuffer(data, chunkSize, DisposeAfterUse::YES, Audio::FLAG_UNSIGNED);
-		
+
 		// If necessary, load further chunks of the voice in
 		while (chunkSize == (_resData._chunkSize - 16)) {
 			// Ensure the next chunk has the 'MORE' header
@@ -2617,14 +2617,14 @@ bool PlayStream::play(int voiceNum, EventHandler *endAction) {
 			_file.read(data, chunkSize);
 			_audioStream->queueBuffer(data, chunkSize, DisposeAfterUse::YES, Audio::FLAG_UNSIGNED);
 		}
-		
-		g_vm->_mixer->playStream(Audio::Mixer::kSpeechSoundType, &_soundHandle, 
+
+		g_vm->_mixer->playStream(Audio::Mixer::kSpeechSoundType, &_soundHandle,
 			_audioStream, DisposeAfterUse::YES);
 		_voiceNum = voiceNum;
 		_endAction = endAction;
 		return true;
 	}
-	 
+
 	// If it reaches this point, no valid voice data found
 	return false;
 }
@@ -2674,7 +2674,7 @@ uint32 PlayStream::getFileOffset(const uint16 *data, int count, int voiceNum) {
 	int byteIndex = voiceNum >> 3;
 	int shiftAmount = bitsIndex * 2;
 	int bitMask = 3 << shiftAmount;
-	int v = (data[byteIndex] & bitMask) >> shiftAmount; 
+	int v = (data[byteIndex] & bitMask) >> shiftAmount;
 	uint32 offset = 0;
 
 	if (!v)
diff --git a/engines/tsage/sound.h b/engines/tsage/sound.h
index beaf916..3f039ff 100644
--- a/engines/tsage/sound.h
+++ b/engines/tsage/sound.h
@@ -438,7 +438,7 @@ public:
 	PlayStream();
 	virtual ~PlayStream();
 
-	bool setFile(const Common::String &filename); 
+	bool setFile(const Common::String &filename);
 	bool play(int voiceNum, EventHandler *endAction);
 	void stop();
 	bool isPlaying() const;
diff --git a/engines/tsage/user_interface.cpp b/engines/tsage/user_interface.cpp
index c7053a0..ae34ac0 100644
--- a/engines/tsage/user_interface.cpp
+++ b/engines/tsage/user_interface.cpp
@@ -295,7 +295,7 @@ void UICollection::r2rDrawFrame() {
 	GLOBALS._screenSurface.copyFrom(vertLine, SCREEN_WIDTH - 4, 3);
 
 	// Restrict drawing area to exclude the borders at the edge of the screen
-	R2_GLOBALS._screenSurface._clipRect = Rect(4, 4, SCREEN_WIDTH - 4, 
+	R2_GLOBALS._screenSurface._clipRect = Rect(4, 4, SCREEN_WIDTH - 4,
 		SCREEN_HEIGHT - 4);
 }
 






More information about the Scummvm-git-logs mailing list