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

sev at users.sourceforge.net sev at users.sourceforge.net
Thu Jan 1 16:06:45 CET 2009


Revision: 35648
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35648&view=rev
Author:   sev
Date:     2009-01-01 15:06:43 +0000 (Thu, 01 Jan 2009)

Log Message:
-----------
Whoa! Removing trailing spaces.

Modified Paths:
--------------
    scummvm/trunk/backends/events/default/default-events.cpp
    scummvm/trunk/backends/fs/ds/ds-fs.cpp
    scummvm/trunk/backends/fs/posix/posix-fs.cpp
    scummvm/trunk/backends/fs/posix/posix-fs.h
    scummvm/trunk/backends/fs/ps2/ps2-fs-factory.h
    scummvm/trunk/backends/fs/ps2/ps2-fs.cpp
    scummvm/trunk/backends/fs/symbian/symbian-fs.cpp
    scummvm/trunk/backends/fs/symbian/symbianstream.cpp
    scummvm/trunk/backends/fs/wii/wii-fs.cpp
    scummvm/trunk/backends/midi/stmidi.cpp
    scummvm/trunk/backends/platform/PalmOS/Src/init_mathlib.cpp
    scummvm/trunk/backends/platform/PalmOS/Src/init_sony.h
    scummvm/trunk/backends/platform/PalmOS/Src/rumble.cpp
    scummvm/trunk/backends/platform/PalmOS/Src/rumble.h
    scummvm/trunk/backends/platform/dc/dc-fs.cpp
    scummvm/trunk/backends/platform/ds/arm9/source/blitters.cpp
    scummvm/trunk/backends/platform/ds/arm9/source/cdaudio.cpp
    scummvm/trunk/backends/platform/ds/arm9/source/cdaudio.h
    scummvm/trunk/backends/platform/ds/arm9/source/console2.h
    scummvm/trunk/backends/platform/ds/arm9/source/dsmain.cpp
    scummvm/trunk/backends/platform/ds/arm9/source/dsmain.h
    scummvm/trunk/backends/platform/ds/arm9/source/dsoptions.cpp
    scummvm/trunk/backends/platform/ds/arm9/source/fat/disc_io.h
    scummvm/trunk/backends/platform/ds/arm9/source/fat/gba_nds_fat.h
    scummvm/trunk/backends/platform/ds/arm9/source/fat/io_dldi.h
    scummvm/trunk/backends/platform/ds/arm9/source/fat/io_fcsr.h
    scummvm/trunk/backends/platform/ds/arm9/source/fat/io_m3_common.h
    scummvm/trunk/backends/platform/ds/arm9/source/fat/io_m3cf.h
    scummvm/trunk/backends/platform/ds/arm9/source/fat/io_mmcf.h
    scummvm/trunk/backends/platform/ds/arm9/source/fat/io_mpcf.h
    scummvm/trunk/backends/platform/ds/arm9/source/fat/io_njsd.h
    scummvm/trunk/backends/platform/ds/arm9/source/fat/io_nmmc.h
    scummvm/trunk/backends/platform/ds/arm9/source/fat/io_sccf.h
    scummvm/trunk/backends/platform/ds/arm9/source/fat/io_scsd.h
    scummvm/trunk/backends/platform/ds/arm9/source/fat/io_sd_common.h
    scummvm/trunk/backends/platform/ds/arm9/source/gbampsave.cpp
    scummvm/trunk/backends/platform/ds/arm9/source/gbampsave.h
    scummvm/trunk/backends/platform/ds/arm9/source/keys.cpp
    scummvm/trunk/backends/platform/ds/arm9/source/osystem_ds.cpp
    scummvm/trunk/backends/platform/ds/arm9/source/osystem_ds.h
    scummvm/trunk/backends/platform/ds/arm9/source/portdefs.h
    scummvm/trunk/backends/platform/ds/arm9/source/ramsave.cpp
    scummvm/trunk/backends/platform/ds/arm9/source/ramsave.h
    scummvm/trunk/backends/platform/ds/arm9/source/scummconsole.h
    scummvm/trunk/backends/platform/ds/arm9/source/scummhelp.cpp
    scummvm/trunk/backends/platform/ds/arm9/source/scummhelp.h
    scummvm/trunk/backends/platform/ds/arm9/source/touchkeyboard.cpp
    scummvm/trunk/backends/platform/ds/arm9/source/touchkeyboard.h
    scummvm/trunk/backends/platform/ds/arm9/source/wordcompletion.cpp
    scummvm/trunk/backends/platform/ds/arm9/source/zipreader.cpp
    scummvm/trunk/backends/platform/ds/arm9/source/zipreader.h
    scummvm/trunk/backends/platform/iphone/osys_iphone.cpp
    scummvm/trunk/backends/platform/iphone/osys_iphone.h
    scummvm/trunk/backends/platform/ps2/Gs2dScreen.cpp
    scummvm/trunk/backends/platform/ps2/fileio.cpp
    scummvm/trunk/backends/platform/ps2/iop/rpckbd/include/ps2kbd.h
    scummvm/trunk/backends/platform/ps2/iop/rpckbd/src/irx_imports.h
    scummvm/trunk/backends/platform/ps2/iop/rpckbd/src/us_keymap.h
    scummvm/trunk/backends/platform/ps2/irxboot.cpp
    scummvm/trunk/backends/platform/ps2/savefilemgr.cpp
    scummvm/trunk/backends/platform/ps2/savefilemgr.h
    scummvm/trunk/backends/platform/ps2/systemps2.cpp
    scummvm/trunk/backends/platform/psp/osys_psp.cpp
    scummvm/trunk/backends/platform/psp/osys_psp_gu.cpp
    scummvm/trunk/backends/platform/sdl/graphics.cpp
    scummvm/trunk/backends/platform/sdl/sdl.h
    scummvm/trunk/backends/platform/symbian/src/SymbianActions.cpp
    scummvm/trunk/backends/platform/symbian/src/SymbianOS.cpp
    scummvm/trunk/backends/platform/symbian/src/vsnprintf.h
    scummvm/trunk/backends/platform/wii/gx_supp.h
    scummvm/trunk/backends/platform/wii/osystem.cpp
    scummvm/trunk/backends/platform/wii/osystem_gfx.cpp
    scummvm/trunk/backends/platform/wince/CEActionsPocket.cpp
    scummvm/trunk/backends/platform/wince/wince-sdl.cpp
    scummvm/trunk/backends/platform/wince/wince-sdl.h
    scummvm/trunk/backends/saves/default/default-saves.cpp
    scummvm/trunk/backends/saves/posix/posix-saves.cpp
    scummvm/trunk/backends/saves/psp/psp-saves.cpp
    scummvm/trunk/common/fs.h
    scummvm/trunk/common/unzip.cpp
    scummvm/trunk/engines/agi/detection.cpp
    scummvm/trunk/engines/agi/loader_v3.cpp
    scummvm/trunk/engines/agi/saveload.cpp
    scummvm/trunk/engines/agos/agos.cpp
    scummvm/trunk/engines/agos/detection.cpp
    scummvm/trunk/engines/agos/sound.cpp
    scummvm/trunk/engines/agos/subroutine.cpp
    scummvm/trunk/engines/agos/vga_s1.cpp
    scummvm/trunk/engines/cine/anim.cpp
    scummvm/trunk/engines/cine/bg_list.cpp
    scummvm/trunk/engines/cine/cine.cpp
    scummvm/trunk/engines/cine/detection.cpp
    scummvm/trunk/engines/cine/gfx.cpp
    scummvm/trunk/engines/cine/main_loop.cpp
    scummvm/trunk/engines/cine/msg.cpp
    scummvm/trunk/engines/cine/pal.cpp
    scummvm/trunk/engines/cine/part.cpp
    scummvm/trunk/engines/cine/saveload.cpp
    scummvm/trunk/engines/cine/script_os.cpp
    scummvm/trunk/engines/cine/unpack.h
    scummvm/trunk/engines/cine/various.cpp
    scummvm/trunk/engines/cruise/ctp.cpp
    scummvm/trunk/engines/cruise/overlay.cpp
    scummvm/trunk/engines/dialogs.cpp
    scummvm/trunk/engines/drascula/animation.cpp
    scummvm/trunk/engines/drascula/converse.cpp
    scummvm/trunk/engines/drascula/drascula.cpp
    scummvm/trunk/engines/drascula/graphics.cpp
    scummvm/trunk/engines/drascula/objects.cpp
    scummvm/trunk/engines/drascula/rooms.cpp
    scummvm/trunk/engines/drascula/talk.cpp
    scummvm/trunk/engines/engine.cpp
    scummvm/trunk/engines/engine.h
    scummvm/trunk/engines/game.cpp
    scummvm/trunk/engines/game.h
    scummvm/trunk/engines/gob/coktelvideo.cpp
    scummvm/trunk/engines/gob/driver_vga.cpp
    scummvm/trunk/engines/gob/game_v6.cpp
    scummvm/trunk/engines/gob/goblin_v4.cpp
    scummvm/trunk/engines/gob/indeo3.h
    scummvm/trunk/engines/gob/mult_v2.cpp
    scummvm/trunk/engines/gob/saveload.cpp
    scummvm/trunk/engines/gob/saveload.h
    scummvm/trunk/engines/gob/saveload_v2.cpp
    scummvm/trunk/engines/gob/saveload_v3.cpp
    scummvm/trunk/engines/gob/saveload_v4.cpp
    scummvm/trunk/engines/gob/saveload_v6.cpp
    scummvm/trunk/engines/gob/sound/soundblaster.cpp
    scummvm/trunk/engines/gob/util.cpp
    scummvm/trunk/engines/gob/video_v6.cpp
    scummvm/trunk/engines/gob/videoplayer.cpp
    scummvm/trunk/engines/groovie/cell.cpp
    scummvm/trunk/engines/groovie/detection.cpp
    scummvm/trunk/engines/groovie/font.cpp
    scummvm/trunk/engines/groovie/groovie.cpp
    scummvm/trunk/engines/groovie/module.mk
    scummvm/trunk/engines/groovie/roq.cpp
    scummvm/trunk/engines/groovie/script.cpp
    scummvm/trunk/engines/groovie/vdx.cpp
    scummvm/trunk/engines/kyra/animator_hof.cpp
    scummvm/trunk/engines/kyra/animator_mr.cpp
    scummvm/trunk/engines/kyra/debugger.cpp
    scummvm/trunk/engines/kyra/detection.cpp
    scummvm/trunk/engines/kyra/gui.cpp
    scummvm/trunk/engines/kyra/gui_hof.cpp
    scummvm/trunk/engines/kyra/gui_lok.cpp
    scummvm/trunk/engines/kyra/gui_mr.cpp
    scummvm/trunk/engines/kyra/gui_v2.cpp
    scummvm/trunk/engines/kyra/gui_v2.h
    scummvm/trunk/engines/kyra/items_mr.cpp
    scummvm/trunk/engines/kyra/kyra_hof.cpp
    scummvm/trunk/engines/kyra/kyra_hof.h
    scummvm/trunk/engines/kyra/kyra_mr.cpp
    scummvm/trunk/engines/kyra/kyra_mr.h
    scummvm/trunk/engines/kyra/kyra_v1.cpp
    scummvm/trunk/engines/kyra/kyra_v1.h
    scummvm/trunk/engines/kyra/kyra_v2.cpp
    scummvm/trunk/engines/kyra/kyra_v2.h
    scummvm/trunk/engines/kyra/lol.cpp
    scummvm/trunk/engines/kyra/lol.h
    scummvm/trunk/engines/kyra/resource.cpp
    scummvm/trunk/engines/kyra/resource_intern.cpp
    scummvm/trunk/engines/kyra/saveload.cpp
    scummvm/trunk/engines/kyra/saveload_hof.cpp
    scummvm/trunk/engines/kyra/saveload_lok.cpp
    scummvm/trunk/engines/kyra/saveload_mr.cpp
    scummvm/trunk/engines/kyra/scene_hof.cpp
    scummvm/trunk/engines/kyra/scene_mr.cpp
    scummvm/trunk/engines/kyra/screen.cpp
    scummvm/trunk/engines/kyra/screen.h
    scummvm/trunk/engines/kyra/screen_lok.h
    scummvm/trunk/engines/kyra/screen_lol.cpp
    scummvm/trunk/engines/kyra/screen_lol.h
    scummvm/trunk/engines/kyra/screen_v2.cpp
    scummvm/trunk/engines/kyra/screen_v2.h
    scummvm/trunk/engines/kyra/script_hof.cpp
    scummvm/trunk/engines/kyra/script_lok.cpp
    scummvm/trunk/engines/kyra/script_mr.cpp
    scummvm/trunk/engines/kyra/script_tim.cpp
    scummvm/trunk/engines/kyra/script_tim.h
    scummvm/trunk/engines/kyra/sequences_hof.cpp
    scummvm/trunk/engines/kyra/sequences_mr.cpp
    scummvm/trunk/engines/kyra/sound.h
    scummvm/trunk/engines/kyra/sound_adlib.cpp
    scummvm/trunk/engines/kyra/sound_digital.cpp
    scummvm/trunk/engines/kyra/sound_midi.cpp
    scummvm/trunk/engines/kyra/sound_towns.cpp
    scummvm/trunk/engines/kyra/staticres.cpp
    scummvm/trunk/engines/kyra/text_mr.cpp
    scummvm/trunk/engines/kyra/timer.cpp
    scummvm/trunk/engines/kyra/vqa.cpp
    scummvm/trunk/engines/kyra/wsamovie.cpp
    scummvm/trunk/engines/lure/detection.cpp
    scummvm/trunk/engines/lure/game.cpp
    scummvm/trunk/engines/lure/hotspots.cpp
    scummvm/trunk/engines/lure/intro.cpp
    scummvm/trunk/engines/lure/lure.cpp
    scummvm/trunk/engines/lure/res_struct.cpp
    scummvm/trunk/engines/lure/sound.cpp
    scummvm/trunk/engines/m4/actor.cpp
    scummvm/trunk/engines/m4/actor.h
    scummvm/trunk/engines/m4/animation.cpp
    scummvm/trunk/engines/m4/animation.h
    scummvm/trunk/engines/m4/assets.cpp
    scummvm/trunk/engines/m4/assets.h
    scummvm/trunk/engines/m4/compression.cpp
    scummvm/trunk/engines/m4/console.cpp
    scummvm/trunk/engines/m4/converse.cpp
    scummvm/trunk/engines/m4/events.cpp
    scummvm/trunk/engines/m4/events.h
    scummvm/trunk/engines/m4/font.cpp
    scummvm/trunk/engines/m4/globals.cpp
    scummvm/trunk/engines/m4/globals.h
    scummvm/trunk/engines/m4/graphics.cpp
    scummvm/trunk/engines/m4/graphics.h
    scummvm/trunk/engines/m4/gui.cpp
    scummvm/trunk/engines/m4/gui.h
    scummvm/trunk/engines/m4/hotspot.cpp
    scummvm/trunk/engines/m4/m4.cpp
    scummvm/trunk/engines/m4/m4.h
    scummvm/trunk/engines/m4/m4_menus.cpp
    scummvm/trunk/engines/m4/m4_views.cpp
    scummvm/trunk/engines/m4/m4_views.h
    scummvm/trunk/engines/m4/mads_anim.cpp
    scummvm/trunk/engines/m4/mads_anim.h
    scummvm/trunk/engines/m4/mads_menus.cpp
    scummvm/trunk/engines/m4/midi.h
    scummvm/trunk/engines/m4/rails.cpp
    scummvm/trunk/engines/m4/resource.cpp
    scummvm/trunk/engines/m4/saveload.cpp
    scummvm/trunk/engines/m4/scene.cpp
    scummvm/trunk/engines/m4/scene.h
    scummvm/trunk/engines/m4/script.cpp
    scummvm/trunk/engines/m4/script.h
    scummvm/trunk/engines/m4/sound.cpp
    scummvm/trunk/engines/m4/sprite.cpp
    scummvm/trunk/engines/m4/viewmgr.cpp
    scummvm/trunk/engines/m4/viewmgr.h
    scummvm/trunk/engines/m4/woodscript.cpp
    scummvm/trunk/engines/m4/woodscript.h
    scummvm/trunk/engines/m4/ws_machine.cpp
    scummvm/trunk/engines/m4/ws_sequence.cpp
    scummvm/trunk/engines/made/database.cpp
    scummvm/trunk/engines/made/database.h
    scummvm/trunk/engines/made/detection.cpp
    scummvm/trunk/engines/made/graphics.cpp
    scummvm/trunk/engines/made/made.cpp
    scummvm/trunk/engines/made/pmvplayer.cpp
    scummvm/trunk/engines/made/redreader.cpp
    scummvm/trunk/engines/made/resource.cpp
    scummvm/trunk/engines/made/resource.h
    scummvm/trunk/engines/made/screen.cpp
    scummvm/trunk/engines/made/screen.h
    scummvm/trunk/engines/made/script.cpp
    scummvm/trunk/engines/made/scriptfuncs.cpp
    scummvm/trunk/engines/made/scriptfuncs.h
    scummvm/trunk/engines/made/sound.cpp
    scummvm/trunk/engines/metaengine.h
    scummvm/trunk/engines/queen/queen.cpp
    scummvm/trunk/engines/queen/queen.h
    scummvm/trunk/engines/saga/detection.cpp
    scummvm/trunk/engines/saga/interface.cpp
    scummvm/trunk/engines/saga/introproc_fta2.cpp
    scummvm/trunk/engines/saga/itedata.cpp
    scummvm/trunk/engines/saga/music.cpp
    scummvm/trunk/engines/saga/render.cpp
    scummvm/trunk/engines/saga/resource_hrs.cpp
    scummvm/trunk/engines/saga/saga.cpp
    scummvm/trunk/engines/saga/script.cpp
    scummvm/trunk/engines/saga/sfuncs.cpp
    scummvm/trunk/engines/saga/sndres.cpp
    scummvm/trunk/engines/saga/sound.cpp
    scummvm/trunk/engines/saga/sound.h
    scummvm/trunk/engines/saga/sprite.cpp
    scummvm/trunk/engines/scumm/actor.cpp
    scummvm/trunk/engines/scumm/detection.cpp
    scummvm/trunk/engines/scumm/dialogs.cpp
    scummvm/trunk/engines/scumm/gfx.cpp
    scummvm/trunk/engines/scumm/he/resource_he.cpp
    scummvm/trunk/engines/scumm/he/script_v80he.cpp
    scummvm/trunk/engines/scumm/he/wiz_he.cpp
    scummvm/trunk/engines/scumm/player_v2a.cpp
    scummvm/trunk/engines/scumm/scumm.h
    scummvm/trunk/engines/scumm/smush/codec47.cpp
    scummvm/trunk/engines/scumm/smush/imuse_channel.cpp
    scummvm/trunk/engines/sky/detection.cpp
    scummvm/trunk/engines/sword1/control.cpp
    scummvm/trunk/engines/sword1/detection.cpp
    scummvm/trunk/engines/sword2/sword2.cpp
    scummvm/trunk/engines/tinsel/actors.cpp
    scummvm/trunk/engines/tinsel/anim.cpp
    scummvm/trunk/engines/tinsel/bg.cpp
    scummvm/trunk/engines/tinsel/bmv.cpp
    scummvm/trunk/engines/tinsel/cliprect.cpp
    scummvm/trunk/engines/tinsel/config.cpp
    scummvm/trunk/engines/tinsel/coroutine.h
    scummvm/trunk/engines/tinsel/cursor.cpp
    scummvm/trunk/engines/tinsel/debugger.cpp
    scummvm/trunk/engines/tinsel/detection.cpp
    scummvm/trunk/engines/tinsel/dialogs.cpp
    scummvm/trunk/engines/tinsel/dialogs.h
    scummvm/trunk/engines/tinsel/events.cpp
    scummvm/trunk/engines/tinsel/graphics.cpp
    scummvm/trunk/engines/tinsel/handle.cpp
    scummvm/trunk/engines/tinsel/heapmem.cpp
    scummvm/trunk/engines/tinsel/move.cpp
    scummvm/trunk/engines/tinsel/music.cpp
    scummvm/trunk/engines/tinsel/object.cpp
    scummvm/trunk/engines/tinsel/palette.cpp
    scummvm/trunk/engines/tinsel/pcode.cpp
    scummvm/trunk/engines/tinsel/pcode.h
    scummvm/trunk/engines/tinsel/pdisplay.cpp
    scummvm/trunk/engines/tinsel/play.cpp
    scummvm/trunk/engines/tinsel/play.h
    scummvm/trunk/engines/tinsel/polygons.cpp
    scummvm/trunk/engines/tinsel/rince.cpp
    scummvm/trunk/engines/tinsel/saveload.cpp
    scummvm/trunk/engines/tinsel/savescn.cpp
    scummvm/trunk/engines/tinsel/scene.cpp
    scummvm/trunk/engines/tinsel/sched.cpp
    scummvm/trunk/engines/tinsel/sched.h
    scummvm/trunk/engines/tinsel/scn.cpp
    scummvm/trunk/engines/tinsel/scroll.cpp
    scummvm/trunk/engines/tinsel/serializer.h
    scummvm/trunk/engines/tinsel/sound.cpp
    scummvm/trunk/engines/tinsel/sound.h
    scummvm/trunk/engines/tinsel/strres.cpp
    scummvm/trunk/engines/tinsel/sysvar.h
    scummvm/trunk/engines/tinsel/text.cpp
    scummvm/trunk/engines/tinsel/text.h
    scummvm/trunk/engines/tinsel/timers.cpp
    scummvm/trunk/engines/tinsel/tinlib.cpp
    scummvm/trunk/engines/tinsel/tinsel.cpp
    scummvm/trunk/gui/ThemeEngine.cpp
    scummvm/trunk/gui/ThemeEngine.h
    scummvm/trunk/test/common/func.h
    scummvm/trunk/test/common/hashmap.h
    scummvm/trunk/test/common/ptr.h
    scummvm/trunk/test/common/queue.h
    scummvm/trunk/test/common/stream.h
    scummvm/trunk/test/cxxtest/cxxtest/Descriptions.cpp
    scummvm/trunk/test/cxxtest/cxxtest/Descriptions.h
    scummvm/trunk/test/cxxtest/cxxtest/DummyDescriptions.cpp
    scummvm/trunk/test/cxxtest/cxxtest/DummyDescriptions.h
    scummvm/trunk/test/cxxtest/cxxtest/ErrorFormatter.h
    scummvm/trunk/test/cxxtest/cxxtest/ErrorPrinter.h
    scummvm/trunk/test/cxxtest/cxxtest/GlobalFixture.cpp
    scummvm/trunk/test/cxxtest/cxxtest/GlobalFixture.h
    scummvm/trunk/test/cxxtest/cxxtest/Gui.h
    scummvm/trunk/test/cxxtest/cxxtest/LinkedList.cpp
    scummvm/trunk/test/cxxtest/cxxtest/LinkedList.h
    scummvm/trunk/test/cxxtest/cxxtest/ParenPrinter.h
    scummvm/trunk/test/cxxtest/cxxtest/QtGui.h
    scummvm/trunk/test/cxxtest/cxxtest/RealDescriptions.cpp
    scummvm/trunk/test/cxxtest/cxxtest/RealDescriptions.h
    scummvm/trunk/test/cxxtest/cxxtest/StdValueTraits.h
    scummvm/trunk/test/cxxtest/cxxtest/StdioFilePrinter.h
    scummvm/trunk/test/cxxtest/cxxtest/StdioPrinter.h
    scummvm/trunk/test/cxxtest/cxxtest/TeeListener.h
    scummvm/trunk/test/cxxtest/cxxtest/TestListener.h
    scummvm/trunk/test/cxxtest/cxxtest/TestRunner.h
    scummvm/trunk/test/cxxtest/cxxtest/TestSuite.cpp
    scummvm/trunk/test/cxxtest/cxxtest/TestSuite.h
    scummvm/trunk/test/cxxtest/cxxtest/TestTracker.cpp
    scummvm/trunk/test/cxxtest/cxxtest/TestTracker.h
    scummvm/trunk/test/cxxtest/cxxtest/ValueTraits.cpp
    scummvm/trunk/test/cxxtest/cxxtest/ValueTraits.h
    scummvm/trunk/test/cxxtest/cxxtest/Win32Gui.h
    scummvm/trunk/test/cxxtest/cxxtest/X11Gui.h
    scummvm/trunk/test/cxxtest/cxxtest/YesNoRunner.h
    scummvm/trunk/test/cxxtest/sample/CreatedTest.h
    scummvm/trunk/test/cxxtest/sample/DeltaTest.h
    scummvm/trunk/test/cxxtest/sample/ExceptionTest.h
    scummvm/trunk/test/cxxtest/sample/FixtureTest.h
    scummvm/trunk/test/cxxtest/sample/TraitsTest.h
    scummvm/trunk/test/cxxtest/sample/mock/Dice.h
    scummvm/trunk/test/cxxtest/sample/mock/MockStdlib.h
    scummvm/trunk/test/cxxtest/sample/mock/TestDice.h
    scummvm/trunk/test/cxxtest/sample/mock/roll.cpp
    scummvm/trunk/tools/create_drascula/create_drascula.cpp
    scummvm/trunk/tools/create_drascula/create_drascula.h
    scummvm/trunk/tools/create_kyradat/create_kyradat.cpp
    scummvm/trunk/tools/create_kyradat/hof_cd.h
    scummvm/trunk/tools/create_kyradat/hof_demo.h
    scummvm/trunk/tools/create_kyradat/misc.h

Modified: scummvm/trunk/backends/events/default/default-events.cpp
===================================================================
--- scummvm/trunk/backends/events/default/default-events.cpp	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/events/default/default-events.cpp	2009-01-01 15:06:43 UTC (rev 35648)
@@ -356,7 +356,7 @@
 	if (!artificialEventQueue.empty()) {
 		event = artificialEventQueue.pop();
 		result = true;
-	} else 	
+	} else
 		result = _boss->pollEvent(event);
 
 	if (_recordMode != kPassthrough)  {
@@ -397,7 +397,7 @@
 				if (g_engine && !g_engine->isPaused()) {
 					Common::Event menuEvent;
 					menuEvent.type = Common::EVENT_MAINMENU;
-					
+
 					// FIXME: GSoC RTL branch passes the F6 key event to the
 					// engine, and also enqueues a EVENT_MAINMENU. For now,
 					// we just drop the key event and return an EVENT_MAINMENU
@@ -406,7 +406,7 @@
 					//
 					// However, this has other consequences, possibly negative ones.
 					// Like, what happens with key repeat for the trigger key?
-					
+
 					//pushEvent(menuEvent);
 					event = menuEvent;
 
@@ -519,8 +519,8 @@
 	if (event.type == Common::EVENT_QUIT) {
 		if (!_shouldQuit)
 			artificialEventQueue.push(event);
-	} else 
-		artificialEventQueue.push(event);	
+	} else
+		artificialEventQueue.push(event);
 }
 
 #endif // !defined(DISABLE_DEFAULT_EVENTMANAGER)

Modified: scummvm/trunk/backends/fs/ds/ds-fs.cpp
===================================================================
--- scummvm/trunk/backends/fs/ds/ds-fs.cpp	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/fs/ds/ds-fs.cpp	2009-01-01 15:06:43 UTC (rev 35648)
@@ -249,7 +249,7 @@
 		_isValid = false;		// Old code returned false here, but I'm not sure why
 	} else if ((strlen(pathStr) > 4) && (!strncmp(pathStr, "mp:/", 4))) {
 		// Files which start with mp:/
-		
+
 		// Clear the filename to 128 bytes, because a libfat bug occationally tries to read in this area.
 		memset(check, 0, 128);
 		strcpy(check, pathStr + 3);
@@ -279,8 +279,8 @@
 		_isValid = fileOrDir == FT_FILE;
 
 	}
-				
 
+
 //	consolePrintf("Path: %s \n", check);
 
 	_displayName = Common::String(disp);
@@ -567,7 +567,7 @@
 			return numItems;
 		} else {
 //			consolePrintf("Read past end of file: %d read out of %d\n", bytes / size, numItems);
-			if ((size_t)bytes != size * numItems) readPastEndOfFile = true;			
+			if ((size_t)bytes != size * numItems) readPastEndOfFile = true;
 			return bytes / size;
 		}
 		return numItems;
@@ -694,7 +694,7 @@
 int std_ferror(FILE* handle) {
 	//FIXME: not implemented?
 //	consolePrintf("ferror ");
-	
+
 	return readPastEndOfFile;
 }
 

Modified: scummvm/trunk/backends/fs/posix/posix-fs.cpp
===================================================================
--- scummvm/trunk/backends/fs/posix/posix-fs.cpp	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/fs/posix/posix-fs.cpp	2009-01-01 15:06:43 UTC (rev 35648)
@@ -61,7 +61,7 @@
 	} else {
 		_path = p;
 	}
-	
+
 #ifdef __OS2__
 	// On OS/2, 'X:/' is a root of drive X, so we should not remove that last
 	// slash.
@@ -95,7 +95,7 @@
 AbstractFSNode *POSIXFilesystemNode::getChild(const Common::String &n) const {
 	assert(!_path.empty());
 	assert(_isDirectory);
-	
+
 	// Make sure the string contains no slashes
 	assert(!n.contains('/'));
 
@@ -117,14 +117,14 @@
 		// Special case for the root dir: List all DOS drives
 		ULONG ulDrvNum;
 		ULONG ulDrvMap;
-	
+
 		DosQueryCurrentDisk(&ulDrvNum, &ulDrvMap);
-	
+
 		for (int i = 0; i < 26; i++) {
 			if (ulDrvMap & 1) {
 				char drive_root[] = "A:/";
 				drive_root[0] += i;
-	
+
                 POSIXFilesystemNode *entry = new POSIXFilesystemNode();
 				entry->_isDirectory = true;
 				entry->_isValid = true;
@@ -132,10 +132,10 @@
 				entry->_displayName = "[" + Common::String(drive_root, 2) + "]";
 				myList.push_back(entry);
 			}
-	
+
 			ulDrvMap >>= 1;
 		}
-		
+
 		return true;
 	}
 #endif
@@ -220,7 +220,7 @@
 
 	const char *start = _path.c_str();
 	const char *end = start + _path.size();
-	
+
 	// Strip of the last component. We make use of the fact that at this
 	// point, _path is guaranteed to be normalized
 	while (end > start && *(end-1) != '/')

Modified: scummvm/trunk/backends/fs/posix/posix-fs.h
===================================================================
--- scummvm/trunk/backends/fs/posix/posix-fs.h	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/fs/posix/posix-fs.h	2009-01-01 15:06:43 UTC (rev 35648)
@@ -43,11 +43,11 @@
 	Common::String _path;
 	bool _isDirectory;
 	bool _isValid;
-	
+
 	virtual AbstractFSNode *makeNode(const Common::String &path) const {
 		return new POSIXFilesystemNode(path);
 	}
-	
+
 	/**
 	 * Plain constructor, for internal use only (hence protected).
 	 */

Modified: scummvm/trunk/backends/fs/ps2/ps2-fs-factory.h
===================================================================
--- scummvm/trunk/backends/fs/ps2/ps2-fs-factory.h	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/fs/ps2/ps2-fs-factory.h	2009-01-01 15:06:43 UTC (rev 35648)
@@ -30,18 +30,18 @@
 
 /**
  * Creates PS2FilesystemNode objects.
- * 
+ *
  * Parts of this class are documented in the base interface class, AbstractFilesystemFactory.
  */
-class Ps2FilesystemFactory : public FilesystemFactory, public Common::Singleton<Ps2FilesystemFactory> {	
+class Ps2FilesystemFactory : public FilesystemFactory, public Common::Singleton<Ps2FilesystemFactory> {
 public:
 	virtual AbstractFSNode *makeRootFileNode() const;
 	virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
 	virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
-	
+
 protected:
 	Ps2FilesystemFactory() {};
-		
+
 private:
 	friend class Common::Singleton<SingletonBaseType>;
 };

Modified: scummvm/trunk/backends/fs/ps2/ps2-fs.cpp
===================================================================
--- scummvm/trunk/backends/fs/ps2/ps2-fs.cpp	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/fs/ps2/ps2-fs.cpp	2009-01-01 15:06:43 UTC (rev 35648)
@@ -40,7 +40,7 @@
 
 /**
  * Implementation of the ScummVM file system API based on the Ps2SDK.
- * 
+ *
  * Parts of this class are documented in the base interface class, AbstractFSNode.
  */
 class Ps2FilesystemNode : public AbstractFSNode {
@@ -62,15 +62,15 @@
 	 * Creates a PS2FilesystemNode with the root node as path.
 	 */
 	Ps2FilesystemNode();
-	
+
 	/**
 	 * Creates a PS2FilesystemNode for a given path.
-	 * 
+	 *
 	 * @param path Common::String with the path the new node should point to.
 	 */
 	Ps2FilesystemNode(const Common::String &path);
 	Ps2FilesystemNode(const Common::String &path, bool verify);
-	
+
 	/**
 	 * Copy constructor.
 	 */
@@ -165,7 +165,7 @@
 }
 
 bool Ps2FilesystemNode::exists(void) const {
-	
+
 	dbg_printf("Ps2FilesystemNode::exists: path \"%s\": ", _path.c_str());
 
 	if (_path[4] != ':') { // don't bother for relative path... they always fail on PS2!
@@ -217,10 +217,10 @@
 	char listDir[256];
 	sprintf(listDir, "%s/", _path.c_str());
 	int fd = fio.dopen(listDir);
-	
+
 	if (fd >= 0) {
 		iox_dirent_t dirent;
-		
+
 		while (fio.dread(fd, &dirent) > 0) {
 			if (strcmp(n.c_str(), dirent.name) == 0) {
 				Ps2FilesystemNode *dirEntry = new Ps2FilesystemNode();
@@ -240,13 +240,13 @@
 		}
 		fio.dclose(fd);
 	}
-	
+
 	return NULL;
 }
 
 bool Ps2FilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hidden) const {
 	//TODO: honor the hidden flag
-	
+
 	if (!_isDirectory)
 		return false;
 
@@ -273,14 +273,14 @@
 	} else {
 		char listDir[256];
 		int fd;
-		
+
 		if (_path.lastChar() == '/' /* || _path.lastChar() == ':'*/)
 			fd = fio.dopen(_path.c_str());
 		else {
 			sprintf(listDir, "%s/", _path.c_str());
 			fd = fio.dopen(listDir);
 		}
-		
+
 		if (fd >= 0) {
 			iox_dirent_t dirent;
 			Ps2FilesystemNode dirEntry;
@@ -338,7 +338,7 @@
 	else if (strncmp(path, "mass", 4) == 0)
 		return "USB Mass Storage";
 	else
-		return "Harddisk";	
+		return "Harddisk";
 }
 
 Common::SeekableReadStream *Ps2FilesystemNode::openForReading() {

Modified: scummvm/trunk/backends/fs/symbian/symbian-fs.cpp
===================================================================
--- scummvm/trunk/backends/fs/symbian/symbian-fs.cpp	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/fs/symbian/symbian-fs.cpp	2009-01-01 15:06:43 UTC (rev 35648)
@@ -140,7 +140,7 @@
 	if (_path.lastChar() != '\\')
 		newPath += '\\';
 
-	newPath += n;	
+	newPath += n;
 
 	return new SymbianFilesystemNode(newPath);
 }
@@ -196,7 +196,7 @@
 
 		if (_path.lastChar() != '\\')
 			fname.Append('\\');
-		
+
 		if (static_cast<OSystem_SDL_Symbian*>(g_system)->FsSession().GetDir(fname, KEntryAttNormal|KEntryAttDir, 0, dirPtr) == KErrNone) {
 			CleanupStack::PushL(dirPtr);
 			TInt cnt=dirPtr->Count();
@@ -219,7 +219,7 @@
 				if ((mode == Common::FSNode::kListFilesOnly && entry._isDirectory) ||
 					(mode == Common::FSNode::kListDirectoriesOnly && !entry._isDirectory))
 					continue;
-			
+
 				myList.push_back(new SymbianFilesystemNode(entry));
 			}
 			CleanupStack::PopAndDestroy(dirPtr);

Modified: scummvm/trunk/backends/fs/symbian/symbianstream.cpp
===================================================================
--- scummvm/trunk/backends/fs/symbian/symbianstream.cpp	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/fs/symbian/symbianstream.cpp	2009-01-01 15:06:43 UTC (rev 35648)
@@ -13,7 +13,7 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- 
+
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -21,7 +21,7 @@
  * $URL$
  * $Id$
  *
- */	
+ */
 
 #include "common/scummsys.h"
 #include "backends/fs/symbian/symbianstream.h"
@@ -48,7 +48,7 @@
 	fileEntry->_inputPos = KErrNotFound;
 	fileEntry->_lastError = 0;
 	fileEntry->_eofReached = EFalse;
-	
+
 	if (fileEntry != NULL) {
 		TInt modeLen = strlen(mode);
 
@@ -102,9 +102,9 @@
 	TSymbianFileEntry* entry = ((TSymbianFileEntry*)(handle));
 	TUint32 totsize = size*numItems;
 	TPtr8 pointer ( (unsigned char*) ptr, totsize);
-	
+
 	// Nothing cached and we want to load at least KInputBufferLength bytes
-	if (totsize >= KInputBufferLength) {	
+	if (totsize >= KInputBufferLength) {
 		TUint32 totLength = 0;
 		if (entry->_inputPos != KErrNotFound) {
 			TPtr8 cacheBuffer( (unsigned char*) entry->_inputBuffer+entry->_inputPos, entry->_inputBufferLen - entry->_inputPos, KInputBufferLength);
@@ -113,19 +113,19 @@
 			totLength+=pointer.Length();
 			pointer.Set(totLength+(unsigned char*) ptr, 0, totsize-totLength);
 		}
-		
+
 		entry->_lastError = entry->_fileHandle.Read(pointer);
-		
+
 		totLength+=pointer.Length();
-		
+
 		pointer.Set((unsigned char*) ptr, totLength, totsize);
-		
+
 	} else {
-		// Nothing in buffer	
+		// Nothing in buffer
 		if (entry->_inputPos == KErrNotFound) {
 			TPtr8 cacheBuffer( (unsigned char*) entry->_inputBuffer, KInputBufferLength);
-			entry->_lastError = entry->_fileHandle.Read(cacheBuffer);			
-			
+			entry->_lastError = entry->_fileHandle.Read(cacheBuffer);
+
 			if (cacheBuffer.Length() >= totsize) {
 				pointer.Copy(cacheBuffer.Left(totsize));
 				entry->_inputPos = totsize;
@@ -134,19 +134,19 @@
 				pointer.Copy(cacheBuffer);
 				entry->_inputPos = KErrNotFound;
 			}
-			
+
 		} else {
 			TPtr8 cacheBuffer( (unsigned char*) entry->_inputBuffer, entry->_inputBufferLen, KInputBufferLength);
-			
+
 			if (entry->_inputPos+totsize < entry->_inputBufferLen) {
 				pointer.Copy(cacheBuffer.Mid(entry->_inputPos, totsize));
 				entry->_inputPos+=totsize;
 			} else {
-				
+
 				pointer.Copy(cacheBuffer.Mid(entry->_inputPos, entry->_inputBufferLen-entry->_inputPos));
 				cacheBuffer.SetLength(0);
 				entry->_lastError = entry->_fileHandle.Read(cacheBuffer);
-				
+
 				if (cacheBuffer.Length() >= totsize-pointer.Length()) {
 					TUint32 restSize = totsize-pointer.Length();
 					pointer.Append(cacheBuffer.Left(restSize));
@@ -158,8 +158,8 @@
 				}
 			}
 		}
-	}	
-	
+	}
+
 	if((numItems * size) != pointer.Length() && entry->_lastError == KErrNone) {
 		entry->_eofReached = ETrue;
 	}
@@ -234,11 +234,11 @@
 		break;
 
 	}
-	
+
 	entry->_inputPos = KErrNotFound;
 	entry->_eofReached = EFalse;
 	entry->_fileHandle.Seek(seekMode, pos);
-	
+
 	return true;	// FIXME: Probably should return a value based on what _fileHandle.Seek returns
 }
 
@@ -256,7 +256,7 @@
 	if (((TSymbianFileEntry*)(_handle))->_lastError == KErrNone) {
 		return len;
 	}
-	
+
 	return 0;
 }
 

Modified: scummvm/trunk/backends/fs/wii/wii-fs.cpp
===================================================================
--- scummvm/trunk/backends/fs/wii/wii-fs.cpp	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/fs/wii/wii-fs.cpp	2009-01-01 15:06:43 UTC (rev 35648)
@@ -91,7 +91,7 @@
 
 		if (!dt || !dt->name || !dt->open_r || !dt->diropen_r)
 			continue;
-	
+
 		list.push_back(new WiiFilesystemNode(Common::String(dt->name) + ":/", true));
 	}
 

Modified: scummvm/trunk/backends/midi/stmidi.cpp
===================================================================
--- scummvm/trunk/backends/midi/stmidi.cpp	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/midi/stmidi.cpp	2009-01-01 15:06:43 UTC (rev 35648)
@@ -17,9 +17,9 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-/*  
+/*
  * Raw MIDI output for the Atari ST line of computers.
- * Based on the ScummVM SEQ & CoreMIDI drivers.  
+ * Based on the ScummVM SEQ & CoreMIDI drivers.
  * Atari code by Keith Scroggins
  * We, unfortunately, could not use the SEQ driver because the /dev/midi under
  * FreeMiNT (and hence in libc) is considered to be a serial port for machine

Modified: scummvm/trunk/backends/platform/PalmOS/Src/init_mathlib.cpp
===================================================================
--- scummvm/trunk/backends/platform/PalmOS/Src/init_mathlib.cpp	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/PalmOS/Src/init_mathlib.cpp	2009-01-01 15:06:43 UTC (rev 35648)
@@ -26,4 +26,4 @@
 		if (!useCount)
 			SysLibRemove(MathLibRef);
 	}
-}
\ No newline at end of file
+}

Modified: scummvm/trunk/backends/platform/PalmOS/Src/init_sony.h
===================================================================
--- scummvm/trunk/backends/platform/PalmOS/Src/init_sony.h	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/PalmOS/Src/init_sony.h	2009-01-01 15:06:43 UTC (rev 35648)
@@ -37,4 +37,4 @@
 
 UInt8 SonyScreenSize(UInt16 HRrefNum, Coord *stdw, Coord *stdh, Coord *fullw, Coord *fullh);
 
-#endif
\ No newline at end of file
+#endif

Modified: scummvm/trunk/backends/platform/PalmOS/Src/rumble.cpp
===================================================================
--- scummvm/trunk/backends/platform/PalmOS/Src/rumble.cpp	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/PalmOS/Src/rumble.cpp	2009-01-01 15:06:43 UTC (rev 35648)
@@ -137,4 +137,4 @@
 		HwrVibrateAttributes(1, kHwrVibrateActive, &active);
 #endif
 	}
-}
\ No newline at end of file
+}

Modified: scummvm/trunk/backends/platform/PalmOS/Src/rumble.h
===================================================================
--- scummvm/trunk/backends/platform/PalmOS/Src/rumble.h	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/PalmOS/Src/rumble.h	2009-01-01 15:06:43 UTC (rev 35648)
@@ -31,4 +31,4 @@
 Boolean	RumbleInit		();
 void	RumbleRelease	();
 
-#endif
\ No newline at end of file
+#endif

Modified: scummvm/trunk/backends/platform/dc/dc-fs.cpp
===================================================================
--- scummvm/trunk/backends/platform/dc/dc-fs.cpp	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/dc/dc-fs.cpp	2009-01-01 15:06:43 UTC (rev 35648)
@@ -90,7 +90,7 @@
 		return new RoninCDFileNode(path);
 	} else if ((fd = open(path.c_str(), O_DIR|O_RDONLY)) >= 0) {
 		close(fd);
-		return new RoninCDDirectoryNode(path);		
+		return new RoninCDDirectoryNode(path);
 	} else {
 		return NULL;
 	}

Modified: scummvm/trunk/backends/platform/ds/arm9/source/blitters.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/blitters.cpp	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/ds/arm9/source/blitters.cpp	2009-01-01 15:06:43 UTC (rev 35648)
@@ -27,25 +27,25 @@
 
 namespace DS {
 
-void asmDrawStripToScreen(int height, int width, byte const* text, byte const* src, byte* dst, 
+void asmDrawStripToScreen(int height, int width, byte const* text, byte const* src, byte* dst,
 	int vsPitch, int vmScreenWidth, int textSurfacePitch) {
 
 
 	if (height <= 0) height = 1;
 	if (width < 4) return;
-	
-	
+
+
 	width &= ~4;
 //	src = (const byte *) (((int) (src)) & (~4));
 //	dst = (byte *) (((int) (dst)) & (~4));
 //	text = (const byte *) (((int) (text)) & (~4));
-	
+
 	asm (	"mov r5, %0\n"				// Height
-			"yLoop:\n"			
+			"yLoop:\n"
 			"mov r3, #0\n"				// X pos
-			
+
 			"xLoop:\n"
-			
+
 			"ldr r4, [%2, r3]\n"		// Load text layer word
 			"cmp r4, %5\n"
 			"bne singleByteCompare\n"
@@ -54,7 +54,7 @@
 			"add r3, r3, #4\n"
 			"cmp r3, %1\n"				// x == width?
 			"blt xLoop\n"
-			
+
 			"add %2, %2, %8\n"			// src += vs->pitch
 			"add %3, %3, %6\n"			// dst += _vm->_screenWidth
 			"add %4, %4, %7\n"			// text += _textSurface.pitch
@@ -62,8 +62,8 @@
 			"cmp r5, #0\n"				// y == 0?
 			"bne yLoop\n"
 			"b end\n"
-			
-			
+
+
 			"singleByteCompare:\n"
 			"ldrb r4, [%2, r3]\n"		// Load text byte
 			"cmps r4, %5, lsr #24\n"	// Compare with mask
@@ -78,7 +78,7 @@
 			"ldreqb r4, [%3, r3]\n"		// Otherwise Load src byte
 			"streqb r4, [%4, r3]\n"		// Store it
 			"add r3, r3, #1\n"
-			
+
 			"ldrb r4, [%2, r3]\n"		// Load text byte
 			"cmps r4, %5, lsr #24\n"	// Compare with mask
 			"strneb r4, [%4, r3]\n"		// Store if not equal
@@ -91,7 +91,7 @@
 			"strneb r4, [%4, r3]\n"		// Store if not equal
 			"ldreqb r4, [%3, r3]\n"		// Otherwise Load src byte
 			"streqb r4, [%4, r3]\n"		// Store it
-			"add r3, r3, #1\n"			
+			"add r3, r3, #1\n"
 
 			"cmps r3, %1\n"				// x == width?
 			"blt xLoop\n"				// Repeat
@@ -101,10 +101,10 @@
 			"sub r5, r5, #1\n"			// y -= 1
 			"cmp r5, #0\n"				// y == 0?
 			"bne yLoop\n"
-			
+
 			"end:\n"
 		: /* no output registers */
-		: "r" (height), "r" (width), "r" (text), "r" (src), "r" (dst), "r" (CHARSET_MASK_TRANSPARENCY | (CHARSET_MASK_TRANSPARENCY << 8) | (CHARSET_MASK_TRANSPARENCY << 16) | (CHARSET_MASK_TRANSPARENCY << 24)), 
+		: "r" (height), "r" (width), "r" (text), "r" (src), "r" (dst), "r" (CHARSET_MASK_TRANSPARENCY | (CHARSET_MASK_TRANSPARENCY << 8) | (CHARSET_MASK_TRANSPARENCY << 16) | (CHARSET_MASK_TRANSPARENCY << 24)),
 			"r" (vsPitch), "r" (vmScreenWidth), "r" (textSurfacePitch)
 		: "r5", "r3", "r4", "%2", "%3", "%4", "memory");
 }
@@ -115,7 +115,7 @@
 	asm("ands r0, %3, #1\n"
 		 "addne %3, %3, #1\n"
 		 "bne roll2\n"
-			
+
 		 "yLoop2:\n"
 		 "ldr r0, [%2, #0]\n"
 		 "str r0, [%0, #0]\n"
@@ -131,7 +131,7 @@
 		 "add %0, %0, %1\n"
 		 "add %2, %2, %1\n"
 		 "subs %3, %3, #2\n"
-		 "bne yLoop2\n"		 
+		 "bne yLoop2\n"
 
 		: /* no output registers */
 		: "r" (dst), "r" (dstPitch), "r" (src), "r" (height)
@@ -150,7 +150,7 @@
     for (int i=0; i<160; ++i)
     {
         DIV_BY_5[i] = (2*i+5)/10;
-    }                
+    }
 }
 
 #ifdef PERFECT_5_TO_4_RESCALING
@@ -163,13 +163,13 @@
     u32 bs3 = s3 & 0x1F;
     u32 bs4 = s4 & 0x1F;
 
-#if 0    
+#if 0
     u32 gs0 = (s0 >> 5) & 0x1F;
     u32 gs1 = (s1 >> 5) & 0x1F;
     u32 gs2 = (s2 >> 5) & 0x1F;
     u32 gs3 = (s3 >> 5) & 0x1F;
     u32 gs4 = (s4 >> 5) & 0x1F;
-    
+
     u32 rs0 = (s0 >> 10) & 0x1F;
     u32 rs1 = (s1 >> 10) & 0x1F;
     u32 rs2 = (s2 >> 10) & 0x1F;
@@ -191,22 +191,22 @@
     asm("and %0, %2, %1, lsr #10" : "=r"(rs3) : "r"(s3), "r"(mask) : );
     asm("and %0, %2, %1, lsr #10" : "=r"(rs4) : "r"(s4), "r"(mask) : );
 #endif
-    
+
     u32 rd0 = 4*rs0 +   rs1;
     u32 rd1 = 2*rs1 + rs1 + 2*rs2;
     u32 rd2 = 2*rs2 + 2*rs3 + rs3;
     u32 rd3 =   rs3 + 4*rs4;
-    
+
     u32 gd0 = 4*gs0 +   gs1;
     u32 gd1 = 2*gs1 + gs1 + 2*gs2;
     u32 gd2 = 2*gs2 + 2*gs3 + gs3;
     u32 gd3 =   gs3 + 4*gs4;
-    
+
     u32 bd0 = 4*bs0 +   bs1;
     u32 bd1 = 2*bs1 + bs1 + 2*bs2;
     u32 bd2 = 2*bs2 + 2*bs3 + bs3;
     u32 bd3 =   bs3 + 4*bs4;
-    
+
 #if 0
     // Offsetting for correct rounding
     rd0 = rd0*2+5; rd1 = rd1*2+5; rd2 = rd2*2+5; rd3 = rd3*2+5;
@@ -217,14 +217,14 @@
 	gd0 = (gd0 * 51) >> 9; gd1 = (gd1 * 51) >> 9; gd2 = (gd2 * 51) >> 9; gd3 = (gd3 * 51) >> 9;
 	bd0 = (bd0 * 51) >> 9; bd1 = (bd1 * 51) >> 9; bd2 = (bd2 * 51) >> 9; bd3 = (bd3 * 51) >> 9;
 #else
-	rd0 = DIV_BY_5[rd0]; rd1 = DIV_BY_5[rd1]; rd2 = DIV_BY_5[rd2]; rd3 = DIV_BY_5[rd3]; 
-	gd0 = DIV_BY_5[gd0]; gd1 = DIV_BY_5[gd1]; gd2 = DIV_BY_5[gd2]; gd3 = DIV_BY_5[gd3]; 
-	bd0 = DIV_BY_5[bd0]; bd1 = DIV_BY_5[bd1]; bd2 = DIV_BY_5[bd2]; bd3 = DIV_BY_5[bd3]; 
+	rd0 = DIV_BY_5[rd0]; rd1 = DIV_BY_5[rd1]; rd2 = DIV_BY_5[rd2]; rd3 = DIV_BY_5[rd3];
+	gd0 = DIV_BY_5[gd0]; gd1 = DIV_BY_5[gd1]; gd2 = DIV_BY_5[gd2]; gd3 = DIV_BY_5[gd3];
+	bd0 = DIV_BY_5[bd0]; bd1 = DIV_BY_5[bd1]; bd2 = DIV_BY_5[bd2]; bd3 = DIV_BY_5[bd3];
 #endif
-    
+
     u32 d10 = 0x80008000 | (rd1 << 26) | (gd1 << 21) | (bd1 << 16) | (rd0 << 10) | (gd0 << 5) | bd0;
     u32 d32 = 0x80008000 | (rd3 << 26) | (gd3 << 21) | (bd3 << 16) | (rd2 << 10) | (gd2 << 5) | bd2;
-    
+
     ((u32*)dest)[0] = d10;
     ((u32*)dest)[1] = d32;
 }
@@ -233,7 +233,7 @@
                                                     u16* dest)
 {
     static const u32 MASK = 0x03E07C1F;
-    
+
     u32 argbargbs0 = u32(s0) | (u32(s0) << 16);
     u32 argbargbs1 = u32(s1) | (u32(s1) << 16);
     u32 argbargbs2 = u32(s2) | (u32(s2) << 16);
@@ -245,32 +245,32 @@
     u32 grbs2 = argbargbs2 & MASK;
     u32 grbs3 = argbargbs3 & MASK;
     u32 grbs4 = argbargbs4 & MASK;
-    
+
     u32 grbd0 = (3*grbs0 +   grbs1) >> 2;
     u32 grbd1 = (  grbs1 +   grbs2) >> 1;
     u32 grbd2 = (  grbs2 +   grbs3) >> 1;
     u32 grbd3 = (  grbs3 + 3*grbs4) >> 2;
-    
+
     grbd0 &= MASK;
     grbd1 &= MASK;
     grbd2 &= MASK;
     grbd3 &= MASK;
-    
+
     u32 d0 = grbd0 | (grbd0 >> 16);
     u32 d1 = grbd1 | (grbd1 >> 16);
     u32 d2 = grbd2 | (grbd2 >> 16);
     u32 d3 = grbd3 | (grbd3 >> 16);
-    
-    d0 &= 0xFFFF; 
-    d1 &= 0xFFFF; 
-    d2 &= 0xFFFF; 
-    d3 &= 0xFFFF; 
-    
-    d0 |= 0x8000; 
-    d1 |= 0x8000; 
-    d2 |= 0x8000; 
-    d3 |= 0x8000; 
-    
+
+    d0 &= 0xFFFF;
+    d1 &= 0xFFFF;
+    d2 &= 0xFFFF;
+    d3 &= 0xFFFF;
+
+    d0 |= 0x8000;
+    d1 |= 0x8000;
+    d2 |= 0x8000;
+    d3 |= 0x8000;
+
     dest[0] = d0;
     dest[1] = d1;
     dest[2] = d2;
@@ -287,13 +287,13 @@
     u32 bd0 = (d0 << 24) >> 24;
     u32 bd1 = (d1 << 24) >> 24;
     u32 gd0 = (d0 << 16) >> 24;
-    u32 gd1 = (d1 << 16) >> 24;    
+    u32 gd1 = (d1 << 16) >> 24;
     u32 rd0 = (d0 >> 16);
     u32 rd1 = (d1 >> 16);
-    
+
 	rd0 = DIV_BY_5[rd0]; rd1 = DIV_BY_5[rd1];
 	gd0 = DIV_BY_5[gd0]; gd1 = DIV_BY_5[gd1];
-	bd0 = DIV_BY_5[bd0]; bd1 = DIV_BY_5[bd1];    
+	bd0 = DIV_BY_5[bd0]; bd1 = DIV_BY_5[bd1];
     u32 d10 = 0x80008000 | (rd1 << 26) | (gd1 << 21) | (bd1 << 16) | (rd0 << 10) | (gd0 << 5) | bd0;
     ((u32*)dest)[0] = d10;
 
@@ -307,11 +307,11 @@
     u32 rd2 = (d2 >> 16);
     u32 rd3 = (d3 >> 16);
 
-    rd2 = DIV_BY_5[rd2]; rd3 = DIV_BY_5[rd3]; 
-    gd2 = DIV_BY_5[gd2]; gd3 = DIV_BY_5[gd3]; 
-    bd2 = DIV_BY_5[bd2]; bd3 = DIV_BY_5[bd3]; 
+    rd2 = DIV_BY_5[rd2]; rd3 = DIV_BY_5[rd3];
+    gd2 = DIV_BY_5[gd2]; gd3 = DIV_BY_5[gd3];
+    bd2 = DIV_BY_5[bd2]; bd3 = DIV_BY_5[bd3];
     u32 d32 = 0x80008000 | (rd3 << 26) | (gd3 << 21) | (bd3 << 16) | (rd2 << 10) | (gd2 << 5) | bd2;
-    
+
     ((u32*)dest)[1] = d32;
 }
 
@@ -320,7 +320,7 @@
 static inline void Rescale_320xPAL8Scanline_To_256x1555Scanline(u16* dest, const u8* src, const u32* palette)
 {
     ComputeDivBy5TableIFN();
-    
+
     for (size_t i=0; i<64; ++i)
     {
         u32 s0 = palette[src[5*i+0]];
@@ -353,7 +353,7 @@
 static inline void Rescale_320x1555Scanline_To_256x1555Scanline(u16* dest, const u16* src)
 {
     ComputeDivBy5TableIFN();
-    
+
     for (size_t i=0; i<64; ++i)
     {
         u16 s0 = src[5*i+0];
@@ -384,7 +384,7 @@
 
 	for (size_t i=0; i<200; ++i)
 	{
-		Rescale_320xPAL8Scanline_To_256x1555Scanline(dest + i*destStride, src + i *srcStride, fastRam);			
+		Rescale_320xPAL8Scanline_To_256x1555Scanline(dest + i*destStride, src + i *srcStride, fastRam);
 	}
 }
 #else
@@ -396,7 +396,7 @@
 
 	for (size_t i=0; i<200; ++i)
 	{
-		Rescale_320xPAL8Scanline_To_256x1555Scanline(dest + i*destStride, src + i *srcStride, fastRam);			
+		Rescale_320xPAL8Scanline_To_256x1555Scanline(dest + i*destStride, src + i *srcStride, fastRam);
 	}
 }
 #endif

Modified: scummvm/trunk/backends/platform/ds/arm9/source/cdaudio.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/cdaudio.cpp	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/ds/arm9/source/cdaudio.cpp	2009-01-01 15:06:43 UTC (rev 35648)
@@ -19,7 +19,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
  */
- 
+
 #include "cdaudio.h"
 #include "backends/fs/ds/ds-fs.h"
 #include "common/config-manager.h"
@@ -53,9 +53,9 @@
 	u16			fmtExtraData;	// Number of extra fmt bytes
 	u16			fmtExtra;		// Samples per block (only for IMA-ADPCM files)
 } __attribute__ ((packed));
-	
+
 struct chunkHeader {
-	char 		name[4];	
+	char 		name[4];
 	u32			size;
 } __attribute__ ((packed));
 
@@ -112,7 +112,7 @@
 
 
 void allocBuffers() {
-	
+
 }
 
 void setActive(bool active) {
@@ -125,17 +125,17 @@
 
 void playTrack(int track, int numLoops, int startFrame, int duration) {
 	Common::String path = ConfMan.get("path");
-	
+
 	if (isPlayingFlag) {
 		stopTrack();
 	}
-	
+
 	if (trackStartsAt2) {
 		track++;
 	}
-	
-	
-	
+
+
+
 	char str[100];
 
 	if (path[strlen(path.c_str()) - 1] == '/') {
@@ -145,50 +145,50 @@
 		sprintf(str, "/track%d.wav", track);
 		path = path + str;
 	}
-	
-	
+
+
 	//1820160
-	
+
 	file = DS::std_fopen(path.c_str(), "rb");
-	
+
 	if (!file) {
 		consolePrintf("Failed to open %s!\n", path.c_str());
 		return;
 	}
-	
-	
+
+
 	DS::std_fread((const void *) &waveHeader, sizeof(waveHeader), 1, file);
-	
+
 	consolePrintf("Playing track %d\n", track);
 	consolePrintf("Format: %d\n", waveHeader.fmtFormatTag);
 	consolePrintf("Rate  : %d\n", waveHeader.fmtSamPerSec);
 	consolePrintf("Bits  : %d\n", waveHeader.fmtBitsPerSam);
 	consolePrintf("BlkSz : %d\n", waveHeader.fmtExtra);
-	
+
 	if ((waveHeader.fmtFormatTag != 17) && (waveHeader.fmtFormatTag != 20)) {
 		consolePrintf("Wave file is in the wrong format!  You must use IMA-ADPCM 4-bit mono.\n");
 		DS::std_fclose(file);
 		return;
 	}
-	
+
 	for (int r = 0; r < 8; r++) {
 		IPC->adpcm.buffer[r] = (u8 * volatile) (decoderFormat *) malloc(waveHeader.fmtBlockAlign);
 		IPC->adpcm.filled[r] = false;
 		IPC->adpcm.arm7Dirty[r] = false;
 	}
-	
+
 	// Skip chunks until we reach the data chunk
 	chunkHeader chunk;
 	DS::std_fread((const void *) &chunk, sizeof(chunkHeader), 1, file);
-	
+
 	while (!((chunk.name[0] == 'd') && (chunk.name[1] == 'a') && (chunk.name[2] == 't') && (chunk.name[3] == 'a'))) {
 		DS::std_fseek(file, chunk.size, SEEK_CUR);
 		DS::std_fread((const void *) &chunk, sizeof(chunkHeader), 1, file);
 	}
-	
+
 	dataChunkStart = DS::std_ftell(file);
-	
-	
+
+
 	static bool started = false;
 	sampleNum = 0;
 	blockCount = 0;
@@ -206,35 +206,35 @@
 		memset(audioBuffer, 0, BUFFER_SIZE * 2);
 		memset(decompressionBuffer, 0, waveHeader.fmtExtra * 2);
 		DS::playSound(audioBuffer, BUFFER_SIZE * 2, false, false, waveHeader.fmtSamPerSec);
-		
-	}	
+
+	}
 	fillPos = (IPC->streamPlayingSection + 1) & 3;
 	isPlayingFlag = true;
-	
-	
+
+
 	// Startframe is a 75Hz timer.  Dunno why, since nothing else
 	// seems to run at that rate.
 	int tenths = (startFrame * 10) / 75;
-	
+
 	// Seek to the nearest block start to the start time
 	int samples = (tenths * waveHeader.fmtSamPerSec) / 10;
 	int block = samples / waveHeader.fmtExtra;
-	
-	
+
+
 	if (duration == 0) {
 		blocksLeft = 0;
 	} else {
 		blocksLeft = ((((duration * 100) / 75) * (waveHeader.fmtSamPerSec)) / (waveHeader.fmtExtra) / 100) + 10;
 	}
 //	consolePrintf("Playing %d blocks (%d)\n\n", blocksLeft, duration);
-	
+
 	// No need to seek if we're starting from the beginning
 	if (block != 0) {
 		DS::std_fseek(file, dataChunkStart + block * waveHeader.fmtBlockAlign, SEEK_SET);
 //		consolePrintf("Startframe: %d  msec: %d (%d,%d)\n", startFrame, tenthssec, samples, block);
 	}
-	
-	
+
+
 	//decompressBlock();
 	playNextBlock();
 	DS::CD::numLoops = numLoops;
@@ -252,21 +252,21 @@
 void decompressBlock() {
 	int block[2048];
 	bool loop = false;
-	
+
 	blockCount++;
-	
+
 	if (blockCount < 10) return;
-	
-	
+
+
 	do {
 		DS::std_fread((const void *) &blockHeader, sizeof(blockHeader), 1, file);
-	
+
 		DS::std_fread(&block[0], waveHeader.fmtBlockAlign - sizeof(blockHeader), 1, file);
 
 		if (DS::std_feof(file) ) {
 			// Reached end of file, so loop
-			
-			
+
+
 			if ((numLoops == -1) || (numLoops > 1)) {
 				// Seek file to first packet
 				if (numLoops != -1) {
@@ -283,14 +283,14 @@
 				stopTrack();
 				return;
 			}
-			
+
 		} else {
 			loop = false;
 		}
-		
+
 	} while (loop);
-		
-		
+
+
 	if (blocksLeft > 0) {
 		blocksLeft--;
 	//	consolePrintf("%d ", blocksLeft);
@@ -305,37 +305,37 @@
 	          blockHeader.stepTableIndex,
 	          blockHeader.firstSample,
 	          decompressionBuffer);
-#else		
+#else
 	// First sample is in header
 	decompressionBuffer[0] = blockHeader.firstSample;
-	
+
 	// Set up initial table indeces
 	int stepTableIndex = blockHeader.stepTableIndex;
 	int prevSample = blockHeader.firstSample;
-	
+
 //	consolePrintf("Decompressing block step=%d fs=%d\n", stepTableIndex, prevSample);
 
 	for (int r = 0; r < waveHeader.fmtExtra - 1; r++) {
-		
+
 		int word = block[r >> 3];
 		int offset = 0;
-		
+
 		switch (7 - (r & 0x0007)) {
 			case 0: {
 				offset = (word & 0xF0000000) >> 28;
 				break;
 			}
-			
+
 			case 1: {
 				offset = (word & 0x0F000000) >> 24;
 				break;
 			}
-			
+
 			case 2: {
 				offset = (word & 0x00F00000) >> 20;
 				break;
 			}
-			
+
 			case 3: {
 				offset = (word & 0x000F0000) >> 16;
 				break;
@@ -361,42 +361,42 @@
 				break;
 			}
 		}
-		
+
 		int diff = 0;
-		
+
 		if (offset & 4) {
 			diff = diff + stepTab[stepTableIndex];
 		}
-		
+
 		if (offset & 2) {
 			diff = diff + (stepTab[stepTableIndex] >> 1);
 		}
-		
+
 		if (offset & 1) {
 			diff = diff + (stepTab[stepTableIndex] >> 2);
 		}
-		
+
 		diff = diff + (stepTab[stepTableIndex] >> 3);
-		
+
 		if (offset & 8) {
-			diff = -diff;		
+			diff = -diff;
 		}
-		
+
 		int newSample = prevSample + diff;
-		
+
 		if (newSample > 32767) newSample = 32767;
 		if (newSample < -32768) newSample = -32768;
-		
+
 		decompressionBuffer[r + 1] = newSample;
-		
+
 		prevSample = newSample;
-		
+
 		stepTableIndex += indexTab[offset];
-		
+
 		if (stepTableIndex > 88) stepTableIndex = 88;
 		if (stepTableIndex < 0) stepTableIndex = 0;
-		
 
+
 	}
 #endif
 }
@@ -404,21 +404,21 @@
 void playNextBlock() {
 	if (!isPlayingFlag) return;
 	int lastBlockId = -1;
-	
+
 	while (IPC->adpcm.semaphore);		// Wait for buffer to become free if needed
 	IPC->adpcm.semaphore = true;		// Lock the buffer structure to prevent clashing with the ARM7
 //	DC_FlushAll();
-	
+
 	//-8644, 25088
 	for (int block = fillPos + 1; block < fillPos + 4; block++) {
 
 		int blockId = block & 3;
-		
+
 		if (IPC->streamFillNeeded[blockId]) {
-			
+
 			IPC->streamFillNeeded[blockId] = false;
 //			DC_FlushAll();
-			
+
 /*			if (!(REG_KEYINPUT & KEY_R)) {
 				//consolePrintf("Align: %d First: %d  Step:%d  Res:%d\n", waveHeader.fmtBlockAlign, blockHeader.firstSample, blockHeader.stepTableIndex, blockHeader.reserved);
 				consolePrintf("Filling buffer %d\n", blockId);
@@ -432,19 +432,19 @@
 					}
 				}
 			}
-			
+
 			lastBlockId = blockId;
 			IPC->streamFillNeeded[blockId] = false;
 //			DC_FlushAll();
 
 		}
-	
-		
-		
+
+
+
 	}
-	
-	
-	
+
+
+
 	if (lastBlockId != -1) {
 		fillPos = lastBlockId;
 /*		if (!(REG_KEYINPUT & KEY_R)) {
@@ -459,18 +459,18 @@
 	if (!isPlayingFlag) return;
 
 	DS::std_fclose(file);
-	
+
 	isPlayingFlag = false;
-	
+
 	for (int r = 0; r < BUFFER_SIZE; r++) {
 		audioBuffer[r] = 0;
 	}
-	
+
 	for (int r= 0; r < waveHeader.fmtExtra; r++) {
 		decompressionBuffer[r] = 0;
 	}
 //	DS::stopSound(1);
-	
+
 //	free(audioBuffer);
 //	free(decompressionBuffer);
 
@@ -507,7 +507,7 @@
 bool checkCD() {
 	// Need to check whethe CD audio files are present - do this by trying to open Track1.wav.
 	consolePrintf("Attempted to open cd drive\n");
-	
+
 	if (trackExists(1)) {
 		trackStartsAt2 = false;
 		return true;

Modified: scummvm/trunk/backends/platform/ds/arm9/source/cdaudio.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/cdaudio.h	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/ds/arm9/source/cdaudio.h	2009-01-01 15:06:43 UTC (rev 35648)
@@ -19,7 +19,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
  */
- 
+
 #ifndef _CDAUDIO_H_
 #define _CDAUDIO_H_
 

Modified: scummvm/trunk/backends/platform/ds/arm9/source/console2.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/console2.h	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/ds/arm9/source/console2.h	2009-01-01 15:06:43 UTC (rev 35648)
@@ -25,7 +25,7 @@
 //
 // Changelog:
 //   0.1: First version
-//	 0.2: Fixed sprite mapping bug.  1D mapping should work now.  
+//	 0.2: Fixed sprite mapping bug.  1D mapping should work now.
 //			Changed some register defines for consistency.
 //
 //////////////////////////////////////////////////////////////////////
@@ -87,7 +87,7 @@
 //
 // Changelog:
 //   0.1: First version
-//	 0.2: Fixed sprite mapping bug.  1D mapping should work now.  
+//	 0.2: Fixed sprite mapping bug.  1D mapping should work now.
 //			Changed some register defines for consistency.
 //
 //////////////////////////////////////////////////////////////////////

Modified: scummvm/trunk/backends/platform/ds/arm9/source/dsmain.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/dsmain.cpp	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/ds/arm9/source/dsmain.cpp	2009-01-01 15:06:43 UTC (rev 35648)
@@ -19,8 +19,8 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
  */
- 
 
+
 // - Remove scummconsole.c
 // - Delete files
 // - Fatlib conversion?
@@ -244,10 +244,10 @@
 		// 150	  192
 		// 200	  128
 
-		// (256 << 8) / scale 
-		
+		// (256 << 8) / scale
 
 
+
 #ifdef USE_PROFILER
 int hBlankCount = 0;
 #endif
@@ -259,7 +259,7 @@
 gameListType gameList[NUM_SUPPORTED_GAMES] = {
 	// Unknown game - use normal SCUMM controls
 	{"unknown", 	CONT_SCUMM_ORIGINAL},
-	
+
 	// SCUMM games
 	{"maniac",		CONT_SCUMM_ORIGINAL},
 	{"zak",			CONT_SCUMM_ORIGINAL},
@@ -270,7 +270,7 @@
 	{"monkey2",		CONT_SCUMM_ORIGINAL},
 	{"tentacle",		CONT_SCUMM_ORIGINAL},
 	{"samnmax",		CONT_SCUMM_SAMNMAX},
-	
+
 	// Non-SCUMM games
 	{"sky",			CONT_SKY},
 	{"simon1",		CONT_SIMON},
@@ -356,8 +356,8 @@
 		// 150	  192
 		// 200	  128
 
-		// (256 << 8) / scale 
-		
+		// (256 << 8) / scale
+
 	s32 scale = (percentage << 8) / 100;
 	subScreenScale = (256 * 256) / scale;
 
@@ -374,11 +374,11 @@
 //plays an 8 bit mono sample at 11025Hz
 void playSound(const void* data, u32 length, bool loop, bool adpcm, int rate)
 {
-	
+
 	if (!IPC->soundData) {
 		soundControl.count = 0;
 	}
-	
+
 	soundControl.data[soundControl.count].data = data;
 	soundControl.data[soundControl.count].len = length | (loop? 0x80000000: 0x00000000);
 	soundControl.data[soundControl.count].rate = rate;		// 367 samples per frame
@@ -428,14 +428,14 @@
 	   sprites[i].attribute[2] = 0;
 	   sprites[i].filler = 0;
     }
-	
+
 	for (int i = 0; i < 128; i++) {
 	   spritesMain[i].attribute[0] = ATTR0_DISABLED;
 	   spritesMain[i].attribute[1] = 0;
 	   spritesMain[i].attribute[2] = 0;
 	   spritesMain[i].filler = 0;
     }
-	
+
 	updateOAM();
 }
 
@@ -446,7 +446,7 @@
 	// So, I lock the video memory here, as if I'm going to modify it.  This
 	// forces OSystem_DS to create a system memory copy if one doesn't exist.
 	// This will be automatially resotred by OSystem_DS::updateScreen().
-	
+
 	OSystem_DS::instance()->lockScreen();
 	OSystem_DS::instance()->unlockScreen();
 }
@@ -460,23 +460,23 @@
 
 	bufferFirstHalf = false;
 	bufferSecondHalf = true;
-	
+
 	int bytes = (2 * (bufferSamples)) + 100;
-	
+
 	soundBuffer = (s16 *) malloc(bytes * 2);
 	if (!soundBuffer)
 		consolePrintf("Sound buffer alloc failed\n");
 
 
 	soundHiPart = true;
-	
+
 	for (int r = 0; r < bytes; r++) {
 		soundBuffer[r] = 0;
 	}
 
 	soundFrequency = freq;
-	
 
+
 	swiWaitForVBlank();
 	swiWaitForVBlank();
 	playSound(soundBuffer, (bufferSamples * 2), true, false, freq * 2);
@@ -507,14 +507,14 @@
 //	consolePrintf("\n\n\n\nCurrent game: '%s' %d\n", gameName, gameName[0]);
 
 	currentGame = &gameList[0];		// Default game
-	
+
 	for (int r = 0; r < NUM_SUPPORTED_GAMES; r++) {
 		if (!stricmp(gameName, gameList[r].gameId)) {
 			currentGame = &gameList[r];
 //			consolePrintf("Game list num: %d\n", currentGame);
 		}
 	}
-		
+
 /*	if (firstTime) {
 		firstTime = false;
 
@@ -557,7 +557,7 @@
 	consolePrintf("displayMode8Bit...");
 #endif
 	u16 buffer[32 * 32];
-	
+
 	setKeyboardEnable(false);
 
 	if (!displayModeIs8Bit) {
@@ -568,7 +568,7 @@
 
 	consoleInitDefault((u16*)SCREEN_BASE_BLOCK(2), (u16*)CHAR_BASE_BLOCK(0), 16);
 	consolePrintSet(0, 23);
-	
+
 	if (!displayModeIs8Bit) {
 		for (int r = 0; r < 32 * 32; r++) {
 			((u16 *) SCREEN_BASE_BLOCK(2))[r] = buffer[r];
@@ -577,20 +577,20 @@
 	}
 
 	displayModeIs8Bit = true;
-	
+
 	if (isCpuScalerEnabled())
 	{
-		videoSetMode(MODE_5_2D | (consoleEnable? DISPLAY_BG0_ACTIVE: 0) | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP); 
+		videoSetMode(MODE_5_2D | (consoleEnable? DISPLAY_BG0_ACTIVE: 0) | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP);
 		videoSetModeSub(MODE_3_2D /*| DISPLAY_BG0_ACTIVE*/ | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP); //sub bg 0 will be used to print text
-	
+
 		vramSetBankA(VRAM_A_MAIN_BG_0x06000000);
 		vramSetBankB(VRAM_B_MAIN_BG_0x06020000);
-	
+
 		vramSetBankC(VRAM_C_SUB_BG_0x06200000);
 		vramSetBankD(VRAM_D_SUB_SPRITE);
-		
+
 		vramSetBankH(VRAM_H_LCD);
-	
+
 		BG3_CR = BG_BMP16_256x256 | BG_BMP_BASE(8);
 
 		BG3_XDX = 256;
@@ -601,27 +601,27 @@
 	}
 	else
 	{
-		videoSetMode(MODE_5_2D | (consoleEnable? DISPLAY_BG0_ACTIVE: 0) | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP); 
+		videoSetMode(MODE_5_2D | (consoleEnable? DISPLAY_BG0_ACTIVE: 0) | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP);
 		videoSetModeSub(MODE_3_2D /*| DISPLAY_BG0_ACTIVE*/ | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP); //sub bg 0 will be used to print text
-	
+
 		vramSetBankA(VRAM_A_MAIN_BG_0x06000000);
 		vramSetBankB(VRAM_B_MAIN_BG_0x06020000);
-	
+
 		vramSetBankC(VRAM_C_SUB_BG_0x06200000);
 		vramSetBankD(VRAM_D_SUB_SPRITE);
-		
+
 		vramSetBankH(VRAM_H_LCD);
-	
+
 		BG3_CR = BG_BMP8_512x256 | BG_BMP_BASE(8);
-		
+
 		BG3_XDX = (int) (((float) (gameWidth) / 256.0f) * 256);
 	    BG3_XDY = 0;
 	    BG3_YDX = 0;
 	    BG3_YDY = (int) ((200.0f / 192.0f) * 256);
-	}	
-	
+	}
+
 	SUB_BG3_CR = BG_BMP8_512x256;
-	
+
 	SUB_BG3_XDX = (int) (subScreenWidth / 256.0f * 256);
     SUB_BG3_XDY = 0;
     SUB_BG3_YDX = 0;
@@ -633,15 +633,15 @@
 
 	BG0_CR = BG_MAP_BASE(2) | BG_TILE_BASE(0);
 	BG0_Y0 = 0;
-	
-	// Restore palette entry used by text in the front-end	
+
+	// Restore palette entry used by text in the front-end
 //	PALETTE_SUB[255] = savedPalEntry255;
 
 
-	
-	
+
+
 	initGame();
-	
+
 	#ifdef HEAVY_LOGGING
 	consolePrintf("done\n");
 	#endif
@@ -653,9 +653,9 @@
 	}
 
 	uploadSpriteGfx();
-	
+
 	keyboardEnable = false;
-	
+
 }
 
 void setGameID(int id) {
@@ -668,22 +668,22 @@
 
 void checkSleepMode() {
 	if (IPC->performArm9SleepMode) {
-	
+
 		consolePrintf("ARM9 Entering sleep mode\n");
-		
+
 		int intSave = REG_IE;
 		irqSet(IRQ_VBLANK, dummyHandler);
 //		int irqHandlerSave = (int) IRQ_HANDLER;
 		REG_IE = IRQ_VBLANK;
 		//IRQ_HANDLER = dummyHandler;
-		
+
 		int powerSave = POWER_CR;
 		POWER_CR &= ~POWER_ALL;
-		
+
 		while (IPC->performArm9SleepMode) {
 			swiWaitForVBlank();
 		}
-		
+
 		POWER_CR = powerSave;
 //		IRQ_HANDLER = (void (*)()) irqHandlerSave;
 		irqSet(IRQ_VBLANK, VBlankHandler);
@@ -722,18 +722,18 @@
 
 	{
 		int off = 128*64;
-	
-	
+
+
 		memset(SPRITE_GFX + off, 0, 32 * 32 * 2);
 		memset(SPRITE_GFX_SUB + off, 0, 32 * 32 * 2);
 
-	
+
 		for (uint y=0; y<h; y++) {
 			for (uint x=0; x<w; x++) {
 				int color = icon[y*w+x];
 
 				//consolePrintf("%d:%d ", color, OSystem_DS::instance()->getDSPaletteEntry(color));
-	
+
 				if (color == keycolor) {
 					SPRITE_GFX[off+(y)*32+x] = 0x0000; // black background
 					SPRITE_GFX_SUB[off+(y)*32+x] = 0x0000; // black background
@@ -743,23 +743,23 @@
 				}
 			}
 		}
-	
+
 	}
 
 	if (currentGame->control != CONT_SCUMM_SAMNMAX)
 		return;
 
 	uint16 border = RGB15(24,24,24) | 0x8000;
-	
-	
+
+
 	int off = 176*64;
 	memset(SPRITE_GFX_SUB+off, 0, 64*64*2);
 	memset(SPRITE_GFX+off, 0, 64*64*2);
-	
+
 	int pos = 190 - (w+2);
-	
 
-	
+
+
 	// make border
 	for (uint i=0; i<w+2; i++) {
 		SPRITE_GFX[off+i] = border;
@@ -775,7 +775,7 @@
 		SPRITE_GFX_SUB[off+(i*64)] = border;
 		SPRITE_GFX_SUB[off+(i*64)+(w+1)] = border;
 	}
-	
+
 	int offset = (32 - h) >> 1;
 
 	for (uint y=0; y<h; y++) {
@@ -791,8 +791,8 @@
 			}
 		}
 	}
-	
-	
+
+
 	if ((cursorEnable)) {
 		sprites[1].attribute[0] = ATTR0_BMP | 150;
 		sprites[1].attribute[1] = ATTR1_SIZE_64 | pos;
@@ -827,7 +827,7 @@
 	}
 
 
-	videoSetMode(MODE_5_2D | /*DISPLAY_BG0_ACTIVE |*/ DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP); 
+	videoSetMode(MODE_5_2D | /*DISPLAY_BG0_ACTIVE |*/ DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP);
 	videoSetModeSub(MODE_0_2D | DISPLAY_BG0_ACTIVE |/* DISPLAY_BG1_ACTIVE |*/ DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP); //sub bg 0 will be used to print text
 
 	vramSetBankA(VRAM_A_MAIN_BG);
@@ -838,10 +838,10 @@
 
 	BG3_CR = BG_BMP16_512x256;
 	highBuffer = false;
-	
 
+
 	memset(BG_GFX, 0, 512 * 256 * 2);
-	
+
 	savedPalEntry255 = PALETTE_SUB[255];
 	PALETTE_SUB[255] = RGB15(31,31,31);//by default font will be rendered with color 255
 
@@ -860,11 +860,11 @@
 
 	consolePrintSet(0, 23);
 	consolePrintf("\n");
-	
+
 	// Show keyboard
 	SUB_BG1_CR = BG_TILE_BASE(1) | BG_MAP_BASE(12);
 	//drawKeyboard(1, 12);
-	
+
 	POWER_CR &= ~POWER_SWAP_LCDS;
 
 	displayModeIs8Bit = false;
@@ -887,10 +887,10 @@
 	#endif
 	if (!displayModeIs8Bit) {
 		u16* back = get16BitBackBuffer();
-	
+
 //		highBuffer = !highBuffer;
 //		BG3_CR = BG_BMP16_512x256 |	BG_BMP_RAM(highBuffer? 1: 0);
-		
+
 		if (isCpuScalerEnabled())
 		{
 			Rescale_320x256x1555_To_256x256x1555(BG_GFX, back, 512, 512);
@@ -912,14 +912,14 @@
         #endif
 		const u8* back = (const u8*)get8BitBackBuffer();
 		u16* base = BG_GFX + 0x10000;
-		Rescale_320x256xPAL8_To_256x256x1555( 
+		Rescale_320x256xPAL8_To_256x256x1555(
 			base,
 			back,
 			256,
 			get8BitBackBufferStride(),
-			BG_PALETTE, 
+			BG_PALETTE,
 			getGameHeight() );
-        
+
         #ifdef SCALER_PROFILE
         // 10 pixels : 1ms
         u16 t1 = TIMER1_DATA;
@@ -982,10 +982,10 @@
 	if (OSystem_DS::instance())
 	if (OSystem_DS::instance()->getMixerImpl()) {
 		lastCallbackFrame = frameCount;
-		
+
 		for (int r = IPC->playingSection; r < IPC->playingSection + 4; r++) {
 			int chunk = r & 3;
-			
+
 			if (IPC->fillNeeded[chunk]) {
 				IPC->fillNeeded[chunk] = false;
 				DC_FlushAll();
@@ -993,9 +993,9 @@
 				IPC->fillNeeded[chunk] = false;
 				DC_FlushAll();
 			}
-		
+
 		}
-		
+
 	}
 	#ifdef HEAVY_LOGGING
 	consolePrintf("done\n");
@@ -1007,7 +1007,7 @@
 		if (callbackTimer <= 0) {
 			callbackTimer += callbackInterval;
 			callback(callbackInterval);
-		}	
+		}
 	}
 }
 
@@ -1016,15 +1016,15 @@
 //		playSound(soundBuffer, (bufferSamples * 2), true);
 	}
 //	consolePrintf("%x\n", IPC->test);
-	
-	
+
+
 	if (bufferFrame == 0) {
 //		bufferFirstHalf = true;
-	}	
+	}
 	if (bufferFrame == bufferSize >> 1) {
 	//bufferSecondHalf = true;
-	}	
-	
+	}
+
 	bufferFrame++;
 	if (bufferFrame == bufferSize) {
 		bufferFrame = 0;
@@ -1037,20 +1037,20 @@
 	do {
 		p = (int *) malloc(r * 8192);
 		free(p);
-		r++;		
+		r++;
 	} while ((p) && (r < 512));
-	
+
 	int t = -1;
 	void* block[1024];
 	do {
 		t++;
 		block[t] = (int *) malloc(4096);
-	} while ((t < 1024) && (block[t]));		
-	
+	} while ((t < 1024) && (block[t]));
+
 	for (int q = 0; q < t; q++) {
 		free(block[q]);
 	}
-	
+
 	consolePrintf("Free: %dK, Largest: %dK\n", t * 4, r * 8);
 }
 
@@ -1061,7 +1061,7 @@
 
 	event.type = Common::EVENT_KEYDOWN;
 	event.kbd.flags = 0;
-	
+
 //	consolePrintf("Fight keys\n");
 
 	if ((getKeysDown() & KEY_L)) {
@@ -1091,16 +1091,16 @@
 		event.kbd.keycode = Common::KEYCODE_6;
 		event.kbd.ascii = '6';
 		system->addEvent(event);
-	}	
+	}
 	if ((getKeysChanged() & KEY_DOWN)) {
 		event.type = getKeyEvent(KEY_DOWN);
 		event.kbd.keycode = Common::KEYCODE_2;
 		event.kbd.ascii = '2';
 		system->addEvent(event);
 	}
-	
+
 	if (indyFightRight) {
-	
+
 		if ((getKeysChanged() & KEY_X)) {
 			event.type = getKeyEvent(KEY_X);
 			event.kbd.keycode = Common::KEYCODE_9;
@@ -1118,7 +1118,7 @@
 			event.kbd.keycode = Common::KEYCODE_3;
 			event.kbd.ascii = '3';
 			system->addEvent(event);
-		}	
+		}
 
 	} else {
 
@@ -1139,18 +1139,18 @@
 			event.kbd.keycode = Common::KEYCODE_1;
 			event.kbd.ascii = '1';
 			system->addEvent(event);
-		}	
-	
+		}
+
 	}
-	
-	
+
+
 	if ((getKeysChanged() & KEY_Y)) {
 		event.type = getKeyEvent(KEY_Y);
 		event.kbd.keycode = Common::KEYCODE_5;
 		event.kbd.ascii = '5';
 		system->addEvent(event);
 	}
-} 			
+}
 
 
 void setKeyboardEnable(bool en) {
@@ -1162,8 +1162,8 @@
 
 
 		DS::drawKeyboard(1, 15, backupBank);
-		
-		
+
+
 		SUB_BG1_CR = BG_TILE_BASE(1) | BG_MAP_BASE(15);
 
 		if (displayModeIs8Bit) {
@@ -1185,10 +1185,10 @@
 		for (int r = 0; r < 256; r++) {
 			BG_PALETTE_SUB[r] = BG_PALETTE[r];
 		}
-		
-		
+
+
 		//restoreVRAM(1, 12, backupBank);
-		
+
 		if (displayModeIs8Bit) {
 			// Copy the sub screen VRAM from the top screen - they should always be
 			// the same.
@@ -1200,17 +1200,17 @@
 					BG_GFX_SUB[y * 256 + x] = buffer[(y * (stride / 2)) + x];
 				}
 			}
-/*            
+/*
             for (int r = 0; r < (512 * 256) >> 1; r++)
                 BG_GFX_SUB[r] = buffer[r];
-  */              
+  */
 			SUB_DISPLAY_CR &= ~DISPLAY_BG1_ACTIVE;	// Turn off keyboard layer
 			SUB_DISPLAY_CR |= DISPLAY_BG3_ACTIVE;	// Turn on game layer
 		} else {
 			SUB_DISPLAY_CR &= ~DISPLAY_BG1_ACTIVE;	// Turn off keyboard layer
 			SUB_DISPLAY_CR |= DISPLAY_BG0_ACTIVE;	// Turn on console layer
 		}
-		
+
 		// Restore the screens so they're the right way round
 		if (gameScreenSwap) {
 			POWER_CR |= POWER_SWAP_LCDS;
@@ -1321,7 +1321,7 @@
 
 
 	if ((mouseMode != MOUSE_HOVER) || (!displayModeIs8Bit)) {
-		if (getPenDown() && (!(getKeysHeld() & KEY_L)) && (!(getKeysHeld() & KEY_R))) {	
+		if (getPenDown() && (!(getKeysHeld() & KEY_L)) && (!(getKeysHeld() & KEY_R))) {
 			if ((mouseMode == MOUSE_LEFT) || (!displayModeIs8Bit)) {
 				event.type = Common::EVENT_LBUTTONDOWN;
 				leftButtonDown = true;
@@ -1333,7 +1333,7 @@
 			event.mouse = Common::Point(getPenX(), getPenY());
 			system->addEvent(event);
 		}
-		
+
 	} else {
 		// In hover mode, D-pad left and right click the mouse when the pen is on the screen
 
@@ -1369,7 +1369,7 @@
 			if (getKeysDown() & KEY_LEFT) {
 				mouseMode = MOUSE_LEFT;
 			}
-		
+
 			if (rightButtonDown)
 			{
 				Common::Event event;
@@ -1378,8 +1378,8 @@
 				system->addEvent(event);
 				rightButtonDown = false;
 			}
-				
-		
+
+
 			if (getKeysDown() & KEY_RIGHT) {
 				if ((currentGame->control != CONT_SCUMM_SAMNMAX) && (currentGame->control != CONT_FUTURE_WARS) && (currentGame->control != CONT_GOBLINS)) {
 					mouseMode = MOUSE_RIGHT;
@@ -1387,7 +1387,7 @@
 					// If we're playing sam and max, click and release the right mouse
 					// button to change verb
 					Common::Event event;
-		
+
 					if (currentGame->control == CONT_FUTURE_WARS) {
 						event.mouse = Common::Point(320 - 128, 200 - 128);
 						event.type = Common::EVENT_MOUSEMOVE;
@@ -1395,20 +1395,20 @@
 					} else {
 						event.mouse = Common::Point(getPenX(), getPenY());
 					}
-					
+
 					rightButtonDown = true;
-		
-		
+
+
 					event.type = Common::EVENT_RBUTTONDOWN;
 					system->addEvent(event);
-		
+
 					//event.type = Common::EVENT_RBUTTONUP;
 					//system->addEvent(event);
 				}
 			}
-		
-		
-		
+
+
+
 			if (getKeysDown() & KEY_UP) {
 				mouseMode = MOUSE_HOVER;
 			}
@@ -1423,7 +1423,7 @@
 	OSystem_DS* system = OSystem_DS::instance();
 	Common::Event event;
 
-	
+
 #ifdef USE_PROFILER
 	if (keysDown() & KEY_R) {
 		cygprofile_begin();
@@ -1435,7 +1435,7 @@
 	}
 #endif
 
-	
+
 	if (system->isEventQueueEmpty()) {
 
 /*
@@ -1444,8 +1444,8 @@
 			consolePrintf("Tweak: %d\n", tweak);
 			IPC->tweakChanged = true;
 		}
-		
 
+
 		if (getKeysDown() & KEY_R) {
 			tweak++;
 			consolePrintf("Tweak: %d\n", tweak);
@@ -1460,14 +1460,14 @@
 
 			if (!indyFightState) {
 
-				if ((!(getKeysHeld() & KEY_L)) && (!(getKeysHeld() & KEY_R)) && (getKeysDown() & KEY_B)) {	
+				if ((!(getKeysHeld() & KEY_L)) && (!(getKeysHeld() & KEY_R)) && (getKeysDown() & KEY_B)) {
 					if (currentGame->control == CONT_AGI) {
 						event.kbd.keycode = Common::KEYCODE_RETURN;
 						event.kbd.ascii = 13;
 						event.kbd.flags = 0;
 					} else {
-						event.kbd.keycode = Common::KEYCODE_ESCAPE;		
-						event.kbd.ascii = 27;		
+						event.kbd.keycode = Common::KEYCODE_ESCAPE;
+						event.kbd.ascii = 27;
 						event.kbd.flags = 0;
 					}
 
@@ -1477,11 +1477,11 @@
 					event.type = Common::EVENT_KEYUP;
 					system->addEvent(event);
 				}
-		
+
 			}
-			
-		
-			
+
+
+
 			if ((!getIndyFightState()) && (getKeysDown() & KEY_Y)) {
 				consoleEnable = !consoleEnable;
 				if (displayModeIs8Bit) {
@@ -1490,7 +1490,7 @@
 					displayMode16Bit();
 				}
 			}
-	
+
 			if ((getKeyboardEnable())) {
 				event.kbd.flags = 0;
 
@@ -1498,30 +1498,30 @@
 				bool release = getKeysReleased() & (KEY_LEFT | KEY_RIGHT | KEY_UP | KEY_DOWN);
 				bool shoulders = getKeysHeld() & (KEY_L | KEY_R);
 
-				if ( (down && (!shoulders)) || release) 
+				if ( (down && (!shoulders)) || release)
 				{
-	
+
 					if (getKeysChanged() & KEY_LEFT) {
 						event.kbd.keycode = Common::KEYCODE_LEFT;
 						event.kbd.ascii = 0;
 						event.type = getKeyEvent(KEY_LEFT);
 						system->addEvent(event);
 					}
-	
+
 					if (getKeysChanged() & KEY_RIGHT) {
 						event.kbd.keycode = Common::KEYCODE_RIGHT;
 						event.kbd.ascii = 0;
 						event.type = getKeyEvent(KEY_RIGHT);
 						system->addEvent(event);
 					}
-	
+
 					if (getKeysChanged() & KEY_UP) {
 						event.kbd.keycode = Common::KEYCODE_UP;
 						event.kbd.ascii = 0;
 						event.type = getKeyEvent(KEY_UP);
 						system->addEvent(event);
 					}
-	
+
 					if (getKeysChanged() & KEY_DOWN) {
 						event.kbd.keycode = Common::KEYCODE_DOWN;
 						event.kbd.ascii = 0;
@@ -1529,9 +1529,9 @@
 						system->addEvent(event);
 					}
 				}
-					
+
 			}
-	
+
 			if (!((getKeysHeld() & KEY_L) || (getKeysHeld() & KEY_R)) && (!getIndyFightState()) && (!getKeyboardEnable())) {
 
 				if ((getKeysDown() & KEY_A) && (!indyFightState)) {
@@ -1544,10 +1544,10 @@
 					}
 
 				}
-	
-	
-					
-				
+
+
+
+
 			}
 
 			if ((getKeysDown() & KEY_SELECT)) {
@@ -1556,18 +1556,18 @@
 				showOptionsDialog();
 			}
 
-			
+
 		}
-	
+
 		if (!getIndyFightState() && !((getKeysHeld() & KEY_L) || (getKeysHeld() & KEY_R)) && (getKeysDown() & KEY_X)) {
 			setKeyboardEnable(!keyboardEnable);
 		}
-		
-		updateStatus();			
-		
+
+		updateStatus();
+
 		Common::Event event;
 
-	
+
 		if (!keyboardEnable) {
 
 			if ((tapScreenClicks) && (getIsDisplayMode8Bit()))
@@ -1578,11 +1578,11 @@
 			{
 				doButtonSelectMode(system);
 			}
-			
+
 			if (((!(getKeysHeld() & KEY_L)) && (!(getKeysHeld() & KEY_R)) || (indyFightState))  && (displayModeIs8Bit)) {
 				// Controls specific to the control method
-			
-			
+
+
 				if (currentGame->control == CONT_SKY) {
 					// Extra controls for Beneath a Steel Sky
 					if ((getKeysDown() & KEY_DOWN)) {
@@ -1595,7 +1595,7 @@
 					// Extra controls for Simon the Sorcerer
 					if ((getKeysDown() & KEY_DOWN)) {
 						Common::Event event;
-					
+
 						event.type = Common::EVENT_KEYDOWN;
 						event.kbd.keycode = Common::KEYCODE_F10;		// F10 or # - show hotspots
 						event.kbd.ascii = Common::ASCII_F10;
@@ -1608,13 +1608,13 @@
 					}
 				}
 
-	
-	
+
+
 				if (currentGame->control == CONT_SCUMM_ORIGINAL) {
 					// Extra controls for Scumm v1-5 games
 					if ((getKeysDown() & KEY_DOWN)) {
 						Common::Event event;
-					
+
 						event.type = Common::EVENT_KEYDOWN;
 						event.kbd.keycode = Common::KEYCODE_PERIOD;		// Full stop - skips current dialogue line
 						event.kbd.ascii = '.';
@@ -1624,19 +1624,19 @@
 						event.type = Common::EVENT_KEYUP;
 						system->addEvent(event);
 					}
-					
+
 					if (indyFightState) {
 						addIndyFightingKeys();
 					}
-					
+
 				}
-				
+
 			}
 		}
-		
+
 		if (!displayModeIs8Bit) {
 			// Front end controls
-			
+
 			if (leftHandedSwap(getKeysChanged()) & KEY_UP) {
 				event.type = getKeyEvent(leftHandedSwap(KEY_UP));
 				event.kbd.keycode = Common::KEYCODE_UP;
@@ -1663,10 +1663,10 @@
 				event.type = Common::EVENT_KEYUP;
 				system->addEvent(event);
 			}
-		
+
 		}
 
-		
+
 		if ((getKeysChanged() & KEY_START)) {
 			event.type = getKeyEvent(KEY_START);
 			if (currentGame->control == CONT_FUTURE_WARS) {
@@ -1688,34 +1688,34 @@
 			system->addEvent(event);
 		}
 
-		
+
 		if (keyboardEnable) {
 			DS::addKeyboardEvents();
 		}
-		
+
 		consumeKeys();
-		
+
 		consumePenEvents();
 
 	}
 }
 
 
-		
+
 void triggerIcon(int imageNum) {
 	triggeredIcon = imageNum;
-	triggeredIconTimeout = 120;	
+	triggeredIconTimeout = 120;
 }
-	
 
+
 void setIcon(int num, int x, int y, int imageNum, int flags, bool enable) {
-	sprites[num].attribute[0] = ATTR0_BMP | (enable? (y & 0xFF): 192) | (!enable? ATTR0_DISABLED: 0); 
+	sprites[num].attribute[0] = ATTR0_BMP | (enable? (y & 0xFF): 192) | (!enable? ATTR0_DISABLED: 0);
 	sprites[num].attribute[1] = ATTR1_SIZE_32 | (x & 0x1FF) | flags;
 	sprites[num].attribute[2] = ATTR2_ALPHA(1)| (imageNum * 16);
 }
 
 void setIconMain(int num, int x, int y, int imageNum, int flags, bool enable) {
-	spritesMain[num].attribute[0] = ATTR0_BMP | (y & 0xFF) | (!enable? ATTR0_DISABLED: 0); 
+	spritesMain[num].attribute[0] = ATTR0_BMP | (y & 0xFF) | (!enable? ATTR0_DISABLED: 0);
 	spritesMain[num].attribute[1] = ATTR1_SIZE_32 | (x & 0x1FF) | flags;
 	spritesMain[num].attribute[2] = ATTR2_ALPHA(1)| (imageNum * 16);
 }
@@ -1744,17 +1744,17 @@
 					break;
 				}
 			}
-		
+
 			setIcon(0, 208, 150, offs, 0, true);
 		}
-	
+
 		if (indyFightState) {
 			setIcon(1, (190 - 32), 150, 3, (indyFightRight? 0: ATTR1_FLIP_X), true);
 //			consolePrintf("%d\n", indyFightRight);
 		} else {
 //			setIcon(1, 0, 0, 0, 0, false);
 		}
-		
+
 		if (triggeredIconTimeout > 0) {
 			triggeredIconTimeout--;
 			setIcon(4, 16, 150, triggeredIcon, 0, true);
@@ -1793,7 +1793,7 @@
 	} else {
 //		bufferFirstHalf = true;
 	}
-	
+
 	soundHiPart = !soundHiPart;
 }
 
@@ -1804,7 +1804,7 @@
 	} else */{
 		BG3_CX = x + (((frameCount & 1) == 0)? 64: 0);
 		BG3_CY = y;
-		
+
 		if ((!gameScreenSwap) || (touchPadStyle)) {
 			touchX = x >> 8;
 			touchY = y >> 8;
@@ -1827,14 +1827,14 @@
 			BG3_YDY = y;
 		}
 		else
-		{	
+		{
 			BG3_XDX = x;
 			BG3_XDY = 0;
 			BG3_YDX = 0;
 			BG3_YDY = y;
 		}
-		
-		if ((!gameScreenSwap) || (touchPadStyle)) {		
+
+		if ((!gameScreenSwap) || (touchPadStyle)) {
 			touchScX = x;
 			touchScY = y;
 		}
@@ -1845,7 +1845,7 @@
 /*	if (gameScreenSwap) {
 		BG3_CX = x + ((shake && ((frameCount & 1) == 0))? 64: 0);
 		BG3_CY = y;
-		
+
 		touchX = x >> 8;
 		touchY = y >> 8;
 	} else */{
@@ -1908,8 +1908,8 @@
 	soundUpdate();
 
 
-	
 
+
 	if ((!gameScreenSwap) && (!(getKeysHeld() & KEY_L) && !(getKeysHeld() & KEY_R))) {
 		if (currentGame) {
 			if (currentGame->control != CONT_SCUMM_SAMNMAX) {
@@ -1923,14 +1923,14 @@
 			}
 		}
 	}
-	
 
+
 	penUpdate();
 	keysUpdate();
 
 
 	frameCount++;
-	
+
 	if ((cursorEnable) && (mouseCursorVisible)) {
 		if (!keyboardEnable) {
 			storedMouseX = penX;
@@ -1953,31 +1953,31 @@
 	if (callback) {
 		callbackTimer -= FRAME_TIME;
 	}
-	
+
 	if ((getKeysHeld() & KEY_L) || (getKeysHeld() & KEY_R)) {
-	
+
 		if ((!dragging) && (getPenHeld()) && (penDownFrames > 5)) {
 			dragging = true;
 			dragStartX = penX;
 			dragStartY = penY;
-			
+
 			if (gameScreenSwap) {
 				dragScX = subScTargetX;
 				dragScY = subScTargetY;
 			} else {
 				dragScX = scX;
-				dragScY = scY;				
-			}	
-			
-			
+				dragScY = scY;
+			}
+
+
 		}
-		
+
 		if ((dragging) && (!getPenHeld())) {
 			dragging = false;
 		}
-		
+
 		if (dragging) {
-		
+
 			if (gameScreenSwap) {
 				subScTargetX = dragScX + ((dragStartX - penX) << 8);
 				subScTargetY = dragScY + ((dragStartY - penY) << 8);
@@ -1985,18 +1985,18 @@
 				scX = dragScX + ((dragStartX - penX));
 				scY = dragScY + ((dragStartY - penY));
 			}
-			
+
 //			consolePrintf("X:%d Y:%d\n", dragStartX - penX, dragStartY - penY);
 		}
-	}	
-	
-	
+	}
+
+
 /*	if ((frameCount & 1) == 0) {
 		SUB_BG3_CX = subScX;
 	} else {
 		SUB_BG3_CX = subScX + 64;
 	}
-	
+
 	SUB_BG3_CY = subScY + (shakePos << 8);*/
 
 	/*SUB_BG3_XDX = (int) (subScreenWidth / 256.0f * 256);
@@ -2005,26 +2005,26 @@
     SUB_BG3_YDY = (int) (subScreenHeight / 192.0f * 256);*/
 
 	static int ratio = (320 << 8) / SCUMM_GAME_WIDTH;
-	
+
 	bool zooming = false;
-	
+
 	if ((getKeysHeld() & KEY_L) || (getKeysHeld() & KEY_R)) {
 		if ((getKeysHeld() & KEY_A) && (subScreenScale < ratio)) {
 			subScreenScale += 1;
 			zooming = true;
 		}
-		
+
 		if ((getKeysHeld() & KEY_B) && (subScreenScale > 128)) {
 			subScreenScale -=1;
 			zooming = true;
 		}
 	}
 
-	
+
 	int xCenter = subScTargetX + ((subScreenWidth >> 1) << 8);
 	int yCenter = subScTargetY + ((subScreenHeight >> 1) << 8);
 
-	
+
 	if (twoHundredPercentFixedScale) {
 		subScreenWidth = 256 >> 1;
 		subScreenHeight = 192 >> 1;
@@ -2033,9 +2033,9 @@
 //		subScreenHeight = SCUMM_GAME_HEIGHT * subScreenScale >> 8;
 
 
-		subScreenWidth = (256 * subScreenScale) >> 8; 
+		subScreenWidth = (256 * subScreenScale) >> 8;
 		subScreenHeight = (192 * subScreenScale) >> 8;
-		
+
 		if ( ((subScreenWidth) > 256 - 8) && ((subScreenWidth) < 256 + 8) ) {
 			subScreenWidth = 256;
 			subScreenHeight = 192;
@@ -2064,14 +2064,14 @@
 			//triggerIcon(-1);
 		}
 	}
-	
 
+
 	subScTargetX = xCenter - ((subScreenWidth >> 1) << 8);
 	subScTargetY = yCenter - ((subScreenHeight >> 1) << 8);
-	
 
-	
 
+
+
 	if (subScTargetX < 0) subScTargetX = 0;
 	if (subScTargetX > (gameWidth - subScreenWidth) << 8) subScTargetX = (gameWidth - subScreenWidth) << 8;
 
@@ -2082,30 +2082,30 @@
 
 	subScX += (subScTargetX - subScX) >> 2;
 	subScY += (subScTargetY - subScY) >> 2;
-	
+
 	if (displayModeIs8Bit) {
-	
+
 		if ((getKeysHeld() & KEY_L) || (getKeysHeld() & KEY_R)) {
-			
+
 			int offsX = 0, offsY = 0;
 
 
 			if (getKeysHeld() & KEY_LEFT) {
 				offsX -= 1;
 			}
-			
+
 			if (getKeysHeld() & KEY_RIGHT) {
 				offsX += 1;
 			}
-	
+
 			if (getKeysHeld() & KEY_UP) {
 				offsY -= 1;
 			}
-	
+
 			if (getKeysHeld() & KEY_DOWN) {
 				offsY += 1;
 			}
-			
+
 			if (((gameScreenSwap) && (getKeysHeld() & KEY_L)) || ((!gameScreenSwap) && (getKeysHeld() & KEY_R))) {
 				subScTargetX += offsX << 8;
 				subScTargetY += offsY << 8;
@@ -2116,32 +2116,32 @@
 		}
 
 		if (!scaledMode) {
-			
+
 			if (scX + 256 > gameWidth - 1) {
 				scX = gameWidth - 1 - 256;
 			}
-	
+
 			if (scX < 0) {
 				scX = 0;
 			}
-	
+
 			if (scY + 192 > gameHeight - 1) {
 				scY = gameHeight - 1 - 192;
 			}
-	
+
 			if (scY < 0) {
 				scY = 0;
 			}
-			
+
 			setZoomedScreenScroll(subScX, subScY, (subScreenWidth != 256) && (subScreenWidth != 128));
 			setZoomedScreenScale(subScreenWidth, ((subScreenHeight * (256 << 8)) / 192) >> 8);
-	
-		
+
+
 			setMainScreenScroll(scX << 8, (scY << 8) + (shakePos << 8));
 			setMainScreenScale(256, 256);		// 1:1 scale
-	
+
 		} else {
-		
+
 			if (scY > gameHeight - 192 - 1) {
 				scY = gameHeight - 192 - 1;
 			}
@@ -2149,13 +2149,13 @@
 			if (scY < 0) {
 				scY = 0;
 			}
-		
+
 			setZoomedScreenScroll(subScX, subScY, (subScreenWidth != 256) && (subScreenWidth != 128));
 			setZoomedScreenScale(subScreenWidth, ((subScreenHeight * (256 << 8)) / 192) >> 8);
-	
+
 			setMainScreenScroll(64, (scY << 8) + (shakePos << 8));
 			setMainScreenScale(320, 256);		// 1:1 scale
-			
+
 		}
 	} else {
 		setZoomedScreenScroll(0, 0, true);
@@ -2164,12 +2164,12 @@
 		setMainScreenScroll(0, 0);
 		setMainScreenScale(320, 256);		// 1:1 scale
 	}
-	
+
 	// Enable on screen keyboard when pen taps icon
 	if ((keyboardIcon) && (penX < 32) && (penY > 160) && (penHeld)) {
 		setKeyboardEnable(true);
 	}
-	
+
 	if (keyboardEnable) {
 		if (DS::getKeyboardClosed()) {
 			setKeyboardEnable(false);
@@ -2219,7 +2219,7 @@
 
 	if (subScTargetY < 0) subScTargetY = 0;
 	if (subScTargetY > gameHeight - subScreenHeight) subScTargetY = gameHeight - subScreenHeight;
-	
+
 	subScTargetX <<=8;
 	subScTargetY <<=8;
 }
@@ -2233,8 +2233,8 @@
 #endif
 
 void uploadSpriteGfx() {
-	vramSetBankD(VRAM_D_SUB_SPRITE); 
-	vramSetBankE(VRAM_E_MAIN_SPRITE); 
+	vramSetBankD(VRAM_D_SUB_SPRITE);
+	vramSetBankE(VRAM_E_MAIN_SPRITE);
 
 	// Convert texture from 24bit 888 to 16bit 1555, remembering to set top bit!
 	u8* srcTex = (u8 *) ::icons_raw;
@@ -2242,7 +2242,7 @@
 		SPRITE_GFX_SUB[r] = 0x8000 | (srcTex[r * 3] >> 3) | ((srcTex[r * 3 + 1] >> 3) << 5) | ((srcTex[r * 3 + 2] >> 3) << 10);
 		SPRITE_GFX[r] = 0x8000 | (srcTex[r * 3] >> 3) | ((srcTex[r * 3 + 1] >> 3) << 5) | ((srcTex[r * 3 + 2] >> 3) << 10);
 	}
-	
+
 }
 
 void initHardware() {
@@ -2253,12 +2253,12 @@
 	penInit();
 
 	powerON(POWER_ALL);
-/*	vramSetBankA(VRAM_A_MAIN_BG); 
-	vramSetBankB(VRAM_B_MAIN_BG); 
+/*	vramSetBankA(VRAM_A_MAIN_BG);
+	vramSetBankB(VRAM_B_MAIN_BG);
 	vramSetBankC(VRAM_C_SUB_BG); */
-	vramSetBankD(VRAM_D_SUB_SPRITE); 
-	vramSetBankE(VRAM_E_MAIN_SPRITE); 
-	
+	vramSetBankD(VRAM_D_SUB_SPRITE);
+	vramSetBankE(VRAM_E_MAIN_SPRITE);
+
 	currentTimeMillis = 0;
 
 
@@ -2286,8 +2286,8 @@
 	// Allocate save buffer for game screen
 //	savedBuffer = new u8[320 * 200];
 	displayMode16Bit();
-	
-	memset(BG_GFX, 0, 512 * 256 * 2);	
+
+	memset(BG_GFX, 0, 512 * 256 * 2);
 	scaledMode = true;
 	scX = 0;
 	scY = 0;
@@ -2295,33 +2295,33 @@
 	subScY = 0;
 	subScTargetX = 0;
 	subScTargetY = 0;
-	
+
 	//lcdSwap();
 	POWER_CR &= ~POWER_SWAP_LCDS;
-	
+
 	frameCount = 0;
 	callback = NULL;
-	
-//	vramSetBankH(VRAM_H_SUB_BG); 
-	
 
+//	vramSetBankH(VRAM_H_SUB_BG);
+
+
 //	// Do text stuff
 	//BG0_CR = BG_MAP_BASE(0) | BG_TILE_BASE(1);
 //	BG0_Y0 = 48;
-	
+
 	PALETTE[255] = RGB15(31,31,31);//by default font will be rendered with color 255
-	
+
 	//consoleInit() is a lot more flexible but this gets you up and running quick
 //	consoleInitDefault((u16*)SCREEN_BASE_BLOCK(0), (u16*)CHAR_BASE_BLOCK(1), 16);
 	//consolePrintSet(0, 6);
-	
+
 	//irqs are nice
 	irqInit();
 //	irqInitHandler();
 	irqSet(IRQ_VBLANK, VBlankHandler);
 	irqSet(IRQ_TIMER0, timerTickHandler);
 	irqSet(IRQ_TIMER2, soundBufferEmptyHandler);
-	
+
 	irqEnable(IRQ_VBLANK);
 	irqEnable(IRQ_TIMER0);
 	irqEnable(IRQ_TIMER2);
@@ -2330,15 +2330,15 @@
 	irqSet(IRQ_HBLANK, hBlankHandler);
 	irqEnable(IRQ_HBLANK);
 #endif
-	
-	
+
+
 	// Set up a millisecond timer
 	#ifdef HEAVY_LOGGING
 	consolePrintf("Setting up timer...");
 	#endif
 	TIMER0_CR = 0;
 	TIMER0_DATA = (u32) TIMER_FREQ(1000);
-	TIMER0_CR = TIMER_ENABLE | TIMER_DIV_1 | TIMER_IRQ_REQ;	
+	TIMER0_CR = TIMER_ENABLE | TIMER_DIV_1 | TIMER_IRQ_REQ;
 	REG_IME = 1;
 	#ifdef HEAVY_LOGGING
 	consolePrintf("done\n");
@@ -2347,7 +2347,7 @@
 	PALETTE[255] = RGB15(0,0,31);
 
 	initSprites();
-	
+
 //	videoSetModeSub(MODE_3_2D | DISPLAY_BG0_ACTIVE | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP); //sub bg 0 will be used to print text
 
 	// If the software scaler's back buffer has not been allocated, do it now
@@ -2405,7 +2405,7 @@
 
 		if ((tapTimeout >= 0)) {
 			tapTimeout++;
-	
+
 			if (((tapTimeout > 15) || (tapCount == 2)) && (tapCount > 0)) {
 				tapComplete = tapCount;
 				tapCount = 0;
@@ -2413,8 +2413,8 @@
 			}
 		}
 
-		
 
+
 		if ((penHeld) && (!penDownThisFrame)) {
 			if ((touchPadStyle) || (moved) || (tapCount == 1)) {
 				if ((penDownFrames > 0) && (penDownFrames < 6) && ((tapTimeout == -1) || (tapTimeout > 2))) {
@@ -2427,15 +2427,15 @@
 		}
 	}
 
-	
 
+
 	if ((touchPadStyle) && (getIsDisplayMode8Bit())) {
-	
-		if ((penDownFrames > 0)) {			
-	
-	
+
+		if ((penDownFrames > 0)) {
+
+
 			if ((penHeld)) {
-	
+
 				if (penDownThisFrame)
 				{
 					if (penDownFrames >= 2) {
@@ -2446,13 +2446,13 @@
 
 						if ((ABS(diffX) < 35) && (ABS(diffY) < 35))
 						{
-	
+
 							if (speed >= 8)
 							{
 								diffX *= ((speed >> 3) * touchPadSensitivity) >> 3;
 								diffY *= ((speed >> 3) * touchPadSensitivity) >> 3;
 							}
-		
+
 							penX += diffX;
 							penY += diffY;
 							if (penX > 255) penX = 255;
@@ -2460,30 +2460,30 @@
 							if (penY > 191) penY = 191;
 							if (penY < 0) penY = 0;
 						}
-	
+
 //						consolePrintf("x: %d y: %d\n", IPC->touchYpx - penDownY, IPC->touchYpx - penDownY);
 						penDownX = IPC->touchXpx;
 						penDownY = IPC->touchYpx;
-	
+
 					}
 				}
 				else
 				{
 				}
-	
-	
+
+
 			} else {
 				penDown = true;
 				penHeld = true;
 				penDownSaved = true;
-	
+
 				// First frame, so save pen positions
 				if (penDownThisFrame) {
 					penDownX = IPC->touchXpx;
 					penDownY = IPC->touchYpx;
 				}
 			}
-	
+
 		} else {
 			if (penHeld) {
 				penReleased = true;
@@ -2491,13 +2491,13 @@
 			} else {
 				penReleased = false;
 			}
-	
+
 			penDown = false;
 			penHeld = false;
 		}
 	} else {
 		if ((penDownFrames > 1)) {			// Is this right?  Dunno, but it works for me.
-	
+
 			if ((penHeld)) {
 				penHeld = true;
 				penDown = false;
@@ -2512,9 +2512,9 @@
 				penY = IPC->touchYpx + touchYOffset;
 				moved = true;
 			}
-					
 
-	
+
+
 		} else {
 			if (penHeld) {
 				penReleased = true;
@@ -2522,12 +2522,12 @@
 			} else {
 				penReleased = false;
 			}
-	
+
 			penDown = false;
 			penHeld = false;
 		}
-	
-	
+
+
 	}
 
 
@@ -2545,20 +2545,20 @@
 	// Start and select are unchanged
 	if (leftHandedMode) {
 		int result = keys & (~(KEY_R | KEY_L | KEY_Y | KEY_A | KEY_B | KEY_X | KEY_LEFT | KEY_RIGHT | KEY_UP | KEY_DOWN));
-		
+
 		if (keys & KEY_L) result |= KEY_R;
 		if (keys & KEY_R) result |= KEY_L;
-	
+
 		if (keys & KEY_LEFT) result |= KEY_Y;
 		if (keys & KEY_RIGHT) result |= KEY_A;
 		if (keys & KEY_DOWN) result |= KEY_B;
 		if (keys & KEY_UP) result |= KEY_X;
-	
+
 		if (keys & KEY_Y) result |= KEY_LEFT;
 		if (keys & KEY_A) result |= KEY_RIGHT;
 		if (keys & KEY_B) result |= KEY_DOWN;
 		if (keys & KEY_X) result |= KEY_UP;
-	
+
 		return result;
 	} else {
 		return keys;
@@ -2647,10 +2647,10 @@
 
 GLvector getPenPos() {
 	GLvector v;
-	
+
 	v.x = (penX * inttof32(1)) / SCREEN_WIDTH;
 	v.y = (penY * inttof32(1)) / SCREEN_HEIGHT;
-	
+
 	return v;
 }
 
@@ -2659,18 +2659,18 @@
 void formatSramOption() {
 	consolePrintf("The following files are present in save RAM:\n");
 	DSSaveFileManager::instance()->listFiles();
-	
+
 	consolePrintf("\nAre you sure you want to\n");
 	consolePrintf("DELETE all files?\n");
 	consolePrintf("A = Yes, X = No\n");
-	
+
 	while (true) {
 		if (keysHeld() & KEY_A) {
 			DSSaveFileManager::instance()->formatSram();
 			consolePrintf("SRAM cleared!\n");
 			return;
 		}
-	
+
 		if (keysHeld() & KEY_X) {
 			consolePrintf("Whew, that was close!\n");
 			return;
@@ -2708,7 +2708,7 @@
 	if(fastRamPointer > fastRamData + FAST_RAM_SIZE) {
 		consolePrintf("FastRam (ITCM) allocation failed!\n");
 		return NULL;
-	}		
+	}
 	return result;
 }
 
@@ -2723,7 +2723,7 @@
 
 bool GBAMPAvail = false;
 
-bool initGBAMP(int mode) {	
+bool initGBAMP(int mode) {
 	if (FAT_InitFiles()) {
 		if (mode == 2)	{
 			disc_IsInserted();
@@ -2748,14 +2748,14 @@
 	set_verbosity(VERBOSE_INFO | VERBOSE_ERROR);
 	wireless_init(0);
 	wireless_connect();
-	
+
 	// This is where the address of the computer running the Java
 	// stub goes.
 	debugger_connect_tcp(192, 168, 0, 1);
-	debugger_init();	
-	
+	debugger_init();
+
 	// Update function - should really call every frame
-	user_debugger_update();	
+	user_debugger_update();
 }
 
 
@@ -2788,7 +2788,7 @@
 void reboot() {
 	int deviceType = -1;
 
-	
+
 	if (disc_getDeviceId() == DEVICE_DLDI) {
 
 		char id[6];
@@ -2855,7 +2855,7 @@
 	consolePrintf("Blue screen of death");
 	setExceptionHandler(NULL);
 
-	
+
 	u32	currentMode = getCPSR() & 0x1f;
 	u32 thumbState = ((*(u32*)0x027FFD90) & 0x20);
 
@@ -2871,7 +2871,7 @@
 			exceptionAddress = getExceptionAddress( codeAddress, thumbState);
 		else
 			exceptionAddress = codeAddress;
-			
+
 	} else {
 		if (thumbState)
 			offset = 2;
@@ -2919,13 +2919,13 @@
 		initDebugger();
 	}
 #endif
-	
+
 	// Let arm9 read cartridge
 	*((u16 *) (0x04000204)) &= ~0x0080;
-	
+
 	lastCallbackFrame = 0;
 	tweak = 0;
-	
+
 	indyFightState = false;
 	indyFightRight = true;
 
@@ -2938,26 +2938,26 @@
 
 //	bufferSize = 10;
 
-	
+
 	/*bufferRate = 44100;
 	bufferFrame = 0;
 	bufferSamples = 8192;
 
 	bufferFirstHalf = false;
 	bufferSecondHalf = true;
-	
+
 	int bytes = (2 * (bufferSamples)) + 100;
-	
+
 	soundBuffer = (s16 *) malloc(bytes * 2);
 
 
 	soundHiPart = true;
-	
+
 	for (int r = 0; r < bytes; r++) {
 		soundBuffer[r] = 0;
 	}
-	
 
+
 	swiWaitForVBlank();
 	swiWaitForVBlank();
 	playSound(soundBuffer, (bufferSamples * 2), true);
@@ -2965,30 +2965,30 @@
 	swiWaitForVBlank();
 	swiWaitForVBlank();
 */
-	
 
+
 	lastEventFrame = 0;
 	mouseMode = MOUSE_LEFT;
-	
 
+
 /*
 	TIMER1_CR = 0;
 	TIMER1_DATA = TIMER_FREQ(bufferRate);
 	TIMER1_CR = TIMER_ENABLE | TIMER_DIV_1;
-	
+
 	TIMER2_CR = 0;
 	TIMER2_DATA = 0xFFFF - (bufferSamples / 2);
 	TIMER2_CR = TIMER_ENABLE | TIMER_IRQ_REQ | TIMER_CASCADE;
 	*/
 	// 2945 - 2947
-	
 
-	
+
+
 //	for (int r = 2946; r < 3000; r++) {
 //		soundBuffer[r] = 30000;
 //	}
-	
 
+
 	//2372
 	consolePrintf("-------------------------------\n");
 	consolePrintf("ScummVM DS\n");
@@ -3040,7 +3040,7 @@
 	consolePrintf("\n");
 #endif
 
-	
+
 #ifdef USE_BUILT_IN_DRIVER_SELECTION
 	// Do M3 detection selectioon
 	int extraData = DSSaveFileManager::getExtraData();
@@ -3079,7 +3079,7 @@
 	disc_setEnable(mode);
 	DSSaveFileManager::setExtraData(mode);
 #else
-	
+
 	int mode = 0;
 
 #endif
@@ -3125,11 +3125,11 @@
 	}
 	delete node;
 
-	
 
+
 	updateStatus();
-	
-	
+
+
 //	OSystem_DS::instance();
 
 	g_system = new OSystem_DS();

Modified: scummvm/trunk/backends/platform/ds/arm9/source/dsmain.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/dsmain.h	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/ds/arm9/source/dsmain.h	2009-01-01 15:06:43 UTC (rev 35648)
@@ -19,7 +19,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
  */
- 
+
 #ifndef _DSMAIN_H
 #define _DSMAIN_H
 
@@ -93,7 +93,7 @@
 void 	doTimerCallback();												// Call callback function if required
 
 // Sound
-void 	doSoundCallback();												
+void 	doSoundCallback();
 void 	startSound(int freq, int buffer);	// Start sound hardware
 // Call function if sound buffers need more data
 void 	playSound(const void* data, u32 length, bool loop, bool adpcm = false, int rate = 22050);		// Start a sound

Modified: scummvm/trunk/backends/platform/ds/arm9/source/dsoptions.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/dsoptions.cpp	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/ds/arm9/source/dsoptions.cpp	2009-01-01 15:06:43 UTC (rev 35648)
@@ -19,7 +19,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
  */
- 
+
 #include "dsoptions.h"
 #include "dsmain.h"
 #include "gui/dialog.h"
@@ -98,7 +98,7 @@
 	_tab->setActiveTab(0);
 
 	_radioButtonMode = false;
-	
+
 #ifdef DS_SCUMM_BUILD
 	if (!DS::isGBAMPAvailable()) {
 //		addButton(this, 100, 140, "Delete Save", 'dels', 'D');
@@ -112,11 +112,11 @@
 //	_cpuScaler = new GUI::CheckboxWidget(this, 160, 115, 90, 20, "CPU scaler", 0, 'T');
 //#endif
 
-	
 
 
 
 
+
 	if (ConfMan.hasKey("snaptoborder", "ds")) {
 		_snapToBorderCheckbox->setState(ConfMan.getBool("snaptoborder", "ds"));
 	} else {
@@ -145,13 +145,13 @@
 		_unscaledCheckbox->setState(false);
 	}
 
-	
+
 	if (ConfMan.hasKey("topscreenzoom", "ds")) {
 
-		_100PercentCheckbox->setState(false);		
-		_150PercentCheckbox->setState(false);		
-		_200PercentCheckbox->setState(false);		
-		
+		_100PercentCheckbox->setState(false);
+		_150PercentCheckbox->setState(false);
+		_200PercentCheckbox->setState(false);
+
 		switch (ConfMan.getInt("topscreenzoom", "ds"))
 		{
 			case 100: {
@@ -237,7 +237,7 @@
 	if (!_cpuScaler->getState() && !_unscaledCheckbox->getState()) {
 		_hardScaler->setState(true);
 	}
-		
+
 	_radioButtonMode = true;
 }
 
@@ -293,17 +293,17 @@
 			_cpuScaler->setState(false);
 			_hardScaler->setState(false);
 			_unscaledCheckbox->setState(false);
-		
+
 			if ((sender == _cpuScaler) && (cmd == 0x10000002))
 			{
 				_cpuScaler->setState(true);
 			}
-		
+
 			if ((sender == _hardScaler) && (cmd == 0x10000001))
 			{
 				_hardScaler->setState(true);
 			}
-	
+
 			if ((sender == _unscaledCheckbox) && (cmd == 0x10000003))
 			{
 				_unscaledCheckbox->setState(true);
@@ -392,11 +392,11 @@
 		OSystem_DS* system = OSystem_DS::instance();
 
 		event.type = Common::EVENT_KEYDOWN;
-		event.kbd.keycode = Common::KEYCODE_p;		
+		event.kbd.keycode = Common::KEYCODE_p;
 		event.kbd.ascii = 'p';
 		event.kbd.flags = 0;
 		system->addEvent(event);
-	
+
 		event.type = Common::EVENT_KEYUP;
 		system->addEvent(event);
 	}
@@ -407,12 +407,12 @@
 	togglePause();
 
 	DS::displayMode16Bit();
-	
 
+
 	DSOptionsDialog* d = new DSOptionsDialog();
 	d->runModal();
 	delete d;
-	
+
 	DS::displayMode8Bit();
 
 	togglePause();
@@ -487,7 +487,7 @@
 	} else {
 		DS::setCpuScalerEnable(false);
 	}
-#endif	
+#endif
 
 	if (ConfMan.hasKey("screentaps", "ds")) {
 		DS::setTapScreenClicksEnable(ConfMan.getBool("screentaps", "ds"));
@@ -497,7 +497,7 @@
 
 	if (ConfMan.hasKey("touchpad", "ds")) {
 		bool enable = ConfMan.getBool("touchpad", "ds");
-		
+
 		DS::setTrackPadStyleEnable(enable);
 
 		if ((enable) and (firstLoad)) {
@@ -509,7 +509,7 @@
 		if (enable) {
 			DS::setTapScreenClicksEnable(true);
 		}
-			
+
 	} else {
 		DS::setTrackPadStyleEnable(false);
 	}

Modified: scummvm/trunk/backends/platform/ds/arm9/source/fat/disc_io.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/fat/disc_io.h	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/ds/arm9/source/fat/disc_io.h	2009-01-01 15:06:43 UTC (rev 35648)
@@ -7,7 +7,7 @@
 // Use DMA to read the card, remove this line to use normal reads/writes
 // #define _CF_USE_DMA
 
-// Allow buffers not aligned to 16 bits when reading files. 
+// Allow buffers not aligned to 16 bits when reading files.
 // Note that this will slow down access speed, so only use if you have to.
 // It is also incompatible with DMA
 #define _CF_ALLOW_UNALIGNED
@@ -43,7 +43,7 @@
 
 // This allows the code to build on an earlier version of libnds, before the register was renamed
 #ifndef REG_EXMEMCNT
-#define REG_EXMEMCNT REG_EXEMEMCNT 
+#define REG_EXMEMCNT REG_EXEMEMCNT
 #endif
 
 #ifndef REG_EXEMEMCNT
@@ -70,7 +70,7 @@
 #endif
 
 // Disable NDS specific hardware and features if running on a GBA
-#ifndef NDS 
+#ifndef NDS
  #undef SUPPORT_NMMC
  #undef DISC_CACHE
 #endif

Modified: scummvm/trunk/backends/platform/ds/arm9/source/fat/gba_nds_fat.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/fat/gba_nds_fat.h	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/ds/arm9/source/fat/gba_nds_fat.h	2009-01-01 15:06:43 UTC (rev 35648)
@@ -147,7 +147,7 @@
 
 /*-----------------------------------------------------------------
 FAT_GetLongFilename
-Get the long name of the last file or directory retrived with 
+Get the long name of the last file or directory retrived with
 	GetDirEntry. Also works for FindFirstFile and FindNextFile
 char* filename: OUT will be filled with the filename, should be at
 	least 256 bytes long
@@ -210,7 +210,7 @@
 Gets the name of the next directory entry
 	(can be a file or subdirectory)
 char* filename: OUT filename, must be at least 13 chars long
-FILE_TYPE return: OUT returns FT_NONE if failed, 
+FILE_TYPE return: OUT returns FT_NONE if failed,
 	FT_FILE if it found a file and FT_DIR if it found a directory
 -----------------------------------------------------------------*/
 FILE_TYPE FAT_FindNextFile (char* filename);
@@ -220,7 +220,7 @@
 Gets the name of the first directory entry and resets the count
 	(can be a file or subdirectory)
 char* filename: OUT filename, must be at least 13 chars long
-FILE_TYPE return: OUT returns FT_NONE if failed, 
+FILE_TYPE return: OUT returns FT_NONE if failed,
 	FT_FILE if it found a file and FT_DIR if it found a directory
 -----------------------------------------------------------------*/
 FILE_TYPE FAT_FindFirstFile (char* filename);
@@ -230,7 +230,7 @@
 Gets the long file name of the first directory entry and resets
 	the count (can be a file or subdirectory)
 char* lfn: OUT long file name, must be at least 256 chars long
-FILE_TYPE return: OUT returns FT_NONE if failed, 
+FILE_TYPE return: OUT returns FT_NONE if failed,
 	FT_FILE if it found a file and FT_DIR if it found a directory
 -----------------------------------------------------------------*/
 FILE_TYPE FAT_FindFirstFileLFN(char* lfn);
@@ -240,16 +240,16 @@
 Gets the long file name of the next directory entry
 	(can be a file or subdirectory)
 char* lfn: OUT long file name, must be at least 256 chars long
-FILE_TYPE return: OUT returns FT_NONE if failed, 
+FILE_TYPE return: OUT returns FT_NONE if failed,
 	FT_FILE if it found a file and FT_DIR if it found a directory
 -----------------------------------------------------------------*/
 FILE_TYPE FAT_FindNextFileLFN(char* lfn);
 
 /*-----------------------------------------------------------------
 FAT_FileExists
-Returns the type of file 
+Returns the type of file
 char* filename: IN filename of the file to look for
-FILE_TYPE return: OUT returns FT_NONE if there is now file with 
+FILE_TYPE return: OUT returns FT_NONE if there is now file with
 	that name, FT_FILE if it is a file and FT_DIR if it is a directory
 -----------------------------------------------------------------*/
 FILE_TYPE FAT_FileExists (const char* filename);
@@ -269,7 +269,7 @@
 /*-----------------------------------------------------------------
 FAT_chdir
 Changes the current working directory
-const char* path: IN null terminated string of directory separated by 
+const char* path: IN null terminated string of directory separated by
 	forward slashes, / is root
 bool return: OUT returns true if successful
 -----------------------------------------------------------------*/
@@ -282,12 +282,12 @@
 /*-----------------------------------------------------------------
 FAT_fopen(filename, mode)
 Opens a file
-const char* path: IN null terminated string of filename and path 
+const char* path: IN null terminated string of filename and path
 	separated by forward slashes, / is root
 const char* mode: IN mode to open file in
 	Supported modes: "r", "r+", "w", "w+", "a", "a+", don't use
 	"b" or "t" in any mode, as all files are openned in binary mode
-FAT_FILE* return: OUT handle to open file, returns -1 if the file 
+FAT_FILE* return: OUT handle to open file, returns -1 if the file
 	couldn't be openned
 -----------------------------------------------------------------*/
 FAT_FILE* FAT_fopen(const char* path, const char* mode);
@@ -338,7 +338,7 @@
 FAT_fwrite(buffer, size, count, file)
 Writes size * count bytes into file from buffer, starting
 	from current position. It then sets the current position to the
-	byte after the last byte written. If the file was openned in 
+	byte after the last byte written. If the file was openned in
 	append mode it always writes to the end of the file.
 const void* buffer IN: Pointer to buffer containing data. Should be
 	at least as big as the number of bytes to be written.
@@ -371,7 +371,7 @@
 #ifdef CAN_WRITE_TO_DISC
 /*-----------------------------------------------------------------
 FAT_mkdir (path)
-Makes a new directory, so long as no other directory or file has 
+Makes a new directory, so long as no other directory or file has
 	the same name.
 const char* path IN: Path and filename of directory to make
 int return OUT: zero if successful, non-zero if not
@@ -403,9 +403,9 @@
 Gets a up to num bytes from file, stopping at the first
  newline.
 
-CAUTION: does not do strictly streaming. I.e. it's 
+CAUTION: does not do strictly streaming. I.e. it's
  reading more then needed bytes and seeking back.
- shouldn't matter for random access 
+ shouldn't matter for random access
 
 char *tgtBuffer OUT: buffer to write to
 int num IN: size of target buffer

Modified: scummvm/trunk/backends/platform/ds/arm9/source/fat/io_dldi.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/fat/io_dldi.h	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/ds/arm9/source/fat/io_dldi.h	2009-01-01 15:06:43 UTC (rev 35648)
@@ -1,8 +1,8 @@
 /*
-	io_dldi.h 
+	io_dldi.h
 
 	Reserved space for new drivers
-	
+
 	This software is completely free. No warranty is provided.
 	If you use it, please give me credit and email me about your
 	project at chishm at hotmail.com

Modified: scummvm/trunk/backends/platform/ds/arm9/source/fat/io_fcsr.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/fat/io_fcsr.h	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/ds/arm9/source/fat/io_fcsr.h	2009-01-01 15:06:43 UTC (rev 35648)
@@ -1,5 +1,5 @@
 /*
-	io_fcsr.h 
+	io_fcsr.h
 
 	Hardware Routines for using a GBA Flash Cart with SRAM
 
@@ -23,7 +23,7 @@
 
 #endif	// define IO_FCSR_H
 /*
-	io_fcsr.h 
+	io_fcsr.h
 
 	Hardware Routines for using a GBA Flash Cart with SRAM
 

Modified: scummvm/trunk/backends/platform/ds/arm9/source/fat/io_m3_common.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/fat/io_m3_common.h	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/ds/arm9/source/fat/io_m3_common.h	2009-01-01 15:06:43 UTC (rev 35648)
@@ -1,5 +1,5 @@
 /*
- io_m3_common.h 
+ io_m3_common.h
 
  Routines common to all version of the M3
 
@@ -7,7 +7,7 @@
  Some code written by SaTa may have been unknowingly used.
 
  Copyright (c) 2006 Michael "Chishm" Chisholm
-	
+
  Redistribution and use in source and binary forms, with or without modification,
  are permitted provided that the following conditions are met:
 
@@ -40,7 +40,7 @@
 
 // Values for changing mode
 #define M3_MODE_ROM 0x00400004
-#define M3_MODE_MEDIA 0x00400003 
+#define M3_MODE_MEDIA 0x00400003
 
 extern void _M3_changeMode (u32 mode);
 

Modified: scummvm/trunk/backends/platform/ds/arm9/source/fat/io_m3cf.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/fat/io_m3cf.h	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/ds/arm9/source/fat/io_m3cf.h	2009-01-01 15:06:43 UTC (rev 35648)
@@ -1,5 +1,5 @@
 /*
-	io_m3cf.h 
+	io_m3cf.h
 
 	Hardware Routines for reading a compact flash card
 	using the M3 CF
@@ -24,7 +24,7 @@
 
 #endif	// define IO_M3CF_H
 /*
-	io_m3cf.h 
+	io_m3cf.h
 
 	Hardware Routines for reading a compact flash card
 	using the M3 CF

Modified: scummvm/trunk/backends/platform/ds/arm9/source/fat/io_mmcf.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/fat/io_mmcf.h	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/ds/arm9/source/fat/io_mmcf.h	2009-01-01 15:06:43 UTC (rev 35648)
@@ -1,5 +1,5 @@
 /*
-	io_mmcf.h 
+	io_mmcf.h
 
 	Hardware Routines for reading a compact flash card
 	using the GBA Movie Player

Modified: scummvm/trunk/backends/platform/ds/arm9/source/fat/io_mpcf.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/fat/io_mpcf.h	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/ds/arm9/source/fat/io_mpcf.h	2009-01-01 15:06:43 UTC (rev 35648)
@@ -1,5 +1,5 @@
 /*
-	io_mpcf.h 
+	io_mpcf.h
 
 	Hardware Routines for reading a compact flash card
 	using the GBA Movie Player
@@ -24,7 +24,7 @@
 
 #endif	// define IO_MPCF_H
 /*
-	io_mpcf.h 
+	io_mpcf.h
 
 	Hardware Routines for reading a compact flash card
 	using the GBA Movie Player

Modified: scummvm/trunk/backends/platform/ds/arm9/source/fat/io_njsd.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/fat/io_njsd.h	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/ds/arm9/source/fat/io_njsd.h	2009-01-01 15:06:43 UTC (rev 35648)
@@ -1,11 +1,11 @@
 /*
- io_njsd.h 
+ io_njsd.h
 
  Hardware Routines for reading an SD card using
  a NinjaDS SD adapter.
 
  Copyright (c) 2006 Michael "Chishm" Chisholm
-	
+
  Redistribution and use in source and binary forms, with or without modification,
  are permitted provided that the following conditions are met:
 

Modified: scummvm/trunk/backends/platform/ds/arm9/source/fat/io_nmmc.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/fat/io_nmmc.h	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/ds/arm9/source/fat/io_nmmc.h	2009-01-01 15:06:43 UTC (rev 35648)
@@ -1,5 +1,5 @@
 /*
-	io_NMMC.h 
+	io_NMMC.h
 
 	Hardware Routines for reading an SD or MMC card using
 	a Neoflash MK2 or MK3.
@@ -26,7 +26,7 @@
 
 #endif	// define IO_NMMC_H
 /*
-	io_NMMC.h 
+	io_NMMC.h
 
 	Hardware Routines for reading an SD or MMC card using
 	a Neoflash MK2 or MK3.

Modified: scummvm/trunk/backends/platform/ds/arm9/source/fat/io_sccf.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/fat/io_sccf.h	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/ds/arm9/source/fat/io_sccf.h	2009-01-01 15:06:43 UTC (rev 35648)
@@ -1,5 +1,5 @@
 /*
-	io_sccf.h 
+	io_sccf.h
 
 	Hardware Routines for reading a compact flash card
 	using the Supercard CF
@@ -24,7 +24,7 @@
 
 #endif	// define IO_SCCF_H
 /*
-	io_sccf.h 
+	io_sccf.h
 
 	Hardware Routines for reading a compact flash card
 	using the Supercard CF

Modified: scummvm/trunk/backends/platform/ds/arm9/source/fat/io_scsd.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/fat/io_scsd.h	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/ds/arm9/source/fat/io_scsd.h	2009-01-01 15:06:43 UTC (rev 35648)
@@ -1,12 +1,12 @@
 /*
 	io_scsd.h by SaTa.
 	based on io_sccf.h
-	
-	
+
+
 */
 
 /*
-	io_sccf.h 
+	io_sccf.h
 
 	Hardware Routines for reading a compact flash card
 	using the GBA Movie Player
@@ -26,4 +26,4 @@
 // export interface
 extern LPIO_INTERFACE SCSD_GetInterface(void) ;
 
-#endif	// define IO_SCSD_H
\ No newline at end of file
+#endif	// define IO_SCSD_H

Modified: scummvm/trunk/backends/platform/ds/arm9/source/fat/io_sd_common.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/fat/io_sd_common.h	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/ds/arm9/source/fat/io_sd_common.h	2009-01-01 15:06:43 UTC (rev 35648)
@@ -8,7 +8,7 @@
  SD routines partially based on sd.s by Romman
 
  Copyright (c) 2006 Michael "Chishm" Chisholm
-	
+
  Redistribution and use in source and binary forms, with or without modification,
  are permitted provided that the following conditions are met:
 
@@ -32,7 +32,7 @@
 
 	2006-07-11 - Chishm
 		* Original release
-	
+
 	2006-07-28 - Chishm
 		* Changed voltage range that the SD card can use
 */
@@ -76,7 +76,7 @@
 #define SD_STATE_IDENT 2	// Identification state, after ALL_SEND_CID
 #define SD_STATE_STBY 3		// Standby state, when card is deselected
 #define SD_STATE_TRAN 4		// Transfer state, after card is selected and ready for data transfer
-#define SD_STATE_DATA 5		// 
+#define SD_STATE_DATA 5		//
 #define SD_STATE_RCV 6		// Receive data state
 #define SD_STATE_PRG 7		// Programming state
 #define SD_STATE_DIS 8		// Disconnect state
@@ -85,7 +85,7 @@
 #define READY_FOR_DATA 1	// bit 8 in card status
 
 /*
-Calculate the CRC7 of a command and return it preshifted with 
+Calculate the CRC7 of a command and return it preshifted with
 an end bit added
 */
 extern u8 _SD_CRC7(u8* data, int size);
@@ -106,7 +106,7 @@
 use4bitBus: initialise card to use a 4 bit data bus when communicating with the card
 RCA: a pointer to the location to store the card's Relative Card Address, preshifted up by 16 bits.
 */
-extern bool _SD_InitCard (_SD_FN_CMD_6BYTE_RESPONSE cmd_6byte_response, 
+extern bool _SD_InitCard (_SD_FN_CMD_6BYTE_RESPONSE cmd_6byte_response,
 							_SD_FN_CMD_17BYTE_RESPONSE cmd_17byte_response,
 							bool use4bitBus,
 							u32 *RCA);

Modified: scummvm/trunk/backends/platform/ds/arm9/source/gbampsave.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/gbampsave.cpp	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/ds/arm9/source/gbampsave.cpp	2009-01-01 15:06:43 UTC (rev 35648)
@@ -93,40 +93,40 @@
 
 		memcpy(buffer + bufferPos, buf, size);
 		bufferPos += size;
-		
+
 		saveSize += size;
 
 
 /*		int pos = 0;
-		
+
 		int rest = SAVE_BUFFER_SIZE - bufferPos;
 		memcpy(buffer + bufferPos, buf, rest);
 		bufferPos = 512;
 		pos += rest;
-		flushSaveBuffer();		
+		flushSaveBuffer();
 		size -= rest;
 //		consolePrintf("First section: %d\n", rest);
-		
+
 		while (size >= 512) {
 			DS::std_fwrite(((char *) (buf)) + pos, 1, 512, handle);
 			size -= 512;
 			pos += 512;
 //			consolePrintf("Full chunk, %d left ", size);
 		}
-		
+
 		bufferPos = 0;
 		memcpy(buffer + bufferPos, ((char *) (buf)) + pos, size);
 		bufferPos += size;
 //		consolePrintf("%d left in buffer ", bufferPos);*/
-		
+
 	} else {
-	
+
 		memcpy(buffer + bufferPos, buf, size);
 		bufferPos += size;
-		
+
 		saveSize += size;
 	}
-	
+
 //	if ((size > 100) || (size <= 0)) consolePrintf("Write %d bytes\n", size);
 	return size;
 }
@@ -146,24 +146,24 @@
 
 GBAMPSaveFile* GBAMPSaveFileManager::openSavefile(char const* name, bool saveOrLoad) {
 	char fileSpec[128];
-	
+
 	strcpy(fileSpec, getSavePath());
-	
+
 	if (fileSpec[strlen(fileSpec) - 1] == '/') {
 		sprintf(fileSpec, "%s%s", getSavePath(), name);
 	} else {
 		sprintf(fileSpec, "%s/%s", getSavePath(), name);
 	}
-	
+
 //	consolePrintf("Opening the file: %s\n", fileSpec);
 	GBAMPSaveFile* sf = new GBAMPSaveFile(fileSpec, saveOrLoad);
 	if (sf->isOpen()) {
 //		consolePrintf("Ok");
-		return sf;	
+		return sf;
 	} else {
 //		consolePrintf("Fail");
 		delete sf;
-		return NULL;	
+		return NULL;
 	}
 }
 
@@ -189,11 +189,11 @@
 	return dir;
 }
 
-Common::StringList GBAMPSaveFileManager::listSavefiles(const char *pattern) { 
+Common::StringList GBAMPSaveFileManager::listSavefiles(const char *pattern) {
 
 	enum { TYPE_NO_MORE = 0, TYPE_FILE = 1, TYPE_DIR = 2 };
 	char name[256];
-	
+
 	{
 		char dir[128];
 		strcpy(dir, getSavePath());
@@ -218,13 +218,13 @@
 
 //	consolePrintf("Save path: '%s', pattern: '%s'\n", getSavePath(), pattern);
 
-	
+
 	int fileType = FAT_FindFirstFileLFN(name);
 
 	Common::StringList list;
 
 	do {
-	
+
 		if (fileType == TYPE_FILE) {
 
 			FAT_GetLongFilename(name);
@@ -232,18 +232,18 @@
 			for (int r = 0; name[r] != 0; r++) {
 				name[r] = tolower(name[r]);
 			}
-			
-			
+
+
 			if (Common::matchString(name, pattern)) {
 				list.push_back(name);
 			}
 		}
 
 	} while ((fileType = FAT_FindNextFileLFN(name)));
-	
+
 	FAT_chdir("/");
 
 	return list;
-}	
+}
 
 

Modified: scummvm/trunk/backends/platform/ds/arm9/source/gbampsave.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/gbampsave.h	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/ds/arm9/source/gbampsave.h	2009-01-01 15:06:43 UTC (rev 35648)
@@ -19,7 +19,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
  */
- 
+
 #ifndef _GBAMPSAVE_H_
 #define _GBAMPSAVE_H_
 
@@ -38,19 +38,19 @@
 public:
 	GBAMPSaveFile(char* name, bool saveOrLoad);
 	virtual ~GBAMPSaveFile();
-		
+
 	virtual uint32 read(void *buf, uint32 size);
 	virtual uint32 write(const void *buf, uint32 size);
-	
+
 	virtual bool eos() const;
 	virtual bool skip(uint32 bytes);
 
 	virtual int32 pos() const;
 	virtual int32 size() const;
 	virtual bool seek(int32 pos, int whence);
-	
+
 	void flushSaveBuffer();
-	
+
 	virtual bool isOpen() const {
 		return handle != 0;
 	}
@@ -61,17 +61,17 @@
 public:
 	GBAMPSaveFileManager();
 	~GBAMPSaveFileManager();
-	
+
 //	static GBAMPSaveFileManager* instance() { return instancePtr; }
 
 	GBAMPSaveFile *openSavefile(const char *filename, bool saveOrLoad);
-	
+
 	virtual Common::OutSaveFile* openForSaving(const char* filename) { return openSavefile(filename, true); }
 	virtual Common::InSaveFile* openForLoading(const char* filename) { return openSavefile(filename, false); }
-	
+
 	virtual bool removeSavefile(const char *filename) { return false; } // TODO: Implement this
 	virtual Common::StringList listSavefiles(const char *pattern);
-	
+
 	void deleteFile(char* name);
 	void listFiles();
 

Modified: scummvm/trunk/backends/platform/ds/arm9/source/keys.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/keys.cpp	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/ds/arm9/source/keys.cpp	2009-01-01 15:06:43 UTC (rev 35648)
@@ -27,26 +27,26 @@
 	$Log: keys.c,v $
 	Revision 1.13  2006/01/12 09:10:47  wntrmute
 	Added key repeat as suggested by pepsiman
-	
+
 	Revision 1.12  2005/11/27 12:30:25  wntrmute
 	reverted to correct hardware REGisters
-	
+
 	Revision 1.11  2005/11/27 07:48:45  joatski
 	Renamed REG_KEYINPUT and REG_KEYCNT back to KEYS and KEYS_CR, as the alternatives are defined in registers_alt.h.
 	Changed function returns to uint32
-	
+
 	Revision 1.10  2005/11/03 23:38:49  wntrmute
 	don't use enum for key function returns
-	
+
 	Revision 1.9  2005/10/13 16:30:11  dovoto
 	Changed KEYPAD_BITS to a typedef enum, this resolved some issues with multiple redefinition of KEYPAD_BITS (although this error did not allways occur).
-	
+
 	Revision 1.8  2005/10/03 21:21:59  wntrmute
 	use enum types
-	
+
 	Revision 1.7  2005/09/07 18:06:27  wntrmute
 	use new register names
-	
+
 	Revision 1.6  2005/08/23 17:06:10  wntrmute
 	converted all endings to unix
 
@@ -148,4 +148,4 @@
 }
 
 
-} // namespace ds
\ No newline at end of file
+} // namespace ds

Modified: scummvm/trunk/backends/platform/ds/arm9/source/osystem_ds.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/osystem_ds.cpp	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/ds/arm9/source/osystem_ds.cpp	2009-01-01 15:06:43 UTC (rev 35648)
@@ -63,7 +63,7 @@
 	tm->handler();
 	return t;
 }
-   
+
 void OSystem_DS::initBackend() {
 	ConfMan.setInt("autosave_period", 0);
 	ConfMan.setBool("FM_medium_quality", true);
@@ -80,7 +80,7 @@
 
 	_mixer->setOutputRate(DS::getSoundFrequency());
 	_mixer->setReady(true);
-    
+
 	OSystem::initBackend();
 }
 
@@ -149,13 +149,13 @@
 		int red = *colors;
 		int green = *(colors + 1);
 		int blue = *(colors + 2);
-		
+
 		red >>= 3;
 		green >>= 3;
 		blue >>= 3;
-		
+
 //		if (r != 255)
-		{		
+		{
 			u16 paletteValue = red | (green << 5) | (blue << 10);
 
 			if (DS::getIsDisplayMode8Bit()) {
@@ -168,7 +168,7 @@
 			_palette[r] = paletteValue;
 		}
 	//	if (num == 255) consolePrintf("pal:%d r:%d g:%d b:%d\n", r, red, green, blue);
-		
+
 		colors += 4;
 	}
 }
@@ -180,14 +180,14 @@
 		int red = *colors;
 		int green = *(colors + 1);
 		int blue = *(colors + 2);
-		
+
 		red >>= 3;
 		green >>= 3;
 		blue >>= 3;
-		
+
 		u16 paletteValue = red | (green << 5) | (blue << 10);
 		_cursorPalette[r] = paletteValue;
-	
+
 		colors += 4;
 	}
 
@@ -198,8 +198,8 @@
 	surf->create(DS::getGameWidth(), DS::getGameHeight(), 1);
 
 	// Ensure we copy using 16 bit quantities due to limitation of VRAM addressing
-	
 
+
 	const u16* image = (const u16 *) DS::get8BitBackBuffer();
 	for (int y = 0; y <  DS::getGameHeight(); y++)
 	{
@@ -215,7 +215,7 @@
 
 void OSystem_DS::grabPalette(unsigned char *colors, uint start, uint num) {
 //	consolePrintf("Grabpalette");
-	
+
 	for (unsigned int r = start; r < start + num; r++) {
 		*colors++ = (BG_PALETTE[r] & 0x001F) << 3;
 		*colors++ = (BG_PALETTE[r] & 0x03E0) >> 5 << 3;
@@ -228,11 +228,11 @@
 
 void OSystem_DS::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) {
 	//consolePrintf("Copy rect %d, %d   %d, %d ", x, y, w, h);
-	if (!_graphicsEnable) return;	
+	if (!_graphicsEnable) return;
 	if (w <= 1) return;
 	if (h < 0) return;
 	if (!DS::getIsDisplayMode8Bit()) return;
-	
+
 	u16* bg;
 	s32 stride;
 	u16* bgSub = (u16 *) BG_GFX_SUB;
@@ -258,7 +258,7 @@
 			u8* dest = ((u8 *) (bg)) + (dy * stride) + x;
 			u8* destSub = ((u8 *) (bgSub)) + (dy * 512) + x;
 			u8* src = (u8 *) buf + (pitch * by);
-			
+
 			u32 dx;
 
 			u32 pixelsLeft = w;
@@ -306,7 +306,7 @@
 			}
 
 			by++;
-				
+
 		}
 
 //		consolePrintf("Slow method used!\n");
@@ -315,40 +315,40 @@
 	} else {
 
 		// Stuff is aligned to 16-bit boundaries, so it's safe to do DMA.
-	
+
 		u16* src = (u16 *) buf;
-		
+
 		if (DS::getKeyboardEnable()) {
-		
+
 			for (int dy = y; dy < y + h; dy++) {
 				u16* dest = bg + (dy * (stride >> 1)) + (x >> 1);
-			
+
 				DC_FlushRange(src, w << 1);
 				DC_FlushRange(dest, w << 1);
 				dmaCopyHalfWords(3, src, dest, w);
-	
+
 				while (dmaBusy(3));
-						
+
 				src += pitch >> 1;
 			}
-		
+
 		} else {
 			for (int dy = y; dy < y + h; dy++) {
 				u16* dest1 = bg + (dy * (stride >> 1)) + (x >> 1);
 				u16* dest2 = bgSub + (dy << 8) + (x >> 1);
-				
+
 				DC_FlushRange(src, w << 1);
 				DC_FlushRange(dest1, w << 1);
 				DC_FlushRange(dest2, w << 1);
-						
+
 				dmaCopyHalfWords(3, src, dest1, w);
-	
+
 				if ((!_frameBufferExists) || (buf == _framebuffer.pixels)) {
 					dmaCopyHalfWords(2, src, dest2, w);
 				}
-	
+
 				while (dmaBusy(2) || dmaBusy(3));
-						
+
 				src += pitch >> 1;
 			}
 		}
@@ -402,36 +402,36 @@
 void OSystem_DS::copyRectToOverlay (const OverlayColor *buf, int pitch, int x, int y, int w, int h) {
 	u16* bg = (u16 *) DS::get16BitBackBuffer();
 	const u16* src = (const u16 *) buf;
-		
+
 //	if (x + w > 256) w = 256 - x;
 	//if (x + h > 256) h = 256 - y;
 
 //	consolePrintf("Copy rect ovl %d, %d   %d, %d  %d\n", x, y, w, h, pitch);
 
-	
-	
+
+
 	for (int dy = y; dy < y + h; dy++) {
-		
-		
+
+
 		// Slow but save copy:
 		for (int dx = x; dx < x + w; dx++) {
-			
+
 			*(bg + (dy * 512) + dx) = *src;
 			//if ((*src) != 0) consolePrintf("%d,%d: %d   ", dx, dy, *src);
 			//consolePrintf("%d,", *src);
 			src++;
 		}
 		src += (pitch - w);
-		
+
 		// Fast but broken copy: (why?)
 		/*
 		REG_IME = 0;
 		dmaCopy(src, bg + (dy << 9) + x, w * 2);
 		REG_IME = 1;
-		
+
 		src += pitch;*/
 	}
-			
+
 //	consolePrintf("Copy rect ovl done");
 
 }
@@ -446,7 +446,7 @@
 	return getWidth();
 }
 
-	
+
 bool OSystem_DS::showMouse(bool visible) {
 	DS::setShowCursor(visible);
 	return true;
@@ -498,7 +498,7 @@
 			return true;
 		}
 	}
-	
+
 	return false;
 
 /*	if (lastPenFrame != DS::getMillis()) {
@@ -511,7 +511,7 @@
 		if (eventNum == 1) {
 			eventNum = 0;
 			lastPenFrame = DS::getMillis();
-			if (DS::getPenDown()) {	
+			if (DS::getPenDown()) {
 				event.type = Common::EVENT_LBUTTONDOWN;
 				event.mouse = Common::Point(DS::getPenX(), DS::getPenY());
 				consolePrintf("Down %d, %d  ", event.mouse.x, event.mouse.y);
@@ -538,12 +538,12 @@
 	int st = getMillis();
 	DS::addEventsToQueue();
 	DS::CD::update();
-	
+
 	DS::doSoundCallback();
 	while (st + msecs >= getMillis()) {
 		DS::doSoundCallback();
 	}
-	
+
 	DS::doTimerCallback();
 	DS::checkSleepMode();
 	DS::addEventsToQueue();
@@ -599,7 +599,7 @@
 /*	consolePrintf("Soft resetting...");
 	IPC->reset = 1;
 	REG_IE = 0;
-	
+
 	asm("swi 0x26\n");
 	swiSoftReset();*/
 }
@@ -618,10 +618,10 @@
 	} else {
 		forceSram = false;
 	}
-	if (forceSram) { 
+	if (forceSram) {
 		consolePrintf("Using SRAM save method!\n");
 	}
-	
+
 	if (DS::isGBAMPAvailable() && (!forceSram)) {
 		return &mpSaveManager;
 	} else {
@@ -653,21 +653,21 @@
 
 
 	} else {
-	
+
 		s32 height = DS::getGameHeight();
 		s32 width = DS::getGameWidth();
 		s32 stride = DS::get8BitBackBufferStride();
-		
+
 		u16* src = DS::get8BitBackBuffer();
 		u16* dest = DS::getScalerBuffer();
 
 		for (int y = 0; y < height; y++) {
-			
+
 			u16* destLine = dest + (y * (width / 2));
 			u16* srcLine = src + (y * (stride / 2));
 
 			DC_FlushRange(srcLine, width);
-					
+
 			dmaCopyHalfWords(3, srcLine, destLine, width);
 		}
 
@@ -681,7 +681,7 @@
 
 	_frameBufferExists = true;
 
-/*	
+/*
 	size_t imageStrideInBytes = DS::get8BitBackBufferStride();
 	size_t imageStrideInWords = imageStrideInBytes / 2;
 

Modified: scummvm/trunk/backends/platform/ds/arm9/source/osystem_ds.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/osystem_ds.h	2009-01-01 08:14:43 UTC (rev 35647)
+++ scummvm/trunk/backends/platform/ds/arm9/source/osystem_ds.h	2009-01-01 15:06:43 UTC (rev 35648)
@@ -19,8 +19,8 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
  */
- 
- 
+
+
 #ifndef _OSYSTEM_DS_H_
 #define _OSYSTEM_DS_H_
 #include "common/system.h"
@@ -33,13 +33,13 @@
 #include "sound/mixer_intern.h"
 #include "graphics/surface.h"
 
-class DSAudioMixer : public Audio::MixerImpl {	
+class DSAudioMixer : public Audio::MixerImpl {
 
 public:
 	DSAudioMixer(OSystem* system) : Audio::MixerImpl(system) { }
 };
 
-class DSTimerManager : public DefaultTimerManager {	

@@ 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