[Scummvm-cvs-logs] SF.net SVN: scummvm:[53160] scummvm/trunk

jvprat at users.sourceforge.net jvprat at users.sourceforge.net
Tue Oct 12 04:18:12 CEST 2010


Revision: 53160
          http://scummvm.svn.sourceforge.net/scummvm/?rev=53160&view=rev
Author:   jvprat
Date:     2010-10-12 02:18:11 +0000 (Tue, 12 Oct 2010)

Log Message:
-----------
JANITORAL: Clean trailing whitespaces.

Modified Paths:
--------------
    scummvm/trunk/backends/fs/psp/psp-fs.cpp
    scummvm/trunk/backends/fs/psp/psp-stream.cpp
    scummvm/trunk/backends/fs/psp/psp-stream.h
    scummvm/trunk/backends/platform/android/android.cpp
    scummvm/trunk/backends/platform/dc/selector.cpp
    scummvm/trunk/backends/platform/dingux/README.DINGUX
    scummvm/trunk/backends/platform/dingux/dingux.mk
    scummvm/trunk/backends/platform/ds/arm9/makefile
    scummvm/trunk/backends/platform/ds/arm9/source/touchkeyboard.cpp
    scummvm/trunk/backends/platform/gp2x/build/README-GP2X
    scummvm/trunk/backends/platform/gp2x/gp2x-bundle.mk
    scummvm/trunk/backends/platform/gp2x/gp2x-common.h
    scummvm/trunk/backends/platform/gph/build/README-GP2XWIZ
    scummvm/trunk/backends/platform/gph/build/config.sh
    scummvm/trunk/backends/platform/gph/build/scummvm-gdb.gpe
    scummvm/trunk/backends/platform/gph/build/scummvm.gpe
    scummvm/trunk/backends/platform/gph/caanoo/config.sh
    scummvm/trunk/backends/platform/gph/caanoo/scummvm-gdb.gpe
    scummvm/trunk/backends/platform/gph/caanoo/scummvm.gpe
    scummvm/trunk/backends/platform/gph/caanoo-bundle.mk
    scummvm/trunk/backends/platform/gph/gp2xwiz-bundle.mk
    scummvm/trunk/backends/platform/iphone/iphone_main.m
    scummvm/trunk/backends/platform/iphone/iphone_video.m
    scummvm/trunk/backends/platform/iphone/osys_events.cpp
    scummvm/trunk/backends/platform/iphone/osys_video.cpp
    scummvm/trunk/backends/platform/linuxmoto/linuxmoto-events.cpp
    scummvm/trunk/backends/platform/n64/Makefile
    scummvm/trunk/backends/platform/n64/README.N64
    scummvm/trunk/backends/platform/n64/module.mk
    scummvm/trunk/backends/platform/n64/osys_n64_base.cpp
    scummvm/trunk/backends/platform/openpandora/build/PXML.xml
    scummvm/trunk/backends/platform/openpandora/build/README-OPENPANDORA
    scummvm/trunk/backends/platform/openpandora/build/README-PND.txt
    scummvm/trunk/backends/platform/openpandora/build/pnd_make.sh
    scummvm/trunk/backends/platform/openpandora/module.mk
    scummvm/trunk/backends/platform/openpandora/op-bundle.mk
    scummvm/trunk/backends/platform/ps2/Makefile.gdb
    scummvm/trunk/backends/platform/ps2/Makefile.ps2
    scummvm/trunk/backends/platform/ps2/iop/CoDyVDfs/iop/imports.lst
    scummvm/trunk/backends/platform/psp/Makefile
    scummvm/trunk/backends/platform/psp/README.PSP
    scummvm/trunk/backends/platform/psp/README.PSP.in
    scummvm/trunk/backends/platform/psp/audio.cpp
    scummvm/trunk/backends/platform/psp/audio.h
    scummvm/trunk/backends/platform/psp/display_client.cpp
    scummvm/trunk/backends/platform/psp/display_manager.cpp
    scummvm/trunk/backends/platform/psp/display_manager.h
    scummvm/trunk/backends/platform/psp/input.cpp
    scummvm/trunk/backends/platform/psp/input.h
    scummvm/trunk/backends/platform/psp/memory.cpp
    scummvm/trunk/backends/platform/psp/memory.h
    scummvm/trunk/backends/platform/psp/mp3.cpp
    scummvm/trunk/backends/platform/psp/mp3.h
    scummvm/trunk/backends/platform/psp/osys_psp.cpp
    scummvm/trunk/backends/platform/psp/plugin.ld
    scummvm/trunk/backends/platform/psp/png_loader.cpp
    scummvm/trunk/backends/platform/psp/png_loader.h
    scummvm/trunk/backends/platform/psp/powerman.cpp
    scummvm/trunk/backends/platform/psp/psp_main.cpp
    scummvm/trunk/backends/platform/psp/pspkeyboard.cpp
    scummvm/trunk/backends/platform/psp/rtc.cpp
    scummvm/trunk/backends/platform/psp/rtc.h
    scummvm/trunk/backends/platform/psp/tests.cpp
    scummvm/trunk/backends/platform/psp/tests.h
    scummvm/trunk/backends/platform/psp/thread.cpp
    scummvm/trunk/backends/platform/psp/thread.h
    scummvm/trunk/backends/platform/sdl/sdl.h
    scummvm/trunk/backends/platform/symbian/AdaptAllMMPs.pl
    scummvm/trunk/backends/platform/symbian/BuildPackageUpload_AllVersions.pl
    scummvm/trunk/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl
    scummvm/trunk/backends/platform/symbian/README
    scummvm/trunk/backends/platform/symbian/S60/BLD.INF.in
    scummvm/trunk/backends/platform/symbian/S60v3/BLD.INF.in
    scummvm/trunk/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in
    scummvm/trunk/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in
    scummvm/trunk/backends/platform/symbian/S80/BLD.INF.in
    scummvm/trunk/backends/platform/symbian/S90/BLD.INF.in
    scummvm/trunk/backends/platform/symbian/UIQ2/BLD.INF.in
    scummvm/trunk/backends/platform/symbian/UIQ3/BLD.INF.in
    scummvm/trunk/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in
    scummvm/trunk/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
    scummvm/trunk/backends/timer/psp/timer.cpp
    scummvm/trunk/backends/timer/psp/timer.h
    scummvm/trunk/backends/vkeybd/packs/vkeybdpack.py
    scummvm/trunk/common/array.h
    scummvm/trunk/common/scummsys.h
    scummvm/trunk/common/stream.cpp
    scummvm/trunk/common/stream.h
    scummvm/trunk/common/translation.cpp
    scummvm/trunk/common/translation.h
    scummvm/trunk/common/unzip.cpp
    scummvm/trunk/configure
    scummvm/trunk/engines/advancedDetector.cpp
    scummvm/trunk/graphics/video/smk_decoder.cpp
    scummvm/trunk/gui/GuiManager.cpp
    scummvm/trunk/gui/ThemeEngine.cpp
    scummvm/trunk/gui/Tooltip.cpp
    scummvm/trunk/gui/Tooltip.h
    scummvm/trunk/gui/launcher.cpp
    scummvm/trunk/gui/options.cpp
    scummvm/trunk/gui/themes/scummmodern/scummmodern_layout.stx
    scummvm/trunk/gui/themes/scummtheme.py
    scummvm/trunk/po/module.mk
    scummvm/trunk/ports.mk
    scummvm/trunk/sound/audiocd.cpp
    scummvm/trunk/sound/decoders/mac_snd.cpp
    scummvm/trunk/sound/mididrv.cpp
    scummvm/trunk/sound/softsynth/fmtowns_pc98/towns_audio.cpp
    scummvm/trunk/sound/softsynth/fmtowns_pc98/towns_euphony.cpp
    scummvm/trunk/sound/softsynth/fmtowns_pc98/towns_pc98_driver.cpp
    scummvm/trunk/sound/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
    scummvm/trunk/tools/create_hugo/create_hugo.cpp
    scummvm/trunk/tools/create_hugo/staticdata.h
    scummvm/trunk/tools/create_hugo/staticfont.h
    scummvm/trunk/tools/create_hugo/staticintro.h
    scummvm/trunk/tools/create_kyradat/tables.cpp
    scummvm/trunk/tools/create_msvc/create_msvc.cpp
    scummvm/trunk/tools/create_translations/po_parser.cpp
    scummvm/trunk/tools/credits.pl
    scummvm/trunk/tools/sci/scitrace.asm
    scummvm/trunk/tools/scumm-md5.txt
    scummvm/trunk/tools/skycpt/README
    scummvm/trunk/tools/svnpropset.sh
    scummvm/trunk/tools/themeparser.py

Modified: scummvm/trunk/backends/fs/psp/psp-fs.cpp
===================================================================
--- scummvm/trunk/backends/fs/psp/psp-fs.cpp	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/fs/psp/psp-fs.cpp	2010-10-12 02:18:11 UTC (rev 53160)
@@ -248,17 +248,17 @@
 
 Common::SeekableReadStream *PSPFilesystemNode::createReadStream() {
 	const uint32 READ_BUFFER_SIZE = 1024;
-	
+
 	Common::SeekableReadStream *stream = PspIoStream::makeFromPath(getPath(), false);
-	
+
 	return new Common::BufferedSeekableReadStream(stream, READ_BUFFER_SIZE, DisposeAfterUse::YES);
 }
 
 Common::WriteStream *PSPFilesystemNode::createWriteStream() {
 	const uint32 WRITE_BUFFER_SIZE = 1024;
-	
+
 	Common::WriteStream *stream = PspIoStream::makeFromPath(getPath(), true);
-	
+
 	return new Common::BufferedWriteStream(stream, WRITE_BUFFER_SIZE, DisposeAfterUse::YES);
 }
 

Modified: scummvm/trunk/backends/fs/psp/psp-stream.cpp
===================================================================
--- scummvm/trunk/backends/fs/psp/psp-stream.cpp	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/fs/psp/psp-stream.cpp	2010-10-12 02:18:11 UTC (rev 53160)
@@ -43,17 +43,17 @@
 #ifdef DEBUG_BUFFERS
 void printBuffer(byte *ptr, uint32 len) {
 	uint32 printLen = len <= 10 ? len : 10;
-	
+
 	for (int i = 0; i < printLen; i++) {
-		PSP_INFO_PRINT("%x ", ptr[i]);		
+		PSP_INFO_PRINT("%x ", ptr[i]);
 	}
-	
+
 	if (len > 10) {
 		PSP_INFO_PRINT("... ");
 		for (int i = len - 10; i < len; i++)
 			PSP_INFO_PRINT("%x ", ptr[i]);
 	}
-	
+
 	PSP_INFO_PRINT("\n");
 }
 #endif
@@ -62,7 +62,7 @@
 
 PspIoStream::PspIoStream(const Common::String &path, bool writeMode)
 		: _handle(0), _path(path), _fileSize(0), _writeMode(writeMode),
-		  _physicalPos(0), _pos(0), _eos(false),	_error(false), 
+		  _physicalPos(0), _pos(0), _eos(false),	_error(false),
 		  _errorSuspend(0), _errorSource(0), _errorPos(0), _errorHandle(0), _suspendCount(0) {
 	DEBUG_ENTER_FUNC();
 
@@ -74,11 +74,11 @@
 
 	if (PowerMan.beginCriticalSection())
 		PSP_DEBUG_PRINT_FUNC("suspended\n");
-		
+
 	PowerMan.unregisterForSuspend(this); 			// Unregister with powermanager to be suspended
 													// Must do this before fclose() or resume() will reopen.
 	sceIoClose(_handle);
-	
+
 	PowerMan.endCriticalSection();
 }
 
@@ -87,7 +87,7 @@
  */
 void *PspIoStream::open() {
 	DEBUG_ENTER_FUNC();
-	
+
 	if (PowerMan.beginCriticalSection()) {
 		// No need to open? Just return the _handle resume() already opened
 		PSP_DEBUG_PRINT_FUNC("suspended\n");
@@ -97,13 +97,13 @@
 	if (!_handle) {
 		_error = true;
 		_handle = NULL;
-	}	
-	
+	}
+
 	// Get the file size. This way is much faster than going to the end of the file and back
 	SceIoStat stat;
 	sceIoGetstat(_path.c_str(), &stat);
 	_fileSize = *((uint32 *)(void *)&stat.st_size);	// 4GB file (32 bits) is big enough for us
-	
+
 	PSP_DEBUG_PRINT("%s filesize[%d]\n", _path.c_str(), _fileSize);
 
 	PowerMan.registerForSuspend(this);	 // Register with the powermanager to be suspended
@@ -115,7 +115,7 @@
 
 bool PspIoStream::err() const {
 	DEBUG_ENTER_FUNC();
-	
+
 	if (_error)	// We dump since no printing to screen with suspend callback
 		PSP_ERROR("mem_error[%d], source[%d], suspend error[%d], pos[%d],"
 				  "_errorPos[%d], _errorHandle[%p], suspendCount[%d]\n",
@@ -142,9 +142,9 @@
 }
 
 bool PspIoStream::physicalSeekFromCur(int32 offset) {
-	
+
 	int ret = sceIoLseek32(_handle, offset, PSP_SEEK_CUR);
-	
+
 	if (ret < 0) {
 		_error = true;
 		PSP_ERROR("failed to seek in file[%s] to [%x]. Error[%x]\n", _path.c_str(), offset, ret);
@@ -158,7 +158,7 @@
 	DEBUG_ENTER_FUNC();
 	PSP_DEBUG_PRINT_FUNC("offset[0x%x], whence[%d], _pos[0x%x], _physPos[0x%x]\n", offs, whence, _pos, _physicalPos);
 	_eos = false;
-	
+
 	int32 posToSearchFor = 0;
 	switch (whence) {
 	case SEEK_CUR:
@@ -179,9 +179,9 @@
 		_eos = true;
 		return false;
 	}
-	
+
 	_pos = posToSearchFor;
-	
+
 	return true;
 }
 
@@ -198,33 +198,33 @@
 	if (len > lenRemainingInFile) {
 		len = lenRemainingInFile;
 		_eos = true;
-	}	
+	}
 
 	if (PowerMan.beginCriticalSection())
 		PSP_DEBUG_PRINT_FUNC("suspended\n");
-	
+
 	// check if we need to seek
 	if (_pos != _physicalPos)
 		PSP_DEBUG_PRINT("seeking from %x to %x\n", _physicalPos, _pos);
 		if (!physicalSeekFromCur(_pos - _physicalPos)) {
 			_error = true;
 			return 0;
-		}	
-	
+		}
+
 	int ret = sceIoRead(_handle, ptr, len);
 
 	PowerMan.endCriticalSection();
-	
+
 	_physicalPos += ret;	// Update position
 	_pos = _physicalPos;
-	
+
 	if (ret != (int)len) {	// error
 		PSP_ERROR("sceIoRead returned [0x%x] instead of len[0x%x]\n", ret, len);
 		_error = true;
-		_errorSource = 4;			
+		_errorSource = 4;
 	}
 	return ret;
-}	
+}
 
 uint32 PspIoStream::write(const void *ptr, uint32 len) {
 	DEBUG_ENTER_FUNC();
@@ -234,7 +234,7 @@
 		return 0;
 
 	_eos = false;			// we can't have eos with write
-		
+
 	if (PowerMan.beginCriticalSection())
 		PSP_DEBUG_PRINT_FUNC("suspended\n");
 
@@ -244,11 +244,11 @@
 			_error = true;
 			return 0;
 		}
-	
+
 	int ret = sceIoWrite(_handle, ptr, len);
-	
+
 	PowerMan.endCriticalSection();
-	
+
 	if (ret != (int)len) {
 		_error = true;
 		_errorSource = 5;
@@ -257,10 +257,10 @@
 
 	_physicalPos += ret;
 	_pos = _physicalPos;
-	
+
 	if (_pos > _fileSize)
-		_fileSize = _pos;	
-	
+		_fileSize = _pos;
+
 	return ret;
 }
 
@@ -323,7 +323,7 @@
 	// Resume our previous position if needed
 	if (_handle > 0 && _pos > 0) {
 		ret = sceIoLseek32(_handle, _pos, PSP_SEEK_SET);
-		
+
 		_physicalPos = _pos;
 
 		if (ret < 0) {		// Check for problem

Modified: scummvm/trunk/backends/fs/psp/psp-stream.h
===================================================================
--- scummvm/trunk/backends/fs/psp/psp-stream.h	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/fs/psp/psp-stream.h	2010-10-12 02:18:11 UTC (rev 53160)
@@ -45,7 +45,7 @@
 	int _physicalPos;	// physical position in file
 	int _pos;			// position. Sometimes virtual
 	bool _eos;			// EOS flag
-	
+
 	enum {
 		SuspendError = 2,
 		ResumeError = 3
@@ -58,9 +58,9 @@
 	int _errorPos;
 	SceUID _errorHandle;
 	int _suspendCount;
-	
+
 	bool physicalSeekFromCur(int32 offset);
-	
+
 public:
 
 	/**
@@ -85,7 +85,7 @@
 	virtual int32 size() const;
 	virtual bool seek(int32 offs, int whence = SEEK_SET);
 	virtual uint32 read(void *dataPtr, uint32 dataSize);
-	
+
 	// for suspending
 	int suspend();		/* Suspendable interface (power manager) */
 	int resume();		/* " " */

Modified: scummvm/trunk/backends/platform/android/android.cpp
===================================================================
--- scummvm/trunk/backends/platform/android/android.cpp	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/android/android.cpp	2010-10-12 02:18:11 UTC (rev 53160)
@@ -1330,7 +1330,7 @@
 static void ScummVM_setSurfaceSize(JNIEnv* env, jobject self,
 								   jint width, jint height) {
 	OSystem_Android* cpp_obj = OSystem_Android::fromJavaObject(env, self);
-	cpp_obj->setSurfaceSize(width, height);	
+	cpp_obj->setSurfaceSize(width, height);
 }
 
 const static JNINativeMethod gMethods[] = {

Modified: scummvm/trunk/backends/platform/dc/selector.cpp
===================================================================
--- scummvm/trunk/backends/platform/dc/selector.cpp	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/dc/selector.cpp	2010-10-12 02:18:11 UTC (rev 53160)
@@ -272,7 +272,7 @@
 			 games[curr_game].dir,
 			 games[curr_game].language,
 			 games[curr_game].platform, games, curr_game)) {
-	    
+
 	    strcpy(games[curr_game].text, ge->description().c_str());
 #if 0
 	    printf("Registered game <%s> (l:%d p:%d) in <%s> <%s> because of <%s> <*>\n",

Modified: scummvm/trunk/backends/platform/dingux/README.DINGUX
===================================================================
--- scummvm/trunk/backends/platform/dingux/README.DINGUX	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/dingux/README.DINGUX	2010-10-12 02:18:11 UTC (rev 53160)
@@ -21,10 +21,10 @@
 
 Installation from binaries
 ==============================
-Mount your dingux SD card in your pc, then copy the directory "scummvm" found in 
-the release package to a directory inside /pathtosdcard/local/dirofyourchoice 
+Mount your dingux SD card in your pc, then copy the directory "scummvm" found in
+the release package to a directory inside /pathtosdcard/local/dirofyourchoice
 (on windows it would be SDLETTER:\local\dirofyourchoice).
-At this point is sufficient to point your launcher (eg. gmenu2x) to scummvm.gpe 
+At this point is sufficient to point your launcher (eg. gmenu2x) to scummvm.gpe
 file included into the scummvm directory you copied to the SD card, and then launch it.
 
 Building from binaries
@@ -33,7 +33,7 @@
 
 Kernel and rootfs WARNINGS
 ==============================
-All the dingux root images (rootfs) i found floating on the net have 
+All the dingux root images (rootfs) i found floating on the net have
 broken tremor libraries, which make scummvm crash in a bad way.
 One solution is to replace the libraries in your rootfs by injecting these fixed ones:
 http://hkzlab.ipv7.net/files/misc/dingux/dingux_fixed_tremor_libs.zip
@@ -42,7 +42,7 @@
 non-opendingux kernels doesn't have lcd double buffering leading to a lot of annoying
 tearing on screen.
 
-The best way to address all the problems in one shot, is to use an opendingux kernel for 
+The best way to address all the problems in one shot, is to use an opendingux kernel for
 your dingoo, which has some interesting advantages:
 - The kernel gets updated and kept in sync with main linux tree
 - Double buffering and centering of screen image
@@ -52,16 +52,16 @@
 The kernel and rootfs images in the zip file is what i use for developing scummvm on dingux.
 
 BTW, i have built images for the A330 and A320 with ILI9325 controllers too,
-but these version aren't tested (i have an A320 with ILI9331, but if someone wants to 
+but these version aren't tested (i have an A320 with ILI9331, but if someone wants to
 donate an A330 to a poor scummvm developer so i can try the port there too... :P)
 
 If you need a launcher with opendingux cpu frequency scaler support, you can find gmenu2x here:
 http://www.treewalker.org/dingux/cpufreq.html
 
-I've also prepared a rootfs image for use on normal dingux kernels (non-opendingux ones). 
+I've also prepared a rootfs image for use on normal dingux kernels (non-opendingux ones).
 It's based on elta's rootfs image with just the fixed libs replaced.
 http://hkzlab.ipv7.net/files/misc/dingux/normal_dingux/rootfs_elta_fixtremor.zip
-I still raccomand the use of opendingux kernel + rootfs, but if you don't, this roofs 
+I still raccomand the use of opendingux kernel + rootfs, but if you don't, this roofs
 image plus another kernel (eg. SiENcE's one) should be do the job.
 
 Enjoy

Modified: scummvm/trunk/backends/platform/dingux/dingux.mk
===================================================================
--- scummvm/trunk/backends/platform/dingux/dingux.mk	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/dingux/dingux.mk	2010-10-12 02:18:11 UTC (rev 53160)
@@ -15,7 +15,7 @@
 	$(MKDIR) $(bundle_name)
 	$(MKDIR) $(bundle_name)/saves
 	$(STRIP) $(EXECUTABLE) -o $(bundle_name)/scummvm.elf
-	$(CP) $(DIST_FILES_THEMES) $(bundle_name)/ 
+	$(CP) $(DIST_FILES_THEMES) $(bundle_name)/
 ifdef DIST_FILES_ENGINEDATA
 	$(CP) $(DIST_FILES_ENGINEDATA) $(bundle_name)/
 endif

Modified: scummvm/trunk/backends/platform/ds/arm9/makefile
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/makefile	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/ds/arm9/makefile	2010-10-12 02:18:11 UTC (rev 53160)
@@ -66,8 +66,8 @@
 	# TODO: Inherit the earth uses so much RAM that I have removed libmad in order to
 	# claw some back.
 
-	
 
+
 	else
 		ifdef DS_BUILD_I
 

Modified: scummvm/trunk/backends/platform/ds/arm9/source/touchkeyboard.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/touchkeyboard.cpp	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/ds/arm9/source/touchkeyboard.cpp	2010-10-12 02:18:11 UTC (rev 53160)
@@ -177,7 +177,7 @@
 			baseAddress[ty * 32 + tx + p] = baseValue | tile;
 		}
 	}
-	
+
 }
 
 
@@ -292,8 +292,8 @@
 		// When there's no completions on the bottom of the screen, it acts like a mouse pad
 		// so this text indicates that
 		drawText(11, 18, "MOUSE AREA", true);
-		
 
+
 	} else {
 
 		consolePrintf("time: %d\n", typingTimeout);
@@ -303,10 +303,10 @@
 		for (int r = 0; r < autoCompleteCount; r++) {
 			int y = 12 + (r % 6) * 2;
 			int x = 0 + ((r / 6) * 16);
-	
+
 			drawText(x, y, autoCompleteWord[r], selectedCompletion == r);
 		}
-	
+
 	}
 }
 

Modified: scummvm/trunk/backends/platform/gp2x/build/README-GP2X
===================================================================
--- scummvm/trunk/backends/platform/gp2x/build/README-GP2X	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/gp2x/build/README-GP2X	2010-10-12 02:18:11 UTC (rev 53160)
@@ -20,10 +20,10 @@
 
 Please refer to the:
 
-GP2X/GP2XWiz ScummVM Forum: <http://forums.scummvm.org/viewforum.php?f=14> 
-WiKi: <http://wiki.scummvm.org/index.php/GP2X> 
+GP2X/GP2XWiz ScummVM Forum: <http://forums.scummvm.org/viewforum.php?f=14>
+WiKi: <http://wiki.scummvm.org/index.php/GP2X>
 
-for the most current information on the port and any updates to this 
+for the most current information on the port and any updates to this
 documentation.
 
 ------------------------------------------------------------------------

Modified: scummvm/trunk/backends/platform/gp2x/gp2x-bundle.mk
===================================================================
--- scummvm/trunk/backends/platform/gp2x/gp2x-bundle.mk	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/gp2x/gp2x-bundle.mk	2010-10-12 02:18:11 UTC (rev 53160)
@@ -6,7 +6,7 @@
 	$(MKDIR) "$(bundle_name)"
 	$(MKDIR) "$(bundle_name)/saves"
 	$(MKDIR) "$(bundle_name)/engine-data"
-	
+
 	echo "Please put your save games in this dir" >> "$(bundle_name)/saves/PUT_SAVES_IN_THIS_DIR"
 
 	$(CP) $(srcdir)/backends/platform/gp2x/build/scummvm.gpe $(bundle_name)/
@@ -28,13 +28,13 @@
 endif
 
 	tar -C $(bundle_name) -cvjf $(bundle_name).tar.bz2 .
-	rm -R ./$(bundle_name)	
+	rm -R ./$(bundle_name)
 
 gp2x-bundle-debug: $(EXECUTABLE)
 	$(MKDIR) "$(bundle_name)"
 	$(MKDIR) "$(bundle_name)/saves"
 	$(MKDIR) "$(bundle_name)/engine-data"
-	
+
 	echo "Please put your save games in this dir" >> "$(bundle_name)/saves/PUT_SAVES_IN_THIS_DIR"
 
 	$(CP) $(srcdir)/backends/platform/gp2x/build/scummvm.gpe $(bundle_name)/
@@ -46,15 +46,15 @@
 	$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/
 	$(INSTALL) -c -m 644 $(DIST_FILES_ENGINEDATA) $(bundle_name)/engine-data
 	$(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip $(bundle_name)/
-	
+
 	$(INSTALL) -c -m 777 $(srcdir)/$(EXECUTABLE) $(bundle_name)/$(EXECUTABLE)
 
 ifdef DYNAMIC_MODULES
 	$(INSTALL) -d "$(bundle_name)/scummvm/plugins"
 	$(INSTALL) -c -m 644 $(PLUGINS) "$(bundle_name)/scummvm/plugins"
 endif
-	
+
 	tar -C $(bundle_name) -cvjf $(bundle_name)-debug.tar.bz2 .
-	rm -R ./$(bundle_name)	
+	rm -R ./$(bundle_name)
 
 .PHONY: gp2x-bundle gp2x-bundle-debug

Modified: scummvm/trunk/backends/platform/gp2x/gp2x-common.h
===================================================================
--- scummvm/trunk/backends/platform/gp2x/gp2x-common.h	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/gp2x/gp2x-common.h	2010-10-12 02:18:11 UTC (rev 53160)
@@ -318,7 +318,7 @@
 
 	// Scroll lock state - since SDL doesn't track it
 	bool _scrollLock;
-	
+
 	// joystick
 	SDL_Joystick *_joystick;
 	bool _stickBtn[32];

Modified: scummvm/trunk/backends/platform/gph/build/README-GP2XWIZ
===================================================================
--- scummvm/trunk/backends/platform/gph/build/README-GP2XWIZ	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/gph/build/README-GP2XWIZ	2010-10-12 02:18:11 UTC (rev 53160)
@@ -19,10 +19,10 @@
 
 Please refer to the:
 
-GP2X/GP2XWiz ScummVM Forum: <http://forums.scummvm.org/viewforum.php?f=14> 
-WiKi: <http://wiki.scummvm.org/index.php/GP2XWiz> 
+GP2X/GP2XWiz ScummVM Forum: <http://forums.scummvm.org/viewforum.php?f=14>
+WiKi: <http://wiki.scummvm.org/index.php/GP2XWiz>
 
-for the most current information on the port and any updates to this 
+for the most current information on the port and any updates to this
 documentation.
 
 ------------------------------------------------------------------------
@@ -112,7 +112,7 @@
 
 NOTE: To use button combos press and hold the Left Trigger then...
 
-Right Trigger: Display Virtual Keyboard 
+Right Trigger: Display Virtual Keyboard
 Menu: Bring up the Global main menu for ScummVM
 Select: Exit ScummVM completely (and gracefully)
 

Modified: scummvm/trunk/backends/platform/gph/build/config.sh
===================================================================
--- scummvm/trunk/backends/platform/gph/build/config.sh	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/gph/build/config.sh	2010-10-12 02:18:11 UTC (rev 53160)
@@ -17,6 +17,6 @@
 
 # Edit the configure line to suit.
 cd ../../../..
-./configure --backend=gp2xwiz --disable-mt32emu --host=gp2xwiz --disable-flac --disable-nasm --disable-hq-scalers --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin --with-mpeg2-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-tremor --with-tremor-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-zlib --with-zlib-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-mad --with-mad-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-vkeybd --enable-plugins --default-dynamic 
+./configure --backend=gp2xwiz --disable-mt32emu --host=gp2xwiz --disable-flac --disable-nasm --disable-hq-scalers --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin --with-mpeg2-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-tremor --with-tremor-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-zlib --with-zlib-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-mad --with-mad-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-vkeybd --enable-plugins --default-dynamic
 
 echo Generating config for GP2X Wiz complete. Check for errors.

Modified: scummvm/trunk/backends/platform/gph/build/scummvm-gdb.gpe
===================================================================
--- scummvm/trunk/backends/platform/gph/build/scummvm-gdb.gpe	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/gph/build/scummvm-gdb.gpe	2010-10-12 02:18:11 UTC (rev 53160)
@@ -6,7 +6,7 @@
 
 # Run ScummVM via GDB (so make sure you have a terminal open or serial).
 # Oh, and GDB installed of course ;)
-gdb --args ./scummvm.wiz --fullscreen --gfx-mode=1x --config=$(pwd)/.scummvmrc 
+gdb --args ./scummvm.wiz --fullscreen --gfx-mode=1x --config=$(pwd)/.scummvmrc
 
 # Sync the SD card to check that everything is written.
 sync

Modified: scummvm/trunk/backends/platform/gph/build/scummvm.gpe
===================================================================
--- scummvm/trunk/backends/platform/gph/build/scummvm.gpe	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/gph/build/scummvm.gpe	2010-10-12 02:18:11 UTC (rev 53160)
@@ -5,7 +5,7 @@
 export LD_LIBRARY_PATH=`pwd`/lib:$LD_LIBRARY_PATH
 
 # Run ScummVM, important this bit.
-./scummvm.wiz --fullscreen --gfx-mode=1x --config=$(pwd)/.scummvmrc 
+./scummvm.wiz --fullscreen --gfx-mode=1x --config=$(pwd)/.scummvmrc
 
 # Sync the SD card to check that everything is written.
 sync

Modified: scummvm/trunk/backends/platform/gph/caanoo/config.sh
===================================================================
--- scummvm/trunk/backends/platform/gph/caanoo/config.sh	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/gph/caanoo/config.sh	2010-10-12 02:18:11 UTC (rev 53160)
@@ -11,6 +11,6 @@
 
 # Edit the configure line to suit.
 cd ../../../..
-./configure --backend=caanoo --disable-mt32emu --host=caanoo --disable-alsa --disable-flac --disable-nasm --disable-vorbis --disable-hq-scalers --with-sdl-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr/bin --with-mpeg2-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr --enable-tremor --with-tremor-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr --enable-zlib --with-zlib-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr --enable-mad --with-mad-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr --enable-vkeybd --enable-plugins --default-dynamic 
+./configure --backend=caanoo --disable-mt32emu --host=caanoo --disable-alsa --disable-flac --disable-nasm --disable-vorbis --disable-hq-scalers --with-sdl-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr/bin --with-mpeg2-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr --enable-tremor --with-tremor-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr --enable-zlib --with-zlib-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr --enable-mad --with-mad-prefix=/opt/arm-caanoo/arm-none-linux-gnueabi/usr --enable-vkeybd --enable-plugins --default-dynamic
 
 echo Generating config for GP2X Caanoo complete. Check for errors.

Modified: scummvm/trunk/backends/platform/gph/caanoo/scummvm-gdb.gpe
===================================================================
--- scummvm/trunk/backends/platform/gph/caanoo/scummvm-gdb.gpe	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/gph/caanoo/scummvm-gdb.gpe	2010-10-12 02:18:11 UTC (rev 53160)
@@ -6,7 +6,7 @@
 
 # Run ScummVM via GDB (so make sure you have a terminal open or serial).
 # Oh, and GDB installed of course ;)
-gdb --args ./scummvm.caanoo --fullscreen --gfx-mode=1x --config=$(pwd)/.scummvmrc 
+gdb --args ./scummvm.caanoo --fullscreen --gfx-mode=1x --config=$(pwd)/.scummvmrc
 
 # Sync the SD card to check that everything is written.
 sync

Modified: scummvm/trunk/backends/platform/gph/caanoo/scummvm.gpe
===================================================================
--- scummvm/trunk/backends/platform/gph/caanoo/scummvm.gpe	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/gph/caanoo/scummvm.gpe	2010-10-12 02:18:11 UTC (rev 53160)
@@ -5,7 +5,7 @@
 export LD_LIBRARY_PATH=`pwd`/lib:$LD_LIBRARY_PATH
 
 # Run ScummVM, important this bit.
-./scummvm.caanoo --fullscreen --gfx-mode=1x --config=$(pwd)/.scummvmrc 
+./scummvm.caanoo --fullscreen --gfx-mode=1x --config=$(pwd)/.scummvmrc
 
 # Sync the SD card to check that everything is written.
 sync

Modified: scummvm/trunk/backends/platform/gph/caanoo-bundle.mk
===================================================================
--- scummvm/trunk/backends/platform/gph/caanoo-bundle.mk	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/gph/caanoo-bundle.mk	2010-10-12 02:18:11 UTC (rev 53160)
@@ -11,14 +11,14 @@
 	$(MKDIR) "$(bundle_name)/scummvm/saves"
 	$(MKDIR) "$(bundle_name)/scummvm/engine-data"
 	$(MKDIR) "$(bundle_name)/scummvm/lib"
-	
+
 	echo "Please put your save games in this dir" >> "$(bundle_name)/scummvm/saves/PUT_SAVES_IN_THIS_DIR"
 
 	$(CP) $(srcdir)/backends/platform/gph/caanoo/scummvm.gpe $(bundle_name)/scummvm/
 	$(CP) $(srcdir)/backends/platform/gph/build/scummvm.png $(bundle_name)/scummvm/
 	$(CP) $(srcdir)/backends/platform/gph/build/scummvmb.png $(bundle_name)/scummvm/
 	$(CP) $(srcdir)/backends/platform/gph/build/README-GP2XWIZ $(bundle_name)/scummvm/README-CAANOO
-	$(CP) $(srcdir)/backends/platform/gph/build/scummvm.ini $(bundle_name)/	
+	$(CP) $(srcdir)/backends/platform/gph/build/scummvm.ini $(bundle_name)/
 
 	$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/scummvm/
 	$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/
@@ -32,9 +32,9 @@
 	$(INSTALL) -c -m 644 $(PLUGINS) "$(bundle_name)/scummvm/plugins"
 	$(STRIP) $(bundle_name)/scummvm/plugins/*
 endif
-	
+
 	tar -C $(bundle_name) -cvjf $(bundle_name).tar.bz2 .
-	rm -R ./$(bundle_name)	
+	rm -R ./$(bundle_name)
 
 caanoo-bundle-debug: $(EXECUTABLE)
 	$(MKDIR) "$(bundle_name)"
@@ -42,14 +42,14 @@
 	$(MKDIR) "$(bundle_name)/scummvm/saves"
 	$(MKDIR) "$(bundle_name)/scummvm/engine-data"
 	$(MKDIR) "$(bundle_name)/scummvm/lib"
-	
+
 	echo "Please put your save games in this dir" >> "$(bundle_name)/scummvm/saves/PUT_SAVES_IN_THIS_DIR"
 
 	$(CP) $(srcdir)/backends/platform/gph/caanoo/scummvm-gdb.gpe $(bundle_name)/scummvm/scummvm.gpe
 	$(CP) $(srcdir)/backends/platform/gph/build/scummvm.png $(bundle_name)/scummvm/
 	$(CP) $(srcdir)/backends/platform/gph/build/scummvmb.png $(bundle_name)/scummvm/
 	$(CP) $(srcdir)/backends/platform/gph/build/README-GP2XWIZ $(bundle_name)/scummvm/README-CAANOO
-	$(CP) $(srcdir)/backends/platform/gph/build/scummvm.ini $(bundle_name)/	
+	$(CP) $(srcdir)/backends/platform/gph/build/scummvm.ini $(bundle_name)/
 
 	$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/scummvm/
 	$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/
@@ -64,6 +64,6 @@
 endif
 
 	tar -C $(bundle_name) -cvjf $(bundle_name)-debug.tar.bz2 .
-	rm -R ./$(bundle_name)	
+	rm -R ./$(bundle_name)
 
 .PHONY: caanoo-bundle caanoo-bundle-debug

Modified: scummvm/trunk/backends/platform/gph/gp2xwiz-bundle.mk
===================================================================
--- scummvm/trunk/backends/platform/gph/gp2xwiz-bundle.mk	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/gph/gp2xwiz-bundle.mk	2010-10-12 02:18:11 UTC (rev 53160)
@@ -11,14 +11,14 @@
 	$(MKDIR) "$(bundle_name)/scummvm/saves"
 	$(MKDIR) "$(bundle_name)/scummvm/engine-data"
 	$(MKDIR) "$(bundle_name)/scummvm/lib"
-	
+
 	echo "Please put your save games in this dir" >> "$(bundle_name)/scummvm/saves/PUT_SAVES_IN_THIS_DIR"
 
 	$(CP) $(srcdir)/backends/platform/gph/build/scummvm.gpe $(bundle_name)/scummvm/
 	$(CP) $(srcdir)/backends/platform/gph/build/scummvm.png $(bundle_name)/scummvm/
 	$(CP) $(srcdir)/backends/platform/gph/build/scummvmb.png $(bundle_name)/scummvm/
 	$(CP) $(srcdir)/backends/platform/gph/build/README-GP2XWIZ $(bundle_name)/scummvm/
-	$(CP) $(srcdir)/backends/platform/gph/build/scummvm.ini $(bundle_name)/	
+	$(CP) $(srcdir)/backends/platform/gph/build/scummvm.ini $(bundle_name)/
 
 	$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/scummvm/
 	$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/
@@ -32,12 +32,12 @@
 	$(INSTALL) -c -m 644 $(PLUGINS) "$(bundle_name)/scummvm/plugins"
 	$(STRIP) $(bundle_name)/scummvm/plugins/*
 endif
-	
+
 	$(CP) $(libloc)/../lib/libz.so.1.2.3 $(bundle_name)/scummvm/lib/libz.so.1
 	$(CP) $(libloc)/../lib/libvorbisidec.so.1.0.2 $(bundle_name)/scummvm/lib/libvorbisidec.so.1
 
 	tar -C $(bundle_name) -cvjf $(bundle_name).tar.bz2 .
-	rm -R ./$(bundle_name)	
+	rm -R ./$(bundle_name)
 
 gp2xwiz-bundle-debug: $(EXECUTABLE)
 	$(MKDIR) "$(bundle_name)"
@@ -45,14 +45,14 @@
 	$(MKDIR) "$(bundle_name)/scummvm/saves"
 	$(MKDIR) "$(bundle_name)/scummvm/engine-data"
 	$(MKDIR) "$(bundle_name)/scummvm/lib"
-	
+
 	echo "Please put your save games in this dir" >> "$(bundle_name)/scummvm/saves/PUT_SAVES_IN_THIS_DIR"
 
 	$(CP) $(srcdir)/backends/platform/gph/build/scummvm-gdb.gpe $(bundle_name)/scummvm/scummvm.gpe
 	$(CP) $(srcdir)/backends/platform/gph/build/scummvm.png $(bundle_name)/scummvm/
 	$(CP) $(srcdir)/backends/platform/gph/build/scummvmb.png $(bundle_name)/scummvm/
 	$(CP) $(srcdir)/backends/platform/gph/build/README-GP2XWIZ $(bundle_name)/scummvm/
-	$(CP) $(srcdir)/backends/platform/gph/build/scummvm.ini $(bundle_name)/	
+	$(CP) $(srcdir)/backends/platform/gph/build/scummvm.ini $(bundle_name)/
 
 	$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/scummvm/
 	$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/
@@ -65,11 +65,11 @@
 	$(INSTALL) -d "$(bundle_name)/scummvm/plugins"
 	$(INSTALL) -c -m 644 $(PLUGINS) "$(bundle_name)/scummvm/plugins"
 endif
-	
+
 	$(CP) $(libloc)/../lib/libz.so.1.2.3 $(bundle_name)/scummvm/lib/libz.so.1
 	$(CP) $(libloc)/../lib/libvorbisidec.so.1.0.2 $(bundle_name)/scummvm/lib/libvorbisidec.so.1
 
 	tar -C $(bundle_name) -cvjf $(bundle_name)-debug.tar.bz2 .
-	rm -R ./$(bundle_name)	
+	rm -R ./$(bundle_name)
 
 .PHONY: gp2xwiz-bundle gp2xwiz-bundle-debug

Modified: scummvm/trunk/backends/platform/iphone/iphone_main.m
===================================================================
--- scummvm/trunk/backends/platform/iphone/iphone_main.m	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/iphone/iphone_main.m	2010-10-12 02:18:11 UTC (rev 53160)
@@ -122,7 +122,7 @@
 
 - (void)applicationResume:(struct __GSEvent *)event {
 	[_view applicationResume];
-	
+
 	// Workaround, need to "hide" and unhide the statusbar to properly remove it,
 	// since the Springboard has put it back without apparently flagging our application.
     [self setStatusBarHidden:YES animated:YES];

Modified: scummvm/trunk/backends/platform/iphone/iphone_video.m
===================================================================
--- scummvm/trunk/backends/platform/iphone/iphone_video.m	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/iphone/iphone_video.m	2010-10-12 02:18:11 UTC (rev 53160)
@@ -233,7 +233,7 @@
 
 	if (_screenTexture)
 		free(_textureBuffer);
-	
+
 	free(_overlayTexBuffer);
 }
 
@@ -265,9 +265,9 @@
 	}
 
 	[self updateMainSurface];
-	
+
 	if (_overlayIsEnabled) {
-		[self updateOverlaySurface];		
+		[self updateOverlaySurface];
 		[self updateMouseSurface];
 	}
 
@@ -350,7 +350,7 @@
 }
 
 - (void)updateMouseSurface {
-	
+
 	int width = _mouseCursorWidth / (float)_backingWidth * _backingHeight;
 	int height = _mouseCursorHeight / (float)_backingHeight * _backingWidth;
 
@@ -378,7 +378,7 @@
 
 	glBindTexture(GL_TEXTURE_2D, _mouseCursorTexture); printOpenGLError();
 	glEnable(GL_BLEND);
-	glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); printOpenGLError();	
+	glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); printOpenGLError();
 }
 
 - (void)initSurface {

Modified: scummvm/trunk/backends/platform/iphone/osys_events.cpp
===================================================================
--- scummvm/trunk/backends/platform/iphone/osys_events.cpp	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/iphone/osys_events.cpp	2010-10-12 02:18:11 UTC (rev 53160)
@@ -74,7 +74,7 @@
 					y = (int)((1.0 - xUnit) * _overlayHeight);
 				} else {
 					x = (int)(yUnit * _screenWidth);
-					y = (int)((1.0 - xUnit) * _screenHeight);					
+					y = (int)((1.0 - xUnit) * _screenHeight);
 				}
 				break;
 			case kScreenOrientationFlippedLandscape:
@@ -279,7 +279,7 @@
 
 		int widthCap = _overlayVisible ? _overlayWidth : _screenWidth;
 		int heightCap = _overlayVisible ? _overlayHeight : _screenHeight;
-		
+
 		if (mouseNewPosX < 0)
 			mouseNewPosX = 0;
 		else if (mouseNewPosX > widthCap)

Modified: scummvm/trunk/backends/platform/iphone/osys_video.cpp
===================================================================
--- scummvm/trunk/backends/platform/iphone/osys_video.cpp	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/iphone/osys_video.cpp	2010-10-12 02:18:11 UTC (rev 53160)
@@ -266,7 +266,7 @@
 
 void OSystem_IPHONE::drawDirtyOverlayRect(const Common::Rect& dirtyRect) {
 	// int h = dirtyRect.bottom - dirtyRect.top;
-	// 
+	//
 	// uint16 *src = (uint16 *)&_overlayBuffer[dirtyRect.top * _screenWidth + dirtyRect.left];
 	// uint16 *dst = &_fullscreen[dirtyRect.top * _screenWidth + dirtyRect.left];
 	// int x = (dirtyRect.right - dirtyRect.left) * 2;
@@ -275,7 +275,7 @@
 	// 	src += _screenWidth;
 	// 	dst += _screenWidth;
 	// }
-	iPhone_updateOverlayRect(_overlayBuffer, dirtyRect.left, dirtyRect.top, dirtyRect.right, dirtyRect.bottom );	
+	iPhone_updateOverlayRect(_overlayBuffer, dirtyRect.left, dirtyRect.top, dirtyRect.right, dirtyRect.bottom);
 }
 
 void OSystem_IPHONE::drawMouseCursorOnRectUpdate(const Common::Rect& updatedRect, const Common::Rect& mouseRect) {

Modified: scummvm/trunk/backends/platform/linuxmoto/linuxmoto-events.cpp
===================================================================
--- scummvm/trunk/backends/platform/linuxmoto/linuxmoto-events.cpp	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/linuxmoto/linuxmoto-events.cpp	2010-10-12 02:18:11 UTC (rev 53160)
@@ -128,7 +128,7 @@
 	// VirtualKeyboard - Right Soft key
 	else if (ev.key.keysym.sym == SDLK_F11) {
 		ev.key.keysym.sym = SDLK_F7;
-	}      
+	}
 #endif
 
 // Joystick to Mouse

Modified: scummvm/trunk/backends/platform/n64/Makefile
===================================================================
--- scummvm/trunk/backends/platform/n64/Makefile	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/n64/Makefile	2010-10-12 02:18:11 UTC (rev 53160)
@@ -15,7 +15,7 @@
 RANLIB = $(GCCN64PREFIX)ranlib
 
 DEFINES += -D__N64__ -DLIMIT_FPS -DNONSTANDARD_PORT -DDISABLE_DEFAULT_SAVEFILEMANAGER -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE -DDISABLE_FANCY_THEMES -DDISABLE_DOSBOX_OPL -DENABLE_VKEYBD -DUSE_ZLIB
-LIBS += -lpakfs -lframfs -ln64 -ln64utils -lromfs 
+LIBS += -lpakfs -lframfs -ln64 -ln64utils -lromfs
 
 #DEFINES += -D_ENABLE_DEBUG_
 
@@ -31,7 +31,7 @@
 LIBS	+= -lvorbisidec
 endif
 
-LIBS += -lm -lstdc++ -lc -lgcc -lz -lnosys 
+LIBS += -lm -lstdc++ -lc -lgcc -lz -lnosys
 
 CXXFLAGS = -g -mno-extern-sdata -O2 --param max-inline-insns-auto=20 -fomit-frame-pointer -march=vr4300 -mtune=vr4300 -mhard-float -fno-rtti -fno-exceptions -Wno-multichar -Wshadow -I$(LIBN64PATH) -I$(TOOLPATH)/include -I./ -I$(srcdir) -I$(srcdir)/engines
 LDFLAGS = -g -march=vr4300 -mtune=vr4300 -nodefaultlibs -nostartfiles -mno-crt0 -L$(LIBN64PATH) -L$(TOOLPATH)/lib $(LIBS) -T n64ld_cpp.x -Xlinker -Map -Xlinker scummvm.map

Modified: scummvm/trunk/backends/platform/n64/README.N64
===================================================================
--- scummvm/trunk/backends/platform/n64/README.N64	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/n64/README.N64	2010-10-12 02:18:11 UTC (rev 53160)
@@ -97,15 +97,15 @@
 C buttons                   - Numeric keypad keys
 
 * Using a N64 Mouse:
-Used like a normal PC mouse. 
+Used like a normal PC mouse.
 
 Notes
 =====
 
-- If virtual keyboard doesn't show up, you need to make sure you included 
+- If virtual keyboard doesn't show up, you need to make sure you included
   'vkeybd_default.zip' in the root of your romfs image.
 
-- In some games (mostly gob) cursor movement might be choppy, it's a known 
+- In some games (mostly gob) cursor movement might be choppy, it's a known
   problem and related on how N64 port manages screen updates.
 
 

Modified: scummvm/trunk/backends/platform/n64/module.mk
===================================================================
--- scummvm/trunk/backends/platform/n64/module.mk	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/n64/module.mk	2010-10-12 02:18:11 UTC (rev 53160)
@@ -6,7 +6,7 @@
 	osys_n64_events.o \
 	osys_n64_utilities.o \
 	pakfs_save_manager.o \
-	framfs_save_manager.o 
+	framfs_save_manager.o
 
 # We don't use rules.mk but rather manually update OBJS and MODULE_DIRS.
 MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS))

Modified: scummvm/trunk/backends/platform/n64/osys_n64_base.cpp
===================================================================
--- scummvm/trunk/backends/platform/n64/osys_n64_base.cpp	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/n64/osys_n64_base.cpp	2010-10-12 02:18:11 UTC (rev 53160)
@@ -859,7 +859,7 @@
 	// No RTC inside the N64, read mips timer to simulate
 	// passing of time, not a perfect solution, but can't think
 	// of anything better.
-	
+
 	uint32 now = getMilliTick();
 
 	t.tm_sec  = (now / 1000) % 60;

Modified: scummvm/trunk/backends/platform/openpandora/build/PXML.xml
===================================================================
--- scummvm/trunk/backends/platform/openpandora/build/PXML.xml	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/openpandora/build/PXML.xml	2010-10-12 02:18:11 UTC (rev 53160)
@@ -4,7 +4,7 @@
   <application id="scummvm.djwillis.0001" appdata="scummvm">
 
     <title lang="en_US">ScummVM</title>
- 
+
     <exec command="./runscummvm.sh"/>
     <icon src="icon/scummvm.png"/>
 
@@ -13,20 +13,20 @@
     </previewpics>
 
     <info name="ScummVM Documentation" type="text/html" src="docs/index.html"/>
- 
+
     <description lang="en_US">Point & click game interpreter.</description>
- 
+
     <author name="DJWillis" website="http://www.scummvm.org/"/>
- 
+
     <version major="1" minor="1" release="1" build="1"/><!--This programs version-->
     <osversion major="1" minor="0" release="0" build="0"/><!--The minimum OS version required-->
- 
+
     <categories>
       <category name="Game"><!--category like "Games", "Graphics", "Internet" etc-->
 	<subcategory name="Adventure Games"/><!--subcategory, like "Board Games", "Strategy", "First Person Shooters"-->
       </category>
     </categories>
- 
+
     <clockspeed frequency="500"/><!--Frequency in Hz-->
 
   </application>

Modified: scummvm/trunk/backends/platform/openpandora/build/README-OPENPANDORA
===================================================================
--- scummvm/trunk/backends/platform/openpandora/build/README-OPENPANDORA	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/openpandora/build/README-OPENPANDORA	2010-10-12 02:18:11 UTC (rev 53160)
@@ -19,10 +19,10 @@
 
 Please refer to the:
 
-ScummVM Forum: <http://forums.scummvm.org/> 
-WiKi: <http://wiki.scummvm.org/index.php/OpenPandora> 
+ScummVM Forum: <http://forums.scummvm.org/>
+WiKi: <http://wiki.scummvm.org/index.php/OpenPandora>
 
-for the most current information on the port and any updates to this 
+for the most current information on the port and any updates to this
 documentation.
 
 ------------------------------------------------------------------------
@@ -112,7 +112,7 @@
 
 NOTE: To use button combos press and hold the Left Trigger then...
 
-Right Trigger: Display Virtual Keyboard 
+Right Trigger: Display Virtual Keyboard
 Menu: Bring up the Global main menu for ScummVM
 Select: Exit ScummVM completely (and gracefully)
 

Modified: scummvm/trunk/backends/platform/openpandora/build/README-PND.txt
===================================================================
--- scummvm/trunk/backends/platform/openpandora/build/README-PND.txt	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/openpandora/build/README-PND.txt	2010-10-12 02:18:11 UTC (rev 53160)
@@ -3,16 +3,16 @@
 
 Please refer to the:
 
-ScummVM Forum: <http://forums.scummvm.org/> 
-WiKi: <http://wiki.scummvm.org/index.php/OpenPandora> 
+ScummVM Forum: <http://forums.scummvm.org/>
+WiKi: <http://wiki.scummvm.org/index.php/OpenPandora>
 
-for the most current information on the port and any updates to this 
+for the most current information on the port and any updates to this
 documentation.
 
 ------------------------------------------------------------------------
 Installing:
 
-This archive contains ScummVM in a PND format ready to be copied to the 
+This archive contains ScummVM in a PND format ready to be copied to the
 OpenPandora and used.
 
 To install just copy the .pnd file from this archive to your device.
@@ -20,13 +20,13 @@
 You will need to place the .pnd file in a suitable location on your SD
 card.
 
-/pandora/desktop <- place here if you wish the icon to show on the 
+/pandora/desktop <- place here if you wish the icon to show on the
 			desktop. Documentation will show in the menu.
 
-/pandora/menu <- place here if you wish the icon to show on the 
+/pandora/menu <- place here if you wish the icon to show on the
 			Xfce menu. Documentation will show in the menu.
 
-/pandora/apps <- place here if you wish the icon to show on the 
+/pandora/apps <- place here if you wish the icon to show on the
 			desktop and in the menu. Documentation will show
 			in the menu.
 

Modified: scummvm/trunk/backends/platform/openpandora/build/pnd_make.sh
===================================================================
--- scummvm/trunk/backends/platform/openpandora/build/pnd_make.sh	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/openpandora/build/pnd_make.sh	2010-10-12 02:18:11 UTC (rev 53160)
@@ -1,11 +1,11 @@
 #!/bin/sh
- 
+
 ######adjust path of genpxml.sh if you want to use that "feture"#####
- 
+
 TEMP=`getopt -o p:d:x:i:c -- "$@"`
- 
+
 if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
- 
+
 eval set -- "$TEMP"
 while true ; do
 	case "$1" in
@@ -18,25 +18,25 @@
 		*) echo "Error while parsing arguments! $2" ; exit 1 ;;
 	esac
 done
- 
+
 rnd=$RANDOM; # random number for genpxml and index$rnd.xml
- 
+
 #generate pxml if guess or empty
 if [ ! $PXML ] || [ $PXML = "guess" ] && [  $PNDNAME ] && [ $FOLDER ];  then
 	PXMLtxt=$(/home/user/libpnd/pandora-libraries/testdata/scripts/genpxml.sh $FOLDER $ICON)
 	PXML=$FOLDER/PXML.xml
 	echo "$PXMLtxt" > $FOLDER/PXML.xml
 fi
- 
+
 #check arguments
 if [ ! $PNDNAME ] || [ ! $FOLDER ] || [ ! $PXML ]; then
-	echo " Usage: pnd_make.sh -p your.pnd -d folder/containing/your/app/ -x 
+	echo " Usage: pnd_make.sh -p your.pnd -d folder/containing/your/app/ -x
 	your.pxml (or \"guess\" to try to generate it from the folder) -i icon.png"
 	exit 1
 fi
 if [ ! -d $FOLDER ]; then echo "$FOLDER doesnt exist"; exit 1; fi #check if folder actually exists
 if [ ! -f $PXML ]; then echo "$PXML doesnt exist"; exit 1; fi #check if pxml actually exists
- 
+
 #make iso from folder
 if [ ! $SQUASH ]; then
 	mkisofs -o $PNDNAME.iso -R $FOLDER
@@ -45,12 +45,12 @@
 		echo "your squashfs version is older then version 4, please upgrade to 4.0 or later"
 		exit 1
 	fi
-	mksquashfs -no-recovery -nopad $FOLDER $PNDNAME.iso 
+	mksquashfs -no-recovery -nopad $FOLDER $PNDNAME.iso
 fi
 #append pxml to iso
 cat $PNDNAME.iso $PXML >  $PNDNAME
 rm $PNDNAME.iso #cleanup
- 
+
 #append icon if specified
 if [ $ICON ]; then # check if we want to add an icon
 	if [ ! -f $ICON ]; then #does the icon actually exist?
@@ -61,5 +61,5 @@
 	rm $PNDNAME.tmp #cleanup
 	fi
 fi
- 
+
 if [ $PXML = "guess" ];then rm $FOLDER/PXML.xml; fi #cleanup

Modified: scummvm/trunk/backends/platform/openpandora/module.mk
===================================================================
--- scummvm/trunk/backends/platform/openpandora/module.mk	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/openpandora/module.mk	2010-10-12 02:18:11 UTC (rev 53160)
@@ -6,10 +6,10 @@
 	op-main.o
 
 MODULE_DIRS += \
-	backends/platform/openpandora/ 
+	backends/platform/openpandora/
 
 # We don't use the rules.mk here on purpose
 OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) $(OBJS)
 
 # Hack to ensure the SDL backend is built so we can use OSystem_SDL.
--include $(srcdir)/backends/platform/sdl/module.mk
\ No newline at end of file
+-include $(srcdir)/backends/platform/sdl/module.mk

Modified: scummvm/trunk/backends/platform/openpandora/op-bundle.mk
===================================================================
--- scummvm/trunk/backends/platform/openpandora/op-bundle.mk	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/openpandora/op-bundle.mk	2010-10-12 02:18:11 UTC (rev 53160)
@@ -22,10 +22,10 @@
 
 
 	$(CP) $(srcdir)/backends/platform/openpandora/build/README-OPENPANDORA $(bundle_name)/scummvm/docs/
-	$(CP) $(srcdir)/backends/platform/openpandora/build/index.html $(bundle_name)/scummvm/docs/	
+	$(CP) $(srcdir)/backends/platform/openpandora/build/index.html $(bundle_name)/scummvm/docs/
 
 	$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/scummvm/docs/
-	
+
 	$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/data/
 	$(INSTALL) -c -m 644 $(DIST_FILES_ENGINEDATA) $(bundle_name)/scummvm/data/
 
@@ -36,10 +36,10 @@
 	$(INSTALL) -c -m 644 $(PLUGINS) "$(bundle_name)/scummvm/plugins"
 	$(STRIP) $(bundle_name)/scummvm/plugins/*
 endif
-	
+
 	$(CP) $(libloc)/../arm-angstrom-linux-gnueabi/usr/lib/libFLAC.so.8.2.0 $(bundle_name)/scummvm/lib/libFLAC.so.8
 	tar -C $(bundle_name) -cvjf $(bundle_name).tar.bz2 .
-	rm -R ./$(bundle_name)	
+	rm -R ./$(bundle_name)
 
 op-pnd: $(EXECUTABLE)
 	$(MKDIR) "$(bundle_name)"
@@ -58,10 +58,10 @@
 
 
 	$(CP) $(srcdir)/backends/platform/openpandora/build/README-OPENPANDORA $(bundle_name)/scummvm/docs/
-	$(CP) $(srcdir)/backends/platform/openpandora/build/index.html $(bundle_name)/scummvm/docs/	
+	$(CP) $(srcdir)/backends/platform/openpandora/build/index.html $(bundle_name)/scummvm/docs/
 
 	$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/scummvm/docs/
-	
+
 	$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/data/
 	$(INSTALL) -c -m 644 $(DIST_FILES_ENGINEDATA) $(bundle_name)/scummvm/data/
 
@@ -72,14 +72,14 @@
 	$(INSTALL) -c -m 644 $(PLUGINS) "$(bundle_name)/scummvm/plugins"
 	$(STRIP) $(bundle_name)/scummvm/plugins/*
 endif
-	
+
 	$(CP) $(libloc)/../arm-angstrom-linux-gnueabi/usr/lib/libFLAC.so.8.2.0 $(bundle_name)/scummvm/lib/libFLAC.so.8
-	
+
 	$(srcdir)/backends/platform/openpandora/build/pnd_make.sh -p $(bundle_name).pnd -d $(bundle_name)/scummvm -x $(bundle_name)/scummvm/data/PXML.xml -i $(bundle_name)/scummvm/icon/scummvm.png
-	
-	$(CP) $(srcdir)/backends/platform/openpandora/build/README-PND.txt $(bundle_name)	
+
+	$(CP) $(srcdir)/backends/platform/openpandora/build/README-PND.txt $(bundle_name)
 	tar -cvjf $(bundle_name)-pnd.tar.bz2 $(bundle_name).pnd $(bundle_name)/README-PND.txt
-	rm -R ./$(bundle_name)	
+	rm -R ./$(bundle_name)
 #	rm $(bundle_name).pnd
 
 .PHONY: op-bundle op-pnd

Modified: scummvm/trunk/backends/platform/ps2/Makefile.gdb
===================================================================
--- scummvm/trunk/backends/platform/ps2/Makefile.gdb	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/ps2/Makefile.gdb	2010-10-12 02:18:11 UTC (rev 53160)
@@ -51,7 +51,7 @@
 DEFINES  = -DUSE_VORBIS -DUSE_TREMOR -DUSE_MAD -DUSE_ZLIB -DFORCE_RTL -D_EE -D__PLAYSTATION2__ -D__PS2_DEBUG__ -g -Wall -Wno-multichar
 
 
-INCLUDES  = $(addprefix -I$(PS2_EXTRA),$(PS2_EXTRA_INCS)) 
+INCLUDES  = $(addprefix -I$(PS2_EXTRA),$(PS2_EXTRA_INCS))
 INCLUDES += -I $(PS2GDB)/ee -I $(PS2SDK)/ee/include -I $(PS2SDK)/common/include -I ./common -I . -I $(srcdir) -I $(srcdir)/engines
 
 TARGET = elf/scummvm.elf
@@ -72,16 +72,16 @@
     backends/platform/ps2/ps2mutex.o \
     backends/platform/ps2/ps2time.o \
 	backends/platform/ps2/ps2debug.o
-    
+
 MODULE_DIRS += .
 
 BACKEND := ps2
 
 include $(srcdir)/Makefile.common
 
-LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -T $(PS2SDK)/ee/startup/linkfile 
+LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -T $(PS2SDK)/ee/startup/linkfile
 LDFLAGS += -L $(PS2GDB)/lib  -L $(PS2SDK)/ee/lib -L .
-LDFLAGS += $(addprefix -L$(PS2_EXTRA),$(PS2_EXTRA_LIBS)) 
+LDFLAGS += $(addprefix -L$(PS2_EXTRA),$(PS2_EXTRA_LIBS))
 LDFLAGS += -lmc -lpad -lmouse -lhdd -lpoweroff -lsjpcm -lmad -ltremor -lz -lm -lc -lfileXio -lps2gdbStub -lps2ip -ldebug -lkernel -lstdc++
 
 all: $(TARGET)

Modified: scummvm/trunk/backends/platform/ps2/Makefile.ps2
===================================================================
--- scummvm/trunk/backends/platform/ps2/Makefile.ps2	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/ps2/Makefile.ps2	2010-10-12 02:18:11 UTC (rev 53160)
@@ -51,7 +51,7 @@
 DEFINES  = -DUSE_VORBIS -DUSE_TREMOR -DUSE_MAD -DUSE_ZLIB -DFORCE_RTL -D_EE -D__PLAYSTATION2__ -O2 -Wall -Wno-multichar
 
 
-INCLUDES  = $(addprefix -I$(PS2_EXTRA),$(PS2_EXTRA_INCS)) 
+INCLUDES  = $(addprefix -I$(PS2_EXTRA),$(PS2_EXTRA_INCS))
 INCLUDES += -I $(PS2SDK)/ee/include -I $(PS2SDK)/common/include -I ./common -I . -I $(srcdir) -I $(srcdir)/engines
 
 TARGET = elf/scummvm.elf
@@ -72,18 +72,18 @@
     backends/platform/ps2/ps2mutex.o \
     backends/platform/ps2/ps2time.o \
 	backends/platform/ps2/ps2debug.o
-    
+
 MODULE_DIRS += .
 
 BACKEND := ps2
 
 include $(srcdir)/Makefile.common
 
-LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -T $(PS2SDK)/ee/startup/linkfile 
+LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -T $(PS2SDK)/ee/startup/linkfile
 LDFLAGS += -L $(PS2SDK)/ee/lib -L .
-LDFLAGS += $(addprefix -L$(PS2_EXTRA),$(PS2_EXTRA_LIBS)) 
-LDFLAGS += -lmc -lpad -lmouse -lhdd -lpoweroff -lsjpcm -lmad -ltremor -lz -lm -lc -lfileXio -lkernel -lstdc++ 
-LDFLAGS += -s 
+LDFLAGS += $(addprefix -L$(PS2_EXTRA),$(PS2_EXTRA_LIBS))
+LDFLAGS += -lmc -lpad -lmouse -lhdd -lpoweroff -lsjpcm -lmad -ltremor -lz -lm -lc -lfileXio -lkernel -lstdc++
+LDFLAGS += -s
 
 all: $(TARGET)
 

Modified: scummvm/trunk/backends/platform/ps2/iop/CoDyVDfs/iop/imports.lst
===================================================================
--- scummvm/trunk/backends/platform/ps2/iop/CoDyVDfs/iop/imports.lst	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/ps2/iop/CoDyVDfs/iop/imports.lst	2010-10-12 02:18:11 UTC (rev 53160)
@@ -24,10 +24,10 @@
 iomanX_IMPORTS_end
 
 sifcmd_IMPORTS_start
-I_sceSifInitRpc 
-I_sceSifSetRpcQueue 
-I_sceSifRegisterRpc 
-I_sceSifRpcLoop 
+I_sceSifInitRpc
+I_sceSifSetRpcQueue
+I_sceSifRegisterRpc
+I_sceSifRpcLoop
 sifcmd_IMPORTS_end
 
 stdio_IMPORTS_start
@@ -59,7 +59,7 @@
 I_CreateThread
 I_StartThread
 I_GetThreadId
-I_DelayThread 
+I_DelayThread
 thbase_IMPORTS_end
 
 

Modified: scummvm/trunk/backends/platform/psp/Makefile
===================================================================
--- scummvm/trunk/backends/platform/psp/Makefile	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/psp/Makefile	2010-10-12 02:18:11 UTC (rev 53160)
@@ -200,4 +200,4 @@
 	$(PACK_PBP) "%__SCE__$(TARGET)/$(PSP_EBOOT)" $(PSP_EBOOT_SFO) $(PSP_EBOOT_ICON)  \
 		$(PSP_EBOOT_ICON1) $(PSP_EBOOT_PIC0) $(PSP_EBOOT_PIC1)  \
 		$(PSP_EBOOT_SND0) NULL $(PSP_EBOOT_PSAR)
-		
+

Modified: scummvm/trunk/backends/platform/psp/README.PSP
===================================================================
--- scummvm/trunk/backends/platform/psp/README.PSP	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/psp/README.PSP	2010-10-12 02:18:11 UTC (rev 53160)
@@ -32,9 +32,9 @@
 Left trigger			- Input numbers/symbols (press to toggle)
 D-Pad					- Select square of characters (up, down, left or right)
 Buttons/Triggers		- Choose a specific character in the square. The four center characters are chosen
-						  by the button in the corresponding position. The 2 top characters are chosen by the 
+						  by the button in the corresponding position. The 2 top characters are chosen by the
 						  triggers.
-Analog					- Moves in a direction (left/right/up/down) (Useful to keep moving 
+Analog					- Moves in a direction (left/right/up/down) (Useful to keep moving
 						  while typing in AGI games among other things)
 
 1st Person Game Mode (Can be ignored by most users)
@@ -49,9 +49,9 @@
 Left/Right Trigger		- Strafe left/right
 D-Pad Left/Right		- Turn left/right
 Square + D-Pad			- F1/F2/F3/F4
-Square + Start			- Esc (shows game menu)		  
+Square + Start			- Esc (shows game menu)
 
-						  
+
 Notes
 =====
 - Notice that you can switch between games! This is much faster than quitting
@@ -61,7 +61,7 @@
 - The PSP version of ScummVM uses the Media Engine to accelerate decoding of MP3 files. This means
   that if you have the choice of compressing using Ogg files or MP3 files, choose MP3 -- the game
   will generally run faster.
-  
+
 - Plugin files are NOT interchangeable between ScummVM versions! You must copy ALL the
   plugin files that come with every version of ScummVM. They sit in the /plugin
   subdirectory. If you get a crash upon startup, try deleting all the existing
@@ -85,7 +85,7 @@
 Q:  Can I run game X with this?
 A:  You can find the list of supported games on the compatibility page
     at http://www.scummvm.org
-    Note that ScummVM is NOT an emulator. The supported games engines have been painstakingly rewritten. 
+    Note that ScummVM is NOT an emulator. The supported games engines have been painstakingly rewritten.
 	It's not easy to add support for a game you want that currently isn't supported.
 
 Q:  My Monkey Island 1 doesn't have any music, what gives?
@@ -128,7 +128,7 @@
 (*) = optional
 
 Once you've installed these libraries (read their README.PSP for instructions),
-create a subdirectory in your ScummVM folder called 'builds/psp'. Then, in this folder, type 
+create a subdirectory in your ScummVM folder called 'builds/psp'. Then, in this folder, type
 '../../configure --host=psp --enable-plugins --default-dynamic'. If everything is installed
 correctly, ScummVM will inform you as it finds the right components. Finally type 'make' to build.
 

Modified: scummvm/trunk/backends/platform/psp/README.PSP.in
===================================================================
--- scummvm/trunk/backends/platform/psp/README.PSP.in	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/psp/README.PSP.in	2010-10-12 02:18:11 UTC (rev 53160)
@@ -32,9 +32,9 @@
 Left trigger			- Input numbers/symbols (press to toggle)
 D-Pad					- Select square of characters (up, down, left or right)
 Buttons/Triggers		- Choose a specific character in the square. The four center characters are chosen
-						  by the button in the corresponding position. The 2 top characters are chosen by the 
+						  by the button in the corresponding position. The 2 top characters are chosen by the
 						  triggers.
-Analog					- Moves in a direction (left/right/up/down) (Useful to keep moving 
+Analog					- Moves in a direction (left/right/up/down) (Useful to keep moving
 						  while typing in AGI games among other things)
 
 1st Person Game Mode (Can be ignored by most users)
@@ -49,9 +49,9 @@
 Left/Right Trigger		- Strafe left/right
 D-Pad Left/Right		- Turn left/right
 Square + D-Pad			- F1/F2/F3/F4
-Square + Start			- Esc (shows game menu)		  
+Square + Start			- Esc (shows game menu)
 
-						  
+
 Notes
 =====
 - Notice that you can switch between games! This is much faster than quitting
@@ -61,7 +61,7 @@
 - The PSP version of ScummVM uses the Media Engine to accelerate decoding of MP3 files. This means
   that if you have the choice of compressing using Ogg files or MP3 files, choose MP3 -- the game
   will generally run faster.
-  
+
 - Plugin files are NOT interchangeable between ScummVM versions! You must copy ALL the
   plugin files that come with every version of ScummVM. They sit in the /plugin
   subdirectory. If you get a crash upon startup, try deleting all the existing
@@ -85,7 +85,7 @@
 Q:  Can I run game X with this?
 A:  You can find the list of supported games on the compatibility page
     at http://www.scummvm.org
-    Note that ScummVM is NOT an emulator. The supported games engines have been painstakingly rewritten. 
+    Note that ScummVM is NOT an emulator. The supported games engines have been painstakingly rewritten.
 	It's not easy to add support for a game you want that currently isn't supported.
 
 Q:  My Monkey Island 1 doesn't have any music, what gives?
@@ -128,7 +128,7 @@
 (*) = optional
 
 Once you've installed these libraries (read their README.PSP for instructions),
-create a subdirectory in your ScummVM folder called 'builds/psp'. Then, in this folder, type 
+create a subdirectory in your ScummVM folder called 'builds/psp'. Then, in this folder, type
 '../../configure --host=psp --enable-plugins --default-dynamic'. If everything is installed
 correctly, ScummVM will inform you as it finds the right components. Finally type 'make' to build.
 

Modified: scummvm/trunk/backends/platform/psp/audio.cpp
===================================================================
--- scummvm/trunk/backends/platform/psp/audio.cpp	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/psp/audio.cpp	2010-10-12 02:18:11 UTC (rev 53160)
@@ -23,10 +23,10 @@
  *
  */
 
-#include <pspthreadman.h> 
+#include <pspthreadman.h>
 #include <pspaudio.h>
- 
-#include "common/scummsys.h" 
+
+#include "common/scummsys.h"
 #include "backends/platform/psp/audio.h"
 
 //#define __PSP_DEBUG_FUNCS__	/* For debugging function calls */
@@ -39,37 +39,37 @@
 	if (_init) {
 		PSP_ERROR("audio device already initialized\n");
 		return true;
-	}		
+	}
 
-	PSP_DEBUG_PRINT("freq[%d], numOfChannels[%d], numOfSamples[%d], callback[%p], userData[%x]\n", 
+	PSP_DEBUG_PRINT("freq[%d], numOfChannels[%d], numOfSamples[%d], callback[%p], userData[%x]\n",
 			freq, numOfChannels, numOfSamples, callback, (uint32)userData);
-	
+
 	numOfSamples = PSP_AUDIO_SAMPLE_ALIGN(numOfSamples);
 	uint32 bufLen = numOfSamples * numOfChannels * NUM_BUFFERS * sizeof(uint16);
-	
+
 	PSP_DEBUG_PRINT("total buffer size[%d]\n", bufLen);
-		
+
 	_buffers[0] = (byte *)memalign(64, bufLen);
 	if (!_buffers[0]) {
 		PSP_ERROR("failed to allocate memory for audio buffers\n");
 		return false;
 	}
 	memset(_buffers[0], 0, bufLen);	// clean the buffer
-	
+
 	// Fill in the rest of the buffer pointers
 	byte *pBuffer = _buffers[0];
 	for (int i = 1; i < NUM_BUFFERS; i++) {
 		pBuffer += numOfSamples * numOfChannels * sizeof(uint16);
 		_buffers[i] = pBuffer;
 	}
-	
+
 	// Reserve a HW channel for our audio
 	_pspChannel = sceAudioChReserve(PSP_AUDIO_NEXT_CHANNEL, numOfSamples, numOfChannels == 2 ? PSP_AUDIO_FORMAT_STEREO : PSP_AUDIO_FORMAT_MONO);
 	if (_pspChannel < 0) {
 		PSP_ERROR("failed to reserve audio channel\n");
 		return false;
 	}
-	
+
 	PSP_DEBUG_PRINT("reserved channel[%d] for audio\n", _pspChannel);
 
 	// Save our data
@@ -80,17 +80,17 @@
 	_userData = userData;
 	_bufferToFill = 0;
 	_bufferToPlay = 0;
-	
+
 	_init = true;
 	_paused = true;	// start in paused mode
-	
+
 	threadCreateAndStart("audioThread", PRIORITY_AUDIO_THREAD, STACK_AUDIO_THREAD);	// start the consumer thread
-	
+
 	return true;
 }
 
 // The real thread function
-void PspAudio::threadFunction() {	
+void PspAudio::threadFunction() {
 	assert(_callback);
 	PSP_DEBUG_PRINT_FUNC("audio thread started\n");
 
@@ -108,12 +108,12 @@
 		PSP_DEBUG_PRINT("filling buffer[%d]\n", _bufferToFill);
 		_callback(_userData, _buffers[_bufferToFill], _bufferSize); // ask mixer to fill in data
 		nextBuffer(_bufferToFill);
-		
+
 		PSP_DEBUG_PRINT("playing buffer[%d].\n", _bufferToPlay);
 		playBuffer();
 		nextBuffer(_bufferToPlay);
 	} // while _init
-	
+
 	// destroy everything
 	free(_buffers[0]);
 	sceAudioChRelease(_pspChannel);
@@ -136,7 +136,7 @@
 		ret = sceAudioOutputBlocking(_pspChannel, PSP_AUDIO_VOLUME_MAX, _buffers[_bufferToPlay]);
 	else
 		ret = sceAudioOutputPannedBlocking(_pspChannel, PSP_AUDIO_VOLUME_MAX, PSP_AUDIO_VOLUME_MAX, _buffers[_bufferToPlay]);
-	
+
 	if (ret < 0) {
 		PSP_ERROR("failed to output audio. Error[%d]\n", ret);
 		return false;
@@ -146,5 +146,5 @@
 
 void PspAudio::close() {
 	PSP_DEBUG_PRINT("close has been called ***************\n");
-	_init = false; 
+	_init = false;
 }

Modified: scummvm/trunk/backends/platform/psp/audio.h
===================================================================
--- scummvm/trunk/backends/platform/psp/audio.h	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/psp/audio.h	2010-10-12 02:18:11 UTC (rev 53160)
@@ -35,9 +35,9 @@
 		FREQUENCY = 44100	/* only frequency we allow */
 	};
 	typedef void (* callbackFunc)(void *userData, byte *samples, int len);	// audio callback to call
-	PspAudio() : _pspChannel(0), 
-			_numOfChannels(0), _numOfSamples(0), _callback(0), 
-			_bufferToPlay(0), _bufferToFill(0), 
+	PspAudio() : _pspChannel(0),
+			_numOfChannels(0), _numOfSamples(0), _callback(0),
+			_bufferToPlay(0), _bufferToFill(0),
 			_init(false), _paused(true) {
 		for (int i=0; i<NUM_BUFFERS; i++)
 			_buffers[i] = 0;
@@ -51,7 +51,7 @@
 	void pause() { _paused = true; }
 	void unpause() { _paused = false; }
 	virtual void threadFunction();	// actual audio thread
-	
+
 private:
 	int _pspChannel;				// chosen hardware output channel
 	uint32 _numOfChannels;			// 1 for mono; 2 for stereo

Modified: scummvm/trunk/backends/platform/psp/display_client.cpp
===================================================================
--- scummvm/trunk/backends/platform/psp/display_client.cpp	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/psp/display_client.cpp	2010-10-12 02:18:11 UTC (rev 53160)
@@ -699,14 +699,14 @@
 	// Save scaled offset on screen
 	float scaledOffsetOnScreenX = scaleSourceToOutputX(_offsetOnScreen.x);
 	float scaledOffsetOnScreenY = scaleSourceToOutputY(_offsetOnScreen.y);
-	
+
 	float imageStartX, imageStartY, imageEndX, imageEndY;
 
 	imageStartX = gapX + scaledOffsetOnScreenX + (scaleSourceToOutputX(_maxTextureOffset.x));
 	imageStartY = gapY + scaledOffsetOnScreenY;
 
 	if (_fullScreen) { // shortcut
-		imageEndX = PSP_SCREEN_WIDTH - gapX + scaledOffsetOnScreenX; 
+		imageEndX = PSP_SCREEN_WIDTH - gapX + scaledOffsetOnScreenX;
 		imageEndY = PSP_SCREEN_HEIGHT - gapY + scaledOffsetOnScreenY; // needed for screen shake
 	} else { /* !fullScreen */
 		imageEndX = imageStartX + scaleSourceToOutputX(_drawSize.width);

Modified: scummvm/trunk/backends/platform/psp/display_manager.cpp
===================================================================
--- scummvm/trunk/backends/platform/psp/display_manager.cpp	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/psp/display_manager.cpp	2010-10-12 02:18:11 UTC (rev 53160)
@@ -128,24 +128,24 @@
 
 void MasterGuRenderer::setupCallbackThread() {
 	DEBUG_ENTER_FUNC();
-	
+
 	// start the thread that updates the display
-	threadCreateAndStart("DisplayCbThread", PRIORITY_DISPLAY_THREAD, STACK_DISPLAY_THREAD);		
+	threadCreateAndStart("DisplayCbThread", PRIORITY_DISPLAY_THREAD, STACK_DISPLAY_THREAD);
 }
 
 // this function gets called by PspThread when starting the new thread
 void MasterGuRenderer::threadFunction() {
 	DEBUG_ENTER_FUNC();
-	
+
 	// Create the callback. It should always get the pointer to MasterGuRenderer
 	_callbackId = sceKernelCreateCallback("Display Callback", guCallback, this);
 	if (_callbackId < 0) {
-		PSP_ERROR("failed to create display callback\n");		
+		PSP_ERROR("failed to create display callback\n");
 	}
-	
+
 	PSP_DEBUG_PRINT("created callback. Going to sleep\n");
 
-	sceKernelSleepThreadCB();	// sleep until we get a callback	
+	sceKernelSleepThreadCB();	// sleep until we get a callback
 }
 
 // This callback is called when the render is finished. It swaps the buffers
@@ -153,12 +153,12 @@
 
 	MasterGuRenderer *_this = (MasterGuRenderer *)__this;
 
-	sceGuSync(0, 0);				// make sure we wait for GU to finish		
+	sceGuSync(0, 0);				// make sure we wait for GU to finish
 	sceDisplayWaitVblankStartCB();	// wait for v-blank without eating main thread cycles
 	sceGuSwapBuffers();				// swap the back and front buffers
 
 	_this->_renderFinished = true;	// Only this thread can set the variable to true
-	
+
 	return 0;
 }
 
@@ -214,7 +214,7 @@
 	DEBUG_ENTER_FUNC();
 
 	_renderFinished = false;	// set to synchronize with callback thread
-	
+
 #ifdef ENABLE_RENDER_MEASURE
 	_lastRenderTime = g_system->getMillis();
 #endif /* ENABLE_RENDER_MEASURE */
@@ -243,7 +243,7 @@
 	else
 		sceKernelNotifyCallback(_callbackId, 0);	// notify the callback. Nothing extra to pass
 #else
-	sceGuSync(0, 0);	
+	sceGuSync(0, 0);
 
 #ifdef ENABLE_RENDER_MEASURE
 	uint32 now = g_system->getMillis();
@@ -253,7 +253,7 @@
 	sceDisplayWaitVblankStart();
 	sceGuSwapBuffers();
 	_renderFinished = true;
-#endif /* !USE_DISPLAY_CALLBACK */	
+#endif /* !USE_DISPLAY_CALLBACK */
 }
 
 void MasterGuRenderer::guShutDown() {
@@ -281,7 +281,7 @@
 #ifdef USE_DISPLAY_CALLBACK
 	_masterGuRenderer.setupCallbackThread();
 #endif
-	
+
 }
 
 void DisplayManager::setSizeAndPixelFormat(uint width, uint height, const Graphics::PixelFormat *format) {
@@ -351,10 +351,10 @@
 		break;
 	case KEEP_ASPECT_RATIO:	{ // maximize the height while keeping aspect ratio
 			float aspectRatio = (float)_displayParams.screenSource.width / (float)_displayParams.screenSource.height;
-			
+
 			_displayParams.screenOutput.height = PSP_SCREEN_HEIGHT;	// always full height
 			_displayParams.screenOutput.width = (uint32)(PSP_SCREEN_HEIGHT * aspectRatio);
-			
+
 			if (_displayParams.screenOutput.width > PSP_SCREEN_WIDTH) // we can't have wider than the screen
 				_displayParams.screenOutput.width = PSP_SCREEN_WIDTH;
 		}
@@ -366,7 +366,7 @@
 	default:
 		PSP_ERROR("Unsupported graphics mode[%d].\n", _graphicsMode);
 	}
-	
+
 	// calculate scale factors for X and Y
 	_displayParams.scaleX = ((float)_displayParams.screenOutput.width) / _displayParams.screenSource.width;
 	_displayParams.scaleY = ((float)_displayParams.screenOutput.height) / _displayParams.screenSource.height;
@@ -381,9 +381,9 @@
 	if (!_masterGuRenderer.isRenderFinished()) {
 		PSP_DEBUG_PRINT("Callback render not finished.\n");
 		return false;	// didn't render
-	}	
+	}
 #endif /* USE_DISPLAY_CALLBACK */
-	
+
 	// This is cheaper than checking time, so we do it first
 	if (!_screen->isDirty() &&
 	        (!_overlay->isDirty()) &&
@@ -393,7 +393,7 @@
 		return true;	// nothing to render
 	}
 
-	if (!isTimeToUpdate()) 
+	if (!isTimeToUpdate())
 		return false;	// didn't render
 
 	PSP_DEBUG_PRINT("screen[%s], overlay[%s], cursor[%s], keyboard[%s]\n",
@@ -425,7 +425,7 @@
 	_keyboard->setClean();
 
 	_masterGuRenderer.guPostRender();
-	
+
 	return true;	// rendered successfully
 }
 

Modified: scummvm/trunk/backends/platform/psp/display_manager.h
===================================================================
--- scummvm/trunk/backends/platform/psp/display_manager.h	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/psp/display_manager.h	2010-10-12 02:18:11 UTC (rev 53160)
@@ -81,7 +81,7 @@
 	void guPostRender();
 	void guShutDown();
 	bool isRenderFinished() { return _renderFinished; }
-	void setupCallbackThread();	
+	void setupCallbackThread();
 private:
 	virtual void threadFunction();			// for the display callback thread
 	static uint32 _displayList[];
@@ -89,7 +89,7 @@
 	void guProgramDisplayBufferSizes();
 	static int guCallback(int, int, void *__this);	// for the display callback
 	bool _renderFinished;					// for sync with render callback
-	int _callbackId;						// to keep track of render callback	
+	int _callbackId;						// to keep track of render callback
 };
 
 class Screen;

Modified: scummvm/trunk/backends/platform/psp/input.cpp
===================================================================
--- scummvm/trunk/backends/platform/psp/input.cpp	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/psp/input.cpp	2010-10-12 02:18:11 UTC (rev 53160)
@@ -50,17 +50,17 @@
 	_ascii = 0;
 	_flag = 0;
 	_pspEventDown.clear();
-	_pspEventUp.clear();	
+	_pspEventUp.clear();
 }
 
-inline bool Button::getEvent(Common::Event &event, PspEvent &pspEvent, bool down) {	
+inline bool Button::getEvent(Common::Event &event, PspEvent &pspEvent, bool down) {
 	if (down) {
 		if (!_pspEventDown.isEmpty())
 			pspEvent = _pspEventDown;
 	} else { // up
 		if (!_pspEventUp.isEmpty())
 			pspEvent = _pspEventUp;
-	}	
+	}
 	if (_key != Common::KEYCODE_INVALID) {
 		event.type = down ? Common::EVENT_KEYDOWN : Common::EVENT_KEYUP;
 		event.kbd.keycode = _key;
@@ -79,19 +79,19 @@
 	_pspEventDown.type = typeDown;
 	_pspEventDown.data = dataDown;
 	_pspEventUp.type = typeUp;
-	_pspEventUp.data = dataUp;	
-}		
+	_pspEventUp.data = dataUp;
+}
 
 // Translates bitfields to our constants
 // We put combined bitfields first to make sure we pick up diagonals
 const uint32 ButtonPad::_buttonMap[] = {
-	PSP_CTRL_UP | PSP_CTRL_LEFT, 
-	PSP_CTRL_UP | PSP_CTRL_RIGHT, 
+	PSP_CTRL_UP | PSP_CTRL_LEFT,
+	PSP_CTRL_UP | PSP_CTRL_RIGHT,
 	PSP_CTRL_DOWN | PSP_CTRL_RIGHT,
 	PSP_CTRL_DOWN | PSP_CTRL_LEFT,
 	PSP_CTRL_RIGHT, PSP_CTRL_DOWN, PSP_CTRL_LEFT, PSP_CTRL_UP,
-	PSP_CTRL_CROSS, PSP_CTRL_CIRCLE, PSP_CTRL_TRIANGLE, PSP_CTRL_SQUARE, 
-	PSP_CTRL_LTRIGGER, PSP_CTRL_RTRIGGER, PSP_CTRL_START, PSP_CTRL_SELECT 
+	PSP_CTRL_CROSS, PSP_CTRL_CIRCLE, PSP_CTRL_TRIANGLE, PSP_CTRL_SQUARE,
+	PSP_CTRL_LTRIGGER, PSP_CTRL_RTRIGGER, PSP_CTRL_START, PSP_CTRL_SELECT
 };
 
 ButtonPad::ButtonPad() : _prevButtonState(0), _shifted(UNSHIFTED), _padMode(PAD_MODE_NORMAL),
@@ -125,7 +125,7 @@
 	DEBUG_ENTER_FUNC();
 	PSP_DEBUG_PRINT("initializing buttons for normal mode\n");
 	clearButtons();
-	
+
 	// Dpad
 	_button[BTN_UP_LEFT][UNSHIFTED].setKey(Common::KEYCODE_KP7, '7');
 	_button[BTN_LEFT][SHIFTED].setKey(Common::KEYCODE_KP7, '7');		// same as up_left
@@ -139,7 +139,7 @@
 	_button[BTN_DOWN][UNSHIFTED].setKey(Common::KEYCODE_KP2, '2');
 	_button[BTN_DOWN_RIGHT][UNSHIFTED].setKey(Common::KEYCODE_KP3, '3');
 	_button[BTN_RIGHT][SHIFTED].setKey(Common::KEYCODE_KP3, '3');		// same as down_right
-	
+
 	// Other buttons
 	_button[BTN_CROSS][UNSHIFTED].setPspEvent(PSP_EVENT_LBUTTON, true, PSP_EVENT_LBUTTON, false);
 	_button[BTN_CIRCLE][UNSHIFTED].setPspEvent(PSP_EVENT_RBUTTON, true, PSP_EVENT_RBUTTON, false);
@@ -153,8 +153,8 @@
 	_button[BTN_RTRIGGER][UNSHIFTED].setKey(Common::KEYCODE_INVALID, 0, Common::KBD_SHIFT);
 	_button[BTN_START][SHIFTED].setKey(Common::KEYCODE_F5, Common::ASCII_F5);
 	_button[BTN_START][UNSHIFTED].setKey(Common::KEYCODE_F5, Common::ASCII_F5, Common::KBD_CTRL);
-	_button[BTN_SELECT][UNSHIFTED].setPspEvent(PSP_EVENT_SHOW_VIRTUAL_KB, true, PSP_EVENT_NONE, 0);			
-}  
+	_button[BTN_SELECT][UNSHIFTED].setPspEvent(PSP_EVENT_SHOW_VIRTUAL_KB, true, PSP_EVENT_NONE, 0);
+}
 
 void ButtonPad::initButtonsLolMode() {
 	DEBUG_ENTER_FUNC();
@@ -166,12 +166,12 @@
 	_button[BTN_SQUARE][UNSHIFTED].setPspEvent(PSP_EVENT_SHIFT, true, PSP_EVENT_SHIFT, false);
 	_button[BTN_SQUARE][SHIFTED].clear();
 	_button[BTN_SQUARE][SHIFTED].setPspEvent(PSP_EVENT_SHIFT, true, PSP_EVENT_SHIFT, false);
-	
+
 	// Dpad
 	_button[BTN_LEFT][UNSHIFTED].clear();
 	_button[BTN_LEFT][UNSHIFTED].setKey(Common::KEYCODE_KP7, '7');
 	_button[BTN_LEFT][SHIFTED].clear();
-	_button[BTN_LEFT][SHIFTED].setKey(Common::KEYCODE_F1, Common::ASCII_F1);	
+	_button[BTN_LEFT][SHIFTED].setKey(Common::KEYCODE_F1, Common::ASCII_F1);
 	_button[BTN_UP][SHIFTED].clear();
 	_button[BTN_UP][SHIFTED].setKey(Common::KEYCODE_F2, Common::ASCII_F2);
 	_button[BTN_RIGHT][UNSHIFTED].clear();
@@ -194,13 +194,13 @@
 
 bool ButtonPad::getEvent(Common::Event &event, PspEvent &pspEvent, SceCtrlData &pad) {
 	DEBUG_ENTER_FUNC();
-	
+
 	//PSP_DEBUG_PRINT("buttons[%x]\n", pad.Buttons);
 
 	uint32 curButtonState = PSP_ALL_BUTTONS & pad.Buttons;	// we only care about these
-	
-	modifyButtonsForCombos(pad);						// change buttons for combos	
-	
+
+	modifyButtonsForCombos(pad);						// change buttons for combos
+
 	return getEventFromButtonState(event, pspEvent, curButtonState);
 }
 
@@ -208,13 +208,13 @@
 	DEBUG_ENTER_FUNC();
 	_buttonsChanged[_shifted] |= buttonState ^ _prevButtonState;	// add any buttons that changed
 	_prevButtonState = buttonState;
-	
+
 	for (int shiftState = UNSHIFTED; shiftState < SHIFTED_MODE_LAST; shiftState++) {
 		if (_buttonsChanged[shiftState]) {	// any button to address?
 			PSP_DEBUG_PRINT("found changed buttons\n");
-			ButtonType buttonType = BTN_LAST; 
+			ButtonType buttonType = BTN_LAST;
 			bool buttonDown = false;		// normally we release a button (as in when we're in a different shiftmode)
-		
+
 			for (int i = BTN_UP_LEFT; i < BTN_LAST; i++) {
 				uint32 buttonCode = _buttonMap[i];
 				if ((_buttonsChanged[shiftState] & buttonCode) == buttonCode) { // check for this changed button
@@ -222,23 +222,23 @@
 					_buttonsChanged[shiftState] &= ~buttonCode;	// save the fact that we treated this button
 					if (shiftState == _shifted)
 						buttonDown = buttonState & buttonCode ? true : false; // pressed or released?
-					
-					PSP_DEBUG_PRINT("button[%i] pressed\n", i);	
+
+					PSP_DEBUG_PRINT("button[%i] pressed\n", i);
 					break;
 				}
 			}
-			
+
 			assert (buttonType < BTN_LAST);
 			bool haveEvent = _button[buttonType][shiftState].getEvent(event, pspEvent, buttonDown);
 			if (haveEvent)
 				PSP_DEBUG_PRINT("have event. key[%d] flag[%x] %s\n", event.kbd.ascii, event.kbd.flags, buttonDown ? "down" : "up");
 			return haveEvent;
 		}
-	}	
-	
+	}
+
 	return false;
 }
-	
+
 void ButtonPad::modifyButtonsForCombos(SceCtrlData &pad) {
 	if (DOWN(PSP_CTRL_RTRIGGER | PSP_CTRL_LTRIGGER)) {
 		if (!_comboMode) {  // we're entering combo mode
@@ -262,24 +262,24 @@
 			initButtons();		// reset the button configuration
 			_comboMode = false;
 		}
-	}	
+	}
 }
-	
+
 bool Nub::getEvent(Common::Event &event, PspEvent &pspEvent, SceCtrlData &pad) {
 	DEBUG_ENTER_FUNC();
-	
+
 	if (_dpadMode) {	// Convert the nub to a D-Pad
 		uint32 buttonState;
 		translateToDpadState(pad.Lx, pad.Ly, buttonState);
 		return _buttonPad.getEventFromButtonState(event, pspEvent, buttonState);
 	}
-	
+
 	int32 analogStepX = pad.Lx;		// Goes up to 255.
 	int32 analogStepY = pad.Ly;
 
 	analogStepX = modifyNubAxisMotion(analogStepX);
 	analogStepY = modifyNubAxisMotion(analogStepY);
-	
+
 	int32 oldX = _cursor->getX();
 	int32 oldY = _cursor->getY();
 
@@ -316,7 +316,7 @@
 			event.mouse.x = newX;
 			event.mouse.y = newY;
 			PSP_DEBUG_PRINT("Nub event. X[%d], Y[%d]\n", newX, newY);
-			return true;			
+			return true;
 		}
 	}
 	return false;
@@ -325,12 +325,12 @@
 void Nub::translateToDpadState(int dpadX, int dpadY, uint32 &buttonState) {
 	#define MIN_NUB_POSITION 70
 	buttonState = 0;
-	
+
 	if (dpadX > 127 + MIN_NUB_POSITION)
 		buttonState |= PSP_CTRL_RIGHT;
 	else if (dpadX < 127 - MIN_NUB_POSITION)
 		buttonState |= PSP_CTRL_LEFT;
-	
+
 	if (dpadY > 127 + MIN_NUB_POSITION)
 		buttonState |= PSP_CTRL_DOWN;
 	else if (dpadY < 127 - MIN_NUB_POSITION)
@@ -353,11 +353,11 @@
 	return input;
 }
 
-inline bool Nub::isButtonDown() { 
+inline bool Nub::isButtonDown() {
 	if (_dpadMode) 		// only relevant in dpad mode
 		return _buttonPad.isButtonDown();
 	return false;
-}	
+}
 
 const char *InputHandler::_padModeText[] = {
 	"Normal Button Mode",
@@ -367,7 +367,7 @@
 void InputHandler::init() {
 	sceCtrlSetSamplingCycle(0);	// set sampling to vsync. n = n usecs
 	sceCtrlSetSamplingMode(1);  // analog
-	
+
 	_buttonPad.initButtons();
 }
 
@@ -386,7 +386,7 @@
 
 	bool haveEvent;
 	//memset(&event, 0, sizeof(event));
-	
+
 	haveEvent = getEvent(event, pad);
 
 	if (haveEvent) {
@@ -407,7 +407,7 @@
 	} else {	// only process buttonpad if keyboard invisible
 		haveEvent = _buttonPad.getEvent(event, pspEvent, pad);
 	}
-	
+
 	if (!haveEvent && pspEvent.isEmpty())
 		haveEvent = _nub.getEvent(event, pspEvent, pad);
 
@@ -417,20 +417,20 @@
 			pspEvent = _pendingPspEvent;
 			_pendingPspEvent.clear();
 		}
-	}	
-	
+	}
+
 	// handle any PSP events we might have
 	if (!pspEvent.isEmpty())
 		haveEvent |= handlePspEvent(event, pspEvent);	// overrides any event we might have
-		
+
 	return haveEvent;
 }
 
 bool InputHandler::handlePspEvent(Common::Event &event, PspEvent &pspEvent) {
 	bool haveEvent = false;
-	
+
 	PSP_DEBUG_PRINT("have pspEvent[%d] data[%d]\n", pspEvent.type, pspEvent.data);
-	
+
 	switch (pspEvent.type) {
 	case PSP_EVENT_SHIFT:
 		handleShiftEvent((ShiftMode)pspEvent.data);
@@ -449,11 +449,11 @@
 		break;
 	case PSP_EVENT_RBUTTON:
 		haveEvent = true;
-		if (pspEvent.data) // down	
+		if (pspEvent.data) // down
 			handleMouseEvent(event, Common::EVENT_RBUTTONDOWN, "RButtonDown");
 		else
 			handleMouseEvent(event, Common::EVENT_RBUTTONUP, "RButtonUp");
-		break;	
+		break;
 	case PSP_EVENT_MODE_SWITCH:
 		handleModeSwitchEvent();
 		break;
@@ -464,7 +464,7 @@
 		PSP_ERROR("Unhandled PSP Event[%d]\n", pspEvent.type);
 		break;
 	}
-	
+
 	return haveEvent;
 }
 
@@ -490,10 +490,10 @@
 		_padMode = (PspPadMode)(_padMode + 1);
 		if (_padMode >= PAD_MODE_LAST)
 			_padMode = PAD_MODE_NORMAL;
-		
+
 		GUI::TimedMessageDialog dialog(_padModeText[_padMode], 1500);
 		dialog.runModal();
-		
+
 		_buttonPad.setPadMode(_padMode);
 		_buttonPad.initButtons();
 	}
@@ -502,10 +502,10 @@
 /*
 void InputHandler::handleSpeedChange(bool up) {
 	char *dialogMsg;
-	
+
 	if (up) {
 		dialogMsg = "
-	
+
 	GUI::TimedMessageDialog dialog(_padModeText[_padMode], 1500);
 	dialog.runModal();
 }*/

Modified: scummvm/trunk/backends/platform/psp/input.h
===================================================================
--- scummvm/trunk/backends/platform/psp/input.h	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/psp/input.h	2010-10-12 02:18:11 UTC (rev 53160)
@@ -48,11 +48,11 @@
 	PspEventType type;
 	uint32 data;
 	PspEvent() { clear(); }
-	void clear() { 
+	void clear() {
 		type = PSP_EVENT_NONE;
 		data = 0;
 	}
-	bool isEmpty() { return type == PSP_EVENT_NONE; }	
+	bool isEmpty() { return type == PSP_EVENT_NONE; }
 };
 
 enum PspPadMode {
@@ -75,7 +75,7 @@
 	uint32 _flag;
 	PspEvent _pspEventDown;	// event when we press
 	PspEvent _pspEventUp;	// event when we release
-public:	
+public:
 	Button();
 	void clear();
 	bool getEvent(Common::Event &event, PspEvent &pspEvent, bool buttonDown);
@@ -105,7 +105,7 @@
 		BTN_LAST
 	};
 
-private:	
+private:
 	Button _button[BTN_LAST][SHIFTED_MODE_LAST];
 	uint32 _buttonsChanged[SHIFTED_MODE_LAST];		// normal and shifted
 	uint32 _prevButtonState;
@@ -128,7 +128,7 @@
 	bool isButtonDown() { return _prevButtonState; }
 	void initButtons();
 };
-	
+
 class Nub {
 private:
 	Cursor *_cursor;		// to enable changing/getting cursor position
@@ -137,35 +137,35 @@
 	ShiftMode _shifted;
 	bool _dpadMode;
 
-public:	
+public:
 	Nub() : _shifted(UNSHIFTED), _dpadMode(false) { _buttonPad.initButtons(); }
 
-	void setCursor(Cursor *cursor) { _cursor = cursor; }	
+	void setCursor(Cursor *cursor) { _cursor = cursor; }
 	void setDpadMode(bool active) { _dpadMode = active; }
 	void setShifted(ShiftMode shifted) { _shifted = shifted; }
 	bool isButtonDown();
-	
+
 	bool getEvent(Common::Event &event, PspEvent &pspEvent, SceCtrlData &pad);
 	int32 modifyNubAxisMotion(int32 input);
 	void translateToDpadState(int dpadX, int dpadY, uint32 &buttonState);	// convert nub data to dpad data
-};	
+};
 
 class InputHandler {
 public:
 	InputHandler() : _keyboard(0), _cursor(0), _padMode(PAD_MODE_NORMAL), _lastPadCheckTime(0) {}
 	void setKeyboard(PSPKeyboard *keyboard) { _keyboard = keyboard; }
 	void setCursor(Cursor *cursor) { _cursor = cursor; _nub.setCursor(cursor); }
-	
-	void init();	
+
+	void init();
 	bool getAllInputs(Common::Event &event);
-	
+
 private:
 	PSPKeyboard *_keyboard;
 	Cursor *_cursor;
-	
-	Nub _nub;	
+
+	Nub _nub;
 	ButtonPad _buttonPad;
-	
+
 	PspPadMode _padMode;				// whice mode we're in
 	PspEvent _pendingPspEvent;			// an event that can't be handled yet
 	uint32	_lastPadCheckTime;

Modified: scummvm/trunk/backends/platform/psp/memory.cpp
===================================================================
--- scummvm/trunk/backends/platform/psp/memory.cpp	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/psp/memory.cpp	2010-10-12 02:18:11 UTC (rev 53160)
@@ -49,29 +49,29 @@
 
 	// align the destination pointer first
 	uint32 prefixDst = (((uint32)dst) & 0x3);
-	
+
 	if (prefixDst) {
-		prefixDst = 4 - prefixDst;				// prefix only if we have address % 4 != 0	
+		prefixDst = 4 - prefixDst;				// prefix only if we have address % 4 != 0
 		PSP_DEBUG_PRINT("prefixDst[%d]\n", prefixDst);
 
 		bytes -= prefixDst;						// remember we assume bytes >= 4
-		
+
 		if (bytes < MIN_AMOUNT_FOR_COMPLEX_COPY) {	// check if it's worthwhile to continue
 			copy8(dst, src, bytes + prefixDst);
 #ifdef TEST_MEMORY_COPY
 			testCopy(debugDst, debugSrc, debugBytes);
-#endif		
+#endif
 			return;
 		}
-		
+
 		while (prefixDst--) {
 			*dst++ = *src++;
-		}		
+		}
 	}
-	
+
 	// check the source pointer alignment now
 	uint32 alignSrc = (((uint32)src) & 0x3);
-	
+
 	if (alignSrc) {						// we'll need to realign our reads
 		copy32Misaligned((uint32 *)dst, src, bytes, alignSrc);
 	} else {
@@ -80,14 +80,14 @@
 
 #ifdef TEST_MEMORY_COPY
 	testCopy(debugDst, debugSrc, debugBytes);
-#endif		
+#endif
 }
 
 void PspMemory::copy32Aligned(uint32 *dst32, const uint32 *src32, uint32 bytes) {
 	PSP_DEBUG_PRINT("copy32Aligned(): dst32[%p], src32[%p], bytes[%d]\n", dst32, src32, bytes);
 
 	int words8 = bytes >> 5;
-	
+
 	// try blocks of 8 words at a time
 	if (words8) {
 		while (words8--) {
@@ -110,11 +110,11 @@
 			dst32[7] = d;
 			dst32 += 8;
 			src32 += 8;
-		}				
+		}
 	}
-	
+
 	int words4 = (bytes & 0x1F) >> 4;
-	
+
 	// try blocks of 4 words at a time
 	if (words4) {
 		uint32 a, b, c, d;
@@ -129,10 +129,10 @@
 		dst32 += 4;
 		src32 += 4;
 	}
-	
+
 	int bytesLeft = (bytes & 0xF);	// only look at bytes left after we did the above
 	int wordsLeft = bytesLeft >> 2;
-	
+
 	// now just do single words
 	while (wordsLeft) {
 		*dst32++ = *src32++;
@@ -145,7 +145,7 @@
 
 	byte *dst = (byte *)dst32;
 	byte *src = (byte *)src32;
-	
+
 	while (bytesLeft--) {
 		*dst++ = *src++;
 	}
@@ -155,10 +155,10 @@
 // Assume dst is aligned
 void PspMemory::copy32Misaligned(uint32 *dst32, const byte *src, uint32 bytes, uint32 alignSrc) {
 	PSP_DEBUG_PRINT("copy32Misaligned: dst32[%p], src[%p], bytes[%d], alignSrc[%d]\n", dst32, src, bytes, alignSrc);
-	
+
 	uint32 *src32 = (uint32 *)(((uint32)src) & 0xFFFFFFFC);	// remove misalignment
 	uint32 shiftValue, lastShiftValue;
-	
+
 	switch (alignSrc) {
 	case 1:
 		shiftValue = 8;
@@ -178,9 +178,9 @@
 
 	// Try to do groups of 4 words
 	uint32 words4 = bytes >> 4;
-	
+
 	srcWord = *src32;		// preload 1st word so we read ahead
-	
+
 	for (; words4; words4--) {
 		dstWord = srcWord >> shiftValue;
 		srcWord = src32[1];
@@ -201,12 +201,12 @@
 		src32 += 4;
 		dst32 += 4;
 	}
-	
+
 	uint32 words = (bytes & 0xF) >> 2;	// now get remaining words
-	
+
 	// we read one word ahead of what we write
 	// setup the first read
-	
+
 	for (; words ;words--) {
 		dstWord = srcWord >> shiftValue;
 		srcWord = src32[1];				// we still go one ahead
@@ -214,9 +214,9 @@
 		dstWord |= srcWord << lastShiftValue;
 		*dst32++ = dstWord;
 	}
-	
+
 	uint32 bytesLeft = bytes & 3;	// and remaining bytes
-		
+
 	if (bytesLeft) {
 		byte *dst8 = (byte *)dst32;
 		byte *src8 = ((byte *)src32) + ((uint32)src & 0x3);	// get exact location we should be at
@@ -228,7 +228,7 @@
 }
 
 void PspMemory::testCopy(const byte *debugDst, const byte *debugSrc, uint32 debugBytes) {
-	
+
 	bool mismatch = false;
 	PSP_INFO_PRINT("testing fastCopy...");
 
@@ -246,10 +246,10 @@
 		PSP_INFO_PRINT("\n");
 	} else {
 		PSP_INFO_PRINT("ok\n");
-	}	
+	}
 }
 
-// 
+//
 // used to swap red and blue
 void PspMemorySwap::swap(uint16 *dst16, const uint16 *src16, uint32 bytes, PSPPixelFormat &format) {
 	DEBUG_ENTER_FUNC();
@@ -258,45 +258,45 @@
 	uint32 debugBytes = bytes;
 	const uint16 *debugDst = dst16, *debugSrc = src16;
 #endif
-	
+
 	// align the destination pointer first
 	uint32 prefixDst = (((uint32)dst16) & 0x3);	// for swap, we can only have 2 or 0 as our prefix
-	
+
 	if (prefixDst) {
 		bytes -= prefixDst;						// remember we assume bytes > 4
 		*dst16++ = format.swapRedBlue16(*src16++);
-		
+
 		if (bytes < MIN_AMOUNT_FOR_COMPLEX_COPY) { // check if it's worthwhile to continue
 			swap16(dst16, src16, bytes, format);
 
 #ifdef TEST_MEMORY_COPY
 			testSwap(debugDst, debugSrc, debugBytes, format);
-#endif		
+#endif
 			return;
 		}
 	}
-	
+
 	// check the source pointer alignment now
 	uint32 alignSrc = (((uint32)src16) & 0x3);
-	
+
 	if (alignSrc) {						// we'll need to realign our reads
 		PSP_DEBUG_PRINT("misaligned copy of %u bytes from %p to %p\n", bytes, src16, dst16);
 		swap32Misaligned((uint32 *)dst16, src16, bytes, format);
 	} else {
 		swap32Aligned((uint32 *)dst16, (const uint32 *)src16, bytes, format);
 	}
-	
+
 #ifdef TEST_MEMORY_COPY
 	testSwap(debugDst, debugSrc, debugBytes, format);
-#endif		
-	
+#endif
+
 }
 
 void PspMemorySwap::testSwap(const uint16 *debugDst, const uint16 *debugSrc, uint32 debugBytes, PSPPixelFormat &format) {
-	
+
 	bool mismatch = false;
 	PSP_INFO_PRINT("testing fastSwap...");
-	
+
 	uint32 shorts = debugBytes >> 1;
 
 	for (uint32 i = 0; i < shorts; i++) {
@@ -313,13 +313,13 @@
 		PSP_INFO_PRINT("\n");
 	} else {
 		PSP_INFO_PRINT("ok\n");
-	}	
+	}
 }
 
 void PspMemorySwap::swap32Aligned(uint32 *dst32, const uint32 *src32, uint32 bytes, PSPPixelFormat &format) {
 	DEBUG_ENTER_FUNC();
 	int words4 = bytes >> 4;
-	
+
 	// try blocks of 4 words at a time
 	while (words4--) {
 		uint32 a, b, c, d;
@@ -337,14 +337,14 @@
 
 	uint32 bytesLeft = bytes & 0xF;
 	uint32 words = bytesLeft >> 2;
-	
+
 	// now just do words
 	while (words--) {
 		*dst32++ = format.swapRedBlue32(*src32++);
-	}	
+	}
 
 	bytesLeft = bytes & 0x3;
-	
+
 	if (bytesLeft) {	// for swap, can only be 1 short left
 		*((uint16 *)dst32) = format.swapRedBlue16(*((uint16 *)src32));
 	}
@@ -357,7 +357,7 @@
 
 	const uint32 shiftValue = 16;
 	uint32 *src32 = (uint32 *)(((uint32)src16) & 0xFFFFFFFC);	// remove misalignment
-	
+
 	// Try to do groups of 4 words
 	uint32 words4 = bytes >> 4;
 	uint32 srcWord = src32[0];	// preload
@@ -382,15 +382,15 @@
 		src32 += 4;
 		dst32 += 4;
 	}
-	
+
 	uint32 words = (bytes & 0xF) >> 2;
-	
+
 	// we read one word ahead of what we write
 	// setup the first read
 	if (words) {
 		//srcWord = *src32++;	// don't need this. already loaded
 		src32++;	// we already have the value loaded in
-		
+
 		while (words--) {
 			uint32 dstWord = srcWord >> shiftValue;
 			srcWord = *src32++;
@@ -398,9 +398,9 @@
 			*dst32++ = format.swapRedBlue32(dstWord);
 		}
 	}
-	
+
 	uint32 bytesLeft = bytes & 3;
-	
+
 	if (bytesLeft) {	// for swap, can only be 1 short left
 		*((uint16 *)dst32) = format.swapRedBlue16((uint16)(srcWord >> shiftValue));
 	}

Modified: scummvm/trunk/backends/platform/psp/memory.h
===================================================================
--- scummvm/trunk/backends/platform/psp/memory.h	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/psp/memory.h	2010-10-12 02:18:11 UTC (rev 53160)
@@ -40,7 +40,7 @@
 	asm volatile ("lwr %0,0(%1)\n\t"
 		 "lwl %0,3(%1)\n\t"
 		 : "=&r" (data) : "r" (src), "m" (*src));
-		 
+
 	asm volatile ("swr %1,0(%2)\n\t"
 		 "swl %1,3(%2)\n\t"
 		 : "=m" (*dst) : "r" (data), "r" (dst));
@@ -55,7 +55,7 @@
 	static void copy(byte *dst, const byte *src, uint32 bytes);
 	static void copy32Aligned(uint32 *dst32, const uint32 *src32, uint32 bytes);
 	static void copy32Misaligned(uint32 *dst32, const byte *src, uint32 bytes, uint32 alignSrc);
-	
+
 	static inline void copy8(byte *dst, const byte *src, int32 bytes) {
 		//PSP_DEBUG_PRINT("copy8 called with dst[%p], src[%p], bytes[%d]\n", dst, src, bytes);
 		uint32 words = bytes >> 2;
@@ -71,18 +71,18 @@
 		}
 	}
 
-public:	
+public:
 	// This is the interface to the outside world
 	static void *fastCopy(void *dstv, const void *srcv, int32 bytes) {
 		byte *dst = (byte *)dstv;
 		byte *src = (byte *)srcv;
-		
+
 		if (bytes < MIN_AMOUNT_FOR_COMPLEX_COPY) {
 			copy8(dst, src, bytes);
 		} else {	// go to more powerful copy
 			copy(dst, src, bytes);
 		}
-		
+
 		return dstv;
 	}
 };

Modified: scummvm/trunk/backends/platform/psp/mp3.cpp
===================================================================
--- scummvm/trunk/backends/platform/psp/mp3.cpp	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/psp/mp3.cpp	2010-10-12 02:18:11 UTC (rev 53160)
@@ -38,13 +38,13 @@
 #include <pspsysmem.h>
 #include <pspmodulemgr.h>
 #include <psputility_avmodules.h>
-#include <mad.h> 
+#include <mad.h>
 #include "backends/platform/psp/mp3.h"
 
 //#define DISABLE_PSP_MP3		// to make us use the regular MAD decoder instead
 
 //#define __PSP_DEBUG_FUNCS__	/* For debugging the stack */
-//#define __PSP_DEBUG_PRINT__ 
+//#define __PSP_DEBUG_PRINT__
 #include "backends/platform/psp/trace.h"
 
 //#define PRINT_BUFFERS	/* to debug MP3 buffers */
@@ -77,7 +77,7 @@
 
 bool Mp3PspStream::initDecoder() {
 	DEBUG_ENTER_FUNC();
-	
+
 	if (_decoderInit) {
 		PSP_ERROR("Already initialized!");
 		return true;
@@ -97,15 +97,15 @@
 			PSP_ERROR("failed to load audiocodec.prx. ME cannot start.\n");
 			_decoderFail = true;
 			return false;
-		}	
-    } else {		
+		}
+    } else {
         if (sceUtilityLoadAvModule(PSP_AV_MODULE_AVCODEC) < 0) {
 			PSP_ERROR("failed to load AVCODEC module. ME cannot start.\n");
 			_decoderFail = true;
 			return false;
 		}
 	}
-	
+
 	PSP_DEBUG_PRINT("Using PSP's ME for MP3\n");	// important to know this is happening
 
 	_decoderInit = true;
@@ -114,10 +114,10 @@
 
 bool Mp3PspStream::stopDecoder() {
 	DEBUG_ENTER_FUNC();
-	
+
 	if (!_decoderInit)
 		return true;
-		
+
 	// Based on PSP firmware version, we need to do different things to do Media Engine processing
     if (sceKernelDevkitVersion() == 0x01050001){  // TODO: how do we unload?
 /*      if (!unloadAudioModule("flash0:/kd/me_for_vsh.prx", PSP_MEMORY_PARTITION_KERNEL) ||
@@ -130,10 +130,10 @@
         if (sceUtilityUnloadModule(PSP_MODULE_AV_AVCODEC) < 0) {
 			PSP_ERROR("failed to unload avcodec module\n");
 			return false;
-		}	
+		}
 	}
-		
-	_decoderInit = false;	
+
+	_decoderInit = false;
 	return true;
 }
 
@@ -176,27 +176,27 @@
 	_length(0, 1000),
 	_sampleRate(0),
 	_totalTime(mad_timer_zero) {
-	
+
 	DEBUG_ENTER_FUNC();
 
 	assert(_decoderInit);	// must be initialized by now
-	
+
 	// let's leave the buffer guard -- who knows, it may be good?
 	memset(_buf, 0, sizeof(_buf));
 	memset(_codecInBuffer, 0, sizeof(_codecInBuffer));
-	
+
 	initStream();	// init needed stuff for the stream
 
 	findValidHeader();	// get a first header so we can read basic stuff
-	
+
 	_sampleRate = _header.samplerate;	// copy it before it gets destroyed
 	_stereo = (MAD_NCHANNELS(&_header) == 2);
-		
+
 	while (_state != MP3_STATE_EOS)
 		findValidHeader();	// get a first header so we can read basic stuff
-	
+
 	_length = Timestamp(mad_timer_count(_totalTime, MAD_UNITS_MILLISECONDS), getRate());
-	
+
 	deinitStream();
 
 	_state = MP3_STATE_INIT;
@@ -222,7 +222,7 @@
 
 	// Read the first few sample bytes into the buffer
 	readMP3DataIntoBuffer();
-	
+
 	return true;
 }
 
@@ -230,7 +230,7 @@
 	// The following will eventually go into the thread
 
 	memset(_codecParams, 0, sizeof(_codecParams));
-	
+
 	// Init the MP3 hardware
 	int ret = 0;
 	ret = sceAudiocodecCheckNeedMem(_codecParams, 0x1002);
@@ -245,22 +245,22 @@
 		return false;
 	}
 	PSP_DEBUG_PRINT("sceAudioCodecGetEDRAM returned %d\n", ret);
-	
+
 	PSP_DEBUG_PRINT("samplerate[%d]\n", _sampleRate);
 	_codecParams[10] = _sampleRate;
-	
+
 	ret = sceAudiocodecInit(_codecParams, 0x1002);
 	if (ret < 0) {
 		PSP_ERROR("failed to init MP3 ME module. sceAudiocodecInit returned 0x%x.\n", ret);
 		return false;
 	}
-	
+
 	return true;
 }
 
 Mp3PspStream::~Mp3PspStream() {
 	DEBUG_ENTER_FUNC();
-	
+
 	deinitStream();
 	releaseStreamME(); 	// free the memory used for this stream
 
@@ -277,17 +277,17 @@
 	// Deinit MAD
 	mad_header_finish(&_header);
 	mad_stream_finish(&_stream);
-	
+
 	_state = MP3_STATE_EOS;
 }
 
 void Mp3PspStream::releaseStreamME() {
 	sceAudiocodecReleaseEDRAM(_codecParams);
-}	
+}
 
 void Mp3PspStream::decodeMP3Data() {
 	DEBUG_ENTER_FUNC();
-	
+
 	do {
 		if (_state == MP3_STATE_INIT) {
 			initStream();
@@ -296,17 +296,17 @@
 
 		if (_state == MP3_STATE_EOS)
 			return;
-			
+
 		findValidHeader();	// seach for next valid header
 
 		while (_state == MP3_STATE_READY) {	// not a real 'while'. Just for easy flow
 			_stream.error = MAD_ERROR_NONE;
 
 			uint32 frame_size = _stream.next_frame - _stream.this_frame;
-			
-			updatePcmLength(); // Retrieve the number of PCM samples. 
+
+			updatePcmLength(); // Retrieve the number of PCM samples.
 							   // We seem to change this, so it needs to be dynamic
-						
+
 			PSP_DEBUG_PRINT("MP3 frame size[%d]. pcmLength[%d]\n", frame_size, _pcmLength);
 
 			memcpy(_codecInBuffer, _stream.this_frame, frame_size);	// we need it aligned
@@ -316,7 +316,7 @@
 			_codecParams[8] = (unsigned long)_pcmSamples;
 			_codecParams[7] = frame_size;
 			_codecParams[9] = _pcmLength * 2;	// x2 for stereo, though this one's not so important
-			
+
 			// debug
 #ifdef PRINT_BUFFERS
 			PSP_DEBUG_PRINT("mp3 frame:\n");
@@ -419,7 +419,7 @@
 	// Important to release and re-init the ME
 	releaseStreamME();
 	initStreamME();
-	
+
 	// Check if we need to rewind
 	if (_state != MP3_STATE_READY || mad_timer_compare(destination, _totalTime) < 0) {
 		initStream();
@@ -473,38 +473,38 @@
 	DEBUG_ENTER_FUNC();
 
 	int samples = 0;
-#ifdef PRINT_BUFFERS	
+#ifdef PRINT_BUFFERS
 	int16 *debugBuffer = buffer;
-#endif	
-	
+#endif
+
 	// Keep going as long as we have input available
 	while (samples < numSamples && _state != MP3_STATE_EOS) {
 		const int len = MIN(numSamples, samples + (int)(_pcmLength - _posInFrame) * MAD_NCHANNELS(&_header));
-		
+
 		while (samples < len) {
 			*buffer++ = _pcmSamples[_posInFrame << 1];
 			samples++;
 			if (MAD_NCHANNELS(&_header) == 2) {
 				*buffer++ = _pcmSamples[(_posInFrame << 1) + 1];
 				samples++;
-			} 
+			}
 			_posInFrame++;	// always skip an extra sample since ME always outputs stereo
 		}
-		
+
 		if (_posInFrame >= _pcmLength) {
 			// We used up all PCM data in the current frame -- read & decode more
 			decodeMP3Data();
 		}
 	}
-	
+
 #ifdef PRINT_BUFFERS
 		PSP_INFO_PRINT("buffer:\n");
 		for (int i = 0; i<numSamples; i++)
 			PSP_INFO_PRINT("%d ", debugBuffer[i]);
 		PSP_INFO_PRINT("\n\n");
-#endif		
-	
+#endif
+
 	return samples;
 }
 
-} // End of namespace Audio
\ No newline at end of file
+} // End of namespace Audio

Modified: scummvm/trunk/backends/platform/psp/mp3.h
===================================================================
--- scummvm/trunk/backends/platform/psp/mp3.h	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/psp/mp3.h	2010-10-12 02:18:11 UTC (rev 53160)
@@ -53,9 +53,9 @@
 
 	Common::SeekableReadStream *_inStream;
 	DisposeAfterUse::Flag _disposeAfterUse;
-	
+
 	uint32 _pcmLength;		// how many pcm samples we have for this type of file (x2 this for stereo)
-	
+
 	uint _posInFrame;		// position in frame
 	State _state;			// what state the stream is in
 
@@ -66,17 +66,17 @@
 	mad_timer_t _totalTime;
 	mad_stream _stream;		//
 	mad_header _header;		// This is all we need from libmad
-	
+
 	static bool _decoderInit;	// has the decoder been initialized
 	static bool _decoderFail;	// has the decoder failed to load
-	
+
 	enum {
 		BUFFER_SIZE = 5 * 8192
 	};
 
 	// This buffer contains a slab of input data
 	byte _buf[BUFFER_SIZE + MAD_BUFFER_GUARD];
-	
+
 	void decodeMP3Data();
 	void readMP3DataIntoBuffer();
 
@@ -85,19 +85,19 @@
 	void findValidHeader();
 	void deinitStream();
 	void updatePcmLength();
-	
+
 	// to init and uninit ME decoder
 	static bool initDecoder();
 	static bool stopDecoder();
-	
+
 	// ME functions for stream
 	bool initStreamME();
 	void releaseStreamME();
-	
+
 public:
 	Mp3PspStream(Common::SeekableReadStream *inStream, DisposeAfterUse::Flag dispose);
 	~Mp3PspStream();
-	
+
 	// This function avoids having to create streams when it's not possible
 	static inline bool isOkToCreateStream() {
 		if (_decoderFail)			// fatal failure
@@ -105,7 +105,7 @@
 		if (!_decoderInit)			// if we're not initialized
 			if (!initDecoder())		// check if we failed init
 				return false;
-		return true;	
+		return true;
 	}
 
 	int readBuffer(int16 *buffer, const int numSamples);

Modified: scummvm/trunk/backends/platform/psp/osys_psp.cpp
===================================================================
--- scummvm/trunk/backends/platform/psp/osys_psp.cpp	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/psp/osys_psp.cpp	2010-10-12 02:18:11 UTC (rev 53160)
@@ -67,7 +67,7 @@
 
 	// Instantiate real time clock
 	PspRtc::instance();
-	
+
 	_cursor.enableCursorPalette(false);
 	_cursor.setXY(PSP_SCREEN_WIDTH >> 1, PSP_SCREEN_HEIGHT >> 1);	// Mouse in the middle of the screen
 
@@ -148,7 +148,7 @@
 
 void OSystem_PSP::initSize(uint width, uint height, const Graphics::PixelFormat *format) {
 	DEBUG_ENTER_FUNC();
-	_pendingUpdate = false;	
+	_pendingUpdate = false;
 	_displayManager.setSizeAndPixelFormat(width, height, format);
 
 	_cursor.setVisible(false);
@@ -167,7 +167,7 @@
 
 void OSystem_PSP::setPalette(const byte *colors, uint start, uint num) {
 	DEBUG_ENTER_FUNC();
-	_pendingUpdate = false;	
+	_pendingUpdate = false;
 	_screen.setPartialPalette(colors, start, num);
 	_cursor.setScreenPalette(colors, start, num);
 	_cursor.clearKeyColor();
@@ -175,7 +175,7 @@
 
 void OSystem_PSP::setCursorPalette(const byte *colors, uint start, uint num) {
 	DEBUG_ENTER_FUNC();
-	_pendingUpdate = false;	
+	_pendingUpdate = false;
 	_cursor.setCursorPalette(colors, start, num);
 	_cursor.enableCursorPalette(true);
 	_cursor.clearKeyColor();	// Do we need this?
@@ -183,25 +183,25 @@
 
 void OSystem_PSP::disableCursorPalette(bool disable) {
 	DEBUG_ENTER_FUNC();
-	_pendingUpdate = false;	
+	_pendingUpdate = false;
 	_cursor.enableCursorPalette(!disable);
 }
 
 void OSystem_PSP::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) {
 	DEBUG_ENTER_FUNC();
-	_pendingUpdate = false;	
+	_pendingUpdate = false;
 	_screen.copyFromRect(buf, pitch, x, y, w, h);
 }
 
 Graphics::Surface *OSystem_PSP::lockScreen() {
 	DEBUG_ENTER_FUNC();
-	_pendingUpdate = false;	
+	_pendingUpdate = false;
 	return _screen.lockAndGetForEditing();
 }
 
 void OSystem_PSP::unlockScreen() {
 	DEBUG_ENTER_FUNC();
-	_pendingUpdate = false;	
+	_pendingUpdate = false;
 	// The screen is always completely updated anyway, so we don't have to force a full update here.
 	_screen.unlock();
 }
@@ -219,7 +219,7 @@
 
 void OSystem_PSP::showOverlay() {
 	DEBUG_ENTER_FUNC();
-	_pendingUpdate = false;	
+	_pendingUpdate = false;
 	_overlay.setVisible(true);
 	_cursor.setLimits(_overlay.getWidth(), _overlay.getHeight());
 	_cursor.useGlobalScaler(false);	// mouse with overlay is 1:1
@@ -227,7 +227,7 @@
 
 void OSystem_PSP::hideOverlay() {
 	DEBUG_ENTER_FUNC();
-	_pendingUpdate = false;	
+	_pendingUpdate = false;
 	_overlay.setVisible(false);
 	_cursor.setLimits(_screen.getWidth(), _screen.getHeight());
 	_cursor.useGlobalScaler(true);	// mouse needs to be scaled with screen
@@ -235,7 +235,7 @@
 
 void OSystem_PSP::clearOverlay() {
 	DEBUG_ENTER_FUNC();
-	_pendingUpdate = false;	
+	_pendingUpdate = false;
 	_overlay.clearBuffer();
 }
 
@@ -246,7 +246,7 @@
 
 void OSystem_PSP::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) {
 	DEBUG_ENTER_FUNC();
-	_pendingUpdate = false;	
+	_pendingUpdate = false;
 	_overlay.copyFromRect(buf, pitch, x, y, w, h);
 }
 
@@ -266,7 +266,7 @@
 bool OSystem_PSP::showMouse(bool v) {
 	DEBUG_ENTER_FUNC();
 	_pendingUpdate = false;
-	
+
 	PSP_DEBUG_PRINT("%s\n", v ? "true" : "false");
 	bool last = _cursor.isVisible();
 	_cursor.setVisible(v);
@@ -276,14 +276,14 @@
 
 void OSystem_PSP::warpMouse(int x, int y) {
 	DEBUG_ENTER_FUNC();
-	_pendingUpdate = false;	
+	_pendingUpdate = false;
 	_cursor.setXY(x, y);
 }
 
 void OSystem_PSP::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format) {
 	DEBUG_ENTER_FUNC();
-	_pendingUpdate = false;	
-	
+	_pendingUpdate = false;
+
 	PSP_DEBUG_PRINT("pbuf[%p], w[%u], h[%u], hotspot:X[%d], Y[%d], keycolor[%d], scale[%d], pformat[%p]\n", buf, w, h, hotspotX, hotspotY, keycolor, cursorTargetScale, format);
 	if (format) {
 		PSP_DEBUG_PRINT("format: bpp[%d], rLoss[%d], gLoss[%d], bLoss[%d], aLoss[%d], rShift[%d], gShift[%d], bShift[%d], aShift[%d]\n", format->bytesPerPixel, format->rLoss, format->gLoss, format->bLoss, format->aLoss, format->rShift, format->gShift, format->bShift, format->aShift);
@@ -310,16 +310,16 @@
 	// Time between event polls is usually 5-10ms, so waiting for 4 calls before checking to update the screen should be fine
 	if (_pendingUpdate) {
 		_pendingUpdateCounter++;
-		
+
 		if (_pendingUpdateCounter >= 4) {
 			PSP_DEBUG_PRINT("servicing pending update\n");
 			updateScreen();
 			if (!_pendingUpdate) 	// we handled the update
-				_pendingUpdateCounter = 0;				
+				_pendingUpdateCounter = 0;
 		}
-	} else 
+	} else
 		_pendingUpdateCounter = 0;	// reset the counter, no pending
-		
+
 	return _inputHandler.getAllInputs(event);
 }
 

Modified: scummvm/trunk/backends/platform/psp/plugin.ld
===================================================================
--- scummvm/trunk/backends/platform/psp/plugin.ld	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/psp/plugin.ld	2010-10-12 02:18:11 UTC (rev 53160)
@@ -208,7 +208,7 @@
   .debug_varnames  0 : { *(.debug_varnames) }
   /DISCARD/ : { *(.comment) *(.pdr) }
   /DISCARD/ : { *(.note.GNU-stack) }
-  
+
   . = __plugin_hole_start;
   .got            : { *(.got.plt) *(.got) } : shorts
   /* We want the small data sections together, so single-instruction offsets
@@ -235,5 +235,5 @@
     PROVIDE (___sbss_end = .);
   }
 
-  
+
 }

Modified: scummvm/trunk/backends/platform/psp/png_loader.cpp
===================================================================
--- scummvm/trunk/backends/platform/psp/png_loader.cpp	2010-10-12 00:26:17 UTC (rev 53159)
+++ scummvm/trunk/backends/platform/psp/png_loader.cpp	2010-10-12 02:18:11 UTC (rev 53160)
@@ -33,7 +33,7 @@
 	if (!findImageDimensions()) {
 		PSP_ERROR("failed to get image dimensions\n");
 		return BAD_FILE;
-	}	
+	}
 
 	PSP_DEBUG_PRINT("width[%d], height[%d], paletteSize[%d], bitDepth[%d]\n", _width, _height, _paletteSize, _bitDepth);
 	_buffer->setSize(_width, _height, _sizeBy);
@@ -65,7 +65,7 @@
 		return OUT_OF_MEMORY;
 	}
 	return OK;
-}	
+}
 
 bool PngLoader::load() {
 	// Try to load the image
@@ -74,8 +74,8 @@
 	if (!loadImageIntoBuffer()) {
 		PSP_DEBUG_PRINT("failed to load image\n");
 		return false;
-	} 
-	
+	}
+
 	PSP_DEBUG_PRINT("succeded in loading image\n");
 
 	if (_paletteSize == 16)		// 4-bit
@@ -99,11 +99,11 @@
 
 bool PngLoader::basicImageLoad() {
 	_pngPtr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
-	if (!_pngPtr) 
+	if (!_pngPtr)
 		return false;
-		
+
 	png_set_error_fn(_pngPtr, (png_voidp) NULL, (png_error_ptr) NULL, warningFn);
-	
+
 	_infoPtr = png_create_info_struct(_pngPtr);
 	if (!_infoPtr) {
 		png_destroy_read_struct(&_pngPtr, png_infopp_NULL, png_infopp_NULL);
@@ -113,16 +113,16 @@
 	png_set_read_fn(_pngPtr, (void *)_file, libReadFunc);
 
 	unsigned int sig_read = 0;
-	
+
 	png_set_sig_bytes(_pngPtr, sig_read);
 	png_read_info(_pngPtr, _infoPtr);
 	int interlaceType;
-	png_get_IHDR(_pngPtr, _infoPtr, (png_uint_32 *)&_width, (png_uint_32 *)&_height, &_bitDepth, 
+	png_get_IHDR(_pngPtr, _infoPtr, (png_uint_32 *)&_width, (png_uint_32 *)&_height, &_bitDepth,
 		&_colorType, &interlaceType, int_p_NULL, int_p_NULL);
 
 	if (_colorType & PNG_COLOR_MASK_PALETTE)
 		_paletteSize = _infoPtr->num_palette;
-		
+
 	return true;
 }
 
@@ -132,7 +132,7 @@
 
 	if (!basicImageLoad())
 		return false;
-	
+

@@ Diff output truncated at 100000 characters. @@

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list