[Scummvm-cvs-logs] scummvm master -> 89abab97e3124fa25eb4c7d3e8b38501747a8d17

lordhoto lordhoto at gmail.com
Wed Sep 26 04:25:03 CEST 2012


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:
89abab97e3 JANITORIAL: Remove trailing whitespaces.


Commit: 89abab97e3124fa25eb4c7d3e8b38501747a8d17
    https://github.com/scummvm/scummvm/commit/89abab97e3124fa25eb4c7d3e8b38501747a8d17
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-09-25T19:17:55-07:00

Commit Message:
JANITORIAL: Remove trailing whitespaces.

Powered by:
git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'

Changed paths:
    audio/audiostream.cpp
    audio/decoders/quicktime.cpp
    audio/decoders/quicktime_intern.h
    audio/mididrv.cpp
    audio/softsynth/mt32/Part.cpp
    audio/softsynth/mt32/Partial.h
    audio/softsynth/mt32/PartialManager.cpp
    audio/softsynth/mt32/Synth.cpp
    audio/softsynth/mt32/TVF.cpp
    audio/softsynth/mt32/freeverb.cpp
    backends/events/sdl/sdl-events.h
    backends/events/webossdl/webossdl-events.h
    backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
    backends/graphics/openglsdl/openglsdl-graphics.cpp
    backends/midi/sndio.cpp
    backends/mixer/sdl13/sdl13-mixer.cpp
    backends/platform/bada/application.cpp
    backends/platform/bada/sscanf.cpp
    backends/platform/iphone/iphone_video.mm
    backends/platform/iphone/osys_video.mm
    backends/platform/sdl/macosx/macosx.cpp
    backends/platform/sdl/macosx/macosx.h
    backends/taskbar/win32/mingw-compat.h
    backends/timer/bada/timer.cpp
    backends/timer/bada/timer.h
    backends/timer/default/default-timer.cpp
    common/array.h
    common/coroutines.cpp
    common/cosinetables.cpp
    common/gui_options.h
    common/quicktime.h
    common/savefile.h
    common/sinetables.cpp
    common/zlib.h
    devtools/create_project/xcode.cpp
    engines/advancedDetector.h
    engines/agi/agi.cpp
    engines/agi/detection_tables.h
    engines/agi/loader_v1.cpp
    engines/agi/menu.cpp
    engines/agi/op_cmd.cpp
    engines/agi/op_test.cpp
    engines/agi/opcodes.cpp
    engines/agi/saveload.cpp
    engines/agi/sound_pcjr.cpp
    engines/agi/text.cpp
    engines/agi/words.cpp
    engines/agos/saveload.cpp
    engines/agos/sound.cpp
    engines/cge/bitmap.cpp
    engines/cge/cge_main.cpp
    engines/cge/detection.cpp
    engines/cge/events.h
    engines/cge/fileio.cpp
    engines/cge/text.cpp
    engines/composer/composer.cpp
    engines/composer/resource.cpp
    engines/cruise/detection.cpp
    engines/dialogs.cpp
    engines/draci/detection.cpp
    engines/drascula/detection.cpp
    engines/dreamweb/dreamweb.cpp
    engines/dreamweb/object.cpp
    engines/dreamweb/people.cpp
    engines/dreamweb/print.cpp
    engines/dreamweb/sprite.cpp
    engines/dreamweb/vgagrafx.cpp
    engines/groovie/detection.cpp
    engines/lure/decode.cpp
    engines/made/screenfx.cpp
    engines/queen/queen.cpp
    engines/saga/script.cpp
    engines/sci/engine/file.cpp
    engines/sci/engine/kernel_tables.h
    engines/sci/engine/kfile.cpp
    engines/sci/engine/kvideo.cpp
    engines/sci/engine/seg_manager.cpp
    engines/sci/engine/vm.cpp
    engines/sci/graphics/controls32.cpp
    engines/sci/graphics/frameout.cpp
    engines/sci/graphics/paint16.cpp
    engines/sci/sound/drivers/fmtowns.cpp
    engines/sci/video/robot_decoder.cpp
    engines/sci/video/robot_decoder.h
    engines/scumm/actor.cpp
    engines/scumm/actor.h
    engines/scumm/charset.cpp
    engines/scumm/charset.h
    engines/scumm/costume.cpp
    engines/scumm/cursor.cpp
    engines/scumm/debugger.cpp
    engines/scumm/dialogs.cpp
    engines/scumm/he/logic/soccer.cpp
    engines/scumm/object.cpp
    engines/scumm/player_apple2.cpp
    engines/scumm/player_apple2.h
    engines/scumm/player_towns.cpp
    engines/scumm/player_v2cms.cpp
    engines/scumm/saveload.cpp
    engines/scumm/script_v0.cpp
    engines/scumm/script_v2.cpp
    engines/scumm/script_v5.cpp
    engines/scumm/scumm.cpp
    engines/scumm/scumm.h
    engines/scumm/sound.cpp
    engines/scumm/verbs.cpp
    engines/sky/detection.cpp
    engines/sword1/animation.cpp
    engines/sword1/objectman.cpp
    engines/sword2/sprite.cpp
    engines/sword25/sfx/soundengine.cpp
    engines/tinsel/actors.cpp
    engines/tinsel/pcode.cpp
    engines/tinsel/saveload.cpp
    engines/toltecs/animation.cpp
    engines/toltecs/animation.h
    engines/toltecs/menu.cpp
    engines/toltecs/menu.h
    engines/toltecs/microtiles.cpp
    engines/toltecs/movie.cpp
    engines/toltecs/movie.h
    engines/toltecs/music.cpp
    engines/toltecs/palette.cpp
    engines/toltecs/palette.h
    engines/toltecs/render.cpp
    engines/toltecs/render.h
    engines/toltecs/resource.cpp
    engines/toltecs/saveload.cpp
    engines/toltecs/screen.cpp
    engines/toltecs/screen.h
    engines/toltecs/script.cpp
    engines/toltecs/script.h
    engines/toltecs/segmap.cpp
    engines/toltecs/segmap.h
    engines/toltecs/sound.cpp
    engines/toltecs/sprite.cpp
    engines/toltecs/toltecs.cpp
    engines/toltecs/toltecs.h
    engines/tony/custom.cpp
    engines/tony/font.cpp
    engines/tony/gfxcore.cpp
    engines/tony/inventory.cpp
    engines/tony/loc.cpp
    engines/tony/mpal/mpalutils.cpp
    engines/tony/mpal/mpalutils.h
    engines/tony/tony.cpp
    engines/tony/window.cpp
    engines/toon/detection.cpp
    engines/toon/movie.h
    engines/toon/picture.cpp
    engines/tsage/blue_force/blueforce_scenes7.cpp
    engines/tsage/blue_force/blueforce_speakers.cpp
    engines/tsage/blue_force/blueforce_speakers.h
    engines/tsage/detection.cpp
    engines/tsage/globals.cpp
    engines/tsage/ringworld/ringworld_logic.cpp
    engines/tsage/ringworld2/ringworld2_logic.cpp
    engines/tsage/scenes.h
    engines/tsage/tsage.cpp
    engines/wintermute/base/base_engine.cpp
    engines/wintermute/base/base_engine.h
    engines/wintermute/base/base_game.cpp
    engines/wintermute/base/file/base_package.cpp
    engines/wintermute/base/gfx/base_renderer.cpp
    engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
    engines/wintermute/base/saveload.cpp
    engines/wintermute/base/saveload.h
    engines/wintermute/graphics/transparent_surface.cpp
    engines/wintermute/persistent.h
    graphics/VectorRenderer.cpp
    graphics/VectorRenderer.h
    graphics/VectorRendererSpec.cpp
    graphics/decoders/bmp.cpp
    graphics/decoders/jpeg.cpp
    graphics/decoders/pcx.cpp
    graphics/decoders/pcx.h
    graphics/decoders/pict.cpp
    graphics/fonts/consolefont.cpp
    graphics/fonts/newfont.cpp
    graphics/fonts/newfont_big.cpp
    graphics/sjis.h
    graphics/yuv_to_rgb.h
    gui/ThemeParser.cpp
    gui/ThemeParser.h
    gui/launcher.cpp
    gui/options.cpp
    gui/predictivedialog.cpp
    gui/saveload-dialog.cpp
    gui/widget.cpp
    gui/widgets/editable.h
    video/avi_decoder.cpp
    video/avi_decoder.h
    video/bink_decoder.cpp
    video/coktel_decoder.cpp
    video/psx_decoder.cpp
    video/psx_decoder.h
    video/theora_decoder.cpp



diff --git a/audio/audiostream.cpp b/audio/audiostream.cpp
index 6e18570..2d65d4a 100644
--- a/audio/audiostream.cpp
+++ b/audio/audiostream.cpp
@@ -402,7 +402,7 @@ public:
 	}
 
 	int readBuffer(int16 *buffer, const int numSamples) {
-		// Cap us off so we don't read past _totalSamples					
+		// Cap us off so we don't read past _totalSamples
 		int samplesRead = _parentStream->readBuffer(buffer, MIN<int>(numSamples, _totalSamples - _samplesRead));
 		_samplesRead += samplesRead;
 		return samplesRead;
@@ -413,7 +413,7 @@ public:
 	int getRate() const { return _parentStream->getRate(); }
 
 private:
-	int getChannels() const { return isStereo() ? 2 : 1; } 
+	int getChannels() const { return isStereo() ? 2 : 1; }
 
 	AudioStream *_parentStream;
 	DisposeAfterUse::Flag _disposeAfterUse;
diff --git a/audio/decoders/quicktime.cpp b/audio/decoders/quicktime.cpp
index 5276cfc..35210eb 100644
--- a/audio/decoders/quicktime.cpp
+++ b/audio/decoders/quicktime.cpp
@@ -195,7 +195,7 @@ QuickTimeAudioDecoder::QuickTimeAudioTrack::QuickTimeAudioTrack(QuickTimeAudioDe
 
 	if (entry->getCodecTag() == MKTAG('r', 'a', 'w', ' ') || entry->getCodecTag() == MKTAG('t', 'w', 'o', 's'))
 		_parentTrack->sampleSize = (entry->_bitsPerSample / 8) * entry->_channels;
-	
+
 	// Initialize our edit parser too
 	_curEdit = 0;
 	enterNewEdit(Timestamp());
@@ -426,7 +426,7 @@ void QuickTimeAudioDecoder::QuickTimeAudioTrack::enterNewEdit(const Timestamp &p
 	// If we're at the end of the edit list, there's nothing else for us to do here
 	if (allDataRead())
 		return;
-	
+
 	// For an empty edit, we may need to adjust the start time
 	if (_parentTrack->editList[_curEdit].mediaTime == -1) {
 		// Just invalidate the current media position (and make sure the scale
diff --git a/audio/decoders/quicktime_intern.h b/audio/decoders/quicktime_intern.h
index efc97cb..f1ab037 100644
--- a/audio/decoders/quicktime_intern.h
+++ b/audio/decoders/quicktime_intern.h
@@ -88,7 +88,7 @@ protected:
 
 	private:
 		QuickTimeAudioDecoder *_decoder;
-		Track *_parentTrack; 
+		Track *_parentTrack;
 		QueuingAudioStream *_queue;
 		uint _curChunk;
 		Timestamp _curMediaPos, _skipSamples;
@@ -115,7 +115,7 @@ protected:
 		~AudioSampleDesc();
 
 		bool isAudioCodecSupported() const;
-		
+
 		AudioStream *createAudioStream(Common::SeekableReadStream *stream) const;
 		void initCodec();
 
diff --git a/audio/mididrv.cpp b/audio/mididrv.cpp
index 0518915..dea07a7 100644
--- a/audio/mididrv.cpp
+++ b/audio/mididrv.cpp
@@ -240,7 +240,7 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
 				devStr = ConfMan.hasKey("gm_device") ? ConfMan.get("gm_device") : Common::String("null");
 			else
 				devStr = "auto";
-			
+
 			// Default to Null device here, since we also register a default null setting for
 			// the MT32 or GM device in the config manager.
 			hdl = getDeviceHandle(devStr.empty() ? Common::String("null") : devStr);
diff --git a/audio/softsynth/mt32/Part.cpp b/audio/softsynth/mt32/Part.cpp
index c9bd86b..75912f3 100644
--- a/audio/softsynth/mt32/Part.cpp
+++ b/audio/softsynth/mt32/Part.cpp
@@ -411,7 +411,7 @@ void RhythmPart::noteOn(unsigned int midiKey, unsigned int velocity) {
 	// According to info from Mok, keyShift does not appear to affect anything on rhythm part on LAPC-I, but may do on MT-32 - needs investigation
 	synth->printDebug(" Patch: (timbreGroup %u), (timbreNum %u), (keyShift %u), fineTune %u, benderRange %u, assignMode %u, (reverbSwitch %u)", patchTemp->patch.timbreGroup, patchTemp->patch.timbreNum, patchTemp->patch.keyShift, patchTemp->patch.fineTune, patchTemp->patch.benderRange, patchTemp->patch.assignMode, patchTemp->patch.reverbSwitch);
 	synth->printDebug(" PatchTemp: outputLevel %u, (panpot %u)", patchTemp->outputLevel, patchTemp->panpot);
-	synth->printDebug(" RhythmTemp: timbre %u, outputLevel %u, panpot %u, reverbSwitch %u", rhythmTemp[drumNum].timbre, rhythmTemp[drumNum].outputLevel, rhythmTemp[drumNum].panpot, rhythmTemp[drumNum].reverbSwitch); 
+	synth->printDebug(" RhythmTemp: timbre %u, outputLevel %u, panpot %u, reverbSwitch %u", rhythmTemp[drumNum].timbre, rhythmTemp[drumNum].outputLevel, rhythmTemp[drumNum].panpot, rhythmTemp[drumNum].reverbSwitch);
 #endif
 #endif
 	playPoly(drumCache[drumNum], &rhythmTemp[drumNum], midiKey, key, velocity);
diff --git a/audio/softsynth/mt32/Partial.h b/audio/softsynth/mt32/Partial.h
index 95218c8..5e25076 100644
--- a/audio/softsynth/mt32/Partial.h
+++ b/audio/softsynth/mt32/Partial.h
@@ -37,7 +37,7 @@ private:
 	const int debugPartialNum; // Only used for debugging
 	// Number of the sample currently being rendered by generateSamples(), or 0 if no run is in progress
 	// This is only kept available for debugging purposes.
-	unsigned long sampleNum; 
+	unsigned long sampleNum;
 
 	int ownerPart; // -1 if unassigned
 	int mixType;
diff --git a/audio/softsynth/mt32/PartialManager.cpp b/audio/softsynth/mt32/PartialManager.cpp
index 42a3eaa..0a6be82 100644
--- a/audio/softsynth/mt32/PartialManager.cpp
+++ b/audio/softsynth/mt32/PartialManager.cpp
@@ -148,7 +148,7 @@ bool PartialManager::abortFirstPolyPreferHeldWhereReserveExceeded(int minPart) {
 bool PartialManager::freePartials(unsigned int needed, int partNum) {
 	// CONFIRMED: Barring bugs, this matches the real LAPC-I according to information from Mok.
 
-	// BUG: There's a bug in the LAPC-I implementation: 
+	// BUG: There's a bug in the LAPC-I implementation:
 	// When allocating for rhythm part, or when allocating for a part that is using fewer partials than it has reserved,
 	// held and playing polys on the rhythm part can potentially be aborted before releasing polys on the rhythm part.
 	// This bug isn't present on MT-32.
diff --git a/audio/softsynth/mt32/Synth.cpp b/audio/softsynth/mt32/Synth.cpp
index 0861053..7a1b5c2 100644
--- a/audio/softsynth/mt32/Synth.cpp
+++ b/audio/softsynth/mt32/Synth.cpp
@@ -1156,7 +1156,7 @@ void Synth::writeMemoryRegion(const MemoryRegion *region, Bit32u addr, Bit32u le
 			DT(partial[x].tva.envLevel[0]); \
 			DT(partial[x].tva.envLevel[1]); \
 			DT(partial[x].tva.envLevel[2]); \
-			DT(partial[x].tva.envLevel[3]); 
+			DT(partial[x].tva.envLevel[3]);
 
 			DTP(0);
 			DTP(1);
diff --git a/audio/softsynth/mt32/TVF.cpp b/audio/softsynth/mt32/TVF.cpp
index 58f72e5..80b592e 100644
--- a/audio/softsynth/mt32/TVF.cpp
+++ b/audio/softsynth/mt32/TVF.cpp
@@ -64,11 +64,11 @@ static int calcBaseCutoff(const TimbreParam::PartialParam *partialParam, Bit32u
 	int biasPoint = partialParam->tvf.biasPoint;
 	if ((biasPoint & 0x40) == 0) {
 		// biasPoint range here: 0 to 63
-		int bias = biasPoint + 33 - key; // bias range here: -75 to 84 
+		int bias = biasPoint + 33 - key; // bias range here: -75 to 84
 		if (bias > 0) {
 			bias = -bias; // bias range here: -1 to -84
 			baseCutoff += bias * biasLevelToBiasMult[partialParam->tvf.biasLevel]; // Calculation range: -7140 to 7140
-			// baseCutoff range now: -10164 to 10164 
+			// baseCutoff range now: -10164 to 10164
 		}
 	} else {
 		// biasPoint range here: 64 to 127
diff --git a/audio/softsynth/mt32/freeverb.cpp b/audio/softsynth/mt32/freeverb.cpp
index de8f263..181b878 100644
--- a/audio/softsynth/mt32/freeverb.cpp
+++ b/audio/softsynth/mt32/freeverb.cpp
@@ -202,7 +202,7 @@ void revmodel::process(const float *inputL, const float *inputR, float *outputL,
 		// Calculate output REPLACING anything already there
 		*outputL = outL*wet1 + outR*wet2;
 		*outputR = outR*wet1 + outL*wet2;
-		
+
 		inputL++;
 		inputR++;
 		outputL++;
diff --git a/backends/events/sdl/sdl-events.h b/backends/events/sdl/sdl-events.h
index 2ba88c7..ca48351 100644
--- a/backends/events/sdl/sdl-events.h
+++ b/backends/events/sdl/sdl-events.h
@@ -116,7 +116,7 @@ protected:
 	//@}
 
 	/**
-	 * Assigns the mouse coords to the mouse event. Furthermore notify the 
+	 * Assigns the mouse coords to the mouse event. Furthermore notify the
 	 * graphics manager about the position change.
 	 */
 	virtual void processMouseEvent(Common::Event &event, int x, int y);
diff --git a/backends/events/webossdl/webossdl-events.h b/backends/events/webossdl/webossdl-events.h
index 99ed310..1ba5c6f 100644
--- a/backends/events/webossdl/webossdl-events.h
+++ b/backends/events/webossdl/webossdl-events.h
@@ -73,10 +73,10 @@ protected:
 
 	// The current mouse position on the screen.
 	int _curX, _curY;
-	
+
 	// The current screen dimensions
 	int _screenX, _screenY;
-	
+
 	// The drag distance for linear gestures
 	int _swipeDistX, _swipeDistY;
 
@@ -107,7 +107,7 @@ protected:
 	virtual bool handleMouseButtonUp(SDL_Event &ev, Common::Event &event);
 	virtual bool handleMouseMotion(SDL_Event &ev, Common::Event &event);
 	virtual bool pollEvent(Common::Event &event);
-	
+
 	// Utility functions
 	void calculateDimensions();
 };
diff --git a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
index f515343..bd87c9f 100644
--- a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
+++ b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
@@ -479,7 +479,7 @@ void DINGUXSdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable)
 	case OSystem::kFeatureCursorPalette:
 		_cursorPaletteDisabled = !enable;
 		blitCursor();
-		break;	
+		break;
 	default:
 		break;
 	}
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index 67041ae..fed02ef 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -665,7 +665,7 @@ void OpenGLSdlGraphicsManager::notifyResize(const uint width, const uint height)
 void OpenGLSdlGraphicsManager::transformMouseCoordinates(Common::Point &point) {
 	adjustMousePosition(point.x, point.y);
 }
- 
+
 void OpenGLSdlGraphicsManager::notifyMousePos(Common::Point mouse) {
 	setMousePosition(mouse.x, mouse.y);
 }
diff --git a/backends/midi/sndio.cpp b/backends/midi/sndio.cpp
index 21c9ea4..a065a65 100644
--- a/backends/midi/sndio.cpp
+++ b/backends/midi/sndio.cpp
@@ -81,7 +81,7 @@ void MidiDriver_Sndio::send(uint32 b) {
 
 	if (!hdl)
 		return;
-	buf[0] = b & 0xff;	
+	buf[0] = b & 0xff;
 	buf[1] = (b >> 8) & 0xff;
 	buf[2] = (b >> 16) & 0xff;
 	buf[3] = (b >> 24) & 0xff;
@@ -101,7 +101,7 @@ void MidiDriver_Sndio::send(uint32 b) {
 void MidiDriver_Sndio::sysEx(const byte *msg, uint16 length) {
 	if (!hdl)
 		return;
-	
+
 	unsigned char buf[266];
 
 	assert(length + 2 <= ARRAYSIZE(buf));
diff --git a/backends/mixer/sdl13/sdl13-mixer.cpp b/backends/mixer/sdl13/sdl13-mixer.cpp
index 84777c8..24d3434 100644
--- a/backends/mixer/sdl13/sdl13-mixer.cpp
+++ b/backends/mixer/sdl13/sdl13-mixer.cpp
@@ -69,13 +69,13 @@ void Sdl13MixerManager::init() {
 		warning("Could not open audio device: %s", SDL_GetError());
 
 		_mixer = new Audio::MixerImpl(g_system, desired.freq);
-		assert(_mixer); 
+		assert(_mixer);
 		_mixer->setReady(false);
 	} else {
 		debug(1, "Output sample rate: %d Hz", _obtained.freq);
 
 		_mixer = new Audio::MixerImpl(g_system, _obtained.freq);
-		assert(_mixer); 
+		assert(_mixer);
 		_mixer->setReady(true);
 
 		startAudio();
diff --git a/backends/platform/bada/application.cpp b/backends/platform/bada/application.cpp
index ba8e544..e761649 100644
--- a/backends/platform/bada/application.cpp
+++ b/backends/platform/bada/application.cpp
@@ -103,7 +103,7 @@ void BadaScummVM::pauseGame(bool pause) {
 		if (pause && g_engine && !g_engine->isPaused()) {
 			_appForm->pushKey(Common::KEYCODE_SPACE);
 		}
-		
+
 		if (g_system) {
 			((BadaSystem *)g_system)->setMute(pause);
 		}
diff --git a/backends/platform/bada/sscanf.cpp b/backends/platform/bada/sscanf.cpp
index b5e5b88..aa84669 100644
--- a/backends/platform/bada/sscanf.cpp
+++ b/backends/platform/bada/sscanf.cpp
@@ -56,7 +56,7 @@ bool scanInt(const char **in, va_list *ap, int max) {
 
 	bool err = false;
 	if (end == *in || (max > 0 && (end - *in) > max)) {
-		err = true; 
+		err = true;
 	} else {
 		*arg = (int)n;
 		*in = end;
diff --git a/backends/platform/iphone/iphone_video.mm b/backends/platform/iphone/iphone_video.mm
index 7877bc6..54e5d63 100644
--- a/backends/platform/iphone/iphone_video.mm
+++ b/backends/platform/iphone/iphone_video.mm
@@ -476,7 +476,7 @@ const char *iPhone_getDocumentsDir() {
 		else if (_videoContext.screenWidth == 640 && _videoContext.screenHeight == 400)
 			adjustedHeight = 480;
 	}
-	
+
 	float overlayPortraitRatio;
 
 	if (_orientation == UIDeviceOrientationLandscapeLeft || _orientation ==  UIDeviceOrientationLandscapeRight) {
diff --git a/backends/platform/iphone/osys_video.mm b/backends/platform/iphone/osys_video.mm
index aa18564..ebe435c 100644
--- a/backends/platform/iphone/osys_video.mm
+++ b/backends/platform/iphone/osys_video.mm
@@ -353,7 +353,7 @@ void OSystem_IPHONE::copyRectToOverlay(const void *buf, int pitch, int x, int y,
 	}
 
 	byte *dst = (byte *)_videoContext->overlayTexture.getBasePtr(x, y);
-	do { 
+	do {
 		memcpy(dst, src, w * sizeof(uint16));
 		src += pitch;
 		dst += _videoContext->overlayTexture.pitch;
@@ -435,7 +435,7 @@ void OSystem_IPHONE::setCursorPalette(const byte *colors, uint start, uint num)
 
 	for (uint i = start; i < start + num; ++i, colors += 3)
 		_mouseCursorPalette[i] = Graphics::RGBToColor<Graphics::ColorMasks<5551> >(colors[0], colors[1], colors[2]);
-	
+
 	// FIXME: This is just stupid, our client code seems to assume that this
 	// automatically enables the cursor palette.
 	_mouseCursorPaletteEnabled = true;
diff --git a/backends/platform/sdl/macosx/macosx.cpp b/backends/platform/sdl/macosx/macosx.cpp
index 639bd98..fb76c11 100644
--- a/backends/platform/sdl/macosx/macosx.cpp
+++ b/backends/platform/sdl/macosx/macosx.cpp
@@ -156,7 +156,7 @@ Common::String OSystem_MacOSX::getSystemLanguage() const {
 			}
 			CFRelease(preferredLocalizations);
 		}
-		
+
 	}
 	// Falback to POSIX implementation
 	return OSystem_POSIX::getSystemLanguage();
diff --git a/backends/platform/sdl/macosx/macosx.h b/backends/platform/sdl/macosx/macosx.h
index 4837e64..d9cb28b 100644
--- a/backends/platform/sdl/macosx/macosx.h
+++ b/backends/platform/sdl/macosx/macosx.h
@@ -32,7 +32,7 @@ public:
 	virtual bool hasFeature(Feature f);
 
 	virtual bool displayLogFile();
-	
+
 	virtual Common::String getSystemLanguage() const;
 
 	virtual void initBackend();
diff --git a/backends/taskbar/win32/mingw-compat.h b/backends/taskbar/win32/mingw-compat.h
index 5510540..f615193 100644
--- a/backends/taskbar/win32/mingw-compat.h
+++ b/backends/taskbar/win32/mingw-compat.h
@@ -70,7 +70,7 @@ DECLARE_INTERFACE_(IPropertyStore, IUnknown) {
 	STDMETHOD (GetValue) (REFPROPERTYKEY key, PROPVARIANT *pv) PURE;
 	STDMETHOD (SetValue) (REFPROPERTYKEY key, REFPROPVARIANT propvar) PURE;
 	STDMETHOD (Commit) (void) PURE;
-	
+
 private:
 	~IPropertyStore();
 };
@@ -137,7 +137,7 @@ DECLARE_INTERFACE_(ITaskbarList3, IUnknown) {
 	STDMETHOD (SetOverlayIcon) (THIS_ HWND hwnd, HICON hIcon, LPCWSTR pszDescription) PURE;
 	STDMETHOD (SetThumbnailTooltip) (THIS_ HWND hwnd, LPCWSTR pszTip) PURE;
 	STDMETHOD (SetThumbnailClip) (THIS_ HWND hwnd, RECT *prcClip) PURE;
-	
+
 private:
 	~ITaskbarList3();
 };
diff --git a/backends/timer/bada/timer.cpp b/backends/timer/bada/timer.cpp
index b7daf02..e41ecd4 100644
--- a/backends/timer/bada/timer.cpp
+++ b/backends/timer/bada/timer.cpp
@@ -49,7 +49,7 @@ bool TimerSlot::OnStart() {
 		AppLog("failed to start timer");
 		return false;
 	}
-	
+
 	AppLog("started timer %d", _interval);
 	return true;
 }
@@ -57,7 +57,7 @@ bool TimerSlot::OnStart() {
 void TimerSlot::OnStop() {
 	AppLog("timer stopped");
 	if (_timer) {
-		_timer->Cancel();		 
+		_timer->Cancel();
 		delete _timer;
 		_timer = NULL;
 	}
diff --git a/backends/timer/bada/timer.h b/backends/timer/bada/timer.h
index f6ae451..826064d 100644
--- a/backends/timer/bada/timer.h
+++ b/backends/timer/bada/timer.h
@@ -51,7 +51,7 @@ public:
 	BadaTimerManager();
 	~BadaTimerManager();
 
-	bool installTimerProc(TimerProc proc, int32 interval, void *refCon, 
+	bool installTimerProc(TimerProc proc, int32 interval, void *refCon,
 												const Common::String &id);
 	void removeTimerProc(TimerProc proc);
 
diff --git a/backends/timer/default/default-timer.cpp b/backends/timer/default/default-timer.cpp
index 9cd803f..9f56d58 100644
--- a/backends/timer/default/default-timer.cpp
+++ b/backends/timer/default/default-timer.cpp
@@ -156,7 +156,7 @@ void DefaultTimerManager::removeTimerProc(TimerProc callback) {
 	}
 
 	// We need to remove all names referencing the timer proc here.
-	// 
+	//
 	// Else we run into troubles, when the client code removes and readds timer
 	// callbacks.
 	//
diff --git a/common/array.h b/common/array.h
index a2c3023..ca89523 100644
--- a/common/array.h
+++ b/common/array.h
@@ -332,7 +332,7 @@ protected:
 				// Copy a part of the new data to the position inside the
 				// initialized space.
 				copy(first, first + (_size - idx), pos);
-				
+
 				// Copy a part of the new data to the position inside the
 				// uninitialized space.
 				uninitialized_copy(first + (_size - idx), last, _storage + _size);
diff --git a/common/coroutines.cpp b/common/coroutines.cpp
index 7209ea3..849b881 100644
--- a/common/coroutines.cpp
+++ b/common/coroutines.cpp
@@ -717,12 +717,12 @@ void CoroutineScheduler::pulseEvent(uint32 pidEvent) {
 	EVENT *evt = getEvent(pidEvent);
 	if (!evt)
 		return;
-	
+
 	// Set the event as signalled and pulsing
 	evt->signalled = true;
 	evt->pulsing = true;
 
-	// If there's an active process, and it's not the first in the queue, then reschedule all 
+	// If there's an active process, and it's not the first in the queue, then reschedule all
 	// the other prcoesses in the queue to run again this frame
 	if (pCurrent && pCurrent != active->pNext)
 		rescheduleAll();
diff --git a/common/cosinetables.cpp b/common/cosinetables.cpp
index bf158e9..fe8f454 100644
--- a/common/cosinetables.cpp
+++ b/common/cosinetables.cpp
@@ -36,7 +36,7 @@ CosineTable::CosineTable(int bitPrecision) {
 	double freq = 2 * M_PI / m;
 	_table = new float[m];
 
-	// Table contains cos(2*pi*x/n) for 0<=x<=n/4, 
+	// Table contains cos(2*pi*x/n) for 0<=x<=n/4,
 	// followed by its reverse
 	for (int i = 0; i <= m / 4; i++)
 		_table[i] = cos(i * freq);
diff --git a/common/gui_options.h b/common/gui_options.h
index 9da19b1..447fff4 100644
--- a/common/gui_options.h
+++ b/common/gui_options.h
@@ -55,7 +55,7 @@
 #define GUIO_RENDERPC9821	"\037"
 #define GUIO_RENDERPC9801	"\040"
 
-// Special GUIO flags for the AdvancedDetector's caching of game specific 
+// Special GUIO flags for the AdvancedDetector's caching of game specific
 // options.
 #define GUIO_GAMEOPTIONS1	"\041"
 #define GUIO_GAMEOPTIONS2	"\042"
diff --git a/common/quicktime.h b/common/quicktime.h
index 08ca35a..641718e 100644
--- a/common/quicktime.h
+++ b/common/quicktime.h
@@ -168,7 +168,7 @@ protected:
 	Rational _scaleFactorX;
 	Rational _scaleFactorY;
 	Array<Track *> _tracks;
-	
+
 	void init();
 
 private:
diff --git a/common/savefile.h b/common/savefile.h
index da78728..19536da 100644
--- a/common/savefile.h
+++ b/common/savefile.h
@@ -109,12 +109,12 @@ public:
 	 *
 	 * Saved games are compressed by default, and engines are expected to
 	 * always write compressed saves.
-	 * 
+	 *
 	 * A notable exception is if uncompressed files are needed for
 	 * compatibility with games not supported by ScummVM, such as character
 	 * exports from the Quest for Glory series. QfG5 is a 3D game and won't be
 	 * supported by ScummVM.
-	 * 
+	 *
 	 * @param name		the name of the savefile
 	 * @param compress	toggles whether to compress the resulting save file
 	 * 					(default) or not.
diff --git a/common/sinetables.cpp b/common/sinetables.cpp
index a446738..a6ec994 100644
--- a/common/sinetables.cpp
+++ b/common/sinetables.cpp
@@ -36,7 +36,7 @@ SineTable::SineTable(int bitPrecision) {
 	double freq = 2 * M_PI / m;
 	_table = new float[m];
 
-	// Table contains sin(2*pi*x/n) for 0<=x<=n/4, 
+	// Table contains sin(2*pi*x/n) for 0<=x<=n/4,
 	// followed by its reverse
 	for (int i = 0; i <= m / 4; i++)
 		_table[i] = sin(i * freq);
diff --git a/common/zlib.h b/common/zlib.h
index b2d321d..6a840f5 100644
--- a/common/zlib.h
+++ b/common/zlib.h
@@ -114,7 +114,7 @@ bool inflateZlibInstallShield(byte *dst, uint dstLen, const byte *src, uint srcL
  * returned).
  *
  * @param toBeWrapped	the stream to be wrapped (if it is in gzip-format)
- * @param knownSize		a supplied length of the compressed data (if not available directly) 
+ * @param knownSize		a supplied length of the compressed data (if not available directly)
  */
 SeekableReadStream *wrapCompressedReadStream(SeekableReadStream *toBeWrapped, uint32 knownSize = 0);
 
diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index 62dd417..a9b8e7a 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -206,7 +206,7 @@ void XCodeProvider::writeFileListToProject(const FileNode &dir, std::ofstream &p
 	// Create group
 	std::string name = getLastPathComponent(dir.name);
 	Object *group = new Object(this, "PBXGroup_" + name , "PBXGroup", "PBXGroup", "", name);
-	
+
 	// List of children
 	Property children;
 	children.hasOrder = true;
@@ -225,7 +225,7 @@ void XCodeProvider::writeFileListToProject(const FileNode &dir, std::ofstream &p
 		ADD_SETTING_ORDER_NOVALUE(children, getHash(id), node->name, order++);
 		ADD_BUILD_FILE(id, node->name, node->name + " in Sources");
 		ADD_FILE_REFERENCE(node->name, property);
-		
+
 		// Process child nodes
 		if (!node->children.empty())
 			writeFileListToProject(*node, projectFile, indentation + 1, duplicate, objPrefix + node->name + '_', filePrefix + node->name + '/');
diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h
index 8c19d03..3eec33a 100644
--- a/engines/advancedDetector.h
+++ b/engines/advancedDetector.h
@@ -194,7 +194,7 @@ protected:
 
 	/**
 	 * A map containing all the extra game GUI options the engine supports.
-	 */ 
+	 */
 	const ADExtraGuiOptionsMap * const _extraGuiOptions;
 
 	/**
@@ -212,7 +212,7 @@ protected:
 	 *
 	 * Used to override gameid.
 	 * This is a recommended setting to prevent global gameid pollution.
-	 * With this option set, the gameid effectively turns into engineid. 
+	 * With this option set, the gameid effectively turns into engineid.
 	 *
 	 * FIXME: This field actually removes a feature (gameid) in order to
 	 * address a more generic problem. We should find a better way to
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index 45c00a7..98ffca2 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -219,7 +219,7 @@ void AgiEngine::processEvents() {
 			case Common::KEYCODE_F6:
 				key = 0x4000;
 				break;
-			case Common::KEYCODE_F7: 
+			case Common::KEYCODE_F7:
 				key = 0x4100;
 				break;
 			case Common::KEYCODE_F8:
diff --git a/engines/agi/detection_tables.h b/engines/agi/detection_tables.h
index ab0e9a1..9d67b15 100644
--- a/engines/agi/detection_tables.h
+++ b/engines/agi/detection_tables.h
@@ -706,10 +706,10 @@ static const AGIGameDescription gameDescriptions[] = {
 	FANMADE("Go West, Young Hippie", "ff31484ea465441cb5f3a0f8e956b716"),
 	FANMADE("Good Man (demo v3.41)", "3facd8a8f856b7b6e0f6c3200274d88c"),
 
-	GAME_LVFPNF("agi-fanmade", "Groza (russian) [AGDS sample]", "logdir", "421da3a18004122a966d64ab6bd86d2e", -1, 
+	GAME_LVFPNF("agi-fanmade", "Groza (russian) [AGDS sample]", "logdir", "421da3a18004122a966d64ab6bd86d2e", -1,
 		Common::RU_RUS, 0x2440, GF_AGDS, GID_FANMADE, Common::kPlatformPC,GType_V2),
 
-	GAME_LVFPNF("agi-fanmade", "Get Outta Space Quest", "logdir", "aaea5b4a348acb669d13b0e6f22d4dc9", -1, 
+	GAME_LVFPNF("agi-fanmade", "Get Outta Space Quest", "logdir", "aaea5b4a348acb669d13b0e6f22d4dc9", -1,
 		Common::EN_ANY, 0x2440, GF_FANMADE, GID_GETOUTTASQ, Common::kPlatformPC,GType_V2),
 
 	FANMADE_F("Half-Death - Terror At White-Mesa", "b62c05d0ace878261392073f57ae788c", GF_AGIMOUSE),
diff --git a/engines/agi/loader_v1.cpp b/engines/agi/loader_v1.cpp
index c6a3e66..189c98e 100644
--- a/engines/agi/loader_v1.cpp
+++ b/engines/agi/loader_v1.cpp
@@ -64,7 +64,7 @@ int AgiLoader_v1::detectGame() {
 
 int AgiLoader_v1::loadDir_DDP(AgiDir *agid, int offset, int max) {
 	Common::File fp;
-	
+
 	if (!fp.open(_filenameDisk0))
 		return errBadFileOpen;
 
@@ -73,13 +73,13 @@ int AgiLoader_v1::loadDir_DDP(AgiDir *agid, int offset, int max) {
 		agid[i].volume = 0xFF;
 		agid[i].offset = _EMPTY;
 	}
-	
+
 	fp.seek(offset, SEEK_SET);
 	for (int i = 0; i <= max; i++) {
 		int b0 = fp.readByte();
 		int b1 = fp.readByte();
 		int b2 = fp.readByte();
-		
+
 		if (b0 == 0xFF && b1 == 0xFF && b2 == 0xFF) {
 			agid[i].volume = 0xFF;
 			agid[i].offset = _EMPTY;
@@ -98,7 +98,7 @@ int AgiLoader_v1::loadDir_DDP(AgiDir *agid, int offset, int max) {
 
 int AgiLoader_v1::loadDir_BC(AgiDir *agid, int offset, int max) {
 	Common::File fp;
-	
+
 	if (!fp.open(_filenameDisk0))
 		return errBadFileOpen;
 
@@ -107,13 +107,13 @@ int AgiLoader_v1::loadDir_BC(AgiDir *agid, int offset, int max) {
 		agid[i].volume = 0xFF;
 		agid[i].offset = _EMPTY;
 	}
-	
+
 	fp.seek(offset, SEEK_SET);
 	for (int i = 0; i <= max; i++) {
 		int b0 = fp.readByte();
 		int b1 = fp.readByte();
 		int b2 = fp.readByte();
-		
+
 		if (b0 == 0xFF && b1 == 0xFF && b2 == 0xFF) {
 			agid[i].volume = 0xFF;
 			agid[i].offset = _EMPTY;
@@ -171,7 +171,7 @@ uint8 *AgiLoader_v1::loadVolRes(struct AgiDir *agid) {
 
 	if (offset == _EMPTY)
 		return NULL;
-	
+
 	if (offset > IMAGE_SIZE) {
 		fp.open(_filenameDisk1);
 		offset -= IMAGE_SIZE;
@@ -191,7 +191,7 @@ uint8 *AgiLoader_v1::loadVolRes(struct AgiDir *agid) {
 	agid->len = fp.readUint16LE();
 	data = (uint8 *)calloc(1, agid->len + 32);
 	fp.read(data, agid->len);
-	
+
 	fp.close();
 
 	return data;
diff --git a/engines/agi/menu.cpp b/engines/agi/menu.cpp
index cac1701..d23a5a2 100644
--- a/engines/agi/menu.cpp
+++ b/engines/agi/menu.cpp
@@ -289,7 +289,7 @@ bool Menu::keyhandler(int key) {
 		_vm->_game.clockEnabled = false;
 		drawMenuBar();
 	}
-	
+
 	// Mouse handling
 	if (_vm->_mouse.button) {
 		int hmenu, vmenu;
diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp
index 7e04328..5334407 100644
--- a/engines/agi/op_cmd.cpp
+++ b/engines/agi/op_cmd.cpp
@@ -1146,7 +1146,7 @@ void cmdFollowEgo(AgiGame *state, uint8 *p) {
 	vt.parm1 = p1 > vt.stepSize ? p1 : vt.stepSize;
 	vt.parm2 = p2;
 	vt.parm3 = 0xff;
-	
+
 	if (getVersion() < 0x2000) {
 		_v[p2] = 0;
 		vt.flags |= fUpdate | fAnimated;
@@ -1270,7 +1270,7 @@ void cmdVersion(AgiGame *state, uint8 *p) {
 	// no Sierra as it wraps textbox
 
 	Common::String verMsg = TITLE " v%s";
-	
+
 	int ver = getVersion();
 	int maj = (ver >> 12) & 0xf;
 	int min = ver & 0xfff;
@@ -1839,7 +1839,7 @@ int AgiEngine::runLogic(int n) {
 //			ip = 2;
 //			warning("running logic %d\n", n);
 //		}
-		
+
 		if (_game.exitAllLogics)
 			break;
 	}
diff --git a/engines/agi/op_test.cpp b/engines/agi/op_test.cpp
index a44c68e..4d5e6ff 100644
--- a/engines/agi/op_test.cpp
+++ b/engines/agi/op_test.cpp
@@ -403,7 +403,7 @@ int AgiEngine::testIfCode(int lognum) {
 		case 0xFF:
 			endTest = true;
 			continue;
-		
+
 		default:
 			// Evaluate the command and skip the rest of the instruction
 			_agiCondCommands[op](state, p);
diff --git a/engines/agi/opcodes.cpp b/engines/agi/opcodes.cpp
index 29fb860..7a427bd 100644
--- a/engines/agi/opcodes.cpp
+++ b/engines/agi/opcodes.cpp
@@ -130,7 +130,7 @@ AgiInstruction insV1[] = {
 	{ "...",				"",			&cmdUnknown },			// 4E  # show.obj
 	{ "load.logics",		"n",		&cmdLoadLogic },		// 4F # load.global.logics
 	{ "display",			"nnns",		&cmdDisplay },			// 50 TODO: 4 vs 3 args
-	{ "prevent.input???",	"",			&cmdUnknown },			// 51 
+	{ "prevent.input???",	"",			&cmdUnknown },			// 51
 	{ "...",				"",			&cmdUnknown },			// 52 # nop
 	{ "...",				"n",		&cmdUnknown },			// 53 # text.screen
 	{ "...",				"",			&cmdUnknown },			// 54 ???
diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp
index 3e63da7..d451a79 100644
--- a/engines/agi/saveload.cpp
+++ b/engines/agi/saveload.cpp
@@ -821,7 +821,7 @@ int AgiEngine::scummVMSaveLoadDialog(bool isSave) {
 
 	if (slot < 0)
 		return true;
-	
+
 	if (isSave)
 		return doSave(slot, desc);
 	else
diff --git a/engines/agi/sound_pcjr.cpp b/engines/agi/sound_pcjr.cpp
index d21baa4..5bffca5 100644
--- a/engines/agi/sound_pcjr.cpp
+++ b/engines/agi/sound_pcjr.cpp
@@ -234,7 +234,7 @@ int SoundGenPCJr::getNextNote(int ch)
 // if tone isn't touched.. it should be inited so it just plays silence
 // return 0 if it's passing more data
 // return -1 if it's passing nothing (end of data)
-int SoundGenPCJr::getNextNote_v2(int ch) { 
+int SoundGenPCJr::getNextNote_v2(int ch) {
 	ToneChan *tpcm;
 	SndGenChan *chan;
 	const byte *data;
@@ -308,7 +308,7 @@ int SoundGenPCJr::getNextNote_v1(int ch) {
 		_channel[ch].attenuationCopy = 0x0F;
 		return -1;
 	}
-	
+
 	// In the V1 player the default duration for a row is 3 ticks
 	if (duration > 0) {
 		duration--;
diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp
index 1886a74..4877be26 100644
--- a/engines/agi/text.cpp
+++ b/engines/agi/text.cpp
@@ -64,7 +64,7 @@ void AgiEngine::printText2(int l, const char *msg, int foff, int xoff, int yoff,
 
 			// Note: there were extra checks for *m being a cursor character
 			// here (1, 2 or 3), which have been removed, as the cursor
-			// character is no longer printed via this function. 
+			// character is no longer printed via this function.
 			if (*m >= 0x20) {
 				int ypos = (y1 * CHAR_LINES) + yoff;
 
@@ -73,7 +73,7 @@ void AgiEngine::printText2(int l, const char *msg, int foff, int xoff, int yoff,
 
 					if (xpos >= GFX_WIDTH)
 						continue;
-					 
+
 					_gfx->putTextCharacter(l, xpos, ypos, *m, fg, bg, checkerboard);
 
 					if (x1 > maxx)
diff --git a/engines/agi/words.cpp b/engines/agi/words.cpp
index 4400112..9c5b3d3 100644
--- a/engines/agi/words.cpp
+++ b/engines/agi/words.cpp
@@ -41,7 +41,7 @@ int AgiEngine::loadWords_v1(Common::File &f) {
 	int k;
 
 	debug(0, "Loading dictionary");
-	
+
 	// Loop through alphabet, as words in the dictionary file are sorted by
 	// first character
 	f.seek(f.pos() + 26 * 2, SEEK_SET);
@@ -131,7 +131,7 @@ int AgiEngine::findWord(const char *word, int *flen) {
 
 	*flen = 0;
 	Common::Array<AgiWord *> &a = _game.words[c];
-	
+
 	for (int i = 0; i < (int)a.size(); i++) {
 		int wlen = strlen(a[i]->word);
 		// Keep looking till we find the word itself, or the whole phrase.
diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp
index c6bca1a..e13fa21 100644
--- a/engines/agos/saveload.cpp
+++ b/engines/agos/saveload.cpp
@@ -142,7 +142,7 @@ void AGOSEngine_Feeble::quickLoadOrSave() {
 }
 #endif
 
-// The function uses segments of code from the original game scripts 
+// The function uses segments of code from the original game scripts
 // to allow quick loading and saving, but isn't perfect.
 //
 // Unfortuntely this allows loading and saving in locations,
@@ -1424,7 +1424,7 @@ bool AGOSEngine_Elvira2::loadGame(const char *filename, bool restartMode) {
 	// The floppy disk versions of Simon the Sorcerer 2 block changing
 	// to scrolling rooms, if the copy protection fails. But the copy
 	// protection flags are never set in the CD version.
-	// Setting this copy protection flag, allows saved games to be shared 
+	// Setting this copy protection flag, allows saved games to be shared
 	// between all versions of Simon the Sorcerer 2.
 	if (getGameType() == GType_SIMON2) {
 		setBitFlag(135, 1);
diff --git a/engines/agos/sound.cpp b/engines/agos/sound.cpp
index 85c449e..bec41bb 100644
--- a/engines/agos/sound.cpp
+++ b/engines/agos/sound.cpp
@@ -297,7 +297,7 @@ Audio::AudioStream *RawSound::makeAudioStream(uint sound) {
 		warning("RawSound::makeAudioStream: Could not open file \"%s\"", _filename.c_str());
 		return NULL;
 	}
-	
+
 	file->seek(_offsets[sound], SEEK_SET);
 	uint size = file->readUint32BE();
 	return Audio::makeRawStream(new Common::SeekableSubReadStream(file, _offsets[sound] + 4, _offsets[sound] + 4 + size, DisposeAfterUse::YES), 22050, _flags, DisposeAfterUse::YES);
diff --git a/engines/cge/bitmap.cpp b/engines/cge/bitmap.cpp
index 4f85957..7089c8e 100644
--- a/engines/cge/bitmap.cpp
+++ b/engines/cge/bitmap.cpp
@@ -94,7 +94,7 @@ Bitmap::Bitmap(CGEEngine *vm, uint16 w, uint16 h, uint8 fill)
 	// Replicate across the entire table
 	for (HideDesc *hdP = b + 1; hdP < (b + _h); hdP++)
 		*hdP = *b;
-	
+
 	b->_skip = 0;                                    // fix the first entry
 	_v = v;
 	_b = b;
@@ -357,7 +357,7 @@ bool Bitmap::loadVBM(EncryptedStream *f) {
 				// Read in the palette
 				byte palData[kPalSize];
 				f->read(palData, kPalSize);
-				
+
 				const byte *srcP = palData;
 				for (int idx = 0; idx < kPalCount; idx++, srcP += 3) {
 					_vm->_bitmapPalette[idx]._r = *srcP;
diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp
index ecbfba2..f4f1cd3 100644
--- a/engines/cge/cge_main.cpp
+++ b/engines/cge/cge_main.cpp
@@ -280,7 +280,7 @@ Common::Error CGEEngine::loadGameState(int slot) {
 	sceneDown();
 	_hero->park();
 	resetGame();
-	
+
 	// If music is playing, kill it.
 	if (_music)
 		_midiPlayer->killMidi();
@@ -508,7 +508,7 @@ void CGEEngine::loadMapping() {
 		if (!cf.err()) {
 			// Move to the data for the given room
 			cf.seek((_now - 1) * kMapArrSize);
-			
+
 			// Read in the data
 			for (int z = 0; z < kMapZCnt; ++z) {
 				cf.read(&_clusterMap[z][0], kMapXCnt);
@@ -772,7 +772,7 @@ void System::touch(uint16 mask, int x, int y, Common::KeyCode keyCode) {
 
 	if (mask & kEventKeyb) {
 		if (keyCode == Common::KEYCODE_ESCAPE) {
-			// The original was calling keyClick() 
+			// The original was calling keyClick()
 			// The sound is uselessly annoying and noisy, so it has been removed
 			_vm->killText();
 			if (_vm->_startupMode == 1) {
@@ -1044,7 +1044,7 @@ void CGEEngine::loadSprite(const char *fname, int ref, int scene, int col = 0, i
 
 		uint16 len;
 		for (line = sprf.readLine(); !sprf.eos(); line = sprf.readLine()) {
-			len = line.size();			
+			len = line.size();
 			lcnt++;
 			strcpy(tmpStr, line.c_str());
 			if (len == 0 || *tmpStr == '.')
diff --git a/engines/cge/detection.cpp b/engines/cge/detection.cpp
index 2e04b82..3d6c24d 100644
--- a/engines/cge/detection.cpp
+++ b/engines/cge/detection.cpp
@@ -198,7 +198,7 @@ SaveStateList CGEMetaEngine::listSaves(const char *target) const {
 SaveStateDescriptor CGEMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
 	Common::String fileName = Common::String::format("%s.%03d", target, slot);
 	Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(fileName);
-	
+
 	if (f) {
 		CGE::SavegameHeader header;
 
@@ -229,7 +229,7 @@ SaveStateDescriptor CGEMetaEngine::querySaveMetaInfos(const char *target, int sl
 			return desc;
 		}
 	}
-	
+
 	return SaveStateDescriptor();
 }
 
diff --git a/engines/cge/events.h b/engines/cge/events.h
index 522aa67..ab8d872 100644
--- a/engines/cge/events.h
+++ b/engines/cge/events.h
@@ -105,7 +105,7 @@ private:
 	void handleEvents();
 public:
 	EventManager(CGEEngine *vm);
-	void poll();	
+	void poll();
 	void clearEvent(Sprite *spr);
 
 	CGEEvent &getNextEvent();
diff --git a/engines/cge/fileio.cpp b/engines/cge/fileio.cpp
index f23105d..609d5e8 100644
--- a/engines/cge/fileio.cpp
+++ b/engines/cge/fileio.cpp
@@ -98,7 +98,7 @@ uint16 ResourceManager::XCrypt(void *buf, uint16 length) {
 
 	for (uint16 i = 0; i < length; i++)
 		*b++ ^= kCryptSeed;
-	
+
 	return kCryptSeed;
 }
 
diff --git a/engines/cge/text.cpp b/engines/cge/text.cpp
index fd4120d..a8ce877 100644
--- a/engines/cge/text.cpp
+++ b/engines/cge/text.cpp
@@ -63,7 +63,7 @@ int16 Text::count() {
 
 	Common::String line;
 	char tmpStr[kLineMax + 1];
-	
+
 	int counter = 0;
 
 	for (line = tf.readLine(); !tf.eos(); line = tf.readLine()) {
diff --git a/engines/composer/composer.cpp b/engines/composer/composer.cpp
index 23a9d2f..555b703 100644
--- a/engines/composer/composer.cpp
+++ b/engines/composer/composer.cpp
@@ -20,7 +20,7 @@
  *
  */
 #include "common/scummsys.h"
- 
+
 #include "common/config-manager.h"
 #include "common/events.h"
 #include "common/file.h"
diff --git a/engines/composer/resource.cpp b/engines/composer/resource.cpp
index a4e2927..83e4997 100644
--- a/engines/composer/resource.cpp
+++ b/engines/composer/resource.cpp
@@ -240,7 +240,7 @@ bool ComposerArchive::openStream(Common::SeekableReadStream *stream) {
 			res.flags = flags;
 			debug(4, "Id %d, offset %d, size %d, flags %08x", id, offset, size, flags);
 		}
-		
+
 		stream->seek(oldPos);
 	}
 
diff --git a/engines/cruise/detection.cpp b/engines/cruise/detection.cpp
index cbe17ea..ba79df4 100644
--- a/engines/cruise/detection.cpp
+++ b/engines/cruise/detection.cpp
@@ -295,7 +295,7 @@ void CruiseMetaEngine::removeSaveState(const char *target, int slot) const {
 SaveStateDescriptor CruiseMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
 	Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(
 		Cruise::CruiseEngine::getSavegameFile(slot));
-	
+
 	if (f) {
 		Cruise::CruiseSavegameHeader header;
 		Cruise::readSavegameHeader(f, header);
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index cf3dfaa..c884075 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -229,7 +229,7 @@ void MainMenuDialog::save() {
 				  "Please consult the README for basic information, and for "
 				  "instructions on how to obtain further assistance."), status.getDesc().c_str());
 			GUI::MessageDialog dialog(failMessage);
-			dialog.runModal();			
+			dialog.runModal();
 		}
 
 		close();
diff --git a/engines/draci/detection.cpp b/engines/draci/detection.cpp
index 61705a1..2d78d05 100644
--- a/engines/draci/detection.cpp
+++ b/engines/draci/detection.cpp
@@ -153,7 +153,7 @@ void DraciMetaEngine::removeSaveState(const char *target, int slot) const {
 SaveStateDescriptor DraciMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
 	Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(
 		Draci::DraciEngine::getSavegameFile(slot));
-	
+
 	if (f) {
 		Draci::DraciSavegameHeader header;
 		Draci::readSavegameHeader(f, header);
diff --git a/engines/drascula/detection.cpp b/engines/drascula/detection.cpp
index 6e38d49..760d8b7 100644
--- a/engines/drascula/detection.cpp
+++ b/engines/drascula/detection.cpp
@@ -284,7 +284,7 @@ public:
 		Common::StringArray filenames = saveFileMan->listSavefiles(pattern);
 		Common::Array<int> slots;
 		for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
-		
+
 			// Obtain the last 2 digits of the filename, since they correspond to the save slot
 			int slotNum = atoi(file->c_str() + file->size() - 2);
 
@@ -299,7 +299,7 @@ public:
 
 		// Load save index
 		Common::String fileEpa = Common::String::format("%s.epa", target);
-		Common::InSaveFile *epa = saveFileMan->openForLoading(fileEpa); 
+		Common::InSaveFile *epa = saveFileMan->openForLoading(fileEpa);
 
 		// Get savegame names from index
 		Common::String saveDesc;
@@ -307,19 +307,19 @@ public:
 		int line = 1;
 		for (size_t i = 0; i < slots.size(); i++) {
 			// ignore lines corresponding to unused saveslots
-			for (; line < slots[i]; line++) 
-				epa->readLine(); 
+			for (; line < slots[i]; line++)
+				epa->readLine();
 
 			// copy the name in the line corresponding to the save slot and truncate to 22 characters
 			saveDesc = Common::String(epa->readLine().c_str(), 22);
 
 			// handle cases where the save directory and save index are detectably out of sync
-			if (saveDesc == "*") 
+			if (saveDesc == "*")
 				saveDesc = "No name specified.";
 
 			// increment line number to keep it in sync with slot number
-			line++;	
-			
+			line++;
+
 			// Insert savegame name into list
 			saveList.push_back(SaveStateDescriptor(slots[i], saveDesc));
 		}
diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp
index 0ca98d5..5f5d627 100644
--- a/engines/dreamweb/dreamweb.cpp
+++ b/engines/dreamweb/dreamweb.cpp
@@ -516,7 +516,7 @@ uint8 DreamWebEngine::modifyChar(uint8 c) const {
 	case Common::IT_ITA:
 		switch(c) {
 		case 133:
-			return 'Z' + 1;	
+			return 'Z' + 1;
 		case 130:
 			return 'Z' + 2;
 		case 138:
@@ -548,10 +548,10 @@ uint8 DreamWebEngine::modifyChar(uint8 c) const {
 		return c;
 	}
 }
-	
+
 Common::String DreamWebEngine::modifyFileName(const char *name) {
 	Common::String fileName(name);
-	
+
 	// Sanity check
 	if (!fileName.hasPrefix("DREAMWEB."))
 		return fileName;
diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp
index b42591e..1e84aba 100644
--- a/engines/dreamweb/object.cpp
+++ b/engines/dreamweb/object.cpp
@@ -516,7 +516,7 @@ void DreamWebEngine::inToInv() {
 
 	if (_mouseButton == _oldButton || !(_mouseButton & 1))
 		return; // notletgo2
-	
+
 	delPointer();
 	DynObject *object = getExAd(_itemFrame);
 	object->mapad[0] = 4;
@@ -1034,7 +1034,7 @@ void DreamWebEngine::fillOpen() {
 		size = 4;
 	findAllOpen();
 	for (uint8 i = 0; i < size; ++i) {
-		uint8 index = _openInvList[i]._index; 
+		uint8 index = _openInvList[i]._index;
 		uint8 type = _openInvList[i]._type;
 		obToInv(index, type, kInventx + i * kItempicsize, kInventy + 96);
 	}
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index 36a756a..dbb8140 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -411,7 +411,7 @@ void DreamWebEngine::interviewer(ReelRoutine &routine) {
 
 	if (routine.reelPointer() != 250 && routine.reelPointer() != 259 && checkSpeed(routine))
 		routine.incReelPointer();
-	
+
 	showGameReel(&routine);
 }
 
@@ -745,7 +745,7 @@ void DreamWebEngine::introMonks2(ReelRoutine &routine) {
 		if (nextReelPointer == 110) {
 			_introCount++;
 			monks2text();
-		
+
 			if (_introCount == 35)
 				nextReelPointer = 111;
 			else
@@ -895,7 +895,7 @@ void DreamWebEngine::helicopter(ReelRoutine &routine) {
 					nextReelPointer = 9;
 				}
 			}
-		} 
+		}
 
 		routine.setReelPointer(nextReelPointer);
 	}
@@ -1002,7 +1002,7 @@ void DreamWebEngine::businessMan(ReelRoutine &routine) {
 				nextReelPointer = 92;
 			}
 		}
-		
+
 		routine.setReelPointer(nextReelPointer);
 	}
 
@@ -1037,7 +1037,7 @@ void DreamWebEngine::endGameSeq(ReelRoutine &routine) {
 
 	showGameReel(&routine);
 	routine.mapY = _mapY;
-	
+
 	if (routine.reelPointer() == 145) {
 		routine.setReelPointer(146);
 		rollEndCreditsGameWon();
@@ -1070,7 +1070,7 @@ void DreamWebEngine::poolGuard(ReelRoutine &routine) {
 
 	if (checkSpeed(routine)) {
 		uint16 nextReelPointer = routine.reelPointer() + 1;
-		
+
 		if (nextReelPointer != 122) {
 			// Not end guard 1
 			if (nextReelPointer == 147) {
@@ -1103,12 +1103,12 @@ void DreamWebEngine::poolGuard(ReelRoutine &routine) {
 				}
 			}
 		}
-		
+
 		routine.setReelPointer(nextReelPointer);
 	}
 
 	showGameReel(&routine);
-	
+
 	if (routine.reelPointer() != 121 && routine.reelPointer() != 146) {
 		_pointerMode = 0;
 		_vars._watchingTime = 2;
diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp
index 3a2c45e..64b9849 100644
--- a/engines/dreamweb/print.cpp
+++ b/engines/dreamweb/print.cpp
@@ -212,7 +212,7 @@ const char *DreamWebEngine::monPrint(const char *string) {
 	while (!done) {
 
 		uint16 count = getNumber(_monitorCharset, (const uint8 *)iterator, 166, false, &x);
-		do {	
+		do {
 			char c = *iterator++;
 			if (c == ':')
 				break;
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index 5b6cf6a..01570c9 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -52,7 +52,7 @@ void DreamWebEngine::printASprite(const Sprite *sprite) {
 	} else {
 		x = sprite->x + _mapAdX;
 	}
-	
+
 	uint8 c;
 	if (sprite->walkFrame != 0)
 		c = 8;
@@ -97,7 +97,7 @@ void DreamWebEngine::spriteUpdate() {
 		else {
 			backObject(&sprite);
 		}
-	
+
 		if (_nowInNewRoom == 1)
 			break;
 	}
@@ -373,7 +373,7 @@ void DreamWebEngine::lockedDoorway(Sprite *sprite, SetObject *objData) {
 
 		if (sprite->animFrame != 0)
 			--sprite->animFrame;
-	
+
 		_vars._throughDoor = 0;
 		sprite->frameNumber = objData->index = objData->frames[sprite->animFrame];
 
@@ -407,7 +407,7 @@ void DreamWebEngine::liftSprite(Sprite *sprite, SetObject *objData) {
 		}
 		sprite->animFrame = 12;
 		sprite->frameNumber = objData->index = objData->frames[sprite->animFrame];
-	}	
+	}
 	else if (liftFlag == 3) { //openlift
 		if (sprite->animFrame == 12) {
 			_vars._liftFlag = 1;
@@ -672,7 +672,7 @@ static const ReelSound g_roomSound6[] = {
 	{ 255,0 }
 };
 static const ReelSound g_roomSound8[] = {
-	
+
 	{ 12, 51 },
 	{ 13, 53 },
 	{ 14, 14 },
@@ -691,7 +691,7 @@ static const ReelSound g_roomSound10[] = {
 	{ 13, 16 },
 	{ 255,0 }
 };
-	
+
 static const ReelSound g_roomSound11[] = {
 	{ 13, 20 },
 	{ 255,0 }
@@ -779,7 +779,7 @@ static const ReelSound g_roomSound26[] = {
 	{ 15, 102 }, // was 90, should be mine cart
 	{ 255,0 }
 };
-	
+
 static const ReelSound g_roomSound27[] = {
 	{ 22, 36 },
 	{ 13, 125 },
diff --git a/engines/dreamweb/vgagrafx.cpp b/engines/dreamweb/vgagrafx.cpp
index 50c0ef3..d2390fb 100644
--- a/engines/dreamweb/vgagrafx.cpp
+++ b/engines/dreamweb/vgagrafx.cpp
@@ -334,9 +334,9 @@ void DreamWebEngine::zoom() {
 		for (size_t j = 0; j < 23; ++j) {
 			uint8 v = src[j];
 			dst[2*j+0] = v;
-			dst[2*j+1] = v; 
+			dst[2*j+1] = v;
 			dst[2*j+320] = v;
-			dst[2*j+321] = v; 
+			dst[2*j+321] = v;
 		}
 		src += 320;
 		dst += 320*2;
diff --git a/engines/groovie/detection.cpp b/engines/groovie/detection.cpp
index 1a3b313..895686b 100644
--- a/engines/groovie/detection.cpp
+++ b/engines/groovie/detection.cpp
@@ -142,7 +142,7 @@ static const GroovieGameDescription gameDescriptions[] = {
 		{
 			"11h", "Demo",
 			AD_ENTRY1s("disk.1", "aacb32ce07e0df2894bd83a3dee40c12", 70),
-			Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO | ADGF_UNSTABLE, 
+			Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO | ADGF_UNSTABLE,
 			GUIO5(GUIO_NOLAUNCHLOAD, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT)
 		},
 		kGroovieV2, 1
diff --git a/engines/lure/decode.cpp b/engines/lure/decode.cpp
index 1338559..484126c 100644
--- a/engines/lure/decode.cpp
+++ b/engines/lure/decode.cpp
@@ -255,7 +255,7 @@ MemoryBlock *PictureDecoder::vgaDecode(MemoryBlock *src, uint32 maxOutputSize) {
 					decrCtr();
 					if (shlCarry())
 						break;
-			
+
 					AL = dataIn->data()[BP + 3];
 				} else {
 					decrCtr();
@@ -375,7 +375,7 @@ uint32 AnimationDecoder::decode_data(MemoryBlock *src, MemoryBlock *dest, uint32
 	// Main loop
 	bool loopFlag = true;
 	while (loopFlag) {
-		for (;;) {		
+		for (;;) {
 			carry = false;
 			rcl(currData, carry);
 			if (--bitCtr == 0) {
diff --git a/engines/made/screenfx.cpp b/engines/made/screenfx.cpp
index de9231a..ad71f1f 100644
--- a/engines/made/screenfx.cpp
+++ b/engines/made/screenfx.cpp
@@ -200,10 +200,10 @@ void ScreenEffects::stepBlendedPalette() {
 		setBlendedPalette(_blendedPaletteStatus._palette, _blendedPaletteStatus._newPalette,
 			_blendedPaletteStatus._colorCount, _blendedPaletteStatus._value, _blendedPaletteStatus._maxValue);
 		if (_blendedPaletteStatus._value == _blendedPaletteStatus._maxValue)
-			_blendedPaletteStatus._value++;	
-		else					
-			_blendedPaletteStatus._value = MIN<int16>(_blendedPaletteStatus._value + _blendedPaletteStatus._incr, _blendedPaletteStatus._maxValue);	
-	}		
+			_blendedPaletteStatus._value++;
+		else
+			_blendedPaletteStatus._value = MIN<int16>(_blendedPaletteStatus._value + _blendedPaletteStatus._incr, _blendedPaletteStatus._maxValue);
+	}
 }
 
 void ScreenEffects::copyFxRect(Graphics::Surface *surface, int16 x1, int16 y1, int16 x2, int16 y2) {
diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp
index f3b183c..c403536 100644
--- a/engines/queen/queen.cpp
+++ b/engines/queen/queen.cpp
@@ -113,12 +113,12 @@ int QueenMetaEngine::getMaximumSaveSlot() const { return 99; }
 const ExtraGuiOptions QueenMetaEngine::getExtraGuiOptions(const Common::String &target) const {
 	Common::String guiOptions;
 	ExtraGuiOptions options;
-	
+
 	if (target.empty()) {
 		options.push_back(queenExtraGuiOption);
 		return options;
 	}
-	
+
 	if (ConfMan.hasKey("guioptions", target)) {
 		guiOptions = ConfMan.get("guioptions", target);
 		guiOptions = parseGameGUIOptions(guiOptions);
diff --git a/engines/saga/script.cpp b/engines/saga/script.cpp
index 96746b5..3efc554 100644
--- a/engines/saga/script.cpp
+++ b/engines/saga/script.cpp
@@ -948,7 +948,7 @@ void Script::opSpeak(SCRIPTOP_PARAMS) {
 	// scripts change to scene 5, but do not clear the cutaway that appears
 	// before Gorrister's speech starts, resulting in a deadlock. We do this
 	// manually here.
-	if (_vm->getGameId() == GID_IHNM && _vm->_scene->currentChapterNumber() == 1 && 
+	if (_vm->getGameId() == GID_IHNM && _vm->_scene->currentChapterNumber() == 1 &&
 		_vm->_scene->currentSceneNumber() == 5 && _vm->_anim->hasCutaway()) {
 		_vm->_anim->returnFromCutaway();
 	}
diff --git a/engines/sci/engine/file.cpp b/engines/sci/engine/file.cpp
index a0f7ebf..3dc0423 100644
--- a/engines/sci/engine/file.cpp
+++ b/engines/sci/engine/file.cpp
@@ -95,7 +95,7 @@ reg_t file_open(EngineState *s, const Common::String &filename, int mode, bool u
 		outFile = saveFileMan->openForSaving(wrappedName, isCompressed);
 		if (!outFile)
 			debugC(kDebugLevelFile, "  -> file_open(_K_FILE_MODE_CREATE): failed to create file '%s'", englishName.c_str());
-		
+
 		// QfG1 opens the character export file with _K_FILE_MODE_CREATE first,
 		// closes it immediately and opens it again with this here. Perhaps
 		// other games use this for read access as well. I guess changing this
@@ -387,7 +387,7 @@ uint32 VirtualIndexFile::read(char *buffer, uint32 size) {
 uint32 VirtualIndexFile::write(const char *buffer, uint32 size) {
 	_changed = true;
 	uint32 curPos = _ptr - _buffer;
-	
+
 	// Check if the buffer needs to be resized
 	if (curPos + size >= _bufferSize) {
 		_bufferSize = curPos + size + 1;
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h
index f5f4628..b6b36c4 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -524,7 +524,7 @@ static SciKernelMapEntry s_kernelMap[] = {
 	{ MAP_CALL(PalCycle),          SIG_EVERYWHERE,           "i(.*)",                 NULL,            NULL },
 
 	// SCI2 Empty functions
-	
+
 	// Debug function used to track resources
 	{ MAP_EMPTY(ResourceTrack),     SIG_EVERYWHERE,          "(.*)",                  NULL,            NULL },
 	// Future TODO: This call is used in the floppy version of QFG4 to add
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index f7cc4f4..e977f15 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -340,7 +340,7 @@ reg_t kFileIOClose(EngineState *s, int argc, reg_t *argv) {
 
 	if (argv[0] == SIGNAL_REG)
 		return s->r_acc;
-	
+
 	uint16 handle = argv[0].toUint16();
 
 #ifdef ENABLE_SCI32
@@ -624,7 +624,7 @@ reg_t kFileIOExists(EngineState *s, int argc, reg_t *argv) {
 	// Special case for KQ6 Mac: The game checks for two video files to see
 	// if they exist before it plays them. Since we support multiple naming
 	// schemes for resource fork files, we also need to support that here in
-	// case someone has a "HalfDome.bin" file, etc. 
+	// case someone has a "HalfDome.bin" file, etc.
 	if (!exists && g_sci->getGameId() == GID_KQ6 && g_sci->getPlatform() == Common::kPlatformMacintosh &&
 			(name == "HalfDome" || name == "Kq6Movie"))
 		exists = Common::MacResManager::exists(name);
@@ -998,7 +998,7 @@ reg_t kMakeSaveFileName(EngineState *s, int argc, reg_t *argv) {
 	if ((virtualId < SAVEGAMEID_OFFICIALRANGE_START) || (virtualId > SAVEGAMEID_OFFICIALRANGE_END))
 		error("kMakeSaveFileName: invalid savegame ID specified");
 	uint saveSlot = virtualId - SAVEGAMEID_OFFICIALRANGE_START;
-	
+
 	Common::Array<SavegameDesc> saves;
 	listSavegames(saves);
 
diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp
index 6bf9aff..9b0cb38 100644
--- a/engines/sci/engine/kvideo.cpp
+++ b/engines/sci/engine/kvideo.cpp
@@ -275,7 +275,7 @@ reg_t kRobot(EngineState *s, int argc, reg_t *argv) {
 			// Signal the engine scripts that the video is done
 			writeSelector(s->_segMan, argv[1], SELECTOR(signal), SIGNAL_REG);
 		} else {
-			writeSelector(s->_segMan, argv[1], SELECTOR(signal), NULL_REG);	
+			writeSelector(s->_segMan, argv[1], SELECTOR(signal), NULL_REG);
 		}
 		break;
 	default:
diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp
index 951fc7c..04c1dab 100644
--- a/engines/sci/engine/seg_manager.cpp
+++ b/engines/sci/engine/seg_manager.cpp
@@ -825,7 +825,7 @@ byte *SegManager::allocDynmem(int size, const char *descr, reg_t *addr) {
 }
 
 bool SegManager::freeDynmem(reg_t addr) {
-	if (addr.getSegment() < 1 || addr.getSegment() >= _heap.size() || 
+	if (addr.getSegment() < 1 || addr.getSegment() >= _heap.size() ||
 		!_heap[addr.getSegment()] || _heap[addr.getSegment()]->getType() != SEG_TYPE_DYNMEM)
 		return false; // error
 
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index 3f43966..ef8f165 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -228,7 +228,7 @@ ExecStack *execute_method(EngineState *s, uint16 script, uint16 pubfunct, StackP
 	uint32 exportAddr = scr->validateExportFunc(pubfunct, false);
 	if (!exportAddr)
 		return NULL;
-	
+
 	// Check if a breakpoint is set on this method
 	g_sci->checkExportBreakpoint(script, pubfunct);
 
diff --git a/engines/sci/graphics/controls32.cpp b/engines/sci/graphics/controls32.cpp
index ad1d9e8..5535a74 100644
--- a/engines/sci/graphics/controls32.cpp
+++ b/engines/sci/graphics/controls32.cpp
@@ -68,7 +68,7 @@ void GfxControls32::kernelTexteditChange(reg_t controlObject) {
 
 	while (captureEvents) {
 		curEvent = g_sci->getEventManager()->getSciEvent(SCI_EVENT_KEYBOARD | SCI_EVENT_PEEK);
-	
+
 		if (curEvent.type == SCI_EVENT_NONE) {
 			eventMan->getSciEvent(SCI_EVENT_KEYBOARD);	// consume the event
 		} else {
@@ -170,11 +170,11 @@ void GfxControls32::kernelTexteditChange(reg_t controlObject) {
 				// Note: the following checkAltInput call might make the text
 				// too wide to fit, but SSCI fails to check that too.
 			}
-			
+
 			reg_t hunkId = readSelector(_segMan, controlObject, SELECTOR(bitmap));
 			Common::Rect nsRect = g_sci->_gfxCompare->getNSRect(controlObject);
 			//texteditCursorErase();	// TODO: Cursor
-			
+
 			// Write back string
 			_segMan->strcpy(textReference, text.c_str());
 			// Modify the buffer and show it
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index 968014c..8b7fa2c 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -197,7 +197,7 @@ void GfxFrameout::kernelUpdatePlane(reg_t object) {
 			} else {
 				it->planeOffsetX = 0;
 			}
-			
+
 			if (it->planeRect.top < 0) {
 				it->planeOffsetY = -it->planeRect.top;
 				it->planeRect.top = 0;
@@ -420,7 +420,7 @@ void GfxFrameout::deletePlaneItems(reg_t planeObject) {
 		} else {
 			objectMatches = true;
 		}
-		
+
 		if (objectMatches) {
 			FrameoutEntry *itemEntry = *listIterator;
 			listIterator = _screenItems.erase(listIterator);
@@ -661,7 +661,7 @@ void GfxFrameout::kernelFrameout() {
 
 			if (!itemEntry->visible)
 				continue;
-			
+
 			if (itemEntry->object.isNull()) {
 				// Picture cel data
 				_coordAdjuster->fromScriptToDisplay(itemEntry->y, itemEntry->x);
@@ -703,7 +703,7 @@ void GfxFrameout::kernelFrameout() {
 						view->getCelRect(itemEntry->loopNo, itemEntry->celNo,
 							itemEntry->x, itemEntry->y, itemEntry->z, itemEntry->celRect);
 					else
-						view->getCelScaledRect(itemEntry->loopNo, itemEntry->celNo, 
+						view->getCelScaledRect(itemEntry->loopNo, itemEntry->celNo,
 							itemEntry->x, itemEntry->y, itemEntry->z, itemEntry->scaleX,
 							itemEntry->scaleY, itemEntry->celRect);
 
@@ -755,10 +755,10 @@ void GfxFrameout::kernelFrameout() {
 				if (view) {
 					if (!clipRect.isEmpty()) {
 						if ((itemEntry->scaleX == 128) && (itemEntry->scaleY == 128))
-							view->draw(itemEntry->celRect, clipRect, translatedClipRect, 
+							view->draw(itemEntry->celRect, clipRect, translatedClipRect,
 								itemEntry->loopNo, itemEntry->celNo, 255, 0, view->isSci2Hires());
 						else
-							view->drawScaled(itemEntry->celRect, clipRect, translatedClipRect, 
+							view->drawScaled(itemEntry->celRect, clipRect, translatedClipRect,
 								itemEntry->loopNo, itemEntry->celNo, 255, itemEntry->scaleX, itemEntry->scaleY);
 					}
 				}
@@ -817,7 +817,7 @@ void GfxFrameout::printPlaneItemList(Console *con, reg_t planeObject) {
 	for (FrameoutList::iterator listIterator = _screenItems.begin(); listIterator != _screenItems.end(); listIterator++) {
 		FrameoutEntry *e = *listIterator;
 		reg_t itemPlane = readSelector(_segMan, e->object, SELECTOR(plane));
-			
+
 		if (planeObject == itemPlane) {
 			Common::String curItemName = _segMan->getObjectName(e->object);
 			Common::Rect icr = e->celRect;
diff --git a/engines/sci/graphics/paint16.cpp b/engines/sci/graphics/paint16.cpp
index 89f3625..d20aa80 100644
--- a/engines/sci/graphics/paint16.cpp
+++ b/engines/sci/graphics/paint16.cpp
@@ -559,8 +559,8 @@ reg_t GfxPaint16::kernelDisplay(const char *text, int argc, reg_t *argv) {
 			SciTrackOriginReply originReply;
 			SciWorkaroundSolution solution = trackOriginAndFindWorkaround(0, kDisplay_workarounds, &originReply);
 			if (solution.type == WORKAROUND_NONE)
-				error("Unknown kDisplay argument (%04x:%04x) from method %s::%s (script %d, localCall %x)", 
-						PRINT_REG(displayArg), originReply.objectName.c_str(), originReply.methodName.c_str(), 
+				error("Unknown kDisplay argument (%04x:%04x) from method %s::%s (script %d, localCall %x)",
+						PRINT_REG(displayArg), originReply.objectName.c_str(), originReply.methodName.c_str(),
 						originReply.scriptNr, originReply.localCallOffset);
 			assert(solution.type == WORKAROUND_IGNORE);
 			break;
diff --git a/engines/sci/sound/drivers/fmtowns.cpp b/engines/sci/sound/drivers/fmtowns.cpp
index 6d8bb2e..21cb2f1 100644
--- a/engines/sci/sound/drivers/fmtowns.cpp
+++ b/engines/sci/sound/drivers/fmtowns.cpp
@@ -52,8 +52,8 @@ public:
 	uint16 _duration;
 
 private:
-	uint8 _id;	
-	uint8 _velo;	
+	uint8 _id;
+	uint8 _velo;
 	uint8 _program;
 
 	MidiDriver_FMTowns *_drv;
@@ -76,7 +76,7 @@ public:
 
 	void addChannels(int num);
 	void dropChannels(int num);
-	
+
 	uint8 currentProgram() const;
 
 private:
@@ -132,7 +132,7 @@ private:
 
 	TownsMidiPart **_parts;
 	TownsChannel **_out;
-	
+
 	uint8 _masterVolume;
 
 	bool _soundOn;
@@ -590,7 +590,7 @@ void MidiDriver_FMTowns::addMissingChannels() {
 			avlChan -= _parts[i]->_chanMissing;
 			uint8 m = _parts[i]->_chanMissing;
 			_parts[i]->_chanMissing = 0;
-			_parts[i]->addChannels(m);			
+			_parts[i]->addChannels(m);
 		} else {
 			_parts[i]->_chanMissing -= avlChan;
 			_parts[i]->addChannels(avlChan);
@@ -601,7 +601,7 @@ void MidiDriver_FMTowns::addMissingChannels() {
 
 void MidiDriver_FMTowns::updateParser() {
 	if (_timerProc)
-		_timerProc(_timerProcPara);		
+		_timerProc(_timerProcPara);
 }
 
 void MidiDriver_FMTowns::updateChannels() {
diff --git a/engines/sci/video/robot_decoder.cpp b/engines/sci/video/robot_decoder.cpp
index 608c771..0337a8d 100644
--- a/engines/sci/video/robot_decoder.cpp
+++ b/engines/sci/video/robot_decoder.cpp
@@ -109,13 +109,13 @@ bool RobotDecoder::loadStream(Common::SeekableReadStream *stream) {
 }
 
 bool RobotDecoder::load(GuiResourceId id) {
-	// TODO: RAMA's robot 1003 cannot be played (shown at the menu screen) - 
+	// TODO: RAMA's robot 1003 cannot be played (shown at the menu screen) -
 	// its drawn at odd coordinates. SV can't play it either (along with some
 	// others), so it must be some new functionality added in RAMA's robot
 	// videos. Skip it for now.
 	if (g_sci->getGameId() == GID_RAMA && id == 1003)
 		return false;
-	
+
 	// TODO: The robot video in the Lighthouse demo gets stuck
 	if (g_sci->getGameId() == GID_LIGHTHOUSE && id == 16)
 		return false;
@@ -247,7 +247,7 @@ void RobotDecoder::readNextPacket() {
 		audioTrack->queueBuffer(g_sci->_audio->getDecodedRobotAudioFrame(_fileStream, audioChunkSize), audioChunkSize * 2);
 	} else {
 		_fileStream->skip(audioChunkSize);
-	}	
+	}
 }
 
 void RobotDecoder::readHeaderChunk() {
diff --git a/engines/sci/video/robot_decoder.h b/engines/sci/video/robot_decoder.h
index ebc3262..437954f 100644
--- a/engines/sci/video/robot_decoder.h
+++ b/engines/sci/video/robot_decoder.h
@@ -45,13 +45,13 @@ public:
 	bool loadStream(Common::SeekableReadStream *stream);
 	bool load(GuiResourceId id);
 	void close();
-	
+
 	void setPos(uint16 x, uint16 y) { _pos = Common::Point(x, y); }
 	Common::Point getPos() const { return _pos; }
 
 protected:
 	void readNextPacket();
-	
+
 private:
 	class RobotVideoTrack : public FixedRateVideoTrack {
 	public:
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp
index b8722b6..0c375ef 100644
--- a/engines/scumm/actor.cpp
+++ b/engines/scumm/actor.cpp
@@ -573,19 +573,19 @@ bool Actor_v2::checkWalkboxesHaveDirectPath(Common::Point &foundPath) {
 	return false;
 }
 
-bool Actor_v0::intersectLineSegments(const Common::Point &line1Start, const Common::Point &line1End, 
-	const Common::Point &line2Start, const Common::Point &line2End, Common::Point &result) 
+bool Actor_v0::intersectLineSegments(const Common::Point &line1Start, const Common::Point &line1End,
+	const Common::Point &line2Start, const Common::Point &line2End, Common::Point &result)
 {
 	const Common::Point v1 = line1End - line1Start; // line1(n1) = line1Start + n1 * v1
 	const Common::Point v2 = line2End - line2Start; // line2(n2) = line2Start + n2 * v2
-	
+
 	double det = v2.x * v1.y - v1.x * v2.y;
 	if (det == 0)
 		return false;
 
-	double n1 = ((double)v2.x * (line2Start.y - line1Start.y) - 
+	double n1 = ((double)v2.x * (line2Start.y - line1Start.y) -
 		         (double)v2.y * (line2Start.x - line1Start.x)) / det;
-	double n2 = ((double)v1.x * (line2Start.y - line1Start.y) - 
+	double n2 = ((double)v1.x * (line2Start.y - line1Start.y) -
 		         (double)v1.y * (line2Start.x - line1Start.x)) / det;
 
 	// both coefficients have to be in [0, 1], otherwise the intersection is
@@ -599,16 +599,16 @@ bool Actor_v0::intersectLineSegments(const Common::Point &line1Start, const Comm
 }
 
 /*
- * MM v0 allows the actor to walk in a direct line between boxes to the target 
+ * MM v0 allows the actor to walk in a direct line between boxes to the target
  * if actor and target share a horizontal or vertical corridor.
- * If such a corridor is found the actor is not forced to go horizontally or 
+ * If such a corridor is found the actor is not forced to go horizontally or
  * vertically from one box to the next but can also walk diagonally.
  *
- * Note: the original v0 interpreter sets the target destination for diagonal 
+ * Note: the original v0 interpreter sets the target destination for diagonal
  * walking only once and then rechecks whenever the actor reaches a new box if the
- * walk destination is still suitable for the current box. 
- * ScummVM does not perform such a check, so it is possible to leave the walkboxes 
- * in some cases, for example L-shaped rooms like the swimming pool (actor walks over water) 
+ * walk destination is still suitable for the current box.
+ * ScummVM does not perform such a check, so it is possible to leave the walkboxes
+ * in some cases, for example L-shaped rooms like the swimming pool (actor walks over water)
  * or the medical room (actor walks over examination table).
  * To solve this we intersect the new walk destination with the actor's walkbox borders,
  * so a recheck is done when the actor leaves his box. This is done by the
@@ -992,7 +992,7 @@ void Actor_v0::setDirection(int direction) {
 			res = 7;	// Face Camera
 			break;
 	}
-	
+
 	_animFrameRepeat = -1;
 	animateActor(res);
 	if (_moving)
@@ -1408,7 +1408,7 @@ void Actor::showActor() {
 
 	if (_vm->_game.version == 0) {
 		Actor_v0 *a = ((Actor_v0 *)this);
-		
+
 		a->_costCommand = a->_costCommandNew = 0xFF;
 
 		for (int i = 0; i < 8; ++i) {
@@ -2056,7 +2056,7 @@ void Actor_v0::animateCostume() {
 void Actor_v0::speakCheck() {
 	if (v0ActorTalkArray[_number] & 0x80)
 		return;
-	
+
 	int cmd = newDirToOldDir(_facing);
 
 	if (_speaking & 0x80)
@@ -2884,7 +2884,7 @@ void Actor_v0::animateActor(int anim) {
 
 		_costCommandNew = anim;
 		_vm->_costumeLoader->costumeDecodeData(this, 0, 0);
-		
+
 		if (dir == -1)
 			return;
 
diff --git a/engines/scumm/actor.h b/engines/scumm/actor.h
index 0ed239d..a733fdb 100644
--- a/engines/scumm/actor.h
+++ b/engines/scumm/actor.h
@@ -377,7 +377,7 @@ public:
 	virtual void saveLoadWithSerializer(Serializer *ser);
 
 protected:
-	bool intersectLineSegments(const Common::Point &line1Start, const Common::Point &line1End, 
+	bool intersectLineSegments(const Common::Point &line1Start, const Common::Point &line1End,
 		const Common::Point &line2Start, const Common::Point &line2End, Common::Point &result);
 	virtual bool checkWalkboxesHaveDirectPath(Common::Point &foundPath);
 };
diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp
index 4064853..9ae75b6 100644
--- a/engines/scumm/charset.cpp
+++ b/engines/scumm/charset.cpp
@@ -69,7 +69,7 @@ void ScummEngine::loadCJKFont() {
 
 		_cjkFont->setDrawingMode(Graphics::FontSJIS::kShadowMode);
 		_2byteWidth = _2byteHeight = 12;
-		_useCJKMode = true;		
+		_useCJKMode = true;
 #endif
 	} else if (_game.id == GID_MONKEY && _game.platform == Common::kPlatformSegaCD && _language == Common::JA_JPN) {
 		int numChar = 1413;
@@ -499,7 +499,7 @@ int CharsetRendererV3::getCharWidth(uint16 chr) {
 
 	if (_vm->_useCJKMode && (chr & 0x80))
 		spacing = _vm->_2byteWidth / 2;
-	
+
 	if (!spacing)
 		spacing = *(_widthTable + chr);
 
@@ -644,7 +644,7 @@ void CharsetRendererV3::printChar(int chr, bool ignoreCharsetMask) {
 		drawBits1(*vs, _left + vs->xstart, drawTop, charPtr, drawTop, origWidth, origHeight);
 	else
 		drawBits1(_vm->_textSurface, _left * _vm->_textSurfaceMultiplier, _top * _vm->_textSurfaceMultiplier, charPtr, drawTop, origWidth, origHeight);
-	
+
 	if (is2byte) {
 		origWidth /= _vm->_textSurfaceMultiplier;
 		height /= _vm->_textSurfaceMultiplier;
@@ -1399,7 +1399,7 @@ void CharsetRendererTownsClassic::drawBitsN(const Graphics::Surface&, byte *dst,
 		_vm->_cjkFont->drawChar(_vm->_textSurface, _sjisCurChar, _left * _vm->_textSurfaceMultiplier, (_top - _vm->_screenTop) * _vm->_textSurfaceMultiplier, _vm->_townsCharsetColorMap[1], _shadowColor);
 		return;
 	}
-	
+
 	bool scale2x = (_vm->_textSurfaceMultiplier == 2);
 	dst = (byte *)_vm->_textSurface.pixels + (_top - _vm->_screenTop) * _vm->_textSurface.pitch * _vm->_textSurfaceMultiplier + _left * _vm->_textSurfaceMultiplier;
 
diff --git a/engines/scumm/charset.h b/engines/scumm/charset.h
index b8f1d84..1c1df51 100644
--- a/engines/scumm/charset.h
+++ b/engines/scumm/charset.h
@@ -112,7 +112,7 @@ public:
 class CharsetRendererClassic : public CharsetRendererCommon {
 protected:
 	virtual void drawBitsN(const Graphics::Surface &s, byte *dst, const byte *src, byte bpp, int drawTop, int width, int height);
-	void printCharIntern(bool is2byte, const byte *charPtr, int origWidth, int origHeight, int width, int height, VirtScreen *vs, bool ignoreCharsetMask);	
+	void printCharIntern(bool is2byte, const byte *charPtr, int origWidth, int origHeight, int width, int height, VirtScreen *vs, bool ignoreCharsetMask);
 	virtual bool prepareDraw(uint16 chr);
 
 	int _width, _height, _origWidth, _origHeight;
@@ -195,7 +195,7 @@ public:
 
 	int getCharWidth(uint16 chr);
 	int getFontHeight();
-	
+
 private:
 	void enableShadow(bool enable);
 	void drawBits1(Graphics::Surface &dest, int x, int y, const byte *src, int drawTop, int width, int height);
diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp
index 3f89bc9..4ebdd00 100644
--- a/engines/scumm/costume.cpp
+++ b/engines/scumm/costume.cpp
@@ -1188,7 +1188,7 @@ byte V0CostumeRenderer::drawLimb(const Actor *a, int limb) {
 		_draw_top = 200;
 		_draw_bottom = 0;
 	}
-	
+
 	// Invalid current position?
 	if (a->_cost.curpos[limb] == 0xFFFF)
 		return 0;
@@ -1377,7 +1377,7 @@ byte V0CostumeLoader::increaseAnim(Actor *a, int limb) {
 			// Reset the comstume command
 			a0->_costCommandNew = 0xFF;
 			a0->_costCommand = 0xFF;
-			
+
 			// Set the frame/start to invalid
 			a0->_cost.frame[limb] = 0xFFFF;
 			a0->_cost.start[limb] = 0xFFFF;
diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp
index 8868189..269ae9e 100644
--- a/engines/scumm/cursor.cpp
+++ b/engines/scumm/cursor.cpp
@@ -180,7 +180,7 @@ void ScummEngine_v70he::setDefaultCursor() {
 								   0xff, 0xff, 0xff,
 								   0,    0,    0,    };
 
-	
+
 	memset(_grabbedCursor, 5, sizeof(_grabbedCursor));
 
 	_cursor.hotspotX = _cursor.hotspotY = 2;
diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp
index edcf2e6..dc5acbd 100644
--- a/engines/scumm/debugger.cpp
+++ b/engines/scumm/debugger.cpp
@@ -382,7 +382,7 @@ bool ScummDebugger::Cmd_Actor(int argc, const char **argv) {
 			DebugPrintf("Actor[%d].costume = %d\n", actnum, a->_costume);
 		}
 	} else if (!strcmp(argv[2], "name")) {
-		DebugPrintf("Name of actor %d: %s\n", actnum, 
+		DebugPrintf("Name of actor %d: %s\n", actnum,
 			_vm->getObjOrActorName(_vm->actorToObj(actnum)));
 	} else if (!strcmp(argv[2], "condmask")) {
 		if (argc > 3) {
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index 0e531da..945c5b6 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -180,7 +180,7 @@ static const ResString string_map_table_v345[] = {
 	// "Moechten Sie wirklich neu starten?  (J/N)J"
 	// Will react to J as 'Yes'
 	{5, _s("Are you sure you want to restart?  (Y/N)")},
-	// I18N: you may specify 'Yes' symbol at the end of the line. See previous comment 
+	// I18N: you may specify 'Yes' symbol at the end of the line. See previous comment
 	{6, _s("Are you sure you want to quit?  (Y/N)")},
 
 	// Added in SCUMM4
diff --git a/engines/scumm/he/logic/soccer.cpp b/engines/scumm/he/logic/soccer.cpp
index 05f377a..2b29f93 100644
--- a/engines/scumm/he/logic/soccer.cpp
+++ b/engines/scumm/he/logic/soccer.cpp
@@ -303,7 +303,7 @@ int LogicHEsoccer::op_1008(int outArray, int srcX, int srcY, int srcZ, int vecX,
 				putInArray(outArray, segmentsSoFar, 5, vecX);
 				putInArray(outArray, segmentsSoFar, 6, vecY);
 				putInArray(outArray, segmentsSoFar++, 7, vecZ);
-			} 
+			}
 		} else {
 			srcY = 0;
 			int thisVecX = vecX;
@@ -628,7 +628,7 @@ int LogicHEsoccer::op_1014(int32 srcX, int32 srcY, int32 srcZ, int32 velX, int32
 		adjustedVelZ = ((double)srcZ - 3869.0) / 100.0;
 		break;
 	}
-	
+
 	int foundCollision = 0;
 
 	// work out which collision objects we might collide with (if any)
diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp
index 399cd91..77c75c4 100644
--- a/engines/scumm/object.cpp
+++ b/engines/scumm/object.cpp
@@ -335,7 +335,7 @@ int ScummEngine::whereIsObject(int object) const {
 		return WIO_NOT_FOUND;
 
 	if ((_game.version != 0 || OBJECT_V0_TYPE(object) == 0) &&
-		 _objectOwnerTable[object] != OF_OWNER_ROOM) 
+		 _objectOwnerTable[object] != OF_OWNER_ROOM)
 	{
 		for (i = 0; i < _numInventory; i++)
 			if (_inventory[i] == object)
@@ -1225,7 +1225,7 @@ byte *ScummEngine::getOBCDFromObject(int obj, bool v0CheckInventory) {
 	byte *ptr;
 
 	if ((_game.version != 0 || OBJECT_V0_TYPE(obj) == 0) &&
-		_objectOwnerTable[obj] != OF_OWNER_ROOM) 
+		_objectOwnerTable[obj] != OF_OWNER_ROOM)
 	{
 		if (_game.version == 0 && !v0CheckInventory)
 			return 0;
diff --git a/engines/scumm/player_apple2.cpp b/engines/scumm/player_apple2.cpp
index a8e150c..58e4f78 100644
--- a/engines/scumm/player_apple2.cpp
+++ b/engines/scumm/player_apple2.cpp
@@ -61,8 +61,8 @@ public:
 
 private:
 	void _update(int interval /*a*/, int count /*y*/) { // D076
-		assert(interval > 0); // 0 == 256? 
-		assert(count > 0); // 0 == 256? 
+		assert(interval > 0); // 0 == 256?
+		assert(count > 0); // 0 == 256?
 
 		for (; count >= 0; --count) {
 			_player->speakerToggle();
@@ -99,7 +99,7 @@ public:
 
 			++_pos;
 			return false;
-		}	
+		}
 		return true;
 	}
 
@@ -112,7 +112,7 @@ private:
 			assert(interval > 0); // 0 == 256?
 
 			int a = (interval >> 3) + count;
-			for (int y = a; y > 0; --y) { 
+			for (int y = a; y > 0; --y) {
 				_player->generateSamples(1292 - 5*interval);
 				_player->speakerToggle();
 
@@ -206,7 +206,7 @@ private:
 
 		_bitmask1 = 0x3;
 		_bitmask2 = 0x3;
-	
+
 		_updateInterval2 = param0;
 		if (_updateInterval2 == 0)
 			_bitmask2 = 0x0;
@@ -234,9 +234,9 @@ private:
 
 		if (_updateRemain2 == 0) {
 			_updateRemain2 = _updateInterval2;
-			// use only first voice's data (bitmask1) if both voices are triggered 
+			// use only first voice's data (bitmask1) if both voices are triggered
 			if (_updateRemain1 != 0) {
-				_speakerShiftReg ^= _bitmask2;		
+				_speakerShiftReg ^= _bitmask2;
 			}
 		}
 
@@ -256,7 +256,7 @@ private:
 
 protected:
 	const byte *_params;
-	
+
 	byte _updateRemain1;
 	byte _updateRemain2;
 
@@ -309,7 +309,7 @@ private:
 		for (int i = count; i > 0; --i) {
 			_player->generateSamples(10 + 5*interval);
 			_player->speakerToggle();
-		
+
 			_player->generateSamples(5 + 5*interval);
 			_player->speakerToggle();
 		}
@@ -332,20 +332,20 @@ private:
 
 // LD000[loc] ^ LD00A[loc]
 const byte AppleII_SoundFunction5_Noise::_noiseTable[256] = {
-	0x65, 0x1b, 0xda, 0x11, 0x61, 0xe5, 0x77, 0x57, 0x92, 0xc8, 0x51, 0x1c, 0xd4, 0x91, 0x62, 0x63, 
-	0x00, 0x38, 0x57, 0xd5, 0x18, 0xd8, 0xdc, 0x40, 0x03, 0x86, 0xd3, 0x2f, 0x10, 0x11, 0xd8, 0x3c, 
-	0xbe, 0x00, 0x19, 0xc5, 0xd2, 0xc3, 0xca, 0x34, 0x00, 0x28, 0xbf, 0xb9, 0x18, 0x20, 0x01, 0xcc, 
-	0xda, 0x08, 0xbc, 0x75, 0x7c, 0xb0, 0x8d, 0xe0, 0x09, 0x18, 0xbf, 0x5d, 0xe9, 0x8c, 0x75, 0x64, 
+	0x65, 0x1b, 0xda, 0x11, 0x61, 0xe5, 0x77, 0x57, 0x92, 0xc8, 0x51, 0x1c, 0xd4, 0x91, 0x62, 0x63,
+	0x00, 0x38, 0x57, 0xd5, 0x18, 0xd8, 0xdc, 0x40, 0x03, 0x86, 0xd3, 0x2f, 0x10, 0x11, 0xd8, 0x3c,
+	0xbe, 0x00, 0x19, 0xc5, 0xd2, 0xc3, 0xca, 0x34, 0x00, 0x28, 0xbf, 0xb9, 0x18, 0x20, 0x01, 0xcc,
+	0xda, 0x08, 0xbc, 0x75, 0x7c, 0xb0, 0x8d, 0xe0, 0x09, 0x18, 0xbf, 0x5d, 0xe9, 0x8c, 0x75, 0x64,
 	0xe5, 0xb5, 0x5d, 0xe0, 0xb7, 0x7d, 0xe9, 0x8c, 0x55, 0x65, 0xc5, 0xb5, 0x5d, 0xd8, 0x09, 0x0d,
-	0x64, 0xf0, 0xf0, 0x08, 0x63, 0x03, 0x00, 0x55, 0x35, 0xc0, 0x00, 0x20, 0x74, 0xa5, 0x1e, 0xe3, 
-	0x00, 0x06, 0x3c, 0x52, 0xd1, 0x70, 0xd0, 0x57, 0x02, 0xf0, 0x00, 0xb6, 0xfc, 0x02, 0x11, 0x9a, 
-	0x3b, 0xc8, 0x38, 0xdf, 0x1a, 0xb0, 0xd1, 0xb8, 0xd0, 0x18, 0x8a, 0x4a, 0xea, 0x1b, 0x12, 0x5d, 
-	0x29, 0x58, 0xd8, 0x43, 0xb8, 0x2d, 0xd2, 0x61, 0x10, 0x3c, 0x0c, 0x5d, 0x1b, 0x61, 0x10, 0x3c, 
+	0x64, 0xf0, 0xf0, 0x08, 0x63, 0x03, 0x00, 0x55, 0x35, 0xc0, 0x00, 0x20, 0x74, 0xa5, 0x1e, 0xe3,
+	0x00, 0x06, 0x3c, 0x52, 0xd1, 0x70, 0xd0, 0x57, 0x02, 0xf0, 0x00, 0xb6, 0xfc, 0x02, 0x11, 0x9a,
+	0x3b, 0xc8, 0x38, 0xdf, 0x1a, 0xb0, 0xd1, 0xb8, 0xd0, 0x18, 0x8a, 0x4a, 0xea, 0x1b, 0x12, 0x5d,
+	0x29, 0x58, 0xd8, 0x43, 0xb8, 0x2d, 0xd2, 0x61, 0x10, 0x3c, 0x0c, 0x5d, 0x1b, 0x61, 0x10, 0x3c,
 	0x0a, 0x5d, 0x1d, 0x61, 0x10, 0x3c, 0x0b, 0x19, 0x88, 0x21, 0xc0, 0x21, 0x07, 0x00, 0x65, 0x62,
-	0x08, 0xe9, 0x36, 0x40, 0x20, 0x41, 0x06, 0x00, 0x20, 0x00, 0x00, 0xed, 0xa3, 0x00, 0x88, 0x06, 
-	0x98, 0x01, 0x5d, 0x7f, 0x02, 0x1d, 0x78, 0x03, 0x60, 0xcb, 0x3a, 0x01, 0xbd, 0x78, 0x02, 0x5d, 
-	0x7e, 0x03, 0x1d, 0xf5, 0xa6, 0x40, 0x81, 0xb4, 0xd0, 0x8d, 0xd3, 0xd0, 0x6d, 0xd5, 0x61, 0x48, 
-	0x61, 0x4d, 0xd1, 0xc8, 0xb1, 0xd8, 0x69, 0xff, 0x61, 0xd9, 0xed, 0xa0, 0xfe, 0x19, 0x91, 0x37, 
+	0x08, 0xe9, 0x36, 0x40, 0x20, 0x41, 0x06, 0x00, 0x20, 0x00, 0x00, 0xed, 0xa3, 0x00, 0x88, 0x06,
+	0x98, 0x01, 0x5d, 0x7f, 0x02, 0x1d, 0x78, 0x03, 0x60, 0xcb, 0x3a, 0x01, 0xbd, 0x78, 0x02, 0x5d,
+	0x7e, 0x03, 0x1d, 0xf5, 0xa6, 0x40, 0x81, 0xb4, 0xd0, 0x8d, 0xd3, 0xd0, 0x6d, 0xd5, 0x61, 0x48,
+	0x61, 0x4d, 0xd1, 0xc8, 0xb1, 0xd8, 0x69, 0xff, 0x61, 0xd9, 0xed, 0xa0, 0xfe, 0x19, 0x91, 0x37,
 	0x19, 0x37, 0x00, 0xf1, 0x00, 0x01, 0x1f, 0x00, 0xad, 0xc1, 0x01, 0x01, 0x2e, 0x00, 0x40, 0xc6,
 	0x7a, 0x9b, 0x95, 0x43, 0xfc, 0x18, 0xd2, 0x9e, 0x2a, 0x5a, 0x4b, 0x2a, 0xb6, 0x87, 0x30, 0x6c
 };
@@ -394,20 +394,20 @@ void Player_AppleII::startSound(int nr) {
 	case 0: // empty (nothing to play)
 		resetState();
 		return;
-	case 1: 
-		_soundFunc = new AppleII_SoundFunction1_FreqUpDown(); 
+	case 1:
+		_soundFunc = new AppleII_SoundFunction1_FreqUpDown();
 		break;
-	case 2: 
-		_soundFunc = new AppleII_SoundFunction2_SymmetricWave(); 
+	case 2:
+		_soundFunc = new AppleII_SoundFunction2_SymmetricWave();
 		break;
-	case 3:	
-		_soundFunc = new AppleII_SoundFunction3_AsymmetricWave(); 
+	case 3:
+		_soundFunc = new AppleII_SoundFunction3_AsymmetricWave();
 		break;
-	case 4: 
-		_soundFunc = new AppleII_SoundFunction4_Polyphone(); 
+	case 4:
+		_soundFunc = new AppleII_SoundFunction4_Polyphone();
 		break;
-	case 5: 
-		_soundFunc = new AppleII_SoundFunction5_Noise(); 
+	case 5:
+		_soundFunc = new AppleII_SoundFunction5_Noise();
 		break;
 	}
 	_soundFunc->init(this, _params);
@@ -484,7 +484,7 @@ int Player_AppleII::readBuffer(int16 *buffer, const int numSamples) {
 
 // toggle speaker on/off
 void Player_AppleII::speakerToggle() {
-	_speakerState ^= 0x1; 
+	_speakerState ^= 0x1;
 }
 
 void Player_AppleII::generateSamples(int cycles) {
@@ -492,8 +492,8 @@ void Player_AppleII::generateSamples(int cycles) {
 }
 
 void Player_AppleII::wait(int interval, int count /*y*/) {
-	assert(count > 0); // 0 == 256? 
-	assert(interval > 0); // 0 == 256? 
+	assert(count > 0); // 0 == 256?
+	assert(interval > 0); // 0 == 256?
 	generateSamples(11 + count*(8 + 5 * interval));
 }
 
diff --git a/engines/scumm/player_apple2.h b/engines/scumm/player_apple2.h
index b4a7d40..e1ec9d8 100644
--- a/engines/scumm/player_apple2.h
+++ b/engines/scumm/player_apple2.h
@@ -36,7 +36,7 @@ namespace Scumm {
 class ScummEngine;
 
 /*
- * Optimized for use with periodical read/write phases when the buffer 
+ * Optimized for use with periodical read/write phases when the buffer
  * is filled in a write phase and completely read in a read phase.
  * The growing strategy is optimized for repeated small (e.g. 2 bytes)
  * single writes resulting in large buffers
@@ -133,7 +133,7 @@ static const double APPLEII_CPU_CLOCK = 1020484.5; // ~ 1.02 MHz
 
 /*
  * Converts the 1-bit speaker state values into audio samples.
- * This is done by aggregation of the speaker states at each 
+ * This is done by aggregation of the speaker states at each
  * CPU cycle in a sampling period into an audio sample.
  */
 class SampleConverter {
@@ -144,7 +144,7 @@ private:
 	}
 
 public:
-	SampleConverter() : 
+	SampleConverter() :
 		_cyclesPerSampleFP(0),
 		_missingCyclesFP(0),
 		_sampleCyclesSumFP(0),
@@ -156,7 +156,7 @@ public:
 	void reset() {
 		_missingCyclesFP = 0;
 		_sampleCyclesSumFP = 0;
-		_buffer.clear();	
+		_buffer.clear();
 	}
 
 	uint32 availableSize() const {
@@ -245,7 +245,7 @@ public:
 	virtual void setMusicVolume(int vol) { _sampleConverter.setMusicVolume(vol); }
 	void setSampleRate(int rate) {
 		_sampleRate = rate;
-		_sampleConverter.setSampleRate(rate); 
+		_sampleConverter.setSampleRate(rate);
 	}
 	virtual void startSound(int sound);
 	virtual void stopSound(int sound);
diff --git a/engines/scumm/player_towns.cpp b/engines/scumm/player_towns.cpp
index 2588026..33e3e40 100644
--- a/engines/scumm/player_towns.cpp
+++ b/engines/scumm/player_towns.cpp
@@ -87,7 +87,7 @@ void Player_Towns::restoreAfterLoad() {
 
 		if (!_v2)
 			restoredSounds.push_back(_pcmCurrentSound[i].index);
-		
+
 		uint8 *ptr = _vm->getResourceAddress(rtSound, _pcmCurrentSound[i].index);
 		if (!ptr)
 			continue;
diff --git a/engines/scumm/player_v2cms.cpp b/engines/scumm/player_v2cms.cpp
index d4b2177..c1242e0 100644
--- a/engines/scumm/player_v2cms.cpp
+++ b/engines/scumm/player_v2cms.cpp
@@ -718,38 +718,38 @@ void Player_V2CMS::playMusicChips(const MusicChip *table) {
 }
 
 const Player_V2CMS::MidiNote Player_V2CMS::_midiNotes[132] = {
-	{   3,  0 }, {  31,  0 }, {  58,  0 }, {  83,  0 },  
-	{ 107,  0 }, { 130,  0 }, { 151,  0 }, { 172,  0 },  
-	{ 191,  0 }, { 209,  0 }, { 226,  0 }, { 242,  0 },  
-	{   3,  1 }, {  31,  1 }, {  58,  1 }, {  83,  1 },  
-	{ 107,  1 }, { 130,  1 }, { 151,  1 }, { 172,  1 },  
-	{ 191,  1 }, { 209,  1 }, { 226,  1 }, { 242,  1 },  
-	{   3,  2 }, {  31,  2 }, {  58,  2 }, {  83,  2 },  
-	{ 107,  2 }, { 130,  2 }, { 151,  2 }, { 172,  2 },  
-	{ 191,  2 }, { 209,  2 }, { 226,  2 }, { 242,  2 },  
-	{   3,  3 }, {  31,  3 }, {  58,  3 }, {  83,  3 },  
-	{ 107,  3 }, { 130,  3 }, { 151,  3 }, { 172,  3 },  
-	{ 191,  3 }, { 209,  3 }, { 226,  3 }, { 242,  3 },  
-	{   3,  4 }, {  31,  4 }, {  58,  4 }, {  83,  4 },  
-	{ 107,  4 }, { 130,  4 }, { 151,  4 }, { 172,  4 },  
-	{ 191,  4 }, { 209,  4 }, { 226,  4 }, { 242,  4 },  
-	{   3,  5 }, {  31,  5 }, {  58,  5 }, {  83,  5 },  
-	{ 107,  5 }, { 130,  5 }, { 151,  5 }, { 172,  5 },  
-	{ 191,  5 }, { 209,  5 }, { 226,  5 }, { 242,  5 },  
-	{   3,  6 }, {  31,  6 }, {  58,  6 }, {  83,  6 },  
-	{ 107,  6 }, { 130,  6 }, { 151,  6 }, { 172,  6 },  
-	{ 191,  6 }, { 209,  6 }, { 226,  6 }, { 242,  6 },  
-	{   3,  7 }, {  31,  7 }, {  58,  7 }, {  83,  7 },  
-	{ 107,  7 }, { 130,  7 }, { 151,  7 }, { 172,  7 },  
-	{ 191,  7 }, { 209,  7 }, { 226,  7 }, { 242,  7 },  
-	{   3,  8 }, {  31,  8 }, {  58,  8 }, {  83,  8 },  
-	{ 107,  8 }, { 130,  8 }, { 151,  8 }, { 172,  8 },  
-	{ 191,  8 }, { 209,  8 }, { 226,  8 }, { 242,  8 },  
-	{   3,  9 }, {  31,  9 }, {  58,  9 }, {  83,  9 },  
-	{ 107,  9 }, { 130,  9 }, { 151,  9 }, { 172,  9 },  
-	{ 191,  9 }, { 209,  9 }, { 226,  9 }, { 242,  9 },  
-	{   3, 10 }, {  31, 10 }, {  58, 10 }, {  83, 10 },  
-	{ 107, 10 }, { 130, 10 }, { 151, 10 }, { 172, 10 },  
+	{   3,  0 }, {  31,  0 }, {  58,  0 }, {  83,  0 },
+	{ 107,  0 }, { 130,  0 }, { 151,  0 }, { 172,  0 },
+	{ 191,  0 }, { 209,  0 }, { 226,  0 }, { 242,  0 },
+	{   3,  1 }, {  31,  1 }, {  58,  1 }, {  83,  1 },
+	{ 107,  1 }, { 130,  1 }, { 151,  1 }, { 172,  1 },
+	{ 191,  1 }, { 209,  1 }, { 226,  1 }, { 242,  1 },
+	{   3,  2 }, {  31,  2 }, {  58,  2 }, {  83,  2 },
+	{ 107,  2 }, { 130,  2 }, { 151,  2 }, { 172,  2 },
+	{ 191,  2 }, { 209,  2 }, { 226,  2 }, { 242,  2 },
+	{   3,  3 }, {  31,  3 }, {  58,  3 }, {  83,  3 },
+	{ 107,  3 }, { 130,  3 }, { 151,  3 }, { 172,  3 },
+	{ 191,  3 }, { 209,  3 }, { 226,  3 }, { 242,  3 },
+	{   3,  4 }, {  31,  4 }, {  58,  4 }, {  83,  4 },
+	{ 107,  4 }, { 130,  4 }, { 151,  4 }, { 172,  4 },
+	{ 191,  4 }, { 209,  4 }, { 226,  4 }, { 242,  4 },
+	{   3,  5 }, {  31,  5 }, {  58,  5 }, {  83,  5 },
+	{ 107,  5 }, { 130,  5 }, { 151,  5 }, { 172,  5 },
+	{ 191,  5 }, { 209,  5 }, { 226,  5 }, { 242,  5 },
+	{   3,  6 }, {  31,  6 }, {  58,  6 }, {  83,  6 },
+	{ 107,  6 }, { 130,  6 }, { 151,  6 }, { 172,  6 },
+	{ 191,  6 }, { 209,  6 }, { 226,  6 }, { 242,  6 },
+	{   3,  7 }, {  31,  7 }, {  58,  7 }, {  83,  7 },
+	{ 107,  7 }, { 130,  7 }, { 151,  7 }, { 172,  7 },
+	{ 191,  7 }, { 209,  7 }, { 226,  7 }, { 242,  7 },
+	{   3,  8 }, {  31,  8 }, {  58,  8 }, {  83,  8 },
+	{ 107,  8 }, { 130,  8 }, { 151,  8 }, { 172,  8 },
+	{ 191,  8 }, { 209,  8 }, { 226,  8 }, { 242,  8 },
+	{   3,  9 }, {  31,  9 }, {  58,  9 }, {  83,  9 },
+	{ 107,  9 }, { 130,  9 }, { 151,  9 }, { 172,  9 },
+	{ 191,  9 }, { 209,  9 }, { 226,  9 }, { 242,  9 },
+	{   3, 10 }, {  31, 10 }, {  58, 10 }, {  83, 10 },
+	{ 107, 10 }, { 130, 10 }, { 151, 10 }, { 172, 10 },
 	{ 191, 10 }, { 209, 10 }, { 226, 10 }, { 242, 10 }
 };
 
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index beac077..72896e0 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -1298,7 +1298,7 @@ void ScummEngine::saveOrLoad(Serializer *s) {
 		s->saveLoadArrayOf(_16BitPalette, 512, sizeof(_16BitPalette[0]), sleUint16);
 	}
 
-	
+
 	// FM-Towns specific (extra palette data, color cycle data, etc.)
 	// In earlier save game versions (below 87) the FM-Towns specific data would get saved (and loaded) even in non FM-Towns games.
 	// This would cause an unnecessary save file incompatibility between DS (which uses the DISABLE_TOWNS_DUAL_LAYER_MODE setting)
diff --git a/engines/scumm/script_v0.cpp b/engines/scumm/script_v0.cpp
index 44b77f1..361287d 100644
--- a/engines/scumm/script_v0.cpp
+++ b/engines/scumm/script_v0.cpp
@@ -602,7 +602,7 @@ void ScummEngine_v0::o_loadRoomWithEgo() {
 	x = r.x;
 	y = r.y;
 	a->putActor(x, y, _currentRoom);
-	
+
 	camera._dest.x = camera._cur.x = a->getPos().x;
 	setCameraAt(a->getPos().x, a->getPos().y);
 	setCameraFollows(a);
@@ -635,18 +635,18 @@ void ScummEngine_v0::setMode(byte mode) {
 	case kModeCutscene:
 		_redrawSentenceLine = false;
 		// Note: do not change freeze state here
-		state = USERSTATE_SET_IFACE | 
+		state = USERSTATE_SET_IFACE |
 			USERSTATE_SET_CURSOR;
 		break;
 	case kModeKeypad:
 		_redrawSentenceLine = false;
-		state = USERSTATE_SET_IFACE | 
+		state = USERSTATE_SET_IFACE |
 			USERSTATE_SET_CURSOR | USERSTATE_CURSOR_ON |
 			USERSTATE_SET_FREEZE | USERSTATE_FREEZE_ON;
 		break;
 	case kModeNormal:
 	case kModeNoNewKid:
-		state = USERSTATE_SET_IFACE | USERSTATE_IFACE_ALL | 
+		state = USERSTATE_SET_IFACE | USERSTATE_IFACE_ALL |
 			USERSTATE_SET_CURSOR | USERSTATE_CURSOR_ON |
 			USERSTATE_SET_FREEZE;
 		break;
@@ -688,7 +688,7 @@ void ScummEngine_v0::o_animateActor() {
 	Actor_v0 *a = (Actor_v0*) derefActor(act, "o_animateActor");
 
 	a->_animFrameRepeat = repeat;
-	
+
 	switch (anim) {
 
 		case 0xFE:
@@ -700,7 +700,7 @@ void ScummEngine_v0::o_animateActor() {
 			// 0x69A3
 			a->_speaking = 0x00;
 			return;
-	
+
 		case 0xFF:
 			a->stopActorMoving();
 			return;
diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp
index ce162b4..96d422d 100644
--- a/engines/scumm/script_v2.cpp
+++ b/engines/scumm/script_v2.cpp
@@ -993,7 +993,7 @@ void ScummEngine_v2::o2_drawSentence() {
 	const byte *temp;
 	int slot = getVerbSlot(VAR(VAR_SENTENCE_VERB), 0);
 
-	if (!((_userState & USERSTATE_IFACE_SENTENCE) || 
+	if (!((_userState & USERSTATE_IFACE_SENTENCE) ||
 	      (_game.platform == Common::kPlatformNES && (_userState & USERSTATE_IFACE_ALL))))
 		return;
 
@@ -1486,8 +1486,8 @@ void ScummEngine_v2::o2_cutscene() {
 	VAR(VAR_CURSORSTATE) = 200;
 
 	// Hide inventory, freeze scripts, hide cursor
-	setUserState(USERSTATE_SET_IFACE | 
-		USERSTATE_SET_CURSOR | 
+	setUserState(USERSTATE_SET_IFACE |
+		USERSTATE_SET_CURSOR |
 		USERSTATE_SET_FREEZE | USERSTATE_FREEZE_ON);
 
 	_sentenceNum = 0;
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index a5591b7..0bf51a2 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -1097,7 +1097,7 @@ void ScummEngine_v5::o5_getDist() {
 	int r;
 
 	getResultPos();
-	
+
 	o1 = getVarOrDirectWord(PARAM_1);
 	o2 = getVarOrDirectWord(PARAM_2);
 
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index c9c9e99..2c79fb8 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1986,11 +1986,11 @@ Common::Error ScummEngine::go() {
 		if (delta < 1)	// Ensure we don't get into an endless loop
 			delta = 1;  // by not decreasing sleepers.
 
-		// WORKAROUND: walking speed in the original v0/v1 interpreter 
+		// WORKAROUND: walking speed in the original v0/v1 interpreter
 		// is sometimes slower (e.g. during scrolling) than in ScummVM.
 		// This is important for the door-closing action in the dungeon,
-		// otherwise (delta < 6) a single kid is able to escape. 
-		if ((_game.version == 0 && isScriptRunning(132)) || 
+		// otherwise (delta < 6) a single kid is able to escape.
+		if ((_game.version == 0 && isScriptRunning(132)) ||
 			(_game.version == 1 && isScriptRunning(137)))
 			delta = 6;
 
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index 7003894..a77c1c0 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -1372,7 +1372,7 @@ public:
 public:
 	bool towns_isRectInStringBox(int x1, int y1, int x2, int y2);
 	byte _townsPaletteFlags;
-	byte _townsCharsetColorMap[16];	
+	byte _townsCharsetColorMap[16];
 
 protected:
 	void towns_drawStripToScreen(VirtScreen *vs, int dstX, int dstY, int srcX, int srcY, int w, int h);
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index 43c86db..a1cecfa 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -957,7 +957,7 @@ void Sound::setupSfxFile() {
 
 		if (file.open(tmp))
 			_sfxFilename = tmp;
-	
+
 		if (_vm->_game.heversion <= 74)
 			_sfxFileEncByte = 0x69;
 
@@ -1182,7 +1182,7 @@ int ScummEngine::readSoundResource(ResId idx) {
 			// its sound resources, and Amiga games, which feature only ROL
 			// resources, since we are a doing Midi -> AdLib conversion for
 			// these.
-			if ((_sound->_musicType == MDT_ADLIB || _sound->_musicType == MDT_TOWNS) && pri != 16 
+			if ((_sound->_musicType == MDT_ADLIB || _sound->_musicType == MDT_TOWNS) && pri != 16
 				&& pri != 15 && pri != 10 && pri != 2 && _game.platform != Common::kPlatformAmiga)
 				pri = -1;
 
diff --git a/engines/scumm/verbs.cpp b/engines/scumm/verbs.cpp
index 567ca31..0d0f6cd 100644
--- a/engines/scumm/verbs.cpp
+++ b/engines/scumm/verbs.cpp
@@ -84,7 +84,7 @@ int ScummEngine_v0::verbPrepIdType(int verbid) {
 	switch (verbid) {
 	case kVerbUse: // depends on object1
 		return kVerbPrepObject;
-	case kVerbGive: 
+	case kVerbGive:
 		return kVerbPrepTo;
 	case kVerbUnlock: case kVerbFix:
 		return kVerbPrepWith;
@@ -693,7 +693,7 @@ void ScummEngine_v0::verbExec() {
 
 	if (_activeVerb == kVerbWhatIs)
 		return;
-		
+
 	if (!(_activeVerb == kVerbWalkTo && _activeObject == 0)) {
 		doSentence(_activeVerb, _activeObject, _activeObject2);
 		if (_activeVerb != kVerbWalkTo) {
diff --git a/engines/sky/detection.cpp b/engines/sky/detection.cpp
index dfa3ded..8f6c2bb 100644
--- a/engines/sky/detection.cpp
+++ b/engines/sky/detection.cpp
@@ -119,12 +119,12 @@ GameList SkyMetaEngine::getSupportedGames() const {
 const ExtraGuiOptions SkyMetaEngine::getExtraGuiOptions(const Common::String &target) const {
 	Common::String guiOptions;
 	ExtraGuiOptions options;
-	
+
 	if (target.empty()) {
 		options.push_back(skyExtraGuiOption);
 		return options;
 	}
-	
+
 	if (ConfMan.hasKey("guioptions", target)) {
 		guiOptions = ConfMan.get("guioptions", target);
 		guiOptions = parseGameGUIOptions(guiOptions);
diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp
index f7add4e..ff3c897 100644
--- a/engines/sword1/animation.cpp
+++ b/engines/sword1/animation.cpp
@@ -69,7 +69,7 @@ static const char *const sequenceList[20] = {
 };
 
 // This is the list of the names of the PlayStation videos
-// TODO: fight.str, flashy.str, 
+// TODO: fight.str, flashy.str,
 static const char *const sequenceListPSX[20] = {
 	"e_ferr1",
 	"ladder1",
@@ -152,14 +152,14 @@ bool MoviePlayer::load(uint32 id) {
 					warning("%s:%d startFrame (%d) <= lastEnd (%d)", filename.c_str(), lineNo, startFrame, lastEnd);
 					continue;
 				}
-				
+
 				int color = 0;
 				if (*ptr == '@') {
 					++ptr;
 					color = strtoul(ptr, const_cast<char **>(&ptr), 10);
 					while (*ptr && Common::isSpace(*ptr))
 						ptr++;
-				} 
+				}
 
 				_movieTexts.push_back(MovieText(startFrame, endFrame, ptr, color));
 				lastEnd = endFrame;
diff --git a/engines/sword1/objectman.cpp b/engines/sword1/objectman.cpp
index 5d1864d..3e70a95 100644
--- a/engines/sword1/objectman.cpp
+++ b/engines/sword1/objectman.cpp
@@ -107,7 +107,7 @@ char *ObjectMan::lockText(uint32 textId) {
 				warning("Missing translation for textId %u (\"%s\")", textId, text);
 			unlockText(textId, BS1_ENGLISH);
 		}
-		
+
 		return _missingSubTitleStr;
 	}
 	return text;
@@ -164,7 +164,7 @@ char *ObjectMan::lockText(uint32 textId, uint8 lang) {
 		// We use the hardcoded text in this case.
 		if (textId == 2950145)
 			return const_cast<char *>(_translationId2950145[lang]);
-		
+
 		warning("ObjectMan::lockText(%d): text number has no text lines", textId);
 		return NULL;
 	}
diff --git a/engines/sword2/sprite.cpp b/engines/sword2/sprite.cpp
index cb0923c..91a5e2e 100644
--- a/engines/sword2/sprite.cpp
+++ b/engines/sword2/sprite.cpp
@@ -772,7 +772,7 @@ int32 Screen::drawSprite(SpriteInfo *s) {
 	src = sprite + rs.top * srcPitch + rs.left;
 	dst = _buffer + _screenWide * rd.top + rd.left;
 
-	if (s->type & RDSPR_BLEND) { 
+	if (s->type & RDSPR_BLEND) {
 		// The original code had two different blending cases. One for
 		// s->blend & 0x01 and one for s->blend & 0x02. However, the
 		// only values that actually appear in the cluster files are
@@ -783,7 +783,7 @@ int32 Screen::drawSprite(SpriteInfo *s) {
 		// The only correct way to simulate this would be using 16-bit mode.
 		// As this is not yet available for this engine, fake transparency is used
 		// as placeholder.
-		if (!(_renderCaps & RDBLTFX_SPRITEBLEND) || Sword2Engine::isPsx()) { 
+		if (!(_renderCaps & RDBLTFX_SPRITEBLEND) || Sword2Engine::isPsx()) {
 			for (i = 0; i < rs.height(); i++) {
 				for (j = 0; j < rs.width(); j++) {
 					if (src[j] && ((i & 1) == (j & 1)))
diff --git a/engines/sword25/sfx/soundengine.cpp b/engines/sword25/sfx/soundengine.cpp
index 69fae3d..61d53c8 100644
--- a/engines/sword25/sfx/soundengine.cpp
+++ b/engines/sword25/sfx/soundengine.cpp
@@ -370,7 +370,7 @@ bool SoundEngine::unpersist(InputPersistenceBlock &reader) {
 		int loopStart;
 		int loopEnd;
 		uint layer;
-		
+
 		reader.readString(fileName);
 		reader.read(sndType);
 		reader.read(volume);
diff --git a/engines/tinsel/actors.cpp b/engines/tinsel/actors.cpp
index a784ff5..0ba8b7c 100644
--- a/engines/tinsel/actors.cpp
+++ b/engines/tinsel/actors.cpp
@@ -319,8 +319,8 @@ static void ActorRestoredProcess(CORO_PARAM, const void *param) {
 	CORO_BEGIN_CODE(_ctx);
 
 	_ctx->pic = RestoreInterpretContext(r->pic);
-	
-	// The newly added check here specially sets the process to RES_NOT when loading a savegame. 
+
+	// The newly added check here specially sets the process to RES_NOT when loading a savegame.
 	// This is needed particularly for the Psychiatrist scene in Discworld 1 - otherwise Rincewind
 	// can't go upstairs without leaving the building and returning.  If this patch causes problems
 	// in other scenes, an added check for the hCode == 1174490602 could be added.
diff --git a/engines/tinsel/pcode.cpp b/engines/tinsel/pcode.cpp
index 6ea18c8..04bc285 100644
--- a/engines/tinsel/pcode.cpp
+++ b/engines/tinsel/pcode.cpp
@@ -152,7 +152,7 @@ static const byte fragment12[] = {OP_JMPTRUE | OPSIZE16, FRAGMENT_WORD(1491),
 		OP_IMM | OPSIZE16, FRAGMENT_WORD(322), OP_LIBCALL | OPSIZE8, 46,	// Give back the whistle
 		OP_JUMP | OPSIZE16, FRAGMENT_WORD(1568)};
 static const byte fragment13[] = {OP_ZERO, OP_GSTORE | OPSIZE16, FRAGMENT_WORD(306)};
-static const byte fragment14[] = {OP_LIBCALL | OPSIZE8, 58, 
+static const byte fragment14[] = {OP_LIBCALL | OPSIZE8, 58,
 		OP_IMM, FRAGMENT_DWORD((42 << 23)), OP_ONE, OP_ZERO, OP_LIBCALL | OPSIZE8, 44,
 		OP_LIBCALL | OPSIZE8, 97, OP_JUMP | OPSIZE16, FRAGMENT_WORD(2220)
 };
@@ -222,7 +222,7 @@ const WorkaroundEntry workaroundList[] = {
 	// times would cause the game to crash
 	{TINSEL_V2, true, false, Common::kPlatformUnknown, 1109294728, 0, sizeof(fragment13), fragment13},
 
-	// DW1 PSX DEMO: Alters a script in the PSX DW1 demo to show the Idle animation scene rather than 
+	// DW1 PSX DEMO: Alters a script in the PSX DW1 demo to show the Idle animation scene rather than
 	// quitting the game when no user input happens for a while
 	{TINSEL_V1, true, true, Common::kPlatformPSX, 0, 2186, sizeof(fragment14), fragment14},
 
diff --git a/engines/tinsel/saveload.cpp b/engines/tinsel/saveload.cpp
index 518e27f..2ef92d8 100644
--- a/engines/tinsel/saveload.cpp
+++ b/engines/tinsel/saveload.cpp
@@ -502,7 +502,7 @@ static bool DoRestore() {
 		delete f;	// Invalid header, or savegame too new -> skip it
 		return false;
 	}
-	
+
 	// Load in the data. For older savegame versions, we potentially need to load the data twice, once
 	// for pre 1.5 savegames, and if that fails, a second time for 1.5 savegames
 	int numInterpreters = hdr.numInterpreters;
diff --git a/engines/toltecs/animation.cpp b/engines/toltecs/animation.cpp
index eef9cef..084332c 100644
--- a/engines/toltecs/animation.cpp
+++ b/engines/toltecs/animation.cpp
@@ -53,7 +53,7 @@ void AnimationPlayer::start(uint resIndex) {
 	_vm->_arc->closeResource();
 
 	debug(1, "AnimationPlayer::start() width = %d; height = %d; frameCount = %d", _width, _height, _frameCount);
-	
+
 	_vm->_sceneWidth = _width;
 	_vm->_sceneHeight = _height;
 
@@ -63,7 +63,7 @@ void AnimationPlayer::start(uint resIndex) {
 	_frameNumber = 0;
 	// TODO mov screenFlag01, 0FFFFh
 	// TODO mov animDrawFrameFlag, 0FFFFh
-	
+
 	_firstNextFrameOffset = _nextFrameOffset;
 	_firstCurFrameSize = _curFrameSize;
 	_firstNextFrameSize = _nextFrameSize;
@@ -81,25 +81,25 @@ void AnimationPlayer::nextFrame() {
 	} else {
 		_frameNumber++;
 	}
-	
+
 	debug(1, "AnimationPlayer::nextFrame() frameNumber = %d", _frameNumber);
 
 	if (_keepFrameCounter > 0) {
 		_keepFrameCounter--;
 		return;
 	}
-	
+
 	_vm->_arc->openResource(_resIndex);
 	_vm->_arc->seek(_nextFrameOffset, SEEK_CUR);
 	_curFrameSize = _nextFrameSize;
-	
+
 	if (_curFrameSize == 0)
 		_curFrameSize = 1;
-	
+
 	_vm->_arc->read(_animBuffer, _curFrameSize);
 	_nextFrameSize = _vm->_arc->readUint32LE();
 	_nextFrameOffset += _curFrameSize + 4;
-	
+
 	if (_curFrameSize > 1) {
 		unpackFrame();
 		// TODO mov animDrawFrameFlag, 0FFFFh
diff --git a/engines/toltecs/animation.h b/engines/toltecs/animation.h
index 22576d7..54ec5d8 100644
--- a/engines/toltecs/animation.h
+++ b/engines/toltecs/animation.h
@@ -54,7 +54,7 @@ public:
 	uint16 _width, _height;
 	uint16 _frameNumber, _frameCount;
 	uint32 _keepFrameCounter;
-	
+
 	uint32 _curFrameSize;
 	uint32 _nextFrameSize, _nextFrameOffset;
 
diff --git a/engines/toltecs/menu.cpp b/engines/toltecs/menu.cpp
index dfdad74..c214205 100644
--- a/engines/toltecs/menu.cpp
+++ b/engines/toltecs/menu.cpp
@@ -75,7 +75,7 @@ int MenuSystem::run(MenuID menuId) {
 		update();
 		_vm->_system->updateScreen();
 	}
-	
+
 	// Restore original background
 	memcpy(_vm->_screen->_frontScreen, backgroundOrig.getBasePtr(0,0), 640 * 400);
 	_vm->_system->copyRectToScreen(_vm->_screen->_frontScreen, 640, 0, 0, 640, 400);
@@ -86,7 +86,7 @@ int MenuSystem::run(MenuID menuId) {
 	_background->free();
 	delete _background;
 
-	return 0;	
+	return 0;
 }
 
 void MenuSystem::update() {
@@ -539,7 +539,7 @@ void MenuSystem::setCfgVoices(bool value, bool active) {
 void MenuSystem::drawVolumeBar(ItemID itemID) {
 	int w = 440, y, volume;
 	char text[21];
-	
+
 	switch (itemID) {
 	case kItemIdMaster:	// unused in ScummVM, always 20
 		y = 130 + 25 * 0;
@@ -567,13 +567,13 @@ void MenuSystem::drawVolumeBar(ItemID itemID) {
 
 	Font font(_vm->_res->load(_vm->_screen->getFontResIndex(1))->data);
 	restoreRect(390, y - font.getHeight(), 100, 25);
-	
+
 	for (int i = 0; i < volume; i++)
 		text[i] = '|';
 	text[volume] = 0;
-	
+
 	drawString(0, y, w, 0, 246, text);
-	
+
 }
 
 void MenuSystem::changeVolumeBar(ItemID itemID, int delta) {
diff --git a/engines/toltecs/menu.h b/engines/toltecs/menu.h
index 9234a56..a72205c 100644
--- a/engines/toltecs/menu.h
+++ b/engines/toltecs/menu.h
@@ -80,7 +80,7 @@ public:
 	int run(MenuID menuId);
 	void update();
 	void handleEvents();
-	
+
 protected:
 
 	struct Item {
@@ -91,7 +91,7 @@ protected:
 		int x, y, w;
 		uint fontNum;
 	};
-	
+
 	struct SavegameItem {
 		int _slotNum;
 		Common::String _description;
@@ -116,20 +116,20 @@ protected:
 
 	Common::Array<Item> _items;
 	Common::Array<SavegameItem> _savegames;
-	
+
 	void addClickTextItem(ItemID id, int x, int y, int w, uint fontNum, const char *caption, byte defaultColor, byte activeColor);
 
 	void drawItem(ItemID itemID, bool active);
 	void handleMouseMove(int x, int y);
 	void handleMouseClick(int x, int y);
 	void handleKeyDown(const Common::KeyState& kbd);
-	
+
 	ItemID findItemAt(int x, int y);
 	Item *getItem(ItemID id);
 	void setItemCaption(Item *item, const char *caption);
 
 	void initMenu(MenuID menuID);
-	
+
 	void enterItem(ItemID id);
 	void leaveItem(ItemID id);
 	void clickItem(ItemID id);
diff --git a/engines/toltecs/microtiles.cpp b/engines/toltecs/microtiles.cpp
index 0b61ac3..60e65bd 100644
--- a/engines/toltecs/microtiles.cpp
+++ b/engines/toltecs/microtiles.cpp
@@ -138,7 +138,7 @@ Common::Rect * MicroTileArray::getRectangles(int *num_rects, int min_x, int min_
 			x0 = CLIP (x0, min_x, max_x);
 			y0 = CLIP (y0, min_y, max_y);
 			y1 = CLIP (y1, min_y, max_y);
-			
+
 			// FIXME: Why is the following code in an #if block?
 #if 1
 			start = i;
diff --git a/engines/toltecs/movie.cpp b/engines/toltecs/movie.cpp
index 7436463..75127d7 100644
--- a/engines/toltecs/movie.cpp
+++ b/engines/toltecs/movie.cpp
@@ -61,7 +61,7 @@ void MoviePlayer::playMovie(uint resIndex) {
 	int16 savedCameraY = _vm->_cameraY;
 	int16 savedGuiHeight = _vm->_guiHeight;
 	byte moviePalette[768];
-	
+
 	_vm->_isSaveAllowed = false;
 
 	memset(moviePalette, 0, sizeof(moviePalette));
@@ -105,7 +105,7 @@ void MoviePlayer::playMovie(uint resIndex) {
 		uint32 chunkSize = _vm->_arc->readUint32LE();
 
 		debug(0, "chunkType = %d; chunkSize = %d", chunkType, chunkSize);
-		
+
 		// Skip audio chunks - we've already queued them in
 		// fetchAudioChunks() above
 		if (chunkType == kChunkAudio) {
@@ -178,7 +178,7 @@ void MoviePlayer::playMovie(uint resIndex) {
 		default:
 			error("MoviePlayer::playMovie(%04X) Unknown chunk type %d at %08X", resIndex, chunkType, _vm->_arc->pos() - 5 - chunkSize);
 		}
-		
+
 		if (!handleInput())
 			break;
 	}
@@ -189,7 +189,7 @@ void MoviePlayer::playMovie(uint resIndex) {
 	_vm->_mixer->stopHandle(_audioStreamHandle);
 
 	_vm->_arc->closeResource();
-	
+
 	debug(0, "playMovie() done");
 
 	_vm->_sceneWidth = savedSceneWidth;
diff --git a/engines/toltecs/movie.h b/engines/toltecs/movie.h
index aecfac2..8fa4897 100644
--- a/engines/toltecs/movie.h
+++ b/engines/toltecs/movie.h
@@ -36,7 +36,7 @@ public:
 	~MoviePlayer();
 
 	void playMovie(uint resIndex);
-	
+
 protected:
 	ToltecsEngine *_vm;
 	Audio::QueuingAudioStream *_audioStream;
@@ -47,11 +47,11 @@ protected:
 
 	void unpackPalette(byte *source, byte *dest, int elemCount, int elemSize);
 	void unpackRle(byte *source, byte *dest);
-	
+
 	void fetchAudioChunks();
-	
+
 	bool handleInput();
-	
+
 };
 
 } // End of namespace Toltecs
diff --git a/engines/toltecs/music.cpp b/engines/toltecs/music.cpp
index 2cd36ca..830e4a9 100644
--- a/engines/toltecs/music.cpp
+++ b/engines/toltecs/music.cpp
@@ -60,7 +60,7 @@ void MusicPlayer::playMIDI(const byte *data, uint32 size, bool loop) {
 	memcpy(_buffer, data, size);
 
 	MidiParser *parser;
-	
+
 	if (!memcmp(data, "FORM", 4))
 		parser = MidiParser::createParser_XMIDI(NULL);
 	else
diff --git a/engines/toltecs/palette.cpp b/engines/toltecs/palette.cpp
index 706218e..74683c6 100644
--- a/engines/toltecs/palette.cpp
+++ b/engines/toltecs/palette.cpp
@@ -31,7 +31,7 @@ namespace Toltecs {
 
 Palette::Palette(ToltecsEngine *vm) : _vm(vm) {
 	clearFragments();
-	
+
 	memset(_colorTransTable, 0, sizeof(_colorTransTable));
 }
 
@@ -81,7 +81,7 @@ void Palette::setDeltaPalette(byte *palette, byte mask, int8 deltaValue, int16 c
 		if (mask & 4) colors[index * 3 + 2] = CLIP<int>(rgb + deltaValue, 0, 63) << 2;
 		index++;
 	}
-	
+
 	debug(0, "startIndex = %d; colorCount = %d", startIndex, colorCount);
 
 	_vm->_system->getPaletteManager()->setPalette((const byte *)colors, 0, 256);
@@ -101,9 +101,9 @@ void Palette::addFragment(uint resIndex, int16 id) {
 
 	Resource *fragmentResource = _vm->_res->load(resIndex);
 	byte count = fragmentResource->size / 3;
-	
+
 	memcpy(&_mainPalette[_fragmentIndex * 3], fragmentResource->data, count * 3);
-	
+
 	PaletteFragment fragment;
 	fragment.id = id;
 	fragment.index = _fragmentIndex;
@@ -126,7 +126,7 @@ uint16 Palette::findFragment(int16 id) {
 			break;
 		}
 	}
-	
+
 	debug(0, "Palette::findFragment() result = %04X", result);
 
 	return result;
@@ -140,9 +140,9 @@ void Palette::clearFragments() {
 
 void Palette::buildColorTransTable(byte limit, int8 deltaValue, byte mask) {
 	byte r = 0, g = 0, b = 0;
-	
+
 	mask &= 7;
-	
+
 	for (int i = 0; i < 256; i++) {
 
 		if (deltaValue < 0) {
@@ -161,7 +161,7 @@ void Palette::buildColorTransTable(byte limit, int8 deltaValue, byte mask) {
 					b -= deltaValue;
 			}
 		}
-		
+
 		int bestIndex = 0;
 		uint16 bestMatch = 0xFFFF;
 
@@ -174,7 +174,7 @@ void Palette::buildColorTransTable(byte limit, int8 deltaValue, byte mask) {
 				bestIndex = j;
 			}
 		}
-		
+
 		_colorTransTable[i] = bestIndex;
 
 	}
diff --git a/engines/toltecs/palette.h b/engines/toltecs/palette.h
index 7bcf06e..570f517 100644
--- a/engines/toltecs/palette.h
+++ b/engines/toltecs/palette.h
@@ -66,7 +66,7 @@ protected:
 		int16 id;
 		byte index, count;
 	};
-	
+
 	typedef Common::Array<PaletteFragment> PaletteFragmentArray;
 
 	ToltecsEngine *_vm;
diff --git a/engines/toltecs/render.cpp b/engines/toltecs/render.cpp
index 3f53564..4c41e6c 100644
--- a/engines/toltecs/render.cpp
+++ b/engines/toltecs/render.cpp
@@ -114,7 +114,7 @@ void RenderQueue::addMask(SegmapMaskRect &mask) {
 void RenderQueue::update() {
 
 	bool doFullRefresh = _vm->_screen->_fullRefresh;
-	
+
 	_updateUta->clear();
 
 	if (!doFullRefresh) {
@@ -166,7 +166,7 @@ void RenderQueue::update() {
 
 	for (RenderQueueArray::iterator iter = _currQueue->begin(); iter != _currQueue->end(); iter++) {
 		const RenderQueueItem *item = &(*iter);
-		
+
 		if (item->flags == kRefresh || doFullRefresh) {
 
 			switch (item->type) {
@@ -200,7 +200,7 @@ void RenderQueue::update() {
 
 	SWAP(_currQueue, _prevQueue);
 	_currQueue->clear();
-	
+
 }
 
 void RenderQueue::clear() {
@@ -249,16 +249,16 @@ bool RenderQueue::hasItemChanged(const RenderQueueItem &item1, const RenderQueue
 
 	if (item1.type != item2.type)
 		return true;
-		
+
 	if (item1.rect.left != item2.rect.left ||
 		item1.rect.top != item2.rect.top ||
 		item1.rect.right != item2.rect.right ||
 		item1.rect.bottom != item2.rect.bottom)
 		return true;
-		
+
 	if (item1.type == kText && item1.text.color != item2.text.color)
 		return true;
-		
+
 	return false;
 }
 
@@ -268,7 +268,7 @@ void RenderQueue::invalidateItemsByRect(const Common::Rect &rect, const RenderQu
 		if (item != subItem &&
 			subItem->flags == kUnchanged &&
 			rect.intersects(subItem->rect)) {
-			
+
 			subItem->flags = kRefresh;
 			invalidateItemsByRect(subItem->rect, subItem);
 		}
diff --git a/engines/toltecs/render.h b/engines/toltecs/render.h
index bb9ec29..59d7a3d 100644
--- a/engines/toltecs/render.h
+++ b/engines/toltecs/render.h
@@ -75,7 +75,7 @@ public:
 	void addMask(SegmapMaskRect &mask);
 	void update();
 	void clear();
-	
+
 protected:
 	typedef Common::List<RenderQueueItem> RenderQueueArray;
 
@@ -87,7 +87,7 @@ protected:
     RenderQueueItem *findItemInQueue(RenderQueueArray *queue, const RenderQueueItem &item);
     bool hasItemChanged(const RenderQueueItem &item1, const RenderQueueItem &item2);
     void invalidateItemsByRect(const Common::Rect &rect, const RenderQueueItem *item);
-    
+
     void addDirtyRect(const Common::Rect &rect);
     void restoreDirtyBackground();
     void updateDirtyRects();
diff --git a/engines/toltecs/resource.cpp b/engines/toltecs/resource.cpp
index b95e044..0b9f7c8 100644
--- a/engines/toltecs/resource.cpp
+++ b/engines/toltecs/resource.cpp
@@ -66,7 +66,7 @@ void ArchiveReader::dump(uint resIndex, const char *prefix) {
 	byte *data = new byte[resourceSize];
 
 	Common::String fn;
-	
+
 	if (prefix)
 		fn = Common::String::format("%s_%04X.0", prefix, resIndex);
 	else
@@ -117,11 +117,11 @@ Resource *ResourceCache::load(uint resIndex) {
 		resItem->data = new byte[resItem->size];
 		_vm->_arc->read(resItem->data, resItem->size);
 		_vm->_arc->closeResource();
-		
+
 		_cache[resIndex] = resItem;
-		
+
 		return resItem;
-		
+
 	}
 }
 
diff --git a/engines/toltecs/saveload.cpp b/engines/toltecs/saveload.cpp
index 4de2510..6c195a3 100644
--- a/engines/toltecs/saveload.cpp
+++ b/engines/toltecs/saveload.cpp
@@ -92,7 +92,7 @@ void ToltecsEngine::savegame(const char *filename, const char *description) {
 	byte descriptionLen = strlen(description);
 	out->writeByte(descriptionLen);
 	out->write(description, descriptionLen);
-	
+
 	Graphics::saveThumbnail(*out);
 
 	// Not used yet, reserved for future usage
@@ -149,13 +149,13 @@ void ToltecsEngine::loadgame(const char *filename) {
 	SaveHeader header;
 
 	kReadSaveHeaderError errorCode = readSaveHeader(in, false, header);
-	
+
 	if (errorCode != kRSHENoError) {
 		warning("Error loading savegame '%s'", filename);
 		delete in;
 		return;
 	}
-	
+
 	_sound->stopAll();
 	_music->stopSequence();
 	g_engine->setTotalPlayTime(header.playTime * 1000);
@@ -181,7 +181,7 @@ void ToltecsEngine::loadgame(const char *filename) {
 	_mouseX = in->readUint16LE();
 	_mouseY = in->readUint16LE();
 	_mouseDisabled = in->readUint16LE();
-	
+
 	_system->warpMouse(_mouseX, _mouseY);
  	_system->showMouse(_mouseDisabled == 0);
 
diff --git a/engines/toltecs/screen.cpp b/engines/toltecs/screen.cpp
index 7ec6e94..32202ad 100644
--- a/engines/toltecs/screen.cpp
+++ b/engines/toltecs/screen.cpp
@@ -73,7 +73,7 @@ Screen::~Screen() {
 
 	delete[] _frontScreen;
 	delete[] _backScreen;
-	
+
 	delete _renderQueue;
 
 }
@@ -129,7 +129,7 @@ void Screen::drawGuiImage(int16 x, int16 y, uint resIndex) {
 	byte *dest = _frontScreen + x + (y + _vm->_cameraHeight) * 640;
 
 	//debug(0, "Screen::drawGuiImage() x = %d; y = %d; w = %d; h = %d; resIndex = %d", x, y, width, height, resIndex);
-	
+
 	while (workHeight > 0) {
 		int count = 1;
 		byte pixel = *imageData++;
@@ -247,7 +247,7 @@ void Screen::addAnimatedSprite(int16 x, int16 y, int16 fragmentId, byte *data, i
 		} else {
 			loopNum |= 0x8000;
 		}
-		
+
 		WRITE_LE_UINT16(spriteItem + 0, loopNum);
 		WRITE_LE_UINT16(spriteItem + 4, frameNum);
 
@@ -308,9 +308,9 @@ void Screen::updateVerbLine(int16 slotIndex, int16 slotOffset) {
 	wrapState.len2 = 0;
 
 	y = _verbLineY;
-	
+
 	memset(wrapState.textBuffer, 0, sizeof(wrapState.textBuffer));
-	
+
 	for (int16 i = 0; i <= _verbLineNum; i++) {
 		wrapState.sourceString = _vm->_script->getSlotData(_verbLineItems[i].slotIndex) + _verbLineItems[i].slotOffset;
 		len = wrapGuiText(_fontResIndexArray[0], _verbLineWidth, wrapState);
@@ -331,19 +331,19 @@ void Screen::updateVerbLine(int16 slotIndex, int16 slotOffset) {
 			wrapState.sourceString++;
 			wrapState.len1 -= len;
 			wrapState.len2 = len + 1;
-			
+
 			drawGuiText(_verbLineX - 1 - (wrapState.width / 2), y, 0xF9, 0xFF, _fontResIndexArray[0], wrapState);
 
 			wrapState.destString = wrapState.textBuffer;
 			wrapState.width = 0;
 			len = wrapGuiText(_fontResIndexArray[0], _verbLineWidth, wrapState);
 			wrapState.len1 += len;
-			
+
 			y += 9;
 		}
 		y += 9;
 	}
-	
+
 	wrapState.len1 -= len;
 	wrapState.len2 = len;
 
@@ -463,7 +463,7 @@ void Screen::addTalkTextRect(Font &font, int16 x, int16 &y, int16 length, int16
 		textRect->x = CLIP<int16>(x - width / 2, 0, 640);
 		item->lineCount++;
 	}
-	
+
 	y += font.getHeight() - 1;
 
 }
@@ -559,7 +559,7 @@ int16 Screen::wrapGuiText(uint fontResIndex, int maxWidth, GuiTextWrapState &wra
 
 	Font font(_vm->_res->load(fontResIndex)->data);
 	int16 len = 0;
-	
+
 	while (*wrapState.sourceString >= 0x20 && *wrapState.sourceString < 0xF0) {
 		byte ch = *wrapState.sourceString;
 		byte charWidth;
@@ -573,9 +573,9 @@ int16 Screen::wrapGuiText(uint fontResIndex, int maxWidth, GuiTextWrapState &wra
 		wrapState.width += charWidth;
 		*wrapState.destString++ = *wrapState.sourceString++;
 	}
-	
+
 	return len;
-	
+
 }
 
 void Screen::drawGuiText(int16 x, int16 y, byte fontColor1, byte fontColor2, uint fontResIndex, GuiTextWrapState &wrapState) {
@@ -765,7 +765,7 @@ void Screen::loadState(Common::ReadStream *in) {
 		_verbLineItems[i].slotIndex = in->readUint16LE();
 		_verbLineItems[i].slotOffset = in->readUint16LE();
 	}
-	
+
 	// Load talk text items
 	_talkTextX = in->readUint16LE();
 	_talkTextY = in->readUint16LE();
@@ -786,7 +786,7 @@ void Screen::loadState(Common::ReadStream *in) {
 			_talkTextItems[i].lines[j].length = in->readUint16LE();
 		}
 	}
-	
+
 	// Load GUI bitmap
 	{
 		byte *gui = _frontScreen + _vm->_cameraHeight * 640;
diff --git a/engines/toltecs/screen.h b/engines/toltecs/screen.h
index 988f59c..315e9a4 100644
--- a/engines/toltecs/screen.h
+++ b/engines/toltecs/screen.h
@@ -154,15 +154,15 @@ public:
 	~Screen();
 
 	void unpackRle(byte *source, byte *dest, uint16 width, uint16 height);
-	
+
 	void loadMouseCursor(uint resIndex);
-	
+
 	void drawGuiImage(int16 x, int16 y, uint resIndex);
-	
+
 	void startShakeScreen(int16 shakeCounter);
 	void stopShakeScreen();
 	void updateShakeScreen();
-	
+
 	// Sprite list
 	void addStaticSprite(byte *spriteItem);
 	void addAnimatedSprite(int16 x, int16 y, int16 fragmentId, byte *data, int16 *spriteArray, bool loop, int mode);
@@ -175,7 +175,7 @@ public:
 
 	// Verb line
 	void updateVerbLine(int16 slotIndex, int16 slotOffset);
-	
+
 	// Talk text
 	void updateTalkText(int16 slotIndex, int16 slotOffset);
 	void addTalkTextRect(Font &font, int16 x, int16 &y, int16 length, int16 width, TalkTextItem *item);
@@ -207,7 +207,7 @@ public:
 		int16 slotIndex;
 		int16 slotOffset;
 	};
-	
+
 	struct Rect {
 		int16 x, y, width, height;
 	};
@@ -215,7 +215,7 @@ public:
 	ToltecsEngine *_vm;
 
 	byte *_frontScreen, *_backScreen;
-	
+
 	uint _fontResIndexArray[10];
 	byte _fontColor1, _fontColor2;
 
@@ -229,7 +229,7 @@ public:
 	VerbLineItem _verbLineItems[8];
 	int16 _verbLineX, _verbLineY, _verbLineWidth;
 	int16 _verbLineCount;
-	
+
 	// Talk text
 	int16 _talkTextX, _talkTextY;
 	int16 _talkTextMaxWidth;
diff --git a/engines/toltecs/script.cpp b/engines/toltecs/script.cpp
index 40b1352..03a2b66 100644
--- a/engines/toltecs/script.cpp
+++ b/engines/toltecs/script.cpp
@@ -197,7 +197,7 @@ void ScriptInterpreter::runScript() {
 				_vm->saveGameState(_vm->_saveLoadSlot, _vm->_saveLoadDescription);
 			_vm->_saveLoadRequested = 0;
 		}
-			
+
 		if (_switchLocalDataNear) {
 			_switchLocalDataNear = false;
 			_localData = getSlotData(_regs.reg4);
@@ -214,7 +214,7 @@ void ScriptInterpreter::runScript() {
 			_localData = _stack + 2;
 			_switchLocalDataNear = true;
 		}
-		
+
 		byte opcode = readByte();
 		execOpcode(opcode);
 
@@ -547,7 +547,7 @@ const char *getVarName(uint variable) {
 
 int16 ScriptInterpreter::getGameVar(uint variable) {
 	debug(0, "ScriptInterpreter::getGameVar(%d{%s})", variable, getVarName(variable));
-	
+
 	switch (variable) {
 	case  0: return _vm->_mouseDisabled;
 	case  1: return _vm->_mouseY;
@@ -579,7 +579,7 @@ int16 ScriptInterpreter::getGameVar(uint variable) {
 
 void ScriptInterpreter::setGameVar(uint variable, int16 value) {
 	debug(0, "ScriptInterpreter::setGameVar(%d{%s}, %d)", variable, getVarName(variable), value);
-	
+
 	switch (variable) {
 	case 0:
 		_vm->_mouseDisabled = value;
@@ -718,7 +718,7 @@ void ScriptInterpreter::saveState(Common::WriteStream *out) {
 	// Save stack
 	out->write(_stack, kScriptStackSize);
 	out->writeUint16LE(_savedSp);
-	
+
 	// Save IP
 	out->writeUint16LE((int16)(_code - getSlotData(_regs.reg4)));
 
@@ -1046,14 +1046,14 @@ void ScriptInterpreter::sfHandleInput() {
 			Only scancodes known to be used (so far) are converted
 		*/
 		switch (_vm->_keyState.keycode) {
-		case Common::KEYCODE_ESCAPE: 
+		case Common::KEYCODE_ESCAPE:
 			keyCode = 1;
 			break;
 		case Common::KEYCODE_F10:
 			keyCode = 68;
 			break;
 		default:
-			break;			
+			break;
 		}
 	}
 	localWrite16(varOfs, keyCode);
@@ -1068,7 +1068,7 @@ void ScriptInterpreter::sfRunOptionsScreen() {
 	of data so the game doesn't stall while playing (due to the slow speed of
 	CD-Drives back then). This is not needed in ScummVM since all supported
 	systems are fast enough to load data in-game. */
-		
+
 void ScriptInterpreter::sfPrecacheSprites() {
 	// See note above
 }
diff --git a/engines/toltecs/script.h b/engines/toltecs/script.h
index 7a50d22..89dca45 100644
--- a/engines/toltecs/script.h
+++ b/engines/toltecs/script.h
@@ -90,13 +90,13 @@ protected:
 	bool _cmpBitTest;
 
 	ScriptSlot _slots[kMaxScriptSlots];
-	
+
 	ScriptRegs _regs;
 	int16 _savedSp;
 
 	byte readByte();
 	int16 readInt16();
-	
+
 	void execOpcode(byte opcode);
 
 	void setupScriptFunctions();
diff --git a/engines/toltecs/segmap.cpp b/engines/toltecs/segmap.cpp
index f7d806c..b06c0af 100644
--- a/engines/toltecs/segmap.cpp
+++ b/engines/toltecs/segmap.cpp
@@ -48,7 +48,7 @@ void SegmentMap::load(byte *source) {
 	uint16 maskRectCount = READ_LE_UINT16(source);
 	source += 2;
 	uint16 maskRectDataSize = maskRectCount * 12 + 2;
-	
+
 	debug(0, "SegmentMap::load() maskRectCount = %d", maskRectCount);
 
 	for (uint16 i = 0; i < maskRectCount; i++) {
@@ -74,25 +74,25 @@ void SegmentMap::load(byte *source) {
 	// Load path rects
 
 	source += 2; // skip rects array size
-	
+
 	uint16 pathRectCount = READ_LE_UINT16(source);
 	source += 2;
-	
+
 	debug(0, "SegmentMap::load() pathRectCount = %d", pathRectCount);
-	
+
 	for (uint16 i = 0; i < pathRectCount; i++) {
 		SegmapPathRect pathRect;
 		pathRect.y1 = READ_LE_UINT16(source);
 		pathRect.x1 = READ_LE_UINT16(source + 2);
 		pathRect.y2 = pathRect.y1 + READ_LE_UINT16(source + 4);
 		pathRect.x2 = pathRect.x1 + READ_LE_UINT16(source + 6);
-		
+
 		debug(0, "SegmentMap::load() (%d, %d, %d, %d)", pathRect.x1, pathRect.y1, pathRect.x2, pathRect.y2);
 
 		source += 8;
 		_pathRects.push_back(pathRect);
 	}
-	
+
 	// Load info rects
 
 	source += 2; // skip rects array size
@@ -141,7 +141,7 @@ void SegmentMap::adjustPathPoint(int16 &x, int16 &y) {
 
 	uint32 minDistance = 0xFFFFFFFF, distance;
 	int16 adjustedX = 0, adjustedY = 0, x2, y2;
-	
+
 	for (int16 rectIndex = 0; rectIndex < (int16)_pathRects.size(); rectIndex++) {
 
 		if (x >= _pathRects[rectIndex].x1 && x < _pathRects[rectIndex].x2) {
@@ -174,7 +174,7 @@ void SegmentMap::adjustPathPoint(int16 &x, int16 &y) {
 		}
 
 	}
-	
+
 	x = adjustedX;
 	y = adjustedY;
 
@@ -318,7 +318,7 @@ void SegmentMap::findPath(int16 *pointsArray, int16 destX, int16 destY, int16 so
 		pointsArray[0] = 0;
 		pointsArray[1] = TO_LE_16(_pathNodesCount + 1);
 	}
-	
+
 	debug(0, "SegmentMap::findPath() count = %d", FROM_LE_16(pointsArray[1]));
 
 #if 0 // DEBUG: Draw the path we found
@@ -335,7 +335,7 @@ void SegmentMap::findPath(int16 *pointsArray, int16 destX, int16 destY, int16 so
 		sy = y;
 	}
 #endif
-	
+
 }
 
 int8 SegmentMap::getScalingAtPoint(int16 x, int16 y) {
diff --git a/engines/toltecs/segmap.h b/engines/toltecs/segmap.h
index 30182a6..dda0ede 100644
--- a/engines/toltecs/segmap.h
+++ b/engines/toltecs/segmap.h
@@ -61,14 +61,14 @@ public:
 	void getRgbModifiertAtPoint(int16 x, int16 y, int16 id, byte &r, byte &g, byte &b);
 
 	void addMasksToRenderQueue();
-	
+
 //protected:
 public: // for debugging purposes
 
 	struct SegmapPathRect {
 		int16 x1, y1, x2, y2;
 	};
-	
+
 	struct SegmapInfoRect {
 		int16 y, x;
 		int16 height, width;
@@ -78,11 +78,11 @@ public: // for debugging purposes
 			return py >= y && py <= y + height && px >= x && px <= x + width;
 		}
 	};
-	
+
 	struct PathPoint {
 		int16 y, x;
 	};
-	
+
 	typedef Common::Array<SegmapMaskRect> SegmapMaskRectArray;
 	typedef Common::Array<SegmapPathRect> SegmapPathRectArray;
 	typedef Common::Array<SegmapInfoRect> SegmapInfoRectArray;
diff --git a/engines/toltecs/sound.cpp b/engines/toltecs/sound.cpp
index 2705efe..4b28139 100644
--- a/engines/toltecs/sound.cpp
+++ b/engines/toltecs/sound.cpp
@@ -57,7 +57,7 @@ void Sound::playSpeech(int16 resIndex) {
 
 void Sound::playSound(int16 resIndex, int16 type, int16 volume) {
 	debug(0, "playSound(%d, %d, %d)", resIndex, type, volume);
-	
+
 	internalPlaySound(resIndex, type, volume, 0);
 }
 
@@ -66,7 +66,7 @@ void Sound::playSoundAtPos(int16 resIndex, int16 x, int16 y) {
 
 	int16 volume = 50 + ABS(_vm->_segmap->getScalingAtPoint(x, y)) / 2;
 	int16 panning = 0, deltaX = 0;
-	
+
 	if (_vm->_cameraX > x)
 		deltaX = _vm->_cameraX - x;
 	else if (_vm->_cameraX + 640 < x)
@@ -75,7 +75,7 @@ void Sound::playSoundAtPos(int16 resIndex, int16 x, int16 y) {
 		deltaX = 600;
 
 	volume = ((100 - deltaX / 6) * volume) / 100;
-	
+
 	if (_vm->_cameraX + 320 != x) {
 		panning = CLIP(x - (_vm->_cameraX + 320), -381, 381) / 3;
 	}
@@ -86,7 +86,7 @@ void Sound::playSoundAtPos(int16 resIndex, int16 x, int16 y) {
 void Sound::internalPlaySound(int16 resIndex, int16 type, int16 volume, int16 panning) {
 	// Change the game's sound volume (0 - 100) to Scummvm's scale (0 - 255)
 	volume = (volume == -1) ? 255 : volume * 255 / 100;
-	
+
 	if (resIndex == -1) {
 		// Stop all sounds
 		_vm->_mixer->stopAll();
@@ -108,7 +108,7 @@ void Sound::internalPlaySound(int16 resIndex, int16 type, int16 volume, int16 pa
 			// Stop speech and play new sound
 			stopSpeech();
 		}
-	
+
 		// Play new sound in empty channel
 		int freeChannel = -1;
 		for (int i = 0; i < kMaxChannels; i++) {
@@ -117,7 +117,7 @@ void Sound::internalPlaySound(int16 resIndex, int16 type, int16 volume, int16 pa
 				break;
 			}
 		}
-		
+
 		// If all channels are in use no new sound will be played
 		if (freeChannel >= 0) {
 			Resource *soundResource = _vm->_res->load(resIndex);
@@ -140,7 +140,7 @@ void Sound::internalPlaySound(int16 resIndex, int16 type, int16 volume, int16 pa
 		}
 
 	}
-	
+
 }
 
 void Sound::updateSpeech() {
diff --git a/engines/toltecs/sprite.cpp b/engines/toltecs/sprite.cpp
index 7a02663..6101eb7 100644
--- a/engines/toltecs/sprite.cpp
+++ b/engines/toltecs/sprite.cpp
@@ -199,7 +199,7 @@ bool Screen::createSpriteDrawItem(const DrawRequest &drawRequest, SpriteDrawItem
 	sprite.frameNum = frameNum;
 
 	spriteData = _vm->_res->load(drawRequest.resIndex)->data;
-	
+
 	if (drawRequest.flags & 0x1000) {
 		sprite.flags |= 4;
 	}
@@ -207,7 +207,7 @@ bool Screen::createSpriteDrawItem(const DrawRequest &drawRequest, SpriteDrawItem
 	if (drawRequest.flags & 0x2000) {
 		sprite.flags |= 0x10;
 	}
-	
+
 	if (drawRequest.flags & 0x4000) {
 		sprite.flags |= 0x40;
 	}
@@ -218,7 +218,7 @@ bool Screen::createSpriteDrawItem(const DrawRequest &drawRequest, SpriteDrawItem
 
 	if (spriteFrameEntry.w == 0 || spriteFrameEntry.h == 0)
 		return false;
-	
+
 	sprite.offset = spriteFrameEntry.offset;
 
 	sprite.width = spriteFrameEntry.w;
@@ -263,12 +263,12 @@ bool Screen::createSpriteDrawItem(const DrawRequest &drawRequest, SpriteDrawItem
 			xoffs -= (xoffs * scaleValue) / 100;
 			yoffs -= (yoffs * scaleValue) / 100;
 		}
-		
+
 	}
-	
+
 	sprite.x -= xoffs;
 	sprite.y -= yoffs;
-	
+
 	sprite.yerror = sprite.ydelta;
 
 	// Now we check if the sprite needs to be clipped
@@ -283,7 +283,7 @@ bool Screen::createSpriteDrawItem(const DrawRequest &drawRequest, SpriteDrawItem
 		sprite.height -= clipHeight;
 		if (sprite.height <= 0)
 			return false;
-		
+
 		sprite.y = _vm->_cameraY;
 
 		// If the sprite is scaled
@@ -311,7 +311,7 @@ bool Screen::createSpriteDrawItem(const DrawRequest &drawRequest, SpriteDrawItem
 			}
 			sprite.yerror = chopHeight;
 		}
-		
+
 		spriteFrameData = spriteData + sprite.offset;
 		// Now the sprite's offset is adjusted to point to the starting line
 		if ((sprite.flags & 0x10) == 0) {
@@ -439,7 +439,7 @@ void Screen::drawSpriteCore(byte *dest, SpriteFilter &reader, const SpriteDrawIt
 
 	SpriteReaderStatus status;
 	PixelPacket packet;
-	
+
 	byte *destp = dest;
 	int16 skipX = sprite.skipX;
 
@@ -459,7 +459,7 @@ void Screen::drawSpriteCore(byte *dest, SpriteFilter &reader, const SpriteDrawIt
 				status = reader.readPacket(packet);
 			}
 		}
-		
+
 		if (w - packet.count < 0)
 			packet.count = w;
 
diff --git a/engines/toltecs/toltecs.cpp b/engines/toltecs/toltecs.cpp
index b1f60c5..71264a6 100644
--- a/engines/toltecs/toltecs.cpp
+++ b/engines/toltecs/toltecs.cpp
@@ -80,7 +80,7 @@ Common::Error ToltecsEngine::run() {
 	_flag01 = 0;
 
 	_saveLoadRequested = 0;
-		
+
 	_cameraX = 0;
 	_cameraY = 0;
 	_newCameraX = 0;
@@ -91,7 +91,7 @@ Common::Error ToltecsEngine::run() {
 
 	_sceneWidth = 0;
 	_sceneHeight = 0;
-	
+
 	_doSpeech = true;
 	_doText = true;
 
@@ -121,7 +121,7 @@ Common::Error ToltecsEngine::run() {
 	_moviePlayer = new MoviePlayer(this);
 	_music = new Music(_arc);
 	_menuSystem = new MenuSystem(this);
-	
+
 	_sound = new Sound(this);
 
 	_cfgText = ConfMan.getBool("subtitles");
@@ -186,7 +186,7 @@ Common::Error ToltecsEngine::run() {
 	delete _music;
 	delete _moviePlayer;
 	delete _menuSystem;
-	
+
 	delete _sound;
 
 	return Common::kNoError;
@@ -250,7 +250,7 @@ void ToltecsEngine::loadScene(uint resIndex) {
 
 	_screen->_fullRefresh = true;
 	_screen->_renderQueue->clear();
-	
+
 }
 
 void ToltecsEngine::updateScreen() {
@@ -426,7 +426,7 @@ void ToltecsEngine::setCamera(int16 x, int16 y) {
 	_screen->finishTalkTextItems();
 
 	_screen->clearSprites();
-	
+
 	_cameraX = x;
 	_newCameraX = x;
 
@@ -495,9 +495,9 @@ void ToltecsEngine::updateCamera() {
 }
 
 void ToltecsEngine::talk(int16 slotIndex, int16 slotOffset) {
-	
+
 	byte *scanData = _script->getSlotData(slotIndex) + slotOffset;
-	
+
 	while (*scanData < 0xF0) {
 		if (*scanData == 0x19) {
 			scanData++;
@@ -510,7 +510,7 @@ void ToltecsEngine::talk(int16 slotIndex, int16 slotOffset) {
 		}
 		scanData++;
 	}
-	
+
 	if (*scanData == 0xFE) {
 		if (_doSpeech) {
 			int16 resIndex = READ_LE_UINT16(scanData + 1);
@@ -544,7 +544,7 @@ void ToltecsEngine::walk(byte *walkData) {
 	walkInfo.xerror = READ_LE_UINT16(walkData + 14);
 	walkInfo.mulValue = READ_LE_UINT16(walkData + 16);
 	walkInfo.scaling = READ_LE_UINT16(walkData + 18);
-	
+
 	walkInfo.scaling = -_segmap->getScalingAtPoint(walkInfo.x, walkInfo.y);
 
 	if (walkInfo.y1 < walkInfo.y2)
@@ -552,7 +552,7 @@ void ToltecsEngine::walk(byte *walkData) {
 	else
 		ystep = 1;
 	ydelta = ABS(walkInfo.y1 - walkInfo.y2) * _walkSpeedY;
-	
+
 	if (walkInfo.x1 < walkInfo.x2)
 		xstep = -1;
 	else
@@ -615,11 +615,11 @@ void ToltecsEngine::walk(byte *walkData) {
 
 }
 
-int16 ToltecsEngine::findRectAtPoint(byte *rectData, int16 x, int16 y, int16 index, int16 itemSize, 
+int16 ToltecsEngine::findRectAtPoint(byte *rectData, int16 x, int16 y, int16 index, int16 itemSize,
 	byte *rectDataEnd) {
 
 	rectData += index * itemSize;
-	
+
 	while (rectData < rectDataEnd) {
 		int16 rectY = READ_LE_UINT16(rectData);
 		if (rectY == -10)
@@ -637,7 +637,7 @@ int16 ToltecsEngine::findRectAtPoint(byte *rectData, int16 x, int16 y, int16 ind
 		index++;
 		rectData += itemSize;
 	}
-	
+
 	return -1;
 }
 
diff --git a/engines/toltecs/toltecs.h b/engines/toltecs/toltecs.h
index e82a88b..b95a4f7 100644
--- a/engines/toltecs/toltecs.h
+++ b/engines/toltecs/toltecs.h
@@ -134,8 +134,8 @@ public:
 	void talk(int16 slotIndex, int16 slotOffset);
 
 	void walk(byte *walkData);
-	
-	int16 findRectAtPoint(byte *rectData, int16 x, int16 y, int16 index, int16 itemSize, 
+
+	int16 findRectAtPoint(byte *rectData, int16 x, int16 y, int16 index, int16 itemSize,
 		byte *rectDataEnd);
 
 	int _cfgVoicesVolume, _cfgMusicVolume, _cfgSoundFXVolume;
@@ -163,7 +163,7 @@ public:
 
 	uint _sceneResIndex;
 	int16 _sceneWidth, _sceneHeight;
-	
+
 	int _counter01, _counter02;
 	bool _movieSceneFlag;
 	byte _flag01;
@@ -174,7 +174,7 @@ public:
 	int16 _guiHeight;
 
 	bool _doSpeech, _doText;
-	
+
 	int16 _walkSpeedY, _walkSpeedX;
 
 	Common::KeyState _keyState;
diff --git a/engines/tony/custom.cpp b/engines/tony/custom.cpp
index 7bca40b..23c655e 100644
--- a/engines/tony/custom.cpp
+++ b/engines/tony/custom.cpp
@@ -72,9 +72,9 @@ static const MusicFileEntry kMusicFiles[] =  {
 
 
 static const char *const kJingleFileNames[] = {
-	"S00.ADP", "S01.ADP", "S02.ADP", "S03.ADP", "S04.ADP", 
-	"S05.ADP", "S06.ADP", "S07.ADP", "S08.ADP", "S09.ADP", 
-	"S10.ADP", "S11.ADP", "S12.ADP", "S13.ADP", "S14.ADP", 
+	"S00.ADP", "S01.ADP", "S02.ADP", "S03.ADP", "S04.ADP",
+	"S05.ADP", "S06.ADP", "S07.ADP", "S08.ADP", "S09.ADP",
+	"S10.ADP", "S11.ADP", "S12.ADP", "S13.ADP", "S14.ADP",
 	"S15.ADP", "S16.ADP", "S17.ADP", "S18.ADP"
 };
 
diff --git a/engines/tony/font.cpp b/engines/tony/font.cpp
index c8919db..fa018b4 100644
--- a/engines/tony/font.cpp
+++ b/engines/tony/font.cpp
@@ -925,7 +925,7 @@ RMDialogChoice::RMDialogChoice() {
 
 	_hUnreg = CoroScheduler.createEvent(false, false);
 	_bRemoveFromOT = false;
-	
+
 	_curAdded = 0;
 	_bShow = false;
 }
diff --git a/engines/tony/gfxcore.cpp b/engines/tony/gfxcore.cpp
index 25ea10d..04ce01b 100644
--- a/engines/tony/gfxcore.cpp
+++ b/engines/tony/gfxcore.cpp
@@ -361,7 +361,7 @@ void RMGfxTargetBuffer::addPrim(RMGfxPrimitive *prim) {
 void RMGfxTargetBuffer::addDirtyRect(const Common::Rect &r) {
 	assert(r.isValidRect());
 	if (_trackDirtyRects && r.width() > 0 && r.height() > 0)
-		_currentDirtyRects.push_back(r);	
+		_currentDirtyRects.push_back(r);
 }
 
 Common::List<Common::Rect> &RMGfxTargetBuffer::getDirtyRects() {
diff --git a/engines/tony/inventory.cpp b/engines/tony/inventory.cpp
index d758c3f..12540e5 100644
--- a/engines/tony/inventory.cpp
+++ b/engines/tony/inventory.cpp
@@ -711,7 +711,7 @@ int RMInventory::loadState(byte *state) {
 
 	_curPos = 0;
 	_bCombining = false;
-	
+
 	_items[29]._icon.setPattern(1);
 
 	if (_nInv > 8)
diff --git a/engines/tony/loc.cpp b/engines/tony/loc.cpp
index 665afa9..18470aa 100644
--- a/engines/tony/loc.cpp
+++ b/engines/tony/loc.cpp
@@ -668,7 +668,7 @@ void RMItem::setPattern(int nPattern, bool bPlayP0) {
 		if (_nCurPattern > 0)
 			_patterns[_nCurPattern].stopSfx(_sfx);
 	}
-	
+
 	// Remember the current pattern
 	_nCurPattern = nPattern;
 
@@ -1661,7 +1661,7 @@ RMCharacter::RMCharacter() {
 	_bMovingWithoutMinpath = false;
 	_bDrawNow = false;
 	_bNeedToStop = false;
-	
+
 	memset(_path, 0, sizeof(_path));
 
 	_pos.set(0, 0);
diff --git a/engines/tony/mpal/mpalutils.cpp b/engines/tony/mpal/mpalutils.cpp
index 92d4af3..0919aed 100644
--- a/engines/tony/mpal/mpalutils.cpp
+++ b/engines/tony/mpal/mpalutils.cpp
@@ -81,7 +81,7 @@ Common::SeekableReadStream *RMRes::getReadStream() {
 }
 
 bool RMRes::isValid() {
-	return _h != NULL; 
+	return _h != NULL;
 }
 
 /****************************************************************************\
diff --git a/engines/tony/mpal/mpalutils.h b/engines/tony/mpal/mpalutils.h
index 629e157..d92bb6f 100644
--- a/engines/tony/mpal/mpalutils.h
+++ b/engines/tony/mpal/mpalutils.h
@@ -59,7 +59,7 @@ class RMResRaw : public RMRes {
 public:
 	RMResRaw(uint32 resID);
 	virtual ~RMResRaw();
-		
+
 	const byte *dataPointer();
 	operator const byte*();
 
diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp
index 710fe7c..695801a 100644
--- a/engines/tony/tony.cpp
+++ b/engines/tony/tony.cpp
@@ -244,16 +244,16 @@ bool TonyEngine::loadTonyDat() {
 		expectedLangVariant = 0;
 		break;
 	}
-	
+
 	int numVariant = in.readUint16BE();
 	if (expectedLangVariant > numVariant) {
 		msg = Common::String::format("Font variant not present in 'tony.dat'. Get it from the ScummVM website");
 		GUIErrorMessage(msg);
 		warning("%s", msg.c_str());
-		
+
 		return false;
 	}
-	
+
 	in.seek(in.pos() + (2 * 256 * 8 * expectedLangVariant));
 	for (int i = 0; i < 256; i++) {
 		_cTableDialog[i] = in.readSint16BE();
diff --git a/engines/tony/window.cpp b/engines/tony/window.cpp
index 013be84..c9c4504 100644
--- a/engines/tony/window.cpp
+++ b/engines/tony/window.cpp
@@ -256,7 +256,7 @@ void RMWindow::plotLines(const byte *lpBuf, const Common::Point &center, int x,
 }
 
 void RMWindow::showDirtyRects(bool v) {
-	_showDirtyRects = v; 
+	_showDirtyRects = v;
 }
 
 /****************************************************************************\
diff --git a/engines/toon/detection.cpp b/engines/toon/detection.cpp
index 3877fa2..38b1f4f 100644
--- a/engines/toon/detection.cpp
+++ b/engines/toon/detection.cpp
@@ -84,7 +84,7 @@ static const ADGameDescription gameDescriptions[] = {
 			{"study.svl", 0, "d4aff126ee27be3c3d25e2996369d7cb", 2324368},
 		},
 		Common::RU_RUS, Common::kPlatformPC, ADGF_NO_FLAGS, GUIO0()
-	},		
+	},
 	{
 		"toon", "",
 		{
diff --git a/engines/toon/movie.h b/engines/toon/movie.h
index e795182..4dd6583 100644
--- a/engines/toon/movie.h
+++ b/engines/toon/movie.h
@@ -40,7 +40,7 @@ protected:
 	SmackerVideoTrack *createVideoTrack(uint32 width, uint32 height, uint32 frameCount, const Common::Rational &frameRate, uint32 flags, uint32 signature) const;
 
 private:
-	bool _lowRes;	
+	bool _lowRes;
 };
 
 class Movie {
diff --git a/engines/toon/picture.cpp b/engines/toon/picture.cpp
index 204b0fe..f59cdca 100644
--- a/engines/toon/picture.cpp
+++ b/engines/toon/picture.cpp
@@ -71,7 +71,7 @@ bool Picture::loadPicture(const Common::String &file) {
 		_data = new uint8[decSize + 100];
 		_paletteEntries = READ_LE_UINT16(fileData + 14) / 3;
 		_useFullPalette = (_paletteEntries == 256);
-		
+
 		if (_paletteEntries) {
 			_palette = new uint8[_paletteEntries * 3];
 			memcpy(_palette, fileData + 16, _paletteEntries * 3);
diff --git a/engines/tsage/blue_force/blueforce_scenes7.cpp b/engines/tsage/blue_force/blueforce_scenes7.cpp
index bb29ad1..4cdd2f3 100644
--- a/engines/tsage/blue_force/blueforce_scenes7.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes7.cpp
@@ -159,7 +159,7 @@ void Scene710::postInit(SceneObjectList *OwnerList) {
 	_stripManager.addSpeaker(&_skipSpeaker);
 	_stripManager.addSpeaker(&_lauraSpeaker);
 	_stripManager.addSpeaker(&_gameTextSpeaker);
-	
+
 	_kid.postInit();
 	_kid._moveDiff = Common::Point(4, 2);
 	_laura.postInit();
diff --git a/engines/tsage/blue_force/blueforce_speakers.cpp b/engines/tsage/blue_force/blueforce_speakers.cpp
index 8af18b4..2a57616 100644
--- a/engines/tsage/blue_force/blueforce_speakers.cpp
+++ b/engines/tsage/blue_force/blueforce_speakers.cpp
@@ -809,7 +809,7 @@ void SpeakerGiggles::setText(const Common::String &msg) {
 SpeakerFBI::SpeakerFBI(): VisualSpeaker() {
 	_color1 = 27;
 	_color2 = 89;
-	
+
 	_speakerName = "FBI";
 }
 
@@ -832,7 +832,7 @@ void SpeakerFBI::setText(const Common::String &msg) {
 SpeakerNico::SpeakerNico(): VisualSpeaker() {
 	_color1 = 105;
 	_color2 = 102;
-	
+
 	_speakerName = "NICO";
 }
 
@@ -845,7 +845,7 @@ void SpeakerNico::setText(const Common::String &msg) {
 	_object1.fixPriority(254);
 	_object1.setPosition(Common::Point(BF_GLOBALS._sceneManager._scene->_sceneBounds.left + 262,
 		BF_GLOBALS._sceneManager._scene->_sceneBounds.top + 166));
-	
+
 	_object2.postInit();
 	_object2.setVisage(905);
 	_object2.setStrip2(1);
@@ -862,7 +862,7 @@ void SpeakerNico::setText(const Common::String &msg) {
 SpeakerDA::SpeakerDA(): VisualSpeaker() {
 	_color1 = 82;
 	_color2 = 80;
-	
+
 	_speakerName = "DA";
 }
 
@@ -875,7 +875,7 @@ void SpeakerDA::setText(const Common::String &msg) {
 	_object1.fixPriority(254);
 	_object1.setPosition(Common::Point(BF_GLOBALS._sceneManager._scene->_sceneBounds.left + 84,
 		BF_GLOBALS._sceneManager._scene->_sceneBounds.top + 166));
-	
+
 	_object2.postInit();
 	_object2.setVisage(915);
 	_object2.setStrip2(1);
@@ -892,7 +892,7 @@ void SpeakerDA::setText(const Common::String &msg) {
 SpeakerGrandma::SpeakerGrandma(): VisualSpeaker() {
 	_color1 = 20;
 	_color2 = 23;
-	
+
 	_speakerName = "GRANDMA";
 }
 
@@ -905,7 +905,7 @@ void SpeakerGrandma::setText(const Common::String &msg) {
 	_object1.fixPriority(254);
 	_object1.setPosition(Common::Point(BF_GLOBALS._sceneManager._scene->_sceneBounds.left + 43,
 		BF_GLOBALS._sceneManager._scene->_sceneBounds.top + 166));
-	
+
 	_object2.postInit();
 	_object2.setVisage(274);
 	_object2.setStrip2(3);
@@ -922,7 +922,7 @@ void SpeakerGrandma::setText(const Common::String &msg) {
 SpeakerLyle::SpeakerLyle(): VisualSpeaker() {
 	_color1 = 29;
 	_color2 = 89;
-	
+
 	_speakerName = "LYLE";
 }
 
@@ -935,7 +935,7 @@ void SpeakerLyle::setText(const Common::String &msg) {
 	_object1.fixPriority(254);
 	_object1.setPosition(Common::Point(BF_GLOBALS._sceneManager._scene->_sceneBounds.left + 75,
 		BF_GLOBALS._sceneManager._scene->_sceneBounds.top + 166));
-	
+
 	_object2.postInit();
 	_object2.setVisage(278);
 	_object2.setStrip2(1);
@@ -952,7 +952,7 @@ void SpeakerLyle::setText(const Common::String &msg) {
 SpeakerGranText::SpeakerGranText(): VisualSpeaker() {
 	_color1 = 20;
 	_color2 = 23;
-	
+
 	_speakerName = "GRANTEXT";
 }
 
@@ -961,7 +961,7 @@ SpeakerGranText::SpeakerGranText(): VisualSpeaker() {
 SpeakerLyleText::SpeakerLyleText(): VisualSpeaker() {
 	_color1 = 29;
 	_color2 = 89;
-	
+
 	_speakerName = "LYLETEXT";
 }
 
@@ -969,7 +969,7 @@ SpeakerLyleText::SpeakerLyleText(): VisualSpeaker() {
 
 SpeakerKate::SpeakerKate(): VisualSpeaker() {
 	_color1 = 108;
-	
+
 	_speakerName = "KATE";
 }
 
@@ -982,7 +982,7 @@ void SpeakerKate::setText(const Common::String &msg) {
 	_object1.fixPriority(254);
 	_object1.setPosition(Common::Point(BF_GLOBALS._sceneManager._scene->_sceneBounds.left + 270,
 		BF_GLOBALS._sceneManager._scene->_sceneBounds.top + 166));
-	
+
 	_object2.postInit();
 	_object2.setVisage(122);
 	_object2.setStrip2(1);
@@ -1000,7 +1000,7 @@ void SpeakerKate::setText(const Common::String &msg) {
 SpeakerTony::SpeakerTony(): VisualSpeaker() {
 	_color1 = 108;
 	_color2 = 8;
-	
+
 	_speakerName = "TONY";
 }
 
diff --git a/engines/tsage/blue_force/blueforce_speakers.h b/engines/tsage/blue_force/blueforce_speakers.h
index 508279a..e406a50 100644
--- a/engines/tsage/blue_force/blueforce_speakers.h
+++ b/engines/tsage/blue_force/blueforce_speakers.h
@@ -290,7 +290,7 @@ public:
 	virtual Common::String getClassName() { return "FBI"; }
 	virtual void setText(const Common::String &msg);
 };
-		
+
 class SpeakerNico: public VisualSpeaker {
 public:
 	SpeakerNico();
@@ -340,7 +340,7 @@ public:
 class SpeakerKate: public VisualSpeaker {
 public:
 	SpeakerKate();
-	
+
 	virtual Common::String getClassName() { return "SpeakerKate"; }
 	virtual void setText(const Common::String &msg);
 };
@@ -348,7 +348,7 @@ public:
 class SpeakerTony: public VisualSpeaker {
 public:
 	SpeakerTony();
-	
+
 	virtual Common::String getClassName() { return "SpeakerTony"; }
 	virtual void setText(const Common::String &msg);
 };
diff --git a/engines/tsage/detection.cpp b/engines/tsage/detection.cpp
index bcadfdc..a35d663 100644
--- a/engines/tsage/detection.cpp
+++ b/engines/tsage/detection.cpp
@@ -156,7 +156,7 @@ public:
 	SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const {
 		Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(
 			generateGameStateFileName(target, slot));
-		
+
 		if (f) {
 			TsAGE::tSageSavegameHeader header;
 			TsAGE::Saver::readSavegameHeader(f, header);
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp
index de94632..4589a92 100644
--- a/engines/tsage/globals.cpp
+++ b/engines/tsage/globals.cpp
@@ -205,7 +205,7 @@ void Globals::dispatchSounds() {
 
 void TsAGE2Globals::reset() {
 	Globals::reset();
-	
+
 	// Reset the inventory
 	T2_GLOBALS._uiElements.updateInventory();
 	T2_GLOBALS._uiElements._scoreValue = 0;
@@ -277,7 +277,7 @@ void BlueForceGlobals::synchronize(Serializer &s) {
 void BlueForceGlobals::reset() {
 	TsAGE2Globals::reset();
 	_scenePalette.clearListeners();
-	
+
 	_scrollFollower = &_player;
 	_bookmark = bNone;
 
@@ -368,7 +368,7 @@ namespace Ringworld2 {
 
 void Ringworld2Globals::reset() {
 	Globals::reset();
-	
+
 	// Reset the inventory
 	R2_INVENTORY.reset();
 	T2_GLOBALS._uiElements.updateInventory();
@@ -526,7 +526,7 @@ void Ringworld2Globals::synchronize(Serializer &s) {
 
 	for (i = 0; i < MAX_CHARACTERS; ++i)
 		s.syncAsByte(_v565F1[i]);
-	
+
 	s.syncAsByte(_v565AE);
 	s.syncAsByte(_v566A4);
 	s.syncAsByte(_v566A5);
diff --git a/engines/tsage/ringworld/ringworld_logic.cpp b/engines/tsage/ringworld/ringworld_logic.cpp
index 7d571b4..0584570 100644
--- a/engines/tsage/ringworld/ringworld_logic.cpp
+++ b/engines/tsage/ringworld/ringworld_logic.cpp
@@ -610,7 +610,7 @@ void NamedHotspot::doAction(int action) {
 	case CURSOR_USE:
 		if (_useLineNum == -1)
 			break;
-		
+
 		SceneItem::display(_resNum, _useLineNum, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
 		return;
 	case CURSOR_TALK:
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp
index a06899f..97042cb 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.cpp
+++ b/engines/tsage/ringworld2/ringworld2_logic.cpp
@@ -1695,7 +1695,7 @@ bool AnimationPlayer::load(int animId, Action *endAction) {
 	_playbackTickPrior = -1;
 	_playbackTick = 0;
 
-	// The final multiplication is used to deliberately slow down playback, since the original 
+	// The final multiplication is used to deliberately slow down playback, since the original
 	// was slowed down by the amount of time spent to decode and display the frames
 	_frameDelay = (60 / _subData._frameRate) * 8;
 	_gameFrame = R2_GLOBALS._events.getFrameNumber();
@@ -1706,7 +1706,7 @@ bool AnimationPlayer::load(int animId, Action *endAction) {
 		int v = (_subData._sliceSize + 2) * _subData._ySlices * _subData._framesPerSlices;
 		_dataNeeded = (_subData._field16 / _subData._framesPerSlices) + v + 96;
 	}
-	
+
 	debugC(1, ktSageDebugGraphics, "Data needed %d", _dataNeeded);
 
 	// Set up animation data objects
@@ -1760,7 +1760,7 @@ bool AnimationPlayer::load(int animId, Action *endAction) {
 			byte r = _subData._palData[idx * 3];
 			byte g = _subData._palData[idx * 3 + 1];
 			byte b = _subData._palData[idx * 3 + 2];
-		
+
 			int palIndex = R2_GLOBALS._scenePalette.indexOf(r, g, b);
 			_palIndexes[idx] = palIndex;
 		}
diff --git a/engines/tsage/scenes.h b/engines/tsage/scenes.h
index 2daa71b..d5ac88c 100644
--- a/engines/tsage/scenes.h
+++ b/engines/tsage/scenes.h
@@ -67,7 +67,7 @@ public:
 
 	void setZoomPercents(int yStart, int minPercent, int yEnd, int maxPercent);
 	void loadBackground(int xAmount, int yAmount);
-	
+
 	void loadSceneData(int sceneNum);
 };
 
diff --git a/engines/tsage/tsage.cpp b/engines/tsage/tsage.cpp
index 40f4dfc..87697f9 100644
--- a/engines/tsage/tsage.cpp
+++ b/engines/tsage/tsage.cpp
@@ -45,7 +45,7 @@ TSageEngine::TSageEngine(OSystem *system, const tSageGameDescription *gameDesc)
 	else if (g_vm->getGameID() == GType_BlueForce)
 		_debugger = new BlueForceDebugger();
 	else if (g_vm->getGameID() == GType_Ringworld2)
-		_debugger = new Ringworld2Debugger();	
+		_debugger = new Ringworld2Debugger();
 }
 
 Common::Error TSageEngine::init() {
@@ -92,7 +92,7 @@ void TSageEngine::initialize() {
 			g_resourceManager->addLib("TSAGE.RLB");
 		}
 		g_globals = new BlueForce::BlueForceGlobals();
-		
+
 		// Setup the user interface
 		T2_GLOBALS._uiElements.setup(Common::Point(0, UI_INTERFACE_Y - 2));
 
@@ -107,7 +107,7 @@ void TSageEngine::initialize() {
 
 		// Reset all global variables
 		R2_GLOBALS.reset();
-	}		
+	}
 
 	g_globals->gfxManager().setDefaults();
 
diff --git a/engines/wintermute/base/base_engine.cpp b/engines/wintermute/base/base_engine.cpp
index 2368f8b..8146d14 100644
--- a/engines/wintermute/base/base_engine.cpp
+++ b/engines/wintermute/base/base_engine.cpp
@@ -8,12 +8,12 @@
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
  * of the License, or (at your option) any later version.
- 
+
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- 
+
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -25,7 +25,7 @@
  * http://dead-code.org/redir.php?target=wmelite
  * Copyright (c) 2011 Jan Nedoma
  */
- 
+
 #include "engines/wintermute/base/base_file_manager.h"
 #include "engines/wintermute/base/base_game.h"
 #include "engines/wintermute/base/base_engine.h"
@@ -71,10 +71,10 @@ void BaseEngine::LOG(bool res, const char *fmt, ...) {
 	secs = secs % 3600;
 	uint32 mins = secs / 60;
 	secs = secs % 60;
-	
+
 	char buff[512];
 	va_list va;
-	
+
 	va_start(va, fmt);
 	vsprintf(buff, fmt, va);
 	va_end(va);
@@ -82,7 +82,7 @@ void BaseEngine::LOG(bool res, const char *fmt, ...) {
 	if (instance()._gameRef) {
 		instance()._gameRef->LOG("%s", buff);
 	} else {
-		debugCN(kWintermuteDebugLog, "%02d:%02d:%02d: %s\n", hours, mins, secs, buff);		
+		debugCN(kWintermuteDebugLog, "%02d:%02d:%02d: %s\n", hours, mins, secs, buff);
 	}
 }
 
diff --git a/engines/wintermute/base/base_engine.h b/engines/wintermute/base/base_engine.h
index 1cef7b3..1ed0e3a 100644
--- a/engines/wintermute/base/base_engine.h
+++ b/engines/wintermute/base/base_engine.h
@@ -8,12 +8,12 @@
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
  * of the License, or (at your option) any later version.
- 
+
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- 
+
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -25,7 +25,7 @@
  * http://dead-code.org/redir.php?target=wmelite
  * Copyright (c) 2011 Jan Nedoma
  */
- 
+
 #ifndef WINTERMUTE_BASE_ENGINE_H
 #define WINTERMUTE_BASE_ENGINE_H
 
diff --git a/engines/wintermute/base/base_game.cpp b/engines/wintermute/base/base_game.cpp
index 622e85c..7b00244 100644
--- a/engines/wintermute/base/base_game.cpp
+++ b/engines/wintermute/base/base_game.cpp
@@ -740,7 +740,7 @@ bool BaseGame::loadBuffer(byte *buffer, bool complete) {
 	TOKEN_TABLE(LOCAL_SAVE_DIR)
 	TOKEN_TABLE(COMPAT_KILL_METHOD_THREADS)
 	TOKEN_TABLE_END
-	
+
 	// Declare a few variables necessary for moving data from these settings over to the renderer:
 	// The values are the same as the defaults set in BaseRenderer.
 	int loadImageX = 0;
@@ -3624,7 +3624,7 @@ bool BaseGame::persist(BasePersistenceManager *persistMgr) {
 	persistMgr->transfer(TMEMBER(_musicCrossfadeChannel1));
 	persistMgr->transfer(TMEMBER(_musicCrossfadeChannel2));
 	persistMgr->transfer(TMEMBER(_musicCrossfadeSwap));
-	
+
 	_renderer->persistSaveLoadImages(persistMgr);
 
 	persistMgr->transfer(TMEMBER_INT(_textEncoding));
diff --git a/engines/wintermute/base/file/base_package.cpp b/engines/wintermute/base/file/base_package.cpp
index 9780992..51a1558 100644
--- a/engines/wintermute/base/file/base_package.cpp
+++ b/engines/wintermute/base/file/base_package.cpp
@@ -86,16 +86,16 @@ void TPackageHeader::readFromStream(Common::ReadStream *stream) {
 	_magic1 = stream->readUint32LE();
 	_magic2 = stream->readUint32LE();
 	_packageVersion = stream->readUint32LE();
-	
+
 	_gameVersion = stream->readUint32LE();
-	
+
 	_priority = stream->readByte();
 	_cd = stream->readByte();
 	_masterIndex = stream->readByte();
 	stream->readByte(); // To align the next byte...
-	
+
 	_creationTime = stream->readUint32LE();
-	
+
 	stream->read(_desc, 100);
 	_numDirs = stream->readUint32LE();
 }
diff --git a/engines/wintermute/base/gfx/base_renderer.cpp b/engines/wintermute/base/gfx/base_renderer.cpp
index 9205438..e7ffc14 100644
--- a/engines/wintermute/base/gfx/base_renderer.cpp
+++ b/engines/wintermute/base/gfx/base_renderer.cpp
@@ -129,13 +129,13 @@ void BaseRenderer::initSaveLoad(bool isSaving, bool quickSave) {
 	_indicatorDisplay = true;
 	_indicatorProgress = 0;
 	_hasDrawnSaveLoadImage = false;
-	
+
 	if (isSaving && !quickSave) {
 		delete _saveLoadImage;
 		_saveLoadImage = NULL;
 		if (_saveImageName.size()) {
 			_saveLoadImage = createSurface();
-			
+
 			if (!_saveLoadImage || DID_FAIL(_saveLoadImage->create(_saveImageName, true, 0, 0, 0))) {
 				delete _saveLoadImage;
 				_saveLoadImage = NULL;
@@ -146,7 +146,7 @@ void BaseRenderer::initSaveLoad(bool isSaving, bool quickSave) {
 		_saveLoadImage = NULL;
 		if (_loadImageName.size()) {
 			_saveLoadImage = createSurface();
-			
+
 			if (!_saveLoadImage || DID_FAIL(_saveLoadImage->create(_loadImageName, true, 0, 0, 0))) {
 				delete _saveLoadImage;
 				_saveLoadImage = NULL;
@@ -360,7 +360,7 @@ bool BaseRenderer::displayIndicator() {
 		flip();
 		_hasDrawnSaveLoadImage = true;
 	}
-	
+
 	if ((!_indicatorDisplay && _indicatorWidth <= 0) || _indicatorHeight <= 0) {
 		return STATUS_OK;
 	}
@@ -369,7 +369,7 @@ bool BaseRenderer::displayIndicator() {
 	for (int i = 0; i < _indicatorHeight; i++) {
 		drawLine(_indicatorX, _indicatorY + i, _indicatorX + curWidth, _indicatorY + i, _indicatorColor);
 	}
-	
+
 	setup2D();
 	_indicatorWidthDrawn = curWidth;
 	if (_indicatorWidthDrawn) {
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
index 03ec827..7970a25 100644
--- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
+++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
@@ -261,7 +261,7 @@ void BaseRenderOSystem::fade(uint16 alpha) {
 void BaseRenderOSystem::fadeToColor(byte r, byte g, byte b, byte a, Common::Rect *rect) {
 	// This particular warning is rather messy, as this function is called a ton,
 	// thus we avoid printing it more than once.
-	
+
 	// TODO: Add fading with dirty rects.
 	if (!_disableDirtyRects) {
 		warning("BaseRenderOSystem::FadeToColor - Breaks when using dirty rects");
diff --git a/engines/wintermute/base/saveload.cpp b/engines/wintermute/base/saveload.cpp
index 0ca68c7..12204e1 100644
--- a/engines/wintermute/base/saveload.cpp
+++ b/engines/wintermute/base/saveload.cpp
@@ -8,12 +8,12 @@
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
  * of the License, or (at your option) any later version.
- 
+
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- 
+
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -45,11 +45,11 @@ namespace Wintermute {
 
 bool SaveLoad::loadGame(const Common::String &filename, BaseGame *gameRef) {
 	gameRef->LOG(0, "Loading game '%s'...", filename.c_str());
-	
+
 	bool ret;
-	
+
 	gameRef->_renderer->initSaveLoad(false);
-	
+
 	gameRef->_loadInProgress = true;
 	BasePersistenceManager *pm = new BasePersistenceManager();
 	if (DID_SUCCEED(ret = pm->initLoad(filename))) {
@@ -61,20 +61,20 @@ bool SaveLoad::loadGame(const Common::String &filename, BaseGame *gameRef) {
 
 				// data initialization after load
 				SaveLoad::initAfterLoad();
-				
+
 				gameRef->applyEvent("AfterLoad", true);
-				
+
 				gameRef->displayContent(true, false);
 				//_renderer->flip();
 			}
 		}
 	}
-	
+
 	delete pm;
 	gameRef->_loadInProgress = false;
-	
+
 	gameRef->_renderer->endSaveLoad();
-	
+
 	//_gameRef->LOG(0, "Load end %d", BaseUtils::GetUsedMemMB());
 	// AdGame:
 	if (DID_SUCCEED(ret)) {
@@ -85,13 +85,13 @@ bool SaveLoad::loadGame(const Common::String &filename, BaseGame *gameRef) {
 
 bool SaveLoad::saveGame(int slot, const char *desc, bool quickSave, BaseGame *gameRef) {
 	Common::String filename = SaveLoad::getSaveSlotFilename(slot);
-	
+
 	gameRef->LOG(0, "Saving game '%s'...", filename.c_str());
-	
+
 	gameRef->applyEvent("BeforeSave", true);
-	
+
 	bool ret;
-	
+
 	BasePersistenceManager *pm = new BasePersistenceManager();
 	if (DID_SUCCEED(ret = pm->initSave(desc))) {
 		gameRef->_renderer->initSaveLoad(true, quickSave); // TODO: The original code inited the indicator before the conditionals
@@ -104,11 +104,11 @@ bool SaveLoad::saveGame(int slot, const char *desc, bool quickSave, BaseGame *ga
 			}
 		}
 	}
-	
+
 	delete pm;
-	
+
 	gameRef->_renderer->endSaveLoad();
-	
+
 	return ret;
 }
 
@@ -166,21 +166,21 @@ Common::String SaveLoad::getSaveSlotFilename(int slot) {
 
 bool SaveLoad::getSaveSlotDescription(int slot, char *buffer) {
 	buffer[0] = '\0';
-	
+
 	Common::String filename = getSaveSlotFilename(slot);
 	BasePersistenceManager *pm = new BasePersistenceManager();
 	if (!pm) {
 		return false;
 	}
-	
+
 	if (!(pm->initLoad(filename))) {
 		delete pm;
 		return false;
 	}
-	
+
 	strcpy(buffer, pm->_savedDescription);
 	delete pm;
-	
+
 	return true;
 }
 
@@ -199,6 +199,6 @@ bool SaveLoad::emptySaveSlot(int slot) {
 	delete pm;
 	return true;
 }
-	
-	
+
+
 } // end of namespace Wintermute
diff --git a/engines/wintermute/base/saveload.h b/engines/wintermute/base/saveload.h
index e448cc8..722f7a8 100644
--- a/engines/wintermute/base/saveload.h
+++ b/engines/wintermute/base/saveload.h
@@ -8,12 +8,12 @@
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
  * of the License, or (at your option) any later version.
- 
+
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- 
+
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -25,7 +25,7 @@
  * http://dead-code.org/redir.php?target=wmelite
  * Copyright (c) 2011 Jan Nedoma
  */
- 
+
 #ifndef WINTERMUTE_SAVEGAME_H
 #define WINTERMUTE_SAVEGAME_H
 
@@ -39,7 +39,7 @@ public:
 	static bool isSaveSlotUsed(int slot);
 	static bool getSaveSlotDescription(int slot, char *buffer);
 	static Common::String getSaveSlotFilename(int slot);
-	
+
 	static bool loadGame(const Common::String &filename, BaseGame *gameRef);
 	static bool saveGame(int slot, const char *desc, bool quickSave, BaseGame *gameRef);
 	static bool initAfterLoad();
diff --git a/engines/wintermute/graphics/transparent_surface.cpp b/engines/wintermute/graphics/transparent_surface.cpp
index da01259..9319899 100644
--- a/engines/wintermute/graphics/transparent_surface.cpp
+++ b/engines/wintermute/graphics/transparent_surface.cpp
@@ -52,13 +52,13 @@ TransparentSurface::TransparentSurface(const Surface &surf, bool copyData) : Sur
 
 void doBlitOpaque(byte *ino, byte* outo, uint32 width, uint32 height, uint32 pitch, int32 inStep, int32 inoStep) {
 	byte *in, *out;
-	
+
 #ifdef SCUMM_LITTLE_ENDIAN
 	const int aIndex = 3;
 #else
 	const int aIndex = 0;
 #endif
-	
+
 	for (uint32 i = 0; i < height; i++) {
 		out = outo;
 		in = ino;
@@ -121,7 +121,7 @@ void TransparentSurface::doBlitAlpha(byte *ino, byte* outo, uint32 width, uint32
 			int a = (pix >> aShift) & 0xff;
 			int outb, outg, outr, outa;
 			in += inStep;
-			
+
 			switch (a) {
 				case 0: // Full transparency
 					out += 4;
diff --git a/engines/wintermute/persistent.h b/engines/wintermute/persistent.h
index 5bcf307..c862df5 100644
--- a/engines/wintermute/persistent.h
+++ b/engines/wintermute/persistent.h
@@ -52,7 +52,7 @@ namespace Wintermute {
 	virtual bool persist(BasePersistenceManager* PersistMgr);\
 	void* operator new (size_t size);\
 	void operator delete(void* p);\
-	 
+
 
 #define IMPLEMENT_PERSISTENT(class_name, persistent_class)\
 	const char class_name::_className[] = #class_name;\
@@ -80,7 +80,7 @@ namespace Wintermute {
 		SystemClassRegistry::getInstance()->unregisterInstance(#class_name, p);\
 		::operator delete(p);\
 	}\
-	 
+
 #define TMEMBER(member_name) #member_name, &member_name
 #define TMEMBER_INT(member_name) #member_name, (int*)&member_name
 
diff --git a/graphics/VectorRenderer.cpp b/graphics/VectorRenderer.cpp
index 30ef9ee..f426dd8 100644
--- a/graphics/VectorRenderer.cpp
+++ b/graphics/VectorRenderer.cpp
@@ -80,7 +80,7 @@ void VectorRenderer::stepGetPositions(const DrawStep &step, const Common::Rect &
 		case Graphics::DrawStep::kVectorAlignManual:
 			if (step.x >= 0)
 				in_x = area.left + step.x + step.padding.left;
-			else 
+			else
 				in_x = area.left + area.width() + step.x + step.padding.left; // value relative to the opposite corner.
 			break;
 
diff --git a/graphics/VectorRenderer.h b/graphics/VectorRenderer.h
index e98f4aa..0467cac 100644
--- a/graphics/VectorRenderer.h
+++ b/graphics/VectorRenderer.h
@@ -55,7 +55,7 @@ struct DrawStep {
 	bool autoWidth, autoHeight;
 	int16 x, y, w, h; /**< width, height and position, if not measured automatically.
 						  negative values mean counting from the opposite direction */
-						  
+
 	Common::Rect padding;
 
 	enum VectorAlignment {
diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp
index 1ed5a33..6a3ee30 100644
--- a/graphics/VectorRendererSpec.cpp
+++ b/graphics/VectorRendererSpec.cpp
@@ -369,12 +369,12 @@ gradientFill(PixelType *ptr, int width, int x, int y) {
 	int grad = (((y - _gradIndexes[curGrad]) % stripSize) << 2) / stripSize;
 
 	// Dithering:
-	//   +--+ +--+ +--+ +--+ 
-	//   |  | |  | | *| | *| 
-	//   |  | | *| |* | |**| 
-	//   +--+ +--+ +--+ +--+ 
+	//   +--+ +--+ +--+ +--+
+	//   |  | |  | | *| | *|
+	//   |  | | *| |* | |**|
+	//   +--+ +--+ +--+ +--+
 	//     0    1    2    3
-	if (grad == 0 || 
+	if (grad == 0 ||
 		_gradCache[curGrad] == _gradCache[curGrad + 1] || // no color change
 		stripSize < 2) { // the stip is small
 		colorFill<PixelType>(ptr, ptr + width, _gradCache[curGrad]);
@@ -873,7 +873,7 @@ drawTriangle(int x, int y, int w, int h, TriangleOrientation orient) {
 		case kTriangleDown:
 			drawTriangleVertAlg(x, y, newW, newH, (orient == kTriangleDown), color, Base::_fillMode);
 			break;
-					
+
 		case kTriangleLeft:
 		case kTriangleRight:
 		case kTriangleAuto:
@@ -1206,14 +1206,14 @@ drawTriangleVertAlg(int x1, int y1, int w, int h, bool inverted, PixelType color
 		pitch = -pitch;
 		y1 += h;
 	}
-	
+
 	PixelType *ptr_right = (PixelType *)_activeSurface->getBasePtr(x1, y1);
 	PixelType *floor = ptr_right - 1;
 	PixelType *ptr_left = (PixelType *)_activeSurface->getBasePtr(x1 + w, y1);
 
 	int x2 = x1 + w / 2;
 	int y2 = y1 + h;
-  
+
 #if FIXED_POINT
 	int dx = (x2 - x1) << 8;
 	int dy = (y2 - y1) << 8;
@@ -1227,7 +1227,7 @@ drawTriangleVertAlg(int x1, int y1, int w, int h, bool inverted, PixelType color
 #endif
 		while (floor++ != ptr_left)
 			blendPixelPtr(floor, color, 50);
-			
+
 #if FIXED_POINT
 		int gradient = (dy << 8) / dx;
 		int intery = (y1 << 8) + gradient;
@@ -1250,7 +1250,7 @@ drawTriangleVertAlg(int x1, int y1, int w, int h, bool inverted, PixelType color
 			ptr_right += pitch;
 
 			intery += gradient;
-			
+
 			switch (fill_m) {
 			case kFillDisabled:
 				*ptr_left = *ptr_right = color;
@@ -1262,16 +1262,16 @@ drawTriangleVertAlg(int x1, int y1, int w, int h, bool inverted, PixelType color
 				blendPixelPtr(ptr_left, color, rfpart(intery));
 				break;
 			case kFillGradient:
-				colorFill<PixelType>(ptr_right, ptr_left, calcGradient(gradient_h++, h));	
+				colorFill<PixelType>(ptr_right, ptr_left, calcGradient(gradient_h++, h));
 				blendPixelPtr(ptr_right, color, rfpart(intery));
 				blendPixelPtr(ptr_left, color, rfpart(intery));
 				break;
 			}
 		}
-		
+
 		return;
 	}
-	
+
 #if FIXED_POINT
 	if (abs(dx) < abs(dy)) {
 #else
@@ -1280,7 +1280,7 @@ drawTriangleVertAlg(int x1, int y1, int w, int h, bool inverted, PixelType color
 		ptr_left--;
 		while (floor++ != ptr_left)
 			blendPixelPtr(floor, color, 50);
-			
+
 #if FIXED_POINT
 		int gradient = (dx << 8) / (dy + 0x100);
 		int interx = (x1 << 8) + gradient;
@@ -1303,7 +1303,7 @@ drawTriangleVertAlg(int x1, int y1, int w, int h, bool inverted, PixelType color
 			ptr_right += pitch;
 
 			interx += gradient;
-			
+
 			switch (fill_m) {
 			case kFillDisabled:
 				*ptr_left = *ptr_right = color;
@@ -1315,18 +1315,18 @@ drawTriangleVertAlg(int x1, int y1, int w, int h, bool inverted, PixelType color
 				blendPixelPtr(ptr_left, color, rfpart(interx));
 				break;
 			case kFillGradient:
-				colorFill<PixelType>(ptr_right, ptr_left, calcGradient(gradient_h++, h));	
+				colorFill<PixelType>(ptr_right, ptr_left, calcGradient(gradient_h++, h));
 				blendPixelPtr(ptr_right, color, rfpart(interx));
 				blendPixelPtr(ptr_left, color, rfpart(interx));
 				break;
 			}
 		}
-		
+
 		return;
 	}
-	
+
 	ptr_left--;
-	
+
 	while (floor++ != ptr_left)
 		blendPixelPtr(floor, color, 50);
 
@@ -1341,12 +1341,12 @@ drawTriangleVertAlg(int x1, int y1, int w, int h, bool inverted, PixelType color
 	for (int y = y1 + 1; y < y2; y++) {
 		ptr_right++;
 		ptr_left--;
-		
+
 		ptr_left += pitch;
 		ptr_right += pitch;
 
 		interx += gradient;
-		
+
 		switch (fill_m) {
 		case kFillDisabled:
 			*ptr_left = *ptr_right = color;
@@ -1358,13 +1358,13 @@ drawTriangleVertAlg(int x1, int y1, int w, int h, bool inverted, PixelType color
 			blendPixelPtr(ptr_left, color, rfpart(interx));
 			break;
 		case kFillGradient:
-			colorFill<PixelType>(ptr_right, ptr_left, calcGradient(gradient_h++, h));	
+			colorFill<PixelType>(ptr_right, ptr_left, calcGradient(gradient_h++, h));
 			blendPixelPtr(ptr_right, color, rfpart(interx));
 			blendPixelPtr(ptr_left, color, rfpart(interx));
 			break;
 		}
 	}
-	
+
 }
 
 /** VERTICAL TRIANGLE DRAWING - FAST VERSION FOR SQUARED TRIANGLES */
@@ -1372,12 +1372,12 @@ template<typename PixelType>
 void VectorRendererSpec<PixelType>::
 drawTriangleFast(int x1, int y1, int size, bool inverted, PixelType color, VectorRenderer::FillMode fill_m) {
 	int pitch = _activeSurface->pitch / _activeSurface->format.bytesPerPixel;
-	
+
 	if (!inverted) {
 		pitch = -pitch;
 		y1 += size;
 	}
-	
+
 	int gradient_h = 0;
 	PixelType *ptr_right = (PixelType *)_activeSurface->getBasePtr(x1, y1);
 	PixelType *ptr_left = (PixelType *)_activeSurface->getBasePtr(x1 + size, y1);
@@ -1388,9 +1388,9 @@ drawTriangleFast(int x1, int y1, int size, bool inverted, PixelType color, Vecto
 	int signX = x1 < x2 ? 1 : -1;
 	int signY = y1 < y2 ? 1 : -1;
 	int error = deltaX - deltaY;
-		
+
 	colorFill<PixelType>(ptr_right, ptr_left, color);
-	 
+
 	while (1) {
 		switch (fill_m) {
 		case kFillDisabled:
@@ -1401,22 +1401,22 @@ drawTriangleFast(int x1, int y1, int size, bool inverted, PixelType color, Vecto
 			colorFill<PixelType>(ptr_right, ptr_left, color);
 			break;
 		case kFillGradient:
-			colorFill<PixelType>(ptr_right, ptr_left, calcGradient(gradient_h++, size));	
+			colorFill<PixelType>(ptr_right, ptr_left, calcGradient(gradient_h++, size));
 			break;
 		}
-		
+
 		if (x1 == x2 && y1 == y2)
 			break;
-	
+
 		int error2 = error * 2;
-	 
+
 		if (error2 > -deltaY) {
 			error -= deltaY;
 			x1 += signX;
 			ptr_right += signX;
 			ptr_left += -signX;
 		}
-	 
+
 		if (error2 < deltaX) {
 			error += deltaX;
 			y1 += signY;
diff --git a/graphics/decoders/bmp.cpp b/graphics/decoders/bmp.cpp
index 0d21656..bcfd0ab 100644
--- a/graphics/decoders/bmp.cpp
+++ b/graphics/decoders/bmp.cpp
@@ -155,7 +155,7 @@ bool BitmapDecoder::loadStream(Common::SeekableReadStream &stream) {
 		}
 	} else { // 32 bpp
 		byte *dst = (byte *)_surface->pixels + (height - 1) * _surface->pitch;
-		
+
 		for (int32 i = 0; i < height; i++) {
 			for (uint32 j = 0; j < width; j++) {
 				byte b = stream.readByte();
@@ -166,11 +166,11 @@ bool BitmapDecoder::loadStream(Common::SeekableReadStream &stream) {
 				// ref: http://msdn.microsoft.com/en-us/library/windows/desktop/dd183376%28v=vs.85%29.aspx
 				stream.readByte();
 				uint32 color = format.RGBToColor(r, g, b);
-				
+
 				*((uint32 *)dst) = color;
 				dst += format.bytesPerPixel;
 			}
-			
+
 			stream.skip(extraDataLength);
 			dst -= _surface->pitch * 2;
 		}
diff --git a/graphics/decoders/jpeg.cpp b/graphics/decoders/jpeg.cpp
index 748275b..08bc1f7 100644
--- a/graphics/decoders/jpeg.cpp
+++ b/graphics/decoders/jpeg.cpp
@@ -452,7 +452,7 @@ bool JPEGDecoder::readSOS() {
 					_bitsNumber = 0;
 
 					for (byte i = 0; i < _numScanComp; i++)
-						_scanComp[i]->DCpredictor = 0;					
+						_scanComp[i]->DCpredictor = 0;
 				}
 			}
 		}
diff --git a/graphics/decoders/pcx.cpp b/graphics/decoders/pcx.cpp
index f5c1c24..1250398 100644
--- a/graphics/decoders/pcx.cpp
+++ b/graphics/decoders/pcx.cpp
@@ -59,33 +59,33 @@ void PCXDecoder::destroy() {
 
 bool PCXDecoder::loadStream(Common::SeekableReadStream &stream) {
 	destroy();
-	
+
 	if (stream.readByte() != 0x0a)	// ZSoft PCX
 		return false;
-	
+
 	byte version = stream.readByte();	// 0 - 5
 	if (version > 5)
 		return false;
-	
+
 	bool compressed = stream.readByte(); // encoding, 1 = run length encoding
 	byte bitsPerPixel = stream.readByte();	// 1, 2, 4 or 8
-	
+
 	// Window
 	uint16 xMin = stream.readUint16LE();
 	uint16 yMin = stream.readUint16LE();
 	uint16 xMax = stream.readUint16LE();
 	uint16 yMax = stream.readUint16LE();
-	
+
 	uint16 width  = xMax - xMin + 1;
 	uint16 height = yMax - yMin + 1;
-	
+
 	if (xMax < xMin || yMax < yMin) {
 		warning("Invalid PCX image dimensions");
 		return false;
 	}
-		
+
 	stream.skip(4);	// HDpi, VDpi
-	
+
 	// Read the EGA palette (colormap)
 	_palette = new byte[16 * 3];
 	for (uint16 i = 0; i < 16; i++) {
@@ -96,24 +96,24 @@ bool PCXDecoder::loadStream(Common::SeekableReadStream &stream) {
 
 	if (stream.readByte() != 0)	// reserved, should be set to 0
 		return false;
-	
+
 	byte nPlanes = stream.readByte();
 	uint16 bytesPerLine = stream.readUint16LE();
 	uint16 bytesPerscanLine = nPlanes * bytesPerLine;
-	
+
 	if (bytesPerscanLine < width * bitsPerPixel * nPlanes / 8) {
 		warning("PCX data is corrupted");
 		return false;
 	}
-	
+
 	stream.skip(60);	// PaletteInfo, HscreenSize, VscreenSize, Filler
-	
+
 	_surface = new Graphics::Surface();
-	
+
 	byte *scanLine = new byte[bytesPerscanLine];
 	byte *dst;
 	int x, y;
-	
+
 	if (nPlanes == 3 && bitsPerPixel == 8) {	// 24bpp
 		Graphics::PixelFormat format = Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0);
 		_surface->create(width, height, format);
@@ -142,14 +142,14 @@ bool PCXDecoder::loadStream(Common::SeekableReadStream &stream) {
 			decodeRLE(stream, scanLine, bytesPerscanLine, compressed);
 			memcpy(dst, scanLine, width);
 		}
-		
+
 		if (version == 5) {
 			if (stream.readByte() != 12) {
 				warning("Expected a palette after the PCX image data");
 				delete[] scanLine;
 				return false;
 			}
-		
+
 			// Read the VGA palette
 			delete[] _palette;
 			_palette = new byte[256 * 3];
@@ -186,7 +186,7 @@ bool PCXDecoder::loadStream(Common::SeekableReadStream &stream) {
 	}
 
 	delete[] scanLine;
-	
+
 	return true;
 }
 
diff --git a/graphics/decoders/pcx.h b/graphics/decoders/pcx.h
index bcff754..b25166b 100644
--- a/graphics/decoders/pcx.h
+++ b/graphics/decoders/pcx.h
@@ -57,7 +57,7 @@ public:
 
 private:
 	void decodeRLE(Common::SeekableReadStream &stream, byte *dst, uint32 bytesPerScanline, bool compressed);
-	
+
 	Surface *_surface;
 	byte *_palette;
 	uint16 _paletteColorCount;
diff --git a/graphics/decoders/pict.cpp b/graphics/decoders/pict.cpp
index 9e619df..d35e5c3 100644
--- a/graphics/decoders/pict.cpp
+++ b/graphics/decoders/pict.cpp
@@ -543,7 +543,7 @@ void PICTDecoder::decodeCompressedQuickTime(Common::SeekableReadStream &stream)
 
 	// Skip the matte and mask
 	stream.skip(matteSize + maskSize);
-	
+
 	// Now we've reached the image descriptor, so read the relevant data from that
 	uint32 idStart = stream.pos();
 	uint32 idSize = stream.readUint32BE();
diff --git a/graphics/fonts/consolefont.cpp b/graphics/fonts/consolefont.cpp
index 8244d75..748aa08 100644
--- a/graphics/fonts/consolefont.cpp
+++ b/graphics/fonts/consolefont.cpp
@@ -1,7 +1,7 @@
 // Generated by convbdf on Fri Jan  6 14:32:21 2012
 #include "graphics/fonts/bdf.h"
 
-// Font information: 
+// Font information:
 //  Name: -Misc-Fixed-Medium-R-Normal--8-80-75-75-C-50-ISO8859-1
 //  Size: 5x8
 //  Box: 5 8 0 -1
diff --git a/graphics/fonts/newfont.cpp b/graphics/fonts/newfont.cpp
index 10af1ef..4922e24 100644
--- a/graphics/fonts/newfont.cpp
+++ b/graphics/fonts/newfont.cpp
@@ -1,7 +1,7 @@
 // Generated by convbdf on Fri Jan  6 14:33:07 2012
 #include "graphics/fonts/bdf.h"
 
-// Font information: 
+// Font information:
 //  Name: -Schumacher-Clean-Medium-R-Normal--12-120-75-75-C-60-ISO8859-1
 //  Size: 6x12
 //  Box: 6 12 0 -3
diff --git a/graphics/fonts/newfont_big.cpp b/graphics/fonts/newfont_big.cpp
index 0e61068..550d6db 100644
--- a/graphics/fonts/newfont_big.cpp
+++ b/graphics/fonts/newfont_big.cpp
@@ -1,7 +1,7 @@
 // Generated by convbdf on Fri Jan  6 14:33:14 2012
 #include "graphics/fonts/bdf.h"
 
-// Font information: 
+// Font information:
 //  Name: -Adobe-Helvetica-Bold-R-Normal--12-120-75-75-P-70-ISO8859-1
 //  Size: 13x14
 //  Box: 13 15 -1 -3
diff --git a/graphics/sjis.h b/graphics/sjis.h
index 2d05005..928332f 100644
--- a/graphics/sjis.h
+++ b/graphics/sjis.h
@@ -169,7 +169,7 @@ protected:
 	bool _flippedMode;
 	int _fontWidth, _fontHeight;
 	uint8 _bitPosNewLineMask;
-	
+
 	bool isASCII(uint16 ch) const;
 
 	virtual const uint8 *getCharData(uint16 c) const = 0;
diff --git a/graphics/yuv_to_rgb.h b/graphics/yuv_to_rgb.h
index 0e832be..f785422 100644
--- a/graphics/yuv_to_rgb.h
+++ b/graphics/yuv_to_rgb.h
@@ -78,7 +78,7 @@ public:
 	void convert420(Graphics::Surface *dst, LuminanceScale scale, const byte *ySrc, const byte *uSrc, const byte *vSrc, int yWidth, int yHeight, int yPitch, int uvPitch);
 
 	/**
-	 * Convert a YUV410 image to an RGB surface	
+	 * Convert a YUV410 image to an RGB surface
 	 *
 	 * Since the chroma has a very low resolution in 410, we perform bilinear scaling
 	 * on the two chroma planes to produce the image. The chroma planes must have
diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp
index 9a85399..8285aff 100644
--- a/gui/ThemeParser.cpp
+++ b/gui/ThemeParser.cpp
@@ -548,11 +548,11 @@ bool ThemeParser::parseDrawStep(ParserNode *stepNode, Graphics::DrawStep *drawst
 		else
 			return parserError("'" + stepNode->values["fill"] + "' is not a valid fill mode for a shape.");
 	}
-	
+
 	if (stepNode->values.contains("padding")) {
 		val = stepNode->values["padding"];
 		int pr, pt, pl, pb;
-		if (parseIntegerKey(val, 4, &pl, &pt, &pr, &pb)) 
+		if (parseIntegerKey(val, 4, &pl, &pt, &pr, &pb))
 			drawstep->padding.left = pl,
 			drawstep->padding.top = pt,
 			drawstep->padding.right = pr,
diff --git a/gui/ThemeParser.h b/gui/ThemeParser.h
index 82f774b..360e3da 100644
--- a/gui/ThemeParser.h
+++ b/gui/ThemeParser.h
@@ -139,7 +139,7 @@ protected:
 					XML_PROP(height, false)
 					XML_PROP(xpos, false)
 					XML_PROP(ypos, false)
-					XML_PROP(padding, false)					
+					XML_PROP(padding, false)
 					XML_PROP(orientation, false)
 					XML_PROP(file, false)
 				KEY_END()
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 26fafa5..0f4867c 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -166,7 +166,7 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc)
 	} else {
 		warning("Plugin for target \"%s\" not found! Game specific settings might be missing", domain.c_str());
 	}
-	
+
 	// GAME: Path to game data (r/o), extra data (r/o), and save data (r/w)
 	String gamePath(ConfMan.get("path", _domain));
 	String extraPath(ConfMan.get("extrapath", _domain));
diff --git a/gui/options.cpp b/gui/options.cpp
index 4fc37c9..4868f18 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -992,7 +992,7 @@ void OptionsDialog::addEngineControls(GuiObject *boss, const Common::String &pre
 	ExtraGuiOptions::const_iterator iter;
 	for (iter = engineOptions.begin(); iter != engineOptions.end(); ++iter, ++i) {
 		Common::String id = Common::String::format("%d", i);
-		_engineCheckboxes.push_back(new CheckboxWidget(boss, 
+		_engineCheckboxes.push_back(new CheckboxWidget(boss,
 			prefix + "customOption" + id + "Checkbox", _(iter->label), _(iter->tooltip)));
 	}
 }
diff --git a/gui/predictivedialog.cpp b/gui/predictivedialog.cpp
index b827d49..ed18847 100644
--- a/gui/predictivedialog.cpp
+++ b/gui/predictivedialog.cpp
@@ -71,7 +71,7 @@ PredictiveDialog::PredictiveDialog() : Dialog("Predictive") {
 
 	_btns = (ButtonWidget **)calloc(1, sizeof(ButtonWidget *) * 16);
 
-	_btns[kCancelAct] = new ButtonWidget(this, "Predictive.Cancel",  _("Cancel")   , 0, kCancelCmd); 
+	_btns[kCancelAct] = new ButtonWidget(this, "Predictive.Cancel",  _("Cancel")   , 0, kCancelCmd);
 	_btns[kOkAct] = 	new ButtonWidget(this, "Predictive.OK",      _("Ok")       , 0, kOkCmd);
 	_btns[kBtn1Act] = 	new ButtonWidget(this, "Predictive.Button1", "1  `-.&" , 0, kBut1Cmd);
 	_btns[kBtn2Act] = 	new ButtonWidget(this, "Predictive.Button2", "2  abc"     , 0, kBut2Cmd);
@@ -84,10 +84,10 @@ PredictiveDialog::PredictiveDialog() : Dialog("Predictive") {
 	_btns[kBtn9Act] = 	new ButtonWidget(this, "Predictive.Button9", "9  wxyz"    , 0, kBut9Cmd);
 	_btns[kBtn0Act] = 	new ButtonWidget(this, "Predictive.Button0", "0"        , 0, kBut0Cmd);
   	// I18N: You must leave "#" as is, only word 'next' is translatable
-	_btns[kNextAct] = 	new ButtonWidget(this, "Predictive.Next",    _("#  next") , 0, kNextCmd); 
+	_btns[kNextAct] = 	new ButtonWidget(this, "Predictive.Next",    _("#  next") , 0, kNextCmd);
 	_btns[kAddAct] = 	new ButtonWidget(this, "Predictive.Add",     _("add") , 0, kAddCmd);
 	_btns[kAddAct]->setEnabled(false);
-  
+
   #ifndef DISABLE_FANCY_THEMES
 	_btns[kDelAct] = new PicButtonWidget(this, "Predictive.Delete", _("Delete char"), kDelCmd);
 	((PicButtonWidget *)_btns[kDelAct])->useThemeTransparency(true);
@@ -214,7 +214,7 @@ void PredictiveDialog::handleKeyDown(Common::KeyState state) {
 		_navigationwithkeys = true;
 		if (_lastbutton == kBtn1Act || _lastbutton == kBtn4Act || _lastbutton == kBtn7Act)
 			_currBtn = ButtonId(_lastbutton + 2);
-		else if (_lastbutton == kDelAct) 
+		else if (_lastbutton == kDelAct)
 			_currBtn = kBtn1Act;
 		else if (_lastbutton == kModeAct)
 			_currBtn = kNextAct;
@@ -227,7 +227,7 @@ void PredictiveDialog::handleKeyDown(Common::KeyState state) {
 		else
 			_currBtn = ButtonId(_lastbutton - 1);
 
-		
+
 		if (_mode != kModeAbc && _lastbutton == kCancelAct)
 			_currBtn = kOkAct;
 
@@ -237,7 +237,7 @@ void PredictiveDialog::handleKeyDown(Common::KeyState state) {
 		_navigationwithkeys = true;
 		if (_lastbutton == kBtn3Act || _lastbutton == kBtn6Act || _lastbutton == kBtn9Act || _lastbutton == kOkAct)
 			_currBtn = ButtonId(_lastbutton - 2);
-		else if (_lastbutton == kDelAct) 
+		else if (_lastbutton == kDelAct)
 			_currBtn = kBtn3Act;
 		else if (_lastbutton == kBtn0Act)
 			_currBtn = kNextAct;
@@ -249,7 +249,7 @@ void PredictiveDialog::handleKeyDown(Common::KeyState state) {
 			_currBtn = kAddAct;
 		else
 			_currBtn = ButtonId(_lastbutton + 1);
-		
+
 		if (_mode != kModeAbc && _lastbutton == kOkAct)
 			_currBtn = kCancelAct;
 		_needRefresh = true;
@@ -260,7 +260,7 @@ void PredictiveDialog::handleKeyDown(Common::KeyState state) {
 			_currBtn = kDelAct;
 		else if (_lastbutton == kDelAct)
 			_currBtn = kOkAct;
-		else if (_lastbutton == kModeAct) 
+		else if (_lastbutton == kModeAct)
 			_currBtn = kBtn7Act;
 		else if (_lastbutton == kBtn0Act)
 			_currBtn = kBtn8Act;
@@ -286,7 +286,7 @@ void PredictiveDialog::handleKeyDown(Common::KeyState state) {
 			_currBtn = kBtn0Act;
 		else if (_lastbutton == kBtn9Act)
 			_currBtn = kNextAct;
-		else if (_lastbutton == kModeAct) 
+		else if (_lastbutton == kModeAct)
 			_currBtn = kAddAct;
 		else if (_lastbutton == kBtn0Act)
 			_currBtn = kCancelAct;
diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index cd0f96d..be6cefd 100644
--- a/gui/saveload-dialog.cpp
+++ b/gui/saveload-dialog.cpp
@@ -735,7 +735,7 @@ void SaveLoadChooserGrid::reflowLayout() {
 			if (!_saveMode) {
 				buttonCmd += 1;
 			}
-	
+
 			PicButtonWidget *button = new PicButtonWidget(container, dstX, dstY, buttonWidth, buttonHeight, 0, buttonCmd);
 			dstY += buttonHeight;
 
@@ -788,7 +788,7 @@ int SaveLoadChooserGrid::runIntern() {
 	} while (_saveMode && slot >= 0 && !selectDescription());
 
 	// Special case for new save games. We need to handle this here, since
-	// we cannot handle it in close() without problems. 
+	// we cannot handle it in close() without problems.
 	if (slot == _nextFreeSaveSlot) {
 		ConfMan.setInt("gui_saveload_last_pos", slot);
 	}
diff --git a/gui/widget.cpp b/gui/widget.cpp
index 9046bcc..270cdc5 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -366,7 +366,7 @@ void ButtonWidget::startAnimatePressedState() {
 }
 
 void ButtonWidget::wantTickle(bool tickled) {
-	if (tickled) 
+	if (tickled)
 		((GUI::Dialog *)_boss)->setTickleWidget(this);
 	else
 		((GUI::Dialog *)_boss)->unSetTickleWidget();
diff --git a/gui/widgets/editable.h b/gui/widgets/editable.h
index 7e453c1..4a18d5e 100644
--- a/gui/widgets/editable.h
+++ b/gui/widgets/editable.h
@@ -77,10 +77,10 @@ public:
 protected:
 	virtual void startEditMode() = 0;
 	virtual void endEditMode() = 0;
-	virtual void abortEditMode() = 0;	
+	virtual void abortEditMode() = 0;
 	virtual Common::Rect getEditRect() const = 0;
 	virtual int getCaretOffset() const;
-	void drawCaret(bool erase);	
+	void drawCaret(bool erase);
 	bool adjustOffset();
 	void makeCaretVisible();
 
diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp
index 0d51f5b..6062049 100644
--- a/video/avi_decoder.cpp
+++ b/video/avi_decoder.cpp
@@ -379,7 +379,7 @@ void AVIDecoder::readNextPacket() {
 	}
 }
 
-AVIDecoder::AVIVideoTrack::AVIVideoTrack(int frameCount, const AVIStreamHeader &streamHeader, const BitmapInfoHeader &bitmapInfoHeader) 
+AVIDecoder::AVIVideoTrack::AVIVideoTrack(int frameCount, const AVIStreamHeader &streamHeader, const BitmapInfoHeader &bitmapInfoHeader)
 		: _frameCount(frameCount), _vidsHeader(streamHeader), _bmInfo(bitmapInfoHeader) {
 	memset(_palette, 0, sizeof(_palette));
 	_videoCodec = createCodec();
diff --git a/video/avi_decoder.h b/video/avi_decoder.h
index a3a262d..3bdc056 100644
--- a/video/avi_decoder.h
+++ b/video/avi_decoder.h
@@ -214,7 +214,7 @@ private:
 	};
 
 	OldIndex _ixInfo;
-	AVIHeader _header;	
+	AVIHeader _header;
 
 	Common::SeekableReadStream *_fileStream;
 	bool _decodedHeader;
diff --git a/video/bink_decoder.cpp b/video/bink_decoder.cpp
index 37e1262..1ece22c 100644
--- a/video/bink_decoder.cpp
+++ b/video/bink_decoder.cpp
@@ -236,7 +236,7 @@ BinkDecoder::AudioInfo::~AudioInfo() {
 
 BinkDecoder::BinkVideoTrack::BinkVideoTrack(uint32 width, uint32 height, const Graphics::PixelFormat &format, uint32 frameCount, const Common::Rational &frameRate, bool swapPlanes, bool hasAlpha, uint32 id) :
 		_frameCount(frameCount), _frameRate(frameRate), _swapPlanes(swapPlanes), _hasAlpha(hasAlpha), _id(id) {
-	_curFrame = -1;	
+	_curFrame = -1;
 
 	for (int i = 0; i < 16; i++)
 		_huffman[i] = 0;
diff --git a/video/coktel_decoder.cpp b/video/coktel_decoder.cpp
index 5d7efe8..08340a1 100644
--- a/video/coktel_decoder.cpp
+++ b/video/coktel_decoder.cpp
@@ -1317,7 +1317,7 @@ void IMDDecoder::processFrame() {
 		// Set palette
 		if (cmd == kCommandPalette) {
 			_stream->skip(2);
-	
+
 			_paletteDirty = true;
 
 			for (int i = 0; i < 768; i++)
diff --git a/video/psx_decoder.cpp b/video/psx_decoder.cpp
index f19802f..57c8972 100644
--- a/video/psx_decoder.cpp
+++ b/video/psx_decoder.cpp
@@ -234,7 +234,7 @@ void PSXStreamDecoder::readNextPacket() {
 					Common::SeekableReadStream *frame = new Common::MemoryReadStream(partialFrame, frameSize, DisposeAfterUse::YES);
 
 					_videoTrack->decodeFrame(frame, sectorsRead);
-					
+
 					delete frame;
 					delete sector;
 					return;
@@ -297,7 +297,7 @@ Common::SeekableReadStream *PSXStreamDecoder::readSector() {
 
 // Ha! It's palindromic!
 #define AUDIO_DATA_CHUNK_SIZE   2304
-#define AUDIO_DATA_SAMPLE_COUNT 4032 
+#define AUDIO_DATA_SAMPLE_COUNT 4032
 
 static const int s_xaTable[5][2] = {
    {   0,   0 },
diff --git a/video/psx_decoder.h b/video/psx_decoder.h
index 11f3115..d1d5204 100644
--- a/video/psx_decoder.h
+++ b/video/psx_decoder.h
@@ -149,7 +149,7 @@ private:
 	uint32 _frameCount;
 	Common::SeekableReadStream *_stream;
 	PSXVideoTrack *_videoTrack;
-	PSXAudioTrack *_audioTrack;	
+	PSXAudioTrack *_audioTrack;
 
 	Common::SeekableReadStream *readSector();
 };
diff --git a/video/theora_decoder.cpp b/video/theora_decoder.cpp
index bf953b0..63aa93e 100644
--- a/video/theora_decoder.cpp
+++ b/video/theora_decoder.cpp
@@ -302,7 +302,7 @@ bool TheoraDecoder::TheoraVideoTrack::decodePacket(ogg_packet &oggPacket) {
 			_nextFrameStartTime += _frameRate.getInverse().toDouble();
 		else
 			_nextFrameStartTime = time;
-	
+
 		return true;
 	}
 






More information about the Scummvm-git-logs mailing list