[Scummvm-cvs-logs] SF.net SVN: scummvm:[43134] scummvm/branches/gsoc2009-mods

nolange at users.sourceforge.net nolange at users.sourceforge.net
Sat Aug 8 21:09:32 CEST 2009


Revision: 43134
          http://scummvm.svn.sourceforge.net/scummvm/?rev=43134&view=rev
Author:   nolange
Date:     2009-08-08 19:09:30 +0000 (Sat, 08 Aug 2009)

Log Message:
-----------
merge with trunk

Modified Paths:
--------------
    scummvm/branches/gsoc2009-mods/AUTHORS
    scummvm/branches/gsoc2009-mods/Makefile.common
    scummvm/branches/gsoc2009-mods/NEWS
    scummvm/branches/gsoc2009-mods/README
    scummvm/branches/gsoc2009-mods/backends/base-backend.h
    scummvm/branches/gsoc2009-mods/backends/events/default/default-events.cpp
    scummvm/branches/gsoc2009-mods/backends/events/default/default-events.h
    scummvm/branches/gsoc2009-mods/backends/keymapper/keymapper.cpp
    scummvm/branches/gsoc2009-mods/backends/keymapper/keymapper.h
    scummvm/branches/gsoc2009-mods/backends/platform/dc/dreamcast.mk
    scummvm/branches/gsoc2009-mods/backends/platform/ds/arm9/source/fat/disc_io.h
    scummvm/branches/gsoc2009-mods/backends/platform/ds/arm9/source/fat/gba_nds_fat.h
    scummvm/branches/gsoc2009-mods/backends/platform/ds/arm9/source/portdefs.h
    scummvm/branches/gsoc2009-mods/backends/platform/ds/commoninclude/NDS/scummvm_ipc.h
    scummvm/branches/gsoc2009-mods/backends/platform/gp2x/build/README-GP2X
    scummvm/branches/gsoc2009-mods/backends/platform/gp2x/build/bundle.sh
    scummvm/branches/gsoc2009-mods/backends/platform/gp2x/build/config-alleng.sh
    scummvm/branches/gsoc2009-mods/backends/platform/gp2x/build/config.sh
    scummvm/branches/gsoc2009-mods/backends/platform/gp2x/events.cpp
    scummvm/branches/gsoc2009-mods/backends/platform/gp2x/gp2x-hw.cpp
    scummvm/branches/gsoc2009-mods/backends/platform/gp2x/gp2x-hw.h
    scummvm/branches/gsoc2009-mods/backends/platform/gp2x/gp2x.cpp
    scummvm/branches/gsoc2009-mods/backends/platform/gp2x/graphics.cpp
    scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/build/README-GP2XWIZ
    scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/build/bundle.sh
    scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/build/scummvm.gpe
    scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-events.cpp
    scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-graphics.cpp
    scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-hw.cpp
    scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-main.cpp
    scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-sdl.h
    scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/module.mk
    scummvm/branches/gsoc2009-mods/backends/platform/sdl/graphics.cpp
    scummvm/branches/gsoc2009-mods/backends/platform/sdl/sdl.cpp
    scummvm/branches/gsoc2009-mods/backends/platform/wii/osystem_events.cpp
    scummvm/branches/gsoc2009-mods/backends/platform/wince/CEActionsPocket.cpp
    scummvm/branches/gsoc2009-mods/backends/platform/wince/CEActionsSmartphone.cpp
    scummvm/branches/gsoc2009-mods/backends/platform/wince/CEScaler.cpp
    scummvm/branches/gsoc2009-mods/backends/platform/wince/CEgui/SDL_ImageResource.cpp
    scummvm/branches/gsoc2009-mods/backends/platform/wince/Makefile
    scummvm/branches/gsoc2009-mods/backends/platform/wince/README-WinCE.txt
    scummvm/branches/gsoc2009-mods/backends/platform/wince/missing/missing.cpp
    scummvm/branches/gsoc2009-mods/backends/platform/wince/wince-sdl.cpp
    scummvm/branches/gsoc2009-mods/backends/platform/wince/wince-sdl.h
    scummvm/branches/gsoc2009-mods/backends/vkeybd/packs/vkeybd_default/lowercase-symbols320x240.bmp
    scummvm/branches/gsoc2009-mods/backends/vkeybd/packs/vkeybd_default/lowercase-symbols640x480.bmp
    scummvm/branches/gsoc2009-mods/backends/vkeybd/packs/vkeybd_default/lowercase320x240.bmp
    scummvm/branches/gsoc2009-mods/backends/vkeybd/packs/vkeybd_default/lowercase640x480.bmp
    scummvm/branches/gsoc2009-mods/backends/vkeybd/packs/vkeybd_default/uppercase-symbols320x240.bmp
    scummvm/branches/gsoc2009-mods/backends/vkeybd/packs/vkeybd_default/uppercase-symbols640x480.bmp
    scummvm/branches/gsoc2009-mods/backends/vkeybd/packs/vkeybd_default/uppercase320x240.bmp
    scummvm/branches/gsoc2009-mods/backends/vkeybd/packs/vkeybd_default/uppercase640x480.bmp
    scummvm/branches/gsoc2009-mods/backends/vkeybd/packs/vkeybd_default/vkeybd_default.xml
    scummvm/branches/gsoc2009-mods/backends/vkeybd/packs/vkeybd_default.zip
    scummvm/branches/gsoc2009-mods/base/internal_version.h
    scummvm/branches/gsoc2009-mods/base/main.cpp
    scummvm/branches/gsoc2009-mods/common/events.h
    scummvm/branches/gsoc2009-mods/common/file.cpp
    scummvm/branches/gsoc2009-mods/common/file.h
    scummvm/branches/gsoc2009-mods/common/module.mk
    scummvm/branches/gsoc2009-mods/common/str.cpp
    scummvm/branches/gsoc2009-mods/common/str.h
    scummvm/branches/gsoc2009-mods/common/stream.h
    scummvm/branches/gsoc2009-mods/common/unarj.cpp
    scummvm/branches/gsoc2009-mods/configure
    scummvm/branches/gsoc2009-mods/dists/msvc8/gob.vcproj
    scummvm/branches/gsoc2009-mods/dists/msvc9/gob.vcproj
    scummvm/branches/gsoc2009-mods/dists/msvc9/scummvm-tfmx.vcproj
    scummvm/branches/gsoc2009-mods/dists/msvc9/scummvm.vcproj
    scummvm/branches/gsoc2009-mods/dists/redhat/scummvm.spec
    scummvm/branches/gsoc2009-mods/dists/scummvm.rc
    scummvm/branches/gsoc2009-mods/dists/slackware/scummvm.SlackBuild
    scummvm/branches/gsoc2009-mods/dists/wii/READMII
    scummvm/branches/gsoc2009-mods/dists/wii/meta.xml
    scummvm/branches/gsoc2009-mods/engines/agi/agi.cpp
    scummvm/branches/gsoc2009-mods/engines/agi/agi.h
    scummvm/branches/gsoc2009-mods/engines/agi/cycle.cpp
    scummvm/branches/gsoc2009-mods/engines/agi/detection.cpp
    scummvm/branches/gsoc2009-mods/engines/agi/keyboard.cpp
    scummvm/branches/gsoc2009-mods/engines/agi/menu.cpp
    scummvm/branches/gsoc2009-mods/engines/agi/preagi_mickey.cpp
    scummvm/branches/gsoc2009-mods/engines/agi/saveload.cpp
    scummvm/branches/gsoc2009-mods/engines/agi/sprite.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/agos.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/agos.h
    scummvm/branches/gsoc2009-mods/engines/agos/debug.h
    scummvm/branches/gsoc2009-mods/engines/agos/detection_tables.h
    scummvm/branches/gsoc2009-mods/engines/agos/draw.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/input.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/midiparser_s1d.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/pn.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/res_snd.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/saveload.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/script_pn.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/script_s1.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/vga_e2.cpp
    scummvm/branches/gsoc2009-mods/engines/agos/vga_ww.cpp
    scummvm/branches/gsoc2009-mods/engines/cine/cine.cpp
    scummvm/branches/gsoc2009-mods/engines/cine/detection.cpp
    scummvm/branches/gsoc2009-mods/engines/cine/pal.cpp
    scummvm/branches/gsoc2009-mods/engines/cine/saveload.cpp
    scummvm/branches/gsoc2009-mods/engines/cruise/cruise.cpp
    scummvm/branches/gsoc2009-mods/engines/cruise/cruise_main.cpp
    scummvm/branches/gsoc2009-mods/engines/cruise/cruise_main.h
    scummvm/branches/gsoc2009-mods/engines/cruise/dataLoader.cpp
    scummvm/branches/gsoc2009-mods/engines/cruise/linker.cpp
    scummvm/branches/gsoc2009-mods/engines/cruise/mainDraw.cpp
    scummvm/branches/gsoc2009-mods/engines/cruise/mainDraw.h
    scummvm/branches/gsoc2009-mods/engines/cruise/menu.cpp
    scummvm/branches/gsoc2009-mods/engines/cruise/script.cpp
    scummvm/branches/gsoc2009-mods/engines/cruise/sound.cpp
    scummvm/branches/gsoc2009-mods/engines/cruise/staticres.cpp
    scummvm/branches/gsoc2009-mods/engines/cruise/staticres.h
    scummvm/branches/gsoc2009-mods/engines/drascula/converse.cpp
    scummvm/branches/gsoc2009-mods/engines/drascula/drascula.cpp
    scummvm/branches/gsoc2009-mods/engines/drascula/drascula.h
    scummvm/branches/gsoc2009-mods/engines/drascula/graphics.cpp
    scummvm/branches/gsoc2009-mods/engines/drascula/rooms.cpp
    scummvm/branches/gsoc2009-mods/engines/drascula/talk.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/dataio.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/dataio.h
    scummvm/branches/gsoc2009-mods/engines/gob/demos/demoplayer.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/demos/demoplayer.h
    scummvm/branches/gsoc2009-mods/engines/gob/demos/scnplayer.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/detection.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/draw.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/draw.h
    scummvm/branches/gsoc2009-mods/engines/gob/draw_v1.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/draw_v2.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/game.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/global.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/global.h
    scummvm/branches/gsoc2009-mods/engines/gob/gob.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/gob.h
    scummvm/branches/gsoc2009-mods/engines/gob/init.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/init.h
    scummvm/branches/gsoc2009-mods/engines/gob/init_v1.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/init_v2.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/init_v3.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/init_v6.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/inter_v1.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/inter_v2.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/map.h
    scummvm/branches/gsoc2009-mods/engines/gob/map_v2.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/module.mk
    scummvm/branches/gsoc2009-mods/engines/gob/resources.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/resources.h
    scummvm/branches/gsoc2009-mods/engines/gob/save/saveconverter.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/save/saveload.h
    scummvm/branches/gsoc2009-mods/engines/gob/save/saveload_v4.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/scenery.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/script.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/sound/bgatmosphere.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/sound/sounddesc.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/sound/soundmixer.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/sound/soundmixer.h
    scummvm/branches/gsoc2009-mods/engines/gob/util.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/util.h
    scummvm/branches/gsoc2009-mods/engines/gob/variables.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/variables.h
    scummvm/branches/gsoc2009-mods/engines/gob/videoplayer.cpp
    scummvm/branches/gsoc2009-mods/engines/gob/videoplayer.h
    scummvm/branches/gsoc2009-mods/engines/groovie/cell.cpp
    scummvm/branches/gsoc2009-mods/engines/groovie/cell.h
    scummvm/branches/gsoc2009-mods/engines/groovie/music.cpp
    scummvm/branches/gsoc2009-mods/engines/groovie/music.h
    scummvm/branches/gsoc2009-mods/engines/groovie/script.cpp
    scummvm/branches/gsoc2009-mods/engines/groovie/script.h
    scummvm/branches/gsoc2009-mods/engines/kyra/gui.cpp
    scummvm/branches/gsoc2009-mods/engines/kyra/gui_hof.cpp
    scummvm/branches/gsoc2009-mods/engines/kyra/gui_lok.cpp
    scummvm/branches/gsoc2009-mods/engines/kyra/gui_mr.cpp
    scummvm/branches/gsoc2009-mods/engines/kyra/gui_v2.cpp
    scummvm/branches/gsoc2009-mods/engines/kyra/items_mr.cpp
    scummvm/branches/gsoc2009-mods/engines/kyra/kyra_hof.cpp
    scummvm/branches/gsoc2009-mods/engines/kyra/kyra_mr.h
    scummvm/branches/gsoc2009-mods/engines/kyra/kyra_v1.cpp
    scummvm/branches/gsoc2009-mods/engines/kyra/saveload.cpp
    scummvm/branches/gsoc2009-mods/engines/kyra/screen.cpp
    scummvm/branches/gsoc2009-mods/engines/kyra/script_mr.cpp
    scummvm/branches/gsoc2009-mods/engines/kyra/sequences_mr.cpp
    scummvm/branches/gsoc2009-mods/engines/kyra/sound_digital.cpp
    scummvm/branches/gsoc2009-mods/engines/kyra/sprites.cpp
    scummvm/branches/gsoc2009-mods/engines/lure/hotspots.cpp
    scummvm/branches/gsoc2009-mods/engines/lure/res.cpp
    scummvm/branches/gsoc2009-mods/engines/lure/scripts.cpp
    scummvm/branches/gsoc2009-mods/engines/m4/m4.cpp
    scummvm/branches/gsoc2009-mods/engines/made/made.cpp
    scummvm/branches/gsoc2009-mods/engines/parallaction/parallaction.cpp
    scummvm/branches/gsoc2009-mods/engines/parallaction/parser.h
    scummvm/branches/gsoc2009-mods/engines/parallaction/parser_br.cpp
    scummvm/branches/gsoc2009-mods/engines/parallaction/parser_ns.cpp
    scummvm/branches/gsoc2009-mods/engines/parallaction/saveload.cpp
    scummvm/branches/gsoc2009-mods/engines/parallaction/saveload.h
    scummvm/branches/gsoc2009-mods/engines/queen/display.cpp
    scummvm/branches/gsoc2009-mods/engines/queen/music.cpp
    scummvm/branches/gsoc2009-mods/engines/queen/queen.cpp
    scummvm/branches/gsoc2009-mods/engines/saga/detection.cpp
    scummvm/branches/gsoc2009-mods/engines/saga/font.cpp
    scummvm/branches/gsoc2009-mods/engines/saga/saga.cpp
    scummvm/branches/gsoc2009-mods/engines/sci/console.cpp
    scummvm/branches/gsoc2009-mods/engines/sci/debug.h
    scummvm/branches/gsoc2009-mods/engines/sci/engine/scriptdebug.cpp
    scummvm/branches/gsoc2009-mods/engines/sci/engine/seg_manager.cpp
    scummvm/branches/gsoc2009-mods/engines/sci/engine/seg_manager.h
    scummvm/branches/gsoc2009-mods/engines/sci/engine/vm.cpp
    scummvm/branches/gsoc2009-mods/engines/sci/engine/vm.h
    scummvm/branches/gsoc2009-mods/engines/sci/gfx/operations.cpp
    scummvm/branches/gsoc2009-mods/engines/sci/resource.cpp
    scummvm/branches/gsoc2009-mods/engines/sci/sci.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/actor.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/actor.h
    scummvm/branches/gsoc2009-mods/engines/scumm/boxes.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/costume.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/costume.h
    scummvm/branches/gsoc2009-mods/engines/scumm/detection.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/detection_tables.h
    scummvm/branches/gsoc2009-mods/engines/scumm/dialogs.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/dialogs.h
    scummvm/branches/gsoc2009-mods/engines/scumm/file.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/file.h
    scummvm/branches/gsoc2009-mods/engines/scumm/gfx.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/he/cup_player_he.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/he/intern_he.h
    scummvm/branches/gsoc2009-mods/engines/scumm/he/script_v100he.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/he/script_v60he.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/he/script_v72he.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/he/script_v80he.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/he/script_v90he.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/he/wiz_he.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/imuse_digi/dimuse_bndmgr.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/input.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/object.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/resource.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/resource_v2.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/resource_v3.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/resource_v4.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/saveload.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/saveload.h
    scummvm/branches/gsoc2009-mods/engines/scumm/script.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/script_v0.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/script_v5.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/script_v6.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/scumm-md5.h
    scummvm/branches/gsoc2009-mods/engines/scumm/scumm.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/scumm.h
    scummvm/branches/gsoc2009-mods/engines/scumm/scumm_v0.h
    scummvm/branches/gsoc2009-mods/engines/scumm/scumm_v2.h
    scummvm/branches/gsoc2009-mods/engines/scumm/sound.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/string.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/vars.cpp
    scummvm/branches/gsoc2009-mods/engines/scumm/verbs.cpp
    scummvm/branches/gsoc2009-mods/engines/sky/logic.cpp
    scummvm/branches/gsoc2009-mods/engines/sword1/animation.cpp
    scummvm/branches/gsoc2009-mods/engines/sword1/control.cpp
    scummvm/branches/gsoc2009-mods/engines/sword1/logic.cpp
    scummvm/branches/gsoc2009-mods/engines/sword1/resman.cpp
    scummvm/branches/gsoc2009-mods/engines/sword1/sound.cpp
    scummvm/branches/gsoc2009-mods/engines/sword2/animation.cpp
    scummvm/branches/gsoc2009-mods/engines/sword2/animation.h
    scummvm/branches/gsoc2009-mods/engines/sword2/resman.cpp
    scummvm/branches/gsoc2009-mods/engines/sword2/startup.cpp
    scummvm/branches/gsoc2009-mods/engines/sword2/sword2.cpp
    scummvm/branches/gsoc2009-mods/engines/tinsel/background.cpp
    scummvm/branches/gsoc2009-mods/engines/tinsel/bmv.cpp
    scummvm/branches/gsoc2009-mods/engines/tinsel/detection.cpp
    scummvm/branches/gsoc2009-mods/engines/tinsel/dw.h
    scummvm/branches/gsoc2009-mods/engines/tinsel/graphics.cpp
    scummvm/branches/gsoc2009-mods/engines/tinsel/heapmem.cpp
    scummvm/branches/gsoc2009-mods/engines/tinsel/music.cpp
    scummvm/branches/gsoc2009-mods/engines/tinsel/palette.cpp
    scummvm/branches/gsoc2009-mods/engines/tinsel/pcode.cpp
    scummvm/branches/gsoc2009-mods/engines/tinsel/saveload.cpp
    scummvm/branches/gsoc2009-mods/engines/tinsel/tinsel.cpp
    scummvm/branches/gsoc2009-mods/engines/touche/touche.cpp
    scummvm/branches/gsoc2009-mods/engines/tucker/locations.cpp
    scummvm/branches/gsoc2009-mods/graphics/VectorRendererSpec.cpp
    scummvm/branches/gsoc2009-mods/graphics/module.mk
    scummvm/branches/gsoc2009-mods/graphics/scaler/scale2x.cpp
    scummvm/branches/gsoc2009-mods/graphics/scaler/scale2x.h
    scummvm/branches/gsoc2009-mods/graphics/scaler/scalebit.cpp
    scummvm/branches/gsoc2009-mods/graphics/scaler.cpp
    scummvm/branches/gsoc2009-mods/graphics/scaler.h
    scummvm/branches/gsoc2009-mods/graphics/sjis.cpp
    scummvm/branches/gsoc2009-mods/graphics/sjis.h
    scummvm/branches/gsoc2009-mods/graphics/video/coktelvideo/coktelvideo.cpp
    scummvm/branches/gsoc2009-mods/graphics/video/coktelvideo/coktelvideo.h
    scummvm/branches/gsoc2009-mods/graphics/video/smk_decoder.cpp
    scummvm/branches/gsoc2009-mods/graphics/video/smk_decoder.h
    scummvm/branches/gsoc2009-mods/gui/ListWidget.cpp
    scummvm/branches/gsoc2009-mods/gui/ScrollBarWidget.cpp
    scummvm/branches/gsoc2009-mods/gui/ThemeEngine.h
    scummvm/branches/gsoc2009-mods/gui/browser.cpp
    scummvm/branches/gsoc2009-mods/gui/credits.h
    scummvm/branches/gsoc2009-mods/gui/debugger.cpp
    scummvm/branches/gsoc2009-mods/gui/debugger.h
    scummvm/branches/gsoc2009-mods/gui/options.cpp
    scummvm/branches/gsoc2009-mods/gui/themes/default.inc
    scummvm/branches/gsoc2009-mods/gui/themes/scummclassic/THEMERC
    scummvm/branches/gsoc2009-mods/gui/themes/scummclassic/classic_layout.stx
    scummvm/branches/gsoc2009-mods/gui/themes/scummclassic/classic_layout_lowres.stx
    scummvm/branches/gsoc2009-mods/gui/themes/scummclassic.zip
    scummvm/branches/gsoc2009-mods/gui/themes/scummmodern/THEMERC
    scummvm/branches/gsoc2009-mods/gui/themes/scummmodern/scummmodern_layout.stx
    scummvm/branches/gsoc2009-mods/gui/themes/scummmodern/scummmodern_layout_lowres.stx
    scummvm/branches/gsoc2009-mods/gui/themes/scummmodern.zip
    scummvm/branches/gsoc2009-mods/ports.mk
    scummvm/branches/gsoc2009-mods/sound/fmopl.h
    scummvm/branches/gsoc2009-mods/sound/midiparser_xmidi.cpp
    scummvm/branches/gsoc2009-mods/sound/softsynth/mt32/partial.cpp
    scummvm/branches/gsoc2009-mods/sound/softsynth/mt32/synth.cpp
    scummvm/branches/gsoc2009-mods/sound/softsynth/mt32/tables.cpp
    scummvm/branches/gsoc2009-mods/test/common/str.h
    scummvm/branches/gsoc2009-mods/tools/credits.pl
    scummvm/branches/gsoc2009-mods/tools/module.mk
    scummvm/branches/gsoc2009-mods/tools/scumm-md5.txt
    scummvm/branches/gsoc2009-mods/tools/update-version.pl

Added Paths:
-----------
    scummvm/branches/gsoc2009-mods/backends/platform/dc/ip.txt.in
    scummvm/branches/gsoc2009-mods/backends/platform/ds/ds.mk
    scummvm/branches/gsoc2009-mods/backends/platform/ds/module.mk
    scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-scaler.cpp
    scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-scaler.h
    scummvm/branches/gsoc2009-mods/backends/platform/wince/module.mk
    scummvm/branches/gsoc2009-mods/backends/platform/wince/wince.mk
    scummvm/branches/gsoc2009-mods/common/EventDispatcher.cpp
    scummvm/branches/gsoc2009-mods/common/EventRecorder.cpp
    scummvm/branches/gsoc2009-mods/common/EventRecorder.h
    scummvm/branches/gsoc2009-mods/dists/iphone/Info.plist
    scummvm/branches/gsoc2009-mods/dists/macosx/Info.plist
    scummvm/branches/gsoc2009-mods/engines/gob/init_v4.cpp
    scummvm/branches/gsoc2009-mods/graphics/scaler/Normal2xARM.s
    scummvm/branches/gsoc2009-mods/graphics/scaler/scale2xARM.s

Removed Paths:
-------------
    scummvm/branches/gsoc2009-mods/backends/platform/gp2x/build/README-GP2X.html
    scummvm/branches/gsoc2009-mods/engines/gob/map_v4.cpp

Property Changed:
----------------
    scummvm/branches/gsoc2009-mods/
    scummvm/branches/gsoc2009-mods/backends/platform/iphone/osys_main.cpp
    scummvm/branches/gsoc2009-mods/backends/platform/iphone/osys_main.h
    scummvm/branches/gsoc2009-mods/dists/macosx/
    scummvm/branches/gsoc2009-mods/sound/iff_sound.cpp
    scummvm/branches/gsoc2009-mods/sound/iff_sound.h


Property changes on: scummvm/branches/gsoc2009-mods
___________________________________________________________________
Modified: svn:mergeinfo
   - /scummvm/trunk:41377-42568
   + /scummvm/trunk:41377-43133

Modified: scummvm/branches/gsoc2009-mods/AUTHORS
===================================================================
--- scummvm/branches/gsoc2009-mods/AUTHORS	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/AUTHORS	2009-08-08 19:09:30 UTC (rev 43134)
@@ -15,14 +15,19 @@
   ------------
     SCUMM:
        Torbjorn Andersson   
+       James Brown           - (retired)
+       Jonathan Gray         - (retired)
+       Vincent Hamm          - (retired)
        Max Horn             
        Travis Howell        
        Pawel Kolodziejski    - Codecs, iMUSE, Smush, etc.
        Gregory Montoir      
        Eugene Sandulenko     - FT INSANE, MM NES, MM C64, game detection,
                                Herc/CGA
+       Ludvig Strigeus       - (retired)
 
     HE:
+       Jonathan Gray         - (retired)
        Travis Howell        
        Gregory Montoir      
        Eugene Sandulenko    
@@ -35,42 +40,53 @@
        Walter van Niftrik   
        Kari Salminen        
        Eugene Sandulenko    
+       David Symonds         - (retired)
 
     AGOS:
        Torbjorn Andersson   
        Paul Gilbert         
        Travis Howell        
+       Oliver Kiehl          - (retired)
+       Ludvig Strigeus       - (retired)
 
     BASS:
+       Robert Goeffringmann  - (retired)
+       Oliver Kiehl          - (retired)
        Joost Peters         
 
     Broken Sword 1:
+       Fabio Battaglia       - PSX version support
+       Robert Goeffringmann  - (retired)
 
     Broken Sword 2:
        Torbjorn Andersson   
+       Fabio Battaglia       - PSX version support
+       Jonathan Gray         - (retired)
 
     Cinematique evo 1:
-       Vincent Hamm          - original CinE engine author
+       Vincent Hamm          - (retired)
        Pawel Kolodziejski   
        Gregory Montoir      
+       Kari Salminen        
        Eugene Sandulenko    
 
     Cinematique evo 2:
-       Vincent Hamm          - original CruisE engine author
        Paul Gilbert         
+       Vincent Hamm          - (retired)
 
     Drascula:
        Filippos Karapetis   
        Pawel Kolodziejski   
 
     FOTAQ:
+       David Eriksson        - (retired)
        Gregory Montoir      
        Joost Peters         
 
     Gob:
        Torbjorn Andersson   
+       Arnaud Boutonne      
        Sven Hesse           
-       Willem Jan Palenstijn
        Eugene Sandulenko    
 
     Groovie:
@@ -103,7 +119,6 @@
 
     SAGA:
        Torbjorn Andersson   
-       Sven Hesse           
        Filippos Karapetis   
        Andrew Kurushin      
        Eugene Sandulenko    
@@ -114,11 +129,13 @@
        Max Horn             
        Filippos Karapetis   
        Walter van Niftrik   
+       Willem Jan Palenstijn
        Jordi Vilalta Prat   
        Lars Skovlund        
 
     Tinsel:
        Torbjorn Andersson   
+       Fabio Battaglia       - PSX version support
        Paul Gilbert         
        Sven Hesse           
        Max Horn             
@@ -152,9 +169,11 @@
        Chris Apers          
 
     PocketPC / WinCE:
+       Nicolas Bacca         - (retired)
        Kostas Nakos         
 
     PlayStation 2:
+       Robert Goeffringmann  - (retired)
        Max Lingua           
 
     PSP (PlayStation Portable):
@@ -179,19 +198,26 @@
        Eugene Sandulenko    
 
     GUI:
+       Vicent Marti         
        Eugene Sandulenko    
        Johannes Schickel    
 
     Miscellaneous:
        David Corrales-Lopez  - Filesystem access improvements (GSoC 2007
-                               task)
-       Jerome Fisher         - MT-32 emulator
+                               task) (retired)
+       Jerome Fisher         - MT-32 emulator (retired)
+       Benjamin Haisch       - Heavily improved de-/encoder for DXA videos
        Jochen Hoenicke       - Speaker & PCjr sound support, AdLib work
+                               (retired)
        Chris Page            - Return to launcher, savestate improvements,
-                               leak fixes, ... (GSoC 2008 task)
+                               leak fixes, ... (GSoC 2008 task) (retired)
        Robin Watts           - ARM assembly routines for nice speedups on
                                several ports; improvements to the sound mixer
 
+  Website (code)
+  --------------
+     Fredrik Wendel       
+
   Website (content)
   -----------------
      All active team members
@@ -201,86 +227,25 @@
      Joachim Eberhard      - Numerous contributions to documentation
      Matthew Hoops         - Wiki editor
 
-  FreeSCI Contributors
-  --------------------
-     Anders Baden Nielsen  - PPC testing
-     Bas Zoetekouw         - Man pages, debian package management, CVS
-                             maintenance
-     Carl Muckenhoupt      - Sources to the SCI resource viewer tools that
-                             started it all
-     Chris Kehler          - Makefile enhancements
-     Christoph Reichenbach - UN*X code, VM/Graphics/Sound/other
-                             infrastructure
-     Christopher T. Lansdo - Original CVS maintainer, Alpha compatibility
-                             fixes
-     Claudio Matsuoka      - CVS snapshots, daily builds, BeOS and cygwin
-                             ports
-     Dark Minister         - SCI research (bytecode and parser)
-     Dmitry Jemerov        - Port to the Win32 platform, numerous bugfixes
-     Emmanuel Jeandel      - Bugfixes and bug reports
-     Francois-R Boyer      - MT-32 information and mapping code
-     George Reid           - FreeBSD package management
-     Hubert Maier          - AmigaOS 4 port
-     Hugues Valois         - Game selection menu
-     Johannes Manhave      - Document format translation
-     Jordi Vilalta         - Numerous code and website clean-up patches
-     Lars Skovlund         - Project maintenance, most documentation,
-                             bugfixes, SCI1 support
-     Magnus Reftel         - Heap implementation, Python class viewer,
-                             bugfixes
-     Matt Hargett          - Clean-ups, bugfixes, Hardcore QA, Win32
-     Max Horn              - SetJump implementation
-     Paul David Doherty    - Game version information
-     Petr Vyhnak           - The DCL-INFLATE algorithm, many Win32
-                             improvements
-     Rainer Canavan        - IRIX MIDI driver and bug fixes
-     Rainer De Temple      - SCI research
-     Ravi I.               - SCI0 sound resource specification
-     Ruediger Hanke        - Port to the MorphOS platform
-     Rune Orsval           - Configuration file editor
-     Rickard Lind          - MT32->GM MIDI mapping magic, sound research
-     Rink Springer         - Port to the DOS platform, several bug fixes
-     Robey Pointer         - Bug tracking system hosting
-     Sergey Lapin          - Port of Carl's type 2 decompression code
-     Solomon Peachy        - SDL ports and much of the sound subsystem
-     Vyacheslav Dikonov    - Config script improvements
-     Walter van Niftrik    - Ports to the Dreamcast and GP32 platforms
-     Xiaojun Chen         
-     Sean Terrell         
-
-     Special thanks to Prof. Dr. Gary Nutt for allowing the FreeSCI VM
-     extension as a course project in his Advanced OS course
-
-     Special thanks to Bob Heitman and Corey Cole for their support of
-     FreeSCI
-
   Retired Team Members
   --------------------
-     Tore Anderson         - Former Debian GNU/Linux maintainer
-     Nicolas Bacca         - Former WinCE porter
      Ralph Brorsen         - Help with GUI implementation
      Jamieson Christian    - iMUSE, MIDI, all things musical
-     David Eriksson        - Engines: FOTAQ
-     Hans-Jorg Frieden     - Former AmigaOS 4 packager
-     Robert Goeffringmann  - Original PS2 porter; Engines: BASS, BS1
-     Jonathan Gray         - Engines: SCUMM, HE, BS2
-     Ruediger Hanke        - Port: MorphOS
      Felix Jakschitsch     - Zak256 reverse engineering
-     Oliver Kiehl          - Engines: AGOS, BASS
      Mutwin Kraus          - Original MacOS porter
      Peter Moraliyski      - Port: GP32
-     Juha Niemimaki        - Former AmigaOS 4 packager
      Jeremy Newman         - Former webmaster
      Lionel Ulmer          - Port: X11
      Won Star              - Former GP32 porter
-     David Symonds         - Engines: AGI
 
 Other contributions
 *******************
   Packages
   --------
     AmigaOS 4:
+       Hans-Jorg Frieden     - (retired)
        Hubert Maier         
+       Juha Niemimaki        - (retired)
 
     Atari/FreeMiNT:
        Keith Scroggins      
@@ -290,6 +255,7 @@
        Luc Schrijvers       
 
     Debian GNU/Linux:
+       Tore Anderson         - (retired)
        David Weinehall      
 
     Fedora / RedHat:
@@ -304,6 +270,7 @@
 
     MorphOS:
        Fabien Coeurjoly     
+       Ruediger Hanke        - (retired)
 
     OS/2:
        Paul Smedley         
@@ -341,7 +308,6 @@
      Thierry Crozat        - Support for Broken Sword 1 Macintosh version
      Martin Doucha         - CinE engine objectification
      Thomas Fach-Pedersen  - ProTracker module player
-     Benjamin Haisch       - Heavily improved de-/encoder for DXA videos
      Janne Huttunen        - V3 actor mask support, Dig/FT SMUSH audio
      Kovacs Endre Janos    - Several fixes for Simon1
      Jeroen Janssen        - Numerous readability and bugfix patches
@@ -356,12 +322,66 @@
      Tim Phillips          - Initial MI1 CD music support
      Quietust              - Sound support for Amiga SCUMM V2/V3 games, MM
                              NES support
+     segra                 - Improved support for Apple II/C64 versions of MM
      Andreas Roever        - Broken Sword 1/2 MPEG2 cutscene support
      Edward Rudd           - Fixes for playing MP3 versions of MI1/Loom audio
      Daniel Schepler       - Final MI1 CD music support, initial Ogg Vorbis
                              support
      Andre Souza           - SDL-based OpenGL renderer
 
+  FreeSCI Contributors
+  --------------------
+     Anders Baden Nielsen  - PPC testing
+     Bas Zoetekouw         - Man pages, debian package management, CVS
+                             maintenance
+     Carl Muckenhoupt      - Sources to the SCI resource viewer tools that
+                             started it all
+     Chris Kehler          - Makefile enhancements
+     Christoph Reichenbach - UN*X code, VM/Graphics/Sound/other
+                             infrastructure
+     Christopher T. Lansdo - Original CVS maintainer, Alpha compatibility
+                             fixes
+     Claudio Matsuoka      - CVS snapshots, daily builds, BeOS and cygwin
+                             ports
+     Dark Minister         - SCI research (bytecode and parser)
+     Dmitry Jemerov        - Port to the Win32 platform, numerous bugfixes
+     Emmanuel Jeandel      - Bugfixes and bug reports
+     Francois-R Boyer      - MT-32 information and mapping code
+     George Reid           - FreeBSD package management
+     Hubert Maier          - AmigaOS 4 port
+     Hugues Valois         - Game selection menu
+     Johannes Manhave      - Document format translation
+     Jordi Vilalta         - Numerous code and website clean-up patches
+     Lars Skovlund         - Project maintenance, most documentation,
+                             bugfixes, SCI1 support
+     Magnus Reftel         - Heap implementation, Python class viewer,
+                             bugfixes
+     Matt Hargett          - Clean-ups, bugfixes, Hardcore QA, Win32
+     Max Horn              - SetJump implementation
+     Paul David Doherty    - Game version information
+     Petr Vyhnak           - The DCL-INFLATE algorithm, many Win32
+                             improvements
+     Rainer Canavan        - IRIX MIDI driver and bug fixes
+     Rainer De Temple      - SCI research
+     Ravi I.               - SCI0 sound resource specification
+     Ruediger Hanke        - Port to the MorphOS platform
+     Rune Orsval           - Configuration file editor
+     Rickard Lind          - MT32->GM MIDI mapping magic, sound research
+     Rink Springer         - Port to the DOS platform, several bug fixes
+     Robey Pointer         - Bug tracking system hosting
+     Sergey Lapin          - Port of Carl's type 2 decompression code
+     Solomon Peachy        - SDL ports and much of the sound subsystem
+     Vyacheslav Dikonov    - Config script improvements
+     Walter van Niftrik    - Ports to the Dreamcast and GP32 platforms
+     Xiaojun Chen         
+     Sean Terrell         
+
+     Special thanks to Prof. Dr. Gary Nutt for allowing the FreeSCI VM
+     extension as a course project in his Advanced OS course.
+
+     Special thanks to Bob Heitman and Corey Cole for their support of
+     FreeSCI.
+
    And to all the contributors, users, and beta testers we've missed. Thanks!
 
 Special thanks to

Modified: scummvm/branches/gsoc2009-mods/Makefile.common
===================================================================
--- scummvm/branches/gsoc2009-mods/Makefile.common	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/Makefile.common	2009-08-08 19:09:30 UTC (rev 43134)
@@ -144,25 +144,6 @@
 
 
 ######################################################################
-# Create the files that depend on the version
-######################################################################
-
-VERSION_FILES = \
-	$(srcdir)/dists/iphone/Info.plist \
-	$(srcdir)/dists/macosx/Info.plist
-
-$(VERSION_FILES): %: %.in
-	@echo "Creating $@"
-	@cat $< | sed \
-		-e "s/@VER_MAJOR@/$(VER_MAJOR)/g" \
-		-e "s/@VER_MINOR@/$(VER_MINOR)/g" \
-		-e "s/@VER_PATCH@/$(VER_PATCH)/g" \
-		-e "s/@VER_EXTRA@/$(VER_EXTRA)/g" \
-		-e "s/@VERSION@/$(VERSION)/g" \
-		> $@
-
-
-######################################################################
 # Distribution settings
 ######################################################################
 

Modified: scummvm/branches/gsoc2009-mods/NEWS
===================================================================
--- scummvm/branches/gsoc2009-mods/NEWS	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/NEWS	2009-08-08 19:09:30 UTC (rev 43134)
@@ -1,6 +1,13 @@
 For a more comprehensive changelog for the latest experimental SVN code, see:
         http://scummvm.svn.sourceforge.net/viewvc/scummvm/?view=log
 
+1.1.0 (????-??-??)
+ General:
+   - Added support for a custom SJIS font for FM-TOWNS and PC98 games.
+
+ KYRA:
+   - Adapted KYRA to support the custom SJIS font.
+
 1.0.0 (2009-??-??)
  New Games:
    - Added support for Discworld.
@@ -18,6 +25,9 @@
    - Added per-game GUI options.
    - Improved Mass Add dialog.
 
+ New Ports:
+   - Added GP2X Wiz port.
+
  AGI:
    - Increased compatibility for Sierra games.
    - Implemented all 'unknown' commands.
@@ -41,14 +51,13 @@
    - Introduced a new savegame format to fix a fatal flaw of the old one,
      breaking compatibility with old savegames made on big-endian systems.
 
+ Groovie:
+   - Increased microscope puzzle difficulty to match original.
+
  KYRA:
    - Added support for PC Speaker based music and sound effects.
-   - Added support for 16 color dithering in Kyrandia PC-9801 (Japanese version
-     only).
+   - Added support for 16 color dithering in Kyrandia PC-9801.
 
- New Ports:
-   - Added GP2X Wiz port.
-
 0.13.1 (2009-04-27)
  AGOS:
     - Fixed crash after OmniTV video is played in The Feeble Files.

Modified: scummvm/branches/gsoc2009-mods/README
===================================================================
--- scummvm/branches/gsoc2009-mods/README	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/README	2009-08-08 19:09:30 UTC (rev 43134)
@@ -771,10 +771,8 @@
   The Legend of Kyrandia:
     - Amiga versions aren't supported
 
-  Waxworks:
-    - No music in the PC version
-
   Humongous Entertainment games:
+    - Only the original load and save interface can be used.
     - No support for printing images
 
 

Modified: scummvm/branches/gsoc2009-mods/backends/base-backend.h
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/base-backend.h	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/base-backend.h	2009-08-08 19:09:30 UTC (rev 43134)
@@ -29,7 +29,7 @@
 #include "common/system.h"
 #include "backends/events/default/default-events.h"
 
-class BaseBackend : public OSystem, EventProvider {
+class BaseBackend : public OSystem, Common::EventSource {
 public:
 	virtual Common::EventManager *getEventManager();
 	virtual void displayMessageOnOSD(const char *msg);

Modified: scummvm/branches/gsoc2009-mods/backends/events/default/default-events.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/events/default/default-events.cpp	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/events/default/default-events.cpp	2009-08-08 19:09:30 UTC (rev 43134)
@@ -35,242 +35,38 @@
 #include "engines/engine.h"
 #include "gui/message.h"
 
-#define RECORD_SIGNATURE 0x54455354
-#define RECORD_VERSION 1
-
-void readRecord(Common::InSaveFile *inFile, uint32 &diff, Common::Event &event) {
-	diff = inFile->readUint32LE();
-
-	event.type = (Common::EventType)inFile->readUint32LE();
-
-	switch(event.type) {
-	case Common::EVENT_KEYDOWN:
-	case Common::EVENT_KEYUP:
-		event.kbd.keycode = (Common::KeyCode)inFile->readSint32LE();
-		event.kbd.ascii = inFile->readUint16LE();
-		event.kbd.flags = inFile->readByte();
-		break;
-	case Common::EVENT_MOUSEMOVE:
-	case Common::EVENT_LBUTTONDOWN:
-	case Common::EVENT_LBUTTONUP:
-	case Common::EVENT_RBUTTONDOWN:
-	case Common::EVENT_RBUTTONUP:
-	case Common::EVENT_WHEELUP:
-	case Common::EVENT_WHEELDOWN:
-		event.mouse.x = inFile->readSint16LE();
-		event.mouse.y = inFile->readSint16LE();
-		break;
-	default:
-		break;
-	}
-}
-
-void writeRecord(Common::OutSaveFile *outFile, uint32 diff, Common::Event &event) {
-	outFile->writeUint32LE(diff);
-
-	outFile->writeUint32LE((uint32)event.type);
-
-	switch(event.type) {
-	case Common::EVENT_KEYDOWN:
-	case Common::EVENT_KEYUP:
-		outFile->writeSint32LE(event.kbd.keycode);
-		outFile->writeUint16LE(event.kbd.ascii);
-		outFile->writeByte(event.kbd.flags);
-		break;
-	case Common::EVENT_MOUSEMOVE:
-	case Common::EVENT_LBUTTONDOWN:
-	case Common::EVENT_LBUTTONUP:
-	case Common::EVENT_RBUTTONDOWN:
-	case Common::EVENT_RBUTTONUP:
-	case Common::EVENT_WHEELUP:
-	case Common::EVENT_WHEELDOWN:
-		outFile->writeSint16LE(event.mouse.x);
-		outFile->writeSint16LE(event.mouse.y);
-		break;
-	default:
-		break;
-	}
-}
-
-DefaultEventManager::DefaultEventManager(EventProvider *boss) :
-	_boss(boss),
+DefaultEventManager::DefaultEventManager(Common::EventSource *boss) :
 	_buttonState(0),
 	_modifierState(0),
 	_shouldQuit(false),
 	_shouldRTL(false),
 	_confirmExitDialogActive(false) {
 
-	assert(_boss);
+	assert(boss);
 
-	_recordFile = NULL;
-	_recordTimeFile = NULL;
-	_playbackFile = NULL;
-	_playbackTimeFile = NULL;
-	_timeMutex = g_system->createMutex();
-	_recorderMutex = g_system->createMutex();
+	_dispatcher.registerSource(boss, false);
+	_dispatcher.registerSource(&_artificialEventSource, false);
 
-	_eventCount = 0;
-	_lastEventCount = 0;
-	_lastMillis = 0;
+	_dispatcher.registerObserver(this, kEventManPriority, false);
 
-	Common::String recordModeString = ConfMan.get("record_mode");
-	if (recordModeString.compareToIgnoreCase("record") == 0) {
-		_recordMode = kRecorderRecord;
-	} else {
-		if (recordModeString.compareToIgnoreCase("playback") == 0) {
-			_recordMode = kRecorderPlayback;
-		} else {
-			_recordMode = kPassthrough;
-		}
-	}
-
-	_recordFileName = ConfMan.get("record_file_name");
-	if (_recordFileName.empty()) {
-		_recordFileName = "record.bin";
-	}
-	_recordTempFileName = ConfMan.get("record_temp_file_name");
-	if (_recordTempFileName.empty()) {
-		_recordTempFileName = "record.tmp";
-	}
-	_recordTimeFileName = ConfMan.get("record_time_file_name");
-	if (_recordTimeFileName.empty()) {
-		_recordTimeFileName = "record.time";
-	}
-
 	// Reset key repeat
 	_currentKeyDown.keycode = 0;
 
-	// recorder stuff
-	if (_recordMode == kRecorderRecord) {
-		_recordCount = 0;
-		_recordTimeCount = 0;
-		_recordFile = g_system->getSavefileManager()->openForSaving(_recordTempFileName);
-		_recordTimeFile = g_system->getSavefileManager()->openForSaving(_recordTimeFileName);
-		_recordSubtitles = ConfMan.getBool("subtitles");
-	}
-
-	uint32 sign;
-	uint32 version;
-	uint32 randomSourceCount;
-	if (_recordMode == kRecorderPlayback) {
-		_playbackCount = 0;
-		_playbackTimeCount = 0;
-		_playbackFile = g_system->getSavefileManager()->openForLoading(_recordFileName);
-		_playbackTimeFile = g_system->getSavefileManager()->openForLoading(_recordTimeFileName);
-
-		if (!_playbackFile) {
-			warning("Cannot open playback file %s. Playback was switched off", _recordFileName.c_str());
-			_recordMode = kPassthrough;
-		}
-
-		if (!_playbackTimeFile) {
-			warning("Cannot open playback time file %s. Playback was switched off", _recordTimeFileName.c_str());
-			_recordMode = kPassthrough;
-		}
-	}
-
-	if (_recordMode == kRecorderPlayback) {
-		sign = _playbackFile->readUint32LE();
-		if (sign != RECORD_SIGNATURE) {
-			error("Unknown record file signature");
-		}
-		version = _playbackFile->readUint32LE();
-
-		// conf vars
-		ConfMan.setBool("subtitles", _playbackFile->readByte() != 0);
-
-		_recordCount = _playbackFile->readUint32LE();
-		_recordTimeCount = _playbackFile->readUint32LE();
-		randomSourceCount = _playbackFile->readUint32LE();
-		for (uint i = 0; i < randomSourceCount; ++i) {
-			RandomSourceRecord rec;
-			rec.name = "";
-			uint32 sLen = _playbackFile->readUint32LE();
-			for (uint j = 0; j < sLen; ++j) {
-				char c = _playbackFile->readSByte();
-				rec.name += c;
-			}
-			rec.seed = _playbackFile->readUint32LE();
-			_randomSourceRecords.push_back(rec);
-		}
-
-		_hasPlaybackEvent = false;
-	}
-
 #ifdef ENABLE_VKEYBD
 	_vk = new Common::VirtualKeyboard();
 #endif
 #ifdef ENABLE_KEYMAPPER
 	_keymapper = new Common::Keymapper(this);
+	// EventDispatcher will automatically free the keymapper
+	_dispatcher.registerMapper(_keymapper);
 	_remap = false;
 #endif
 }
 
 DefaultEventManager::~DefaultEventManager() {
-#ifdef ENABLE_KEYMAPPER
-	delete _keymapper;
-#endif
 #ifdef ENABLE_VKEYBD
 	delete _vk;
 #endif
-	g_system->lockMutex(_timeMutex);
-	g_system->lockMutex(_recorderMutex);
-	_recordMode = kPassthrough;
-	g_system->unlockMutex(_timeMutex);
-	g_system->unlockMutex(_recorderMutex);
-
-	if (!artificialEventQueue.empty())
-		artificialEventQueue.clear();
-
-	if (_playbackFile != NULL) {
-		delete _playbackFile;
-	}
-	if (_playbackTimeFile != NULL) {
-		delete _playbackTimeFile;
-	}
-
-	if (_recordFile != NULL) {
-		_recordFile->finalize();
-		delete _recordFile;
-		_recordTimeFile->finalize();
-		delete _recordTimeFile;
-
-		_playbackFile = g_system->getSavefileManager()->openForLoading(_recordTempFileName);
-
-		assert(_playbackFile);
-
-		_recordFile = g_system->getSavefileManager()->openForSaving(_recordFileName);
-		_recordFile->writeUint32LE(RECORD_SIGNATURE);
-		_recordFile->writeUint32LE(RECORD_VERSION);
-
-		// conf vars
-		_recordFile->writeByte(_recordSubtitles ? 1 : 0);
-
-		_recordFile->writeUint32LE(_recordCount);
-		_recordFile->writeUint32LE(_recordTimeCount);
-
-		_recordFile->writeUint32LE(_randomSourceRecords.size());
-		for (uint i = 0; i < _randomSourceRecords.size(); ++i) {
-			_recordFile->writeUint32LE(_randomSourceRecords[i].name.size());
-			_recordFile->writeString(_randomSourceRecords[i].name);
-			_recordFile->writeUint32LE(_randomSourceRecords[i].seed);
-		}
-
-		for (uint i = 0; i < _recordCount; ++i) {
-			uint32 tempDiff;
-			Common::Event tempEvent;
-			readRecord(_playbackFile, tempDiff, tempEvent);
-			writeRecord(_recordFile, tempDiff, tempEvent);
-		}
-
-		_recordFile->finalize();
-		delete _recordFile;
-		delete _playbackFile;
-
-		//TODO: remove recordTempFileName'ed file
-	}
-	g_system->deleteMutex(_timeMutex);
-	g_system->deleteMutex(_recorderMutex);
 }
 
 void DefaultEventManager::init() {
@@ -283,147 +79,16 @@
 #endif
 }
 
-bool DefaultEventManager::playback(Common::Event &event) {
-
-	if (!_hasPlaybackEvent) {
-		if (_recordCount > _playbackCount) {
-			readRecord(_playbackFile, const_cast<uint32&>(_playbackDiff), _playbackEvent);
-			_playbackCount++;
-			_hasPlaybackEvent = true;
-		}
-	}
-
-	if (_hasPlaybackEvent) {
-		if (_playbackDiff <= (_eventCount - _lastEventCount)) {
-			switch(_playbackEvent.type) {
-			case Common::EVENT_MOUSEMOVE:
-			case Common::EVENT_LBUTTONDOWN:
-			case Common::EVENT_LBUTTONUP:
-			case Common::EVENT_RBUTTONDOWN:
-			case Common::EVENT_RBUTTONUP:
-			case Common::EVENT_WHEELUP:
-			case Common::EVENT_WHEELDOWN:
-				g_system->warpMouse(_playbackEvent.mouse.x, _playbackEvent.mouse.y);
-				break;
-			default:
-				break;
-			}
-			event = _playbackEvent;
-			_hasPlaybackEvent = false;
-			_lastEventCount = _eventCount;
-			return true;
-		}
-	}
-
-	return false;
-}
-
-void DefaultEventManager::record(Common::Event &event) {
-	writeRecord(_recordFile, _eventCount - _lastEventCount, event);
-
-	_recordCount++;
-	_lastEventCount = _eventCount;
-}
-
-void DefaultEventManager::registerRandomSource(Common::RandomSource &rnd, const char *name) {
-
-	if (_recordMode == kRecorderRecord) {
-		RandomSourceRecord rec;
-		rec.name = name;
-		rec.seed = rnd.getSeed();
-		_randomSourceRecords.push_back(rec);
-	}
-
-	if (_recordMode == kRecorderPlayback) {
-		for (uint i = 0; i < _randomSourceRecords.size(); ++i) {
-			if (_randomSourceRecords[i].name == name) {
-				rnd.setSeed(_randomSourceRecords[i].seed);
-				_randomSourceRecords.remove_at(i);
-				break;
-			}
-		}
-	}
-}
-
-void DefaultEventManager::processMillis(uint32 &millis) {
-	uint32 d;
-	if (_recordMode == kPassthrough) {
-		return;
-	}
-
-	g_system->lockMutex(_timeMutex);
-	if (_recordMode == kRecorderRecord) {
-		//Simple RLE compression
-		d = millis - _lastMillis;
-		if (d >= 0xff) {
-			_recordTimeFile->writeByte(0xff);
-			_recordTimeFile->writeUint32LE(d);
-		} else {
-			_recordTimeFile->writeByte(d);
-		}
-		_recordTimeCount++;
-	}
-
-	if (_recordMode == kRecorderPlayback) {
-		if (_recordTimeCount > _playbackTimeCount) {
-			d = _playbackTimeFile->readByte();
-			if (d == 0xff) {
-				d = _playbackTimeFile->readUint32LE();
-			}
-			millis = _lastMillis + d;
-			_playbackTimeCount++;
-		}
-	}
-
-	_lastMillis = millis;
-	g_system->unlockMutex(_timeMutex);
-}
-
 bool DefaultEventManager::pollEvent(Common::Event &event) {
 	uint32 time = g_system->getMillis();
-	bool result;
+	bool result = false;
 
-	if (!artificialEventQueue.empty()) {
-		event = artificialEventQueue.pop();
+	_dispatcher.dispatch();
+	if (!_eventQueue.empty()) {
+		event = _eventQueue.pop();
 		result = true;
-	} else {
-		result = _boss->pollEvent(event);
-
-#ifdef ENABLE_KEYMAPPER
-		if (result) {
-			// send key press events to keymapper
-			if (event.type == Common::EVENT_KEYDOWN) {
-				if (_keymapper->mapKeyDown(event.kbd)) {
-					result = false;
-				}
-			} else if (event.type == Common::EVENT_KEYUP) {
-				if (_keymapper->mapKeyUp(event.kbd)) {
-					result = false;
-				}
-			}
-		}
-#endif
 	}
 
-	if (_recordMode != kPassthrough)  {
-
-		g_system->lockMutex(_recorderMutex);
-		_eventCount++;
-
-		if (_recordMode == kRecorderPlayback)  {
-			if (event.type != Common::EVENT_QUIT) {
-				result = playback(event);
-			}
-		} else {
-			if (_recordMode == kRecorderRecord) {
-				if (result) {
-					record(event);
-				}
-			}
-		}
-		g_system->unlockMutex(_recorderMutex);
-	}
-
 	if (result) {
 		event.synthetic = false;
 		switch (event.type) {
@@ -598,13 +263,12 @@
 }
 
 void DefaultEventManager::pushEvent(const Common::Event &event) {
-
 	// If already received an EVENT_QUIT, don't add another one
 	if (event.type == Common::EVENT_QUIT) {
 		if (!_shouldQuit)
-			artificialEventQueue.push(event);
+			_artificialEventSource.addEvent(event);
 	} else
-		artificialEventQueue.push(event);
+		_artificialEventSource.addEvent(event);
 }
 
 #endif // !defined(DISABLE_DEFAULT_EVENTMANAGER)

Modified: scummvm/branches/gsoc2009-mods/backends/events/default/default-events.h
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/events/default/default-events.h	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/events/default/default-events.h	2009-08-08 19:09:30 UTC (rev 43134)
@@ -27,8 +27,6 @@
 #define BACKEND_EVENTS_DEFAULT_H
 
 #include "common/events.h"
-#include "common/savefile.h"
-#include "common/mutex.h"
 #include "common/queue.h"
 
 namespace Common {
@@ -41,21 +39,7 @@
 }
 
 
-class EventProvider {
-public:
-	virtual ~EventProvider() {}
-	/**
-	 * Get the next event in the event queue.
-	 * @param event	point to an Common::Event struct, which will be filled with the event data.
-	 * @return true if an event was retrieved.
-	 */
-	virtual bool pollEvent(Common::Event &event) = 0;
-};
-
-
-class DefaultEventManager : public Common::EventManager {
-	EventProvider *_boss;
-
+class DefaultEventManager : public Common::EventManager, Common::EventObserver {
 #ifdef ENABLE_VKEYBD
 	Common::VirtualKeyboard *_vk;
 #endif
@@ -65,8 +49,14 @@
 	bool _remap;
 #endif
 
-	Common::Queue<Common::Event> _artificialEventQueue;
+	Common::ArtificialEventSource _artificialEventSource;
 
+	Common::Queue<Common::Event> _eventQueue;
+	bool notifyEvent(const Common::Event &ev) {
+		_eventQueue.push(ev);
+		return true;
+	}
+
 	Common::Point _mousePos;
 	int _buttonState;
 	int _modifierState;
@@ -74,44 +64,6 @@
 	bool _shouldRTL;
 	bool _confirmExitDialogActive;
 
-	class RandomSourceRecord {
-	public:
-		Common::String name;
-		uint32 seed;
-	};
-	Common::Array<RandomSourceRecord> _randomSourceRecords;
-
-	bool _recordSubtitles;
-	volatile uint32 _recordCount;
-	volatile uint32 _lastRecordEvent;
-	volatile uint32 _recordTimeCount;
-	Common::OutSaveFile *_recordFile;
-	Common::OutSaveFile *_recordTimeFile;
-	Common::MutexRef _timeMutex;
-	Common::MutexRef _recorderMutex;
-	volatile uint32 _lastMillis;
-
-	volatile uint32 _playbackCount;
-	volatile uint32 _playbackDiff;
-	volatile bool _hasPlaybackEvent;
-	volatile uint32 _playbackTimeCount;
-	Common::Event _playbackEvent;
-	Common::InSaveFile *_playbackFile;
-	Common::InSaveFile *_playbackTimeFile;
-
-	volatile uint32 _eventCount;
-	volatile uint32 _lastEventCount;
-
-	enum RecordMode {
-		kPassthrough = 0,
-		kRecorderRecord = 1,
-		kRecorderPlayback = 2
-	};
-	volatile RecordMode _recordMode;
-	Common::String _recordFileName;
-	Common::String _recordTempFileName;
-	Common::String _recordTimeFileName;
-
 	// for continuous events (keyDown)
 	enum {
 		kKeyRepeatInitialDelay = 400,
@@ -124,18 +76,13 @@
 		int keycode;
 	} _currentKeyDown;
 	uint32 _keyRepeatTime;
-
-	void record(Common::Event &event);
-	bool playback(Common::Event &event);
 public:
-	DefaultEventManager(EventProvider *boss);
+	DefaultEventManager(Common::EventSource *boss);
 	~DefaultEventManager();
 
 	virtual void init();
 	virtual bool pollEvent(Common::Event &event);
 	virtual void pushEvent(const Common::Event &event);
-	virtual void registerRandomSource(Common::RandomSource &rnd, const char *name);
-	virtual void processMillis(uint32 &millis);
 
 	virtual Common::Point getMousePos() const { return _mousePos; }
 	virtual int getButtonState() const { return _buttonState; }

Modified: scummvm/branches/gsoc2009-mods/backends/keymapper/keymapper.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/keymapper/keymapper.cpp	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/keymapper/keymapper.cpp	2009-08-08 19:09:30 UTC (rev 43134)
@@ -168,6 +168,15 @@
 		_activeMaps.pop();
 }
 
+bool Keymapper::notifyEvent(const Common::Event &ev) {
+	if (ev.type == Common::EVENT_KEYDOWN)
+		return mapKeyDown(ev.kbd);
+	else if (ev.type == Common::EVENT_KEYUP)
+		return mapKeyUp(ev.kbd);
+	else
+		return false;
+}
+
 bool Keymapper::mapKeyDown(const KeyState& key) {
 	return mapKey(key, true);
 }
@@ -255,7 +264,7 @@
 		}
 
 		evt.mouse = _eventMan->getMousePos();
-		_eventMan->pushEvent(evt);
+		addEvent(evt);
 	}
 }
 

Modified: scummvm/branches/gsoc2009-mods/backends/keymapper/keymapper.h
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/keymapper/keymapper.h	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/keymapper/keymapper.h	2009-08-08 19:09:30 UTC (rev 43134)
@@ -39,7 +39,7 @@
 
 namespace Common {
 
-class Keymapper {
+class Keymapper : public Common::EventMapper, private Common::ArtificialEventSource {
 public:
 
 	struct MapRecord {
@@ -134,6 +134,10 @@
 	 */
 	void popKeymap();
 
+	// Implementation of the EventMapper interface
+	bool notifyEvent(const Common::Event &ev);
+	bool pollEvent(Common::Event &ev) { return Common::ArtificialEventSource::pollEvent(ev); }
+
 	/**
 	 * @brief Map a key press event.
 	 * If the active keymap contains a Action mapped to the given key, then

Modified: scummvm/branches/gsoc2009-mods/backends/platform/dc/dreamcast.mk
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/dc/dreamcast.mk	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/dc/dreamcast.mk	2009-08-08 19:09:30 UTC (rev 43134)
@@ -6,9 +6,8 @@
 CC := $(CXX)
 ASFLAGS := $(CXXFLAGS)
 
+dist : SCUMMVM.BIN IP.BIN plugin_dist
 
-dist : SCUMMVM.BIN plugin_dist
-
 plugin_dist : plugins
 	@[ -z "$(PLUGINS)" ] || for p in $(or $(PLUGINS),none); do \
 	  t="`basename \"$$p\" | LC_CTYPE=C tr '[:lower:]' '[:upper:]'`"; \
@@ -24,4 +23,12 @@
 scummvm.bin : scummvm.elf
 	sh-elf-objcopy -S -R .stack -O binary $< $@
 
+IP.BIN : ip.txt
+	makeip $< $@
 
+ip.txt : $(srcdir)/backends/platform/dc/ip.txt.in
+	if [ x"$(VER_EXTRA)" = xsvn ]; then \
+	  if [ -z "$(VER_SVNREV)" ]; then ver="SVN"; else ver="r$(VER_SVNREV)"; fi; \
+	else ver="V$(VERSION)"; fi; \
+	sed -e 's/[@]VERSION[@]/'"$$ver"/ -e 's/[@]DATE[@]/$(shell date '+%Y%m%d')/' < $< > $@
+

Copied: scummvm/branches/gsoc2009-mods/backends/platform/dc/ip.txt.in (from rev 43133, scummvm/trunk/backends/platform/dc/ip.txt.in)
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/dc/ip.txt.in	                        (rev 0)
+++ scummvm/branches/gsoc2009-mods/backends/platform/dc/ip.txt.in	2009-08-08 19:09:30 UTC (rev 43134)
@@ -0,0 +1,11 @@
+Hardware ID   : SEGA SEGAKATANA
+Maker ID      : SEGA ENTERPRISES
+Device Info   : 0000 CD-ROM1/1
+Area Symbols  : JUE
+Peripherals   : E000F10
+Product No    : T0000
+Version       : @VERSION@
+Release Date  : @DATE@
+Boot Filename : SCUMMVM.BIN
+SW Maker Name : The ScummVM team
+Game Title    : ScummVM

Modified: scummvm/branches/gsoc2009-mods/backends/platform/ds/arm9/source/fat/disc_io.h
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/ds/arm9/source/fat/disc_io.h	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/ds/arm9/source/fat/disc_io.h	2009-08-08 19:09:30 UTC (rev 43134)
@@ -64,7 +64,7 @@
 #endif
 
 #ifdef NDS
- #include <nds/jtypes.h>
+ #include <nds/ndstypes.h>
 #else
  #include "gba_types.h"
 #endif

Modified: scummvm/branches/gsoc2009-mods/backends/platform/ds/arm9/source/fat/gba_nds_fat.h
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/ds/arm9/source/fat/gba_nds_fat.h	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/ds/arm9/source/fat/gba_nds_fat.h	2009-08-08 19:09:30 UTC (rev 43134)
@@ -47,7 +47,7 @@
 #endif
 
 #ifdef NDS
- #include <nds/jtypes.h>
+ #include <nds/ndstypes.h>
 #else
  #include "gba_types.h"
 #endif

Modified: scummvm/branches/gsoc2009-mods/backends/platform/ds/arm9/source/portdefs.h
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/ds/arm9/source/portdefs.h	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/ds/arm9/source/portdefs.h	2009-08-08 19:09:30 UTC (rev 43134)
@@ -36,7 +36,7 @@
 typedef signed int s32;
 */
 
-#include "nds/jtypes.h"
+#include "nds/ndstypes.h"
 
 
 // Somebody removed these from scummsys.h, but they're still required, so I'm adding them here

Modified: scummvm/branches/gsoc2009-mods/backends/platform/ds/commoninclude/NDS/scummvm_ipc.h
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/ds/commoninclude/NDS/scummvm_ipc.h	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/ds/commoninclude/NDS/scummvm_ipc.h	2009-08-08 19:09:30 UTC (rev 43134)
@@ -27,7 +27,7 @@
 
 //////////////////////////////////////////////////////////////////////
 
-#include <nds/jtypes.h>
+#include <nds/ndstypes.h>
 #include <nds/ipc.h>
 
 //////////////////////////////////////////////////////////////////////

Copied: scummvm/branches/gsoc2009-mods/backends/platform/ds/ds.mk (from rev 43133, scummvm/trunk/backends/platform/ds/ds.mk)
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/ds/ds.mk	                        (rev 0)
+++ scummvm/branches/gsoc2009-mods/backends/platform/ds/ds.mk	2009-08-08 19:09:30 UTC (rev 43134)
@@ -0,0 +1,111 @@
+# Repeat "all" target here, to make sure it is the first target
+# Currently disabled, so only arm7.bin gets build
+#all:
+
+
+
+# Files in this list will be optimisied for speed, otherwise they will be optimised for space
+OPTLIST := actor.cpp ds_main.cpp osystem_ds.cpp blitters.cpp fmopl.cpp rate.cpp isomap.cpp image.cpp gfx.cpp sprite.cpp actor_path.cpp actor_walk.cpp
+#OPTLIST :=
+
+# Compiler options for files which should be optimised for speed
+OPT_SPEED := -O3
+
+# Compiler options for files which should be optimised for space
+OPT_SIZE := -Os -mthumb
+
+
+#-mthumb -fno-gcse -fno-schedule-insns2
+
+
+OBJS := $(DATA_OBJS) $(LIBCARTRESET_OBJS) $(PORT_OBJS) $(COMPRESSOR_OBJS) $(FAT_OBJS)
+
+
+# TODO: Handle files in OPTLIST.
+#   For this, the list should be made explicit. So, replace actor.cpp by path/to/actor.cpp --
+#   in fact, there are several actor.cpp files, and right now all are "optimized", but
+#   I think Neil only had the SAGA one in mind. Same for gfx.cpp
+
+
+
+
+
+
+#############################################################################
+#############################################################################
+#############################################################################
+
+
+#ndsdir = $(srcdir)/backends/platform/ds
+ndsdir = backends/platform/ds
+
+#############################################################################
+#
+# ARM7 rules.
+# For ARM7 files, we need different compiler flags, which leads to the
+# extra rules for .o files below
+#
+#############################################################################
+
+$(ndsdir)/arm7/arm7.bin: $(ndsdir)/arm7/arm7.elf
+
+$(ndsdir)/arm7/arm7.elf: \
+	$(ndsdir)/arm7/source/libcartreset/cartreset.o \
+	$(ndsdir)/arm7/source/main.o
+
+# HACK/FIXME: C compiler, for cartreset.c -- we should switch this to use CXX
+# as soon as possible.
+CC := $(DEVKITARM)/bin/arm-eabi-gcc
+
+# HACK/TODO: Pointer to objcopy. This should really be set by configure
+OBJCOPY := $(DEVKITARM)/bin/arm-eabi-objcopy
+
+#
+# Set various flags
+#
+ARM7_ARCH	:=	-mthumb-interwork
+
+# note: arm9tdmi isn't the correct CPU arch, but anything newer and LD
+# *insists* it has a FPU or VFP, and it won't take no for an answer!
+ARM7_CFLAGS	:=	-g -Wall -O2\
+		-mcpu=arm7tdmi -mtune=arm7tdmi -fomit-frame-pointer\
+		-ffast-math \
+		$(ARM7_ARCH) \
+		-I$(srcdir)/$(ndsdir)/arm7/source/libcartreset \
+		-I$(srcdir)/$(ndsdir)/commoninclude \
+		-I$(DEVKITPRO)/libnds/include \
+		-I$(DEVKITPRO)/libnds/include/nds \
+		-DARM7
+
+ARM7_CXXFLAGS	:= $(ARM7_CFLAGS) -fno-exceptions -fno-rtti
+
+ARM7_LDFLAGS	:= -g $(ARM7_ARCH) -mno-fpu
+
+# HACK/FIXME: Define a custom build rule for cartreset.c.
+# We do this because it is a .c file, not a .cpp file and so is outside our
+# regular build system anyway. But this is *bad*. It should be changed into a
+# .cpp file and this rule be removed.
+%.o: %.c
+	$(MKDIR) $(*D)/$(DEPDIR)
+	$(CC) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
+
+
+# Set custom build flags for cartreset.o
+$(ndsdir)/arm7/source/libcartreset/cartreset.o: CXXFLAGS=$(ARM7_CFLAGS)
+$(ndsdir)/arm7/source/libcartreset/cartreset.o: CPPFLAGS=
+
+# Set custom build flags for main.o
+$(ndsdir)/arm7/source/main.o: CXXFLAGS=$(ARM7_CXXFLAGS)
+$(ndsdir)/arm7/source/main.o: CPPFLAGS=
+
+# Rule for creating ARM7 .bin files from .elf files
+%.bin: %.elf
+	@echo ------
+	@echo Building $@...
+	$(OBJCOPY) -O binary  $< $@
+
+# Rule for creating ARM7 .elf files by linking .o files together with a special linker script
+%.elf:
+	@echo ------
+	@echo Building $@...
+	$(CXX)  $(ARM7_LDFLAGS) -specs=ds_arm7.specs $+ -L/opt/devkitPro/libnds/lib -lnds7  -o $@

Copied: scummvm/branches/gsoc2009-mods/backends/platform/ds/module.mk (from rev 43133, scummvm/trunk/backends/platform/ds/module.mk)
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/ds/module.mk	                        (rev 0)
+++ scummvm/branches/gsoc2009-mods/backends/platform/ds/module.mk	2009-08-08 19:09:30 UTC (rev 43134)
@@ -0,0 +1,71 @@
+MODULE := backends/platform/ds
+
+ARM7_MODULE_OBJS := \
+	arm7/source/main.o \
+	arm7/source/libcartreset/cartreset.o \
+
+PORT_OBJS := \
+	arm9/source/blitters_arm.o \
+	arm9/source/cdaudio.o \
+	arm9/source/dsmain.o \
+	../../fs/ds/ds-fs.o \
+	arm9/source/gbampsave.o \
+	arm9/source/scummhelp.o \
+	arm9/source/osystem_ds.o \
+	arm9/source/portdefs.o \
+	arm9/source/ramsave.o \
+	arm9/source/touchkeyboard.o \
+	arm9/source/zipreader.o \
+	arm9/source/dsoptions.o \
+	arm9/source/keys.o \
+	arm9/source/wordcompletion.o \
+	arm9/source/interrupt.o
+
+ifdef USE_PROFILER
+	PORT_OBJS += arm9/source/profiler/cyg-profile.o
+endif
+
+DATA_OBJS := \
+	arm9/data/icons.o \
+	arm9/data/keyboard.o \
+	arm9/data/keyboard_pal.o \
+	arm9/data/default_font.o \
+	arm9/data/8x8font_tga.o
+
+COMPRESSOR_OBJS := #arm9/source/compressor/lz.o
+
+FAT_OBJS :=  arm9/source/fat/disc_io.o arm9/source/fat/gba_nds_fat.o\
+	arm9/source/fat/io_fcsr.o \
+	arm9/source/fat/io_m3cf.o \
+	arm9/source/fat/io_mpcf.o \
+	arm9/source/fat/io_sccf.o \
+	arm9/source/fat/io_m3sd.o \
+	arm9/source/fat/io_nmmc.o \
+	arm9/source/fat/io_scsd.o \
+	arm9/source/fat/io_scsd_asm.o \
+	arm9/source/fat/io_njsd.o \
+	arm9/source/fat/io_mmcf.o \
+	arm9/source/fat/io_sd_common.o \
+	arm9/source/fat/io_m3_common.o \
+	arm9/source/fat/io_dldi.o \
+	arm9/source/fat/m3sd.o
+
+
+#	arm9/source/fat/io_cf_common.o arm9/source/fat/io_m3_common.o\
+#	arm9/source/fat/io_sd_common.o arm9/source/fat/io_scsd_s.o \
+#	arm9/source/fat/io_sc_common.o arm9/source/fat/io_sd_common.o
+
+LIBCARTRESET_OBJS := 
+	#arm9/source/libcartreset/cartreset.o
+
+
+MODULE_OBJS :=
+
+
+
+# TODO: Should add more dirs to MODULE_DIRS so that "make distclean" can remove .deps dirs.
+MODULE_DIRS += \
+	backends/platform/ds/
+
+# We don't use the rules.mk here on purpose
+OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) $(OBJS)

Modified: scummvm/branches/gsoc2009-mods/backends/platform/gp2x/build/README-GP2X
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/gp2x/build/README-GP2X	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/gp2x/build/README-GP2X	2009-08-08 19:09:30 UTC (rev 43134)
@@ -12,11 +12,20 @@
     * How to save <#How_to_save>
     * Controller mappings <#Controller_mappings>
     * Know issues <#Know_issues>
-    * Major TODO's <#Major_TODOs>
+    * TODO's <#Major_TODOs>
     * Additional resources/links <#Additional_resourceslinks>
     * Credits <#Credits>
 
+------------------------------------------------------------------------
 
+Please refer to the:
+
+GP2X/GP2XWiz ScummVM Forum: <http://forums.scummvm.org/viewforum.php?f=14> 
+WiKi: <http://wiki.scummvm.org/index.php/GP2X> 
+
+for the most current information on the port and any updates to this 
+documentation.
+
 ------------------------------------------------------------------------
 About the backend/port
 
@@ -58,22 +67,6 @@
 Just because an engine is included does not mean any/all of its games
 are supported. Please check game compatability for more infomation.
 
-    * Scumm - (All games supported by ScummVM should work to some
-      extent, using the hardware scalar if needed)
-    * AGOS (AKA Simon) - (Simon the Sorcerer one and two).
-    * Sky - (Beneath a Steel Sky)
-    * Sword - (Broken Sword 1) - This engine uses the hardware scalar to
-      downsize the graphics to fix on the GP2X. It is NOT very nice to
-      look at.
-    * Sword2 - (Broken Sword 2) - This engine uses the hardware scalar
-      to downsize the graphics to fix on the GP2X. It is NOT very nice
-      to look at.
-    * Gob - (Goblins one)
-    * Queen - (Flight of the Amazon Queen)
-    * Kyra - (The Legend of Kyrandia)
-
-All other game engines are disabled in this release.
-
 ------------------------------------------------------------------------
 Supported audio options
 
@@ -169,16 +162,10 @@
 Saving often is never a bad idea anyhow.
 
 ------------------------------------------------------------------------
-Major TODO's
+TODO's
 
 Fix save support when using the Sky engine (Beneath a Steel Sky) - You
 CAN'T save at the moment but auto save works.
-Look into inconsistencies with AGOS engine and map Y key to a button
-combination to allow clean quitting (Simon 1/2).
-Add splash-screen and pre-ScummVM config menu (CPU speed, LCD timings
-etc.) - Partly done.
-Fix TV out, maybe make it an option in the pre-ScummVM config menu.
-Any help appreciated :).
 
 ------------------------------------------------------------------------
 Additional resources/links
@@ -186,7 +173,7 @@
     * ScummVM WiKi GP2X page <http://wiki.scummvm.org/index.php/GP2X>
     * ScummVM forums GP2X forum
       <http://forums.scummvm.org/viewforum.php?f=14>
-    * My own ScummVM page <http://www.distant-earth.com/scummvm> (for
+    * My own ScummVM page <http://scummvm.distant-earth.com/> (for
       SVN/test builds)
     * Main ScummVM site <http://www.scummvm.org> (for official supported
       release builds)
@@ -197,4 +184,3 @@
 Core ScummVM code (c) The ScummVM Team
 Portions of the GP2X backend (c) John Willis
 Detailed (c) information can be found within the source code
-

Deleted: scummvm/branches/gsoc2009-mods/backends/platform/gp2x/build/README-GP2X.html
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/gp2x/build/README-GP2X.html	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/gp2x/build/README-GP2X.html	2009-08-08 19:09:30 UTC (rev 43134)
@@ -1,369 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-  <title>ScummVM - GP2X SPECIFIC README</title>
-
-
-</head>
-
-
-<body>
-
-<span style="font-weight: bold;">ScummVM -
-GP2X SPECIFIC README - HEAD SVN<br>
-
-</span>
-<hr style="width: 100%; height: 2px;"><br>
-
-<span style="font-weight: bold;">Contents:</span><br>
-
-<ul>
-
-  <li><a href="#About_the_backendport">About the
-backend/port</a></li>
-
-  <li><a href="#Game_compatibility">Game
-compatability</a></li>
-
-  <li><a href="#Included_engines">Included engines</a></li>
-
-  <li><a href="#Supported_audio_options">Supported
-audio options</a></li>
-
-  <li><a href="#Supported_cut-scene_options">Supported
-cut-scene options</a></li>
-
-  <li><a href="#Recent_changes">Recent changes</a></li>
-
-  <li><a href="#How_to_save">How to save</a></li>
-
-  <li><a href="#Controller_mappings">Controller
-mappings</a></li>
-
-  <li><a href="#Know_issues">Know issues</a></li>
-
-  <li><a href="#Major_TODOs">Major TODO's</a></li>
-
-  <li><a href="#Additional_resourceslinks">Additional
-resources/links</a></li>
-
-  <li><a href="#Credits">Credits</a></li>
-
-</ul>
-
-<br>
-
-<hr style="width: 100%; height: 2px;"><a style="font-weight: bold;" name="About_the_backendport"></a><span style="font-weight: bold;">About the backend/port</span><br>
-
-<br>
-
-This is the readme for the offficial GP2X ScummVM backend (also known
-as the GP2X port).<br>
-
-<br>
-
-This is an SVN test release of ScummVM for the GP2X, it would be
-appreciated
-if this SVN test distribution was not mirrored and that people be
-directed to <a href="http://www.distant-earth.com/scummvm">http://www.distant-earth.com/scummvm</a>
-instead for updated SVN builds.<br>
-
-<br>
-
-Full supported official releases of the GP2X ScummVM backend are made
-in line with main official releases and are avalalble from the <a href="http://www.scummvm.org/downloads.php">ScummVM
-downloads page</a>.<br>
-
-<br>
-
-This build is in an active state of development and as such no
-‘expected’ behavior can be guaranteed ;).<br>
-
-<br>
-
-SVN builds are quickly tested with firmware 2.0.0 for reference.<br>
-
-<br>
-
-Please refer to the <a href="http://forums.scummvm.org/viewforum.php?f=14">GP2X
-ScummVM forum</a> and <a href="http://wiki.scummvm.org/index.php/GP2X">WiKi</a>
-for the latest information on the port.<br>
-
-<br>
-
-<hr style="width: 100%; height: 2px;"><a style="font-weight: bold;" name="Game_compatibility"></a><span style="font-weight: bold;">Game compatibility</span><br>
-
-<br>
-
-For information on the compatability of a specific game please refer to
-the <a href="http://wiki.scummvm.org/index.php/GP2X#Compatibility_List">GP2X
-compatability section of the ScummVM WiKi</a>.<br>
-
-<br>
-
-Please note the version and date of the ScummVM build you are running
-when reviewing the above list.<br>
-
-<br>
-
-<hr style="width: 100%; height: 2px;"><a style="font-weight: bold;" name="Included_engines"></a><span style="font-weight: bold;">Included engines</span><br>
-
-<br>
-
-Just because an engine is included does not mean any/all of its games
-are supported. Please check game compatability for more infomation.<br>
-
-<ul>
-
-  <li>Scumm - (All games supported by ScummVM should work to some
-extent, using the hardware scalar if needed)</li>
-
-  <li>AGOS (AKA Simon) - (Simon the Sorcerer one and two).</li>
-
-  <li>Sky - (Beneath a Steel Sky)</li>
-
-  <li>Sword - (Broken Sword 1) - This engine uses the hardware
-scalar to
-downsize the graphics to fix on the GP2X. It is NOT very nice to look
-at.</li>
-
-  <li>Sword2 - (Broken Sword 2) - This engine uses the hardware
-scalar to downsize the graphics to fix on the GP2X. It is NOT very nice
-to look at.</li>
-
-  <li>Gob - (Goblins one)</li>
-
-  <li>Queen - (Flight of the Amazon Queen)</li>
-
-  <li>Kyra - (The Legend of Kyrandia)</li>
-
-</ul>
-
-All other game engines are disabled in this release.<br>
-
-<br style="font-weight: bold;">
-
-<hr style="width: 100%; height: 2px;"><a style="font-weight: bold;" name="Supported_audio_options"></a><span style="font-weight: bold;">Supported audio options</span><br>
-
-<br>
-
-Raw audio.<br>
-
-MP3 audio.<br>
-
-OGG Vorbis audio.<br>
-
-<br>
-
-FLAC audio is currently unsupported.<br>
-
-<br>
-
-For best results use uncompressed audio in games.<br>
-
-<br>
-
-<hr style="width: 100%; height: 2px;"><a style="font-weight: bold;" name="Supported_cut-scene_options"></a><span style="font-weight: bold;">Supported cut-scene options</span><br>
-
-<br>
-
-No cut scene compression options are currently supported. <br>
-
-<br>
-
-DXA video support will be added as soon as it is stable.<br>
-
-<br>
-
-<hr style="width: 100%; height: 2px;"><a style="font-weight: bold;" name="Recent_changes"></a><span style="font-weight: bold;">Recent changes<br>
-
-<br>
-
-</span>Refined audio hacks to reduce audio delay a little more.<br>
-
-Enabled hardware scalar code.<br>
-
-Now built using SDL 1.2.9 for the parts of the port that use SDL (some
-parts now hit the hardware directly).<br>
-
-Enabled new launcher - (Ensure defaulttheme.zip is in the same folder
-as the executable).<br>
-
-Aspect Ratio Correction can now be disabled ‘per
-game’. When adding a game you can find this option on the GFX
-tab. <br>
-
-Note: This will cause the game to run with a black border at the bottom
-as it will be rendered to a 320*200 frame.<br>
-
-<br>
-
-<hr style="width: 100%; height: 2px;"><a style="font-weight: bold;" name="How_to_save"></a><span style="font-weight: bold;">How to save</span><br>
-
-<br>
-
-<span style="font-weight: bold;">NOTE:</span>
-Everything is saved to the SD card, saves are stored in the <span style="font-weight: bold;">saves</span> folder under
-your main ScummVM executable unless you set another save location.<br>
-
-<br>
-
-The configiration file for ScummVM (.scummvmrc) is stored in the
-same place as the ScummVM executable.<br>
-
-<br>
-
-The save process below is for Scumm engine games but the
-principle is the same for all.<br>
-
-<br>
-
-In Game.<br>
-
-<br>
-
-1. Right Trigger<br>
-
-2. Select SAVE with B<br>
-
-3. Select a position with B<br>
-
-4. Right trigger puts ? in the name box for some text.<br>
-
-5. Press B to save<br>
-
-<br>
-
-Basically the emulated keys you can use are equivelent to the values
-buttons are mapped to, <br>
-
-<br>
-
-I have a virtual keyboard like the GP32 one (left/right on the stick to
-pick chars) to add in at some point ;-)<br>
-
-<br>
-
-<hr style="width: 100%; height: 2px;"><a style="font-weight: bold;" name="Controller_mappings"></a><span style="font-weight: bold;">Controller mappings</span><br>
-
-<br>
-
-<span style="font-weight: bold;">Mouse emulation:</span><br>
-
-<br>
-
-Stick: Move Pointer<br>
-
-Stick Click: ‘light’ Left Click<br>
-
-B: Left click<br>
-
-X: Right click<br>
-
-<br>
-
-<span style="font-weight: bold;">Keyboard emulation:</span><br>
-
-<br>
-
-Start: Return<br>
-
-Select: Escape<br>
-
-Y: Space Bar (Pause)<br>
-
-Right Trigger: Game Menu (Save, Load, Quit etc.)<br>
-
-Volume Buttons: Increase and Decrease volume (5% per press)<br>
-
-<br>
-
-<span style="font-weight: bold;">Fancy button combos:</span><br>
-
-<br>
-
-NOTE: To use button combos press and hold the Left Trigger then...<br>
-
-<br>
-
-Y: Toggle "zoom" mode - Try it in larger games like Broken Sword.<br>
-
-Volume Buttons: Increase and Decrease subtitle speed (In SCUMM games)<br>
-
-Right Trigger: 0 (For skipping the copy protection in Monkey Island 2)<br>
-
-Select: Exit ScummVM completely (and gracefully)<br>
-
-<br>
-
-<hr style="width: 100%; height: 2px;"><a style="font-weight: bold;" name="Know_issues"></a><span style="font-weight: bold;">Know issues</span><br>
-
-<br>
-
-Possible random crash (well SegFault). I have had this happen twice and
-have not tracked down the cause. <br>
-
-It happens very infrequently, both times it was in the DOTT CD intro.
-Saving often is never a bad idea anyhow.<br>
-
-<br>
-
-<hr style="width: 100%; height: 2px;"><a style="font-weight: bold;" name="Major_TODOs"></a><span style="font-weight: bold;">Major TODO's</span><br>
-
-<br>
-
-Fix save support when using the Sky engine (Beneath a Steel Sky) - You
-CAN'T save at the moment but auto save works.<br>
-
-Look into inconsistencies with AGOS engine and map Y key to a button
-combination to allow clean quitting (Simon 1/2).<br>
-
-Add splash-screen and pre-ScummVM config menu (CPU speed, LCD timings
-etc.) - Partly done.<br>
-
-Fix TV out, maybe make it an option in the pre-ScummVM config menu.<br>
-
-Any help appreciated :).<br>
-
-<br style="font-weight: bold;">
-
-<hr style="width: 100%; height: 2px;"><a style="font-weight: bold;" name="Additional_resourceslinks"></a><span style="font-weight: bold;">Additional resources/links<br>
-
-<br>
-
-</span><span style="font-weight: bold;">Note:</span>
-When providing feedback,
-requests, forum posts, bug reports or anything like that always include
-a mention of the version of ScummVM you are using (the build version,
-date and time can be seen in the main game launcher window).<br>
-
-<ul>
-
-  <li><a href="http://wiki.scummvm.org/index.php/GP2X">ScummVM
-WiKi GP2X page</a></li>
-
-  <li><a href="http://forums.scummvm.org/viewforum.php?f=14">ScummVM
-forums GP2X forum</a></li>
-
-  <li><a href="http://www.distant-earth.com/scummvm">My
-own ScummVM page</a> (for SVN/test builds)</li>
-
-  <li><a href="http://www.scummvm.org">Main ScummVM
-site</a> (for official supported release builds)</li>
-
-</ul>
-
-<hr style="width: 100%; height: 2px;"><a style="font-weight: bold;" name="Credits"></a><span style="font-weight: bold;">Credits</span><br>
-
-<br>
-
-Core ScummVM code (c) The ScummVM Team<br>
-
-Portions of the GP2X backend (c) John Willis<br>
-
-Detailed (c) information can be found within the source code<br>
-
-<br>
-
-</body>
-</html>

Modified: scummvm/branches/gsoc2009-mods/backends/platform/gp2x/build/bundle.sh
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/gp2x/build/bundle.sh	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/gp2x/build/bundle.sh	2009-08-08 19:09:30 UTC (rev 43134)
@@ -19,7 +19,6 @@
 
 cp ./scummvm.gpe ./scummvm-gp2x-`date '+%Y-%m-%d'`/
 cp ./scummvm.png ./scummvm-gp2x-`date '+%Y-%m-%d'`/
-cp ./README-GP2X.html ./scummvm-gp2x-`date '+%Y-%m-%d'`/
 cp ./README-GP2X ./scummvm-gp2x-`date '+%Y-%m-%d'`/
 cp ./mmuhack.o ./scummvm-gp2x-`date '+%Y-%m-%d'`/
 cp ../../../../scummvm.gp2x ./scummvm-gp2x-`date '+%Y-%m-%d'`/

Modified: scummvm/branches/gsoc2009-mods/backends/platform/gp2x/build/config-alleng.sh
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/gp2x/build/config-alleng.sh	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/gp2x/build/config-alleng.sh	2009-08-08 19:09:30 UTC (rev 43134)
@@ -18,6 +18,6 @@
 # Edit the configure line to suit.
 cd ../../../..
 ./configure --backend=gp2x --disable-mt32emu --host=gp2x --disable-flac --disable-nasm --disable-hq-scalers --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin --with-mpeg2-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-tremor --with-tremor-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-zlib --with-zlib-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-mad --with-mad-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-all-engines --enable-vkeybd
-# --enable-plugins --default-dynamic
+#--enable-plugins --default-dynamic
 
 echo Generating config for GP2X complete. Check for errors.

Modified: scummvm/branches/gsoc2009-mods/backends/platform/gp2x/build/config.sh
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/gp2x/build/config.sh	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/gp2x/build/config.sh	2009-08-08 19:09:30 UTC (rev 43134)
@@ -18,6 +18,6 @@
 # Edit the configure line to suit.
 cd ../../../..
 ./configure --backend=gp2x --disable-mt32emu --host=gp2x --disable-flac --disable-nasm --disable-hq-scalers --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin --with-mpeg2-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-tremor --with-tremor-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-zlib --with-zlib-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-mad --with-mad-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-vkeybd
-# --enable-plugins --default-dynamic
+#--enable-plugins --default-dynamic
 
 echo Generating config for GP2X complete. Check for errors.

Modified: scummvm/branches/gsoc2009-mods/backends/platform/gp2x/events.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/gp2x/events.cpp	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/gp2x/events.cpp	2009-08-08 19:09:30 UTC (rev 43134)
@@ -35,7 +35,7 @@
 #include "common/events.h"
 
 // FIXME move joystick defines out and replace with confile file options
-// we should really allow users to map any key to a joystick button
+// we should really allow users to map any key to a joystick button using the keymapper.
 #define JOY_DEADZONE 2200
 
 #define JOY_XAXIS 0
@@ -273,7 +273,7 @@
 
 	Combos:
 
-	GP2X_BUTTON_VOLUP &	GP2X_BUTTON_VOLDOWN		0 (For Monkey 2 CP)
+	GP2X_BUTTON_VOLUP &	GP2X_BUTTON_VOLDOWN		0 (For Monkey 2 CP) or Virtual Keyboard if enabled
 	GP2X_BUTTON_L &	GP2X_BUTTON_SELECT			Common::EVENT_QUIT (Calls Sync() to make sure SD is flushed)
 	GP2X_BUTTON_L &	GP2X_BUTTON_Y				Toggles setZoomOnMouse() for larger then 320*240 games to scale to the point + raduis.
 	GP2X_BUTTON_L &	GP2X_BUTTON_START			Common::EVENT_MAINMENU (ScummVM Global Main Menu)
@@ -434,29 +434,22 @@
 						}
 						break;
 					case GP2X_BUTTON_VOLUP:
-						//if (GP2X_BUTTON_STATE_L == TRUE) {
-						//	displayMessageOnOSD("Setting CPU Speed at 230MHz");
-						//	GP2X_setCpuspeed(200);
-							//event.kbd.keycode = Common::KEYCODE_PLUS;
-							//event.kbd.ascii = mapKey(SDLK_PLUS, ev.key.keysym.mod, 0);
-						//} else {
-							GP2X_mixer_move_volume(1);
+						GP2X_HW::mixerMoveVolume(2);
+						if (GP2X_HW::volumeLevel == 100) {
+							displayMessageOnOSD("Maximum Volume");
+						} else {
 							displayMessageOnOSD("Increasing Volume");
-						//}
+						}
 						break;
 
 					case GP2X_BUTTON_VOLDOWN:
-						//if (GP2X_BUTTON_STATE_L == TRUE) {
-						//	displayMessageOnOSD("Setting CPU Speed at 60MHz");
-						//	GP2X_setCpuspeed(60);
-							//event.kbd.keycode = Common::KEYCODE_MINUS;
-							//event.kbd.ascii = mapKey(SDLK_MINUS, ev.key.keysym.mod, 0);
-						//} else {
-							GP2X_mixer_move_volume(0);
+						GP2X_HW::mixerMoveVolume(1);
+						if (GP2X_HW::volumeLevel == 0) {
+							displayMessageOnOSD("Minimal Volume");
+						} else {
 							displayMessageOnOSD("Decreasing Volume");
-						//}
+						}
 						break;
-
 				}
 			}
 			return true;

Modified: scummvm/branches/gsoc2009-mods/backends/platform/gp2x/gp2x-hw.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/gp2x/gp2x-hw.cpp	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/gp2x/gp2x-hw.cpp	2009-08-08 19:09:30 UTC (rev 43134)
@@ -48,6 +48,20 @@
 #include <sys/time.h>
 #include <unistd.h>
 
+namespace GP2X_HW {
+
+enum {
+	VOLUME_NOCHG			= 0,
+	VOLUME_DOWN				= 1,
+	VOLUME_UP				= 2,
+	VOLUME_CHANGE_RATE		= 8,
+	VOLUME_MIN				= 0,
+	VOLUME_INITIAL			= 70,
+	VOLUME_MAX				= 100
+};
+
+int volumeLevel = VOLUME_INITIAL;
+
 /* system registers */
 static struct
 {
@@ -61,14 +75,14 @@
 
 #define SYS_CLK_FREQ 7372800
 
-void GP2X_device_init() {
+void deviceInit() {
 	// Open devices
 	if (!gp2x_dev[0])  gp2x_dev[0] = open("/dev/mixer", O_RDWR);
 	if (!gp2x_dev[1])  gp2x_dev[1] = open("/dev/batt",   O_RDONLY);
 	if (!gp2x_dev[2])  gp2x_dev[2] = open("/dev/mem",   O_RDWR);
 }
 
-void GP2X_device_deinit() {
+void deviceDeinit() {
 	// Close devices
 	{
 		int i;
@@ -92,68 +106,35 @@
 	unpatchMMU();
 }
 
-// Vairous mixer level fudges.
-// TODO: Clean up and merge quick hacks.
+void mixerMoveVolume(int direction) {
+    if (volumeLevel <= 10) {
+        if (direction == VOLUME_UP)   volumeLevel += VOLUME_CHANGE_RATE/2;
+        if (direction == VOLUME_DOWN) volumeLevel -= VOLUME_CHANGE_RATE/2;
+    } else {
+        if(direction == VOLUME_UP)   volumeLevel += VOLUME_CHANGE_RATE;
+        if(direction == VOLUME_DOWN) volumeLevel -= VOLUME_CHANGE_RATE;
+    }
 
-void GP2X_mixer_set_volume(int L /*0..100*/, int R /*0..100*/) {
+    if (volumeLevel < VOLUME_MIN) volumeLevel = VOLUME_MIN;
+    if (volumeLevel > VOLUME_MAX) volumeLevel = VOLUME_MAX;
 
-	/* Set an arbitrary percentage value for the hardware mixer volume.
+    unsigned long soundDev = open("/dev/mixer", O_RDWR);
 
-	   Parameters:
-	   L (0..100) - volume percentage for the left channel
-	   R (0..100) - volume percentage for the right channel
-
-	   Note:
-	   - A higher percentage than 100 will distort your sound.
-	*/
-
-	unsigned char temp[4];
-
-	if (L < 0) L = 0;
-	if (L > GP2X_MAXVOL) L = GP2X_MAXVOL;
-	if (R < 0) R = 0;
-	if (R > GP2X_MAXVOL) R = GP2X_MAXVOL;
-
-	temp[0]=(unsigned char)L;
-	temp[1]=(unsigned char)R;
-	temp[2]=temp[3]=0;
-
-	//warning("GP2X_mixer_set_volume is about to set %d %d", L, R);
-	ioctl(gp2x_dev[0], SOUND_MIXER_WRITE_PCM, temp);
+    if(soundDev) {
+        int vol = ((volumeLevel << 8) | volumeLevel);
+        ioctl(soundDev, SOUND_MIXER_WRITE_PCM, &vol);
+        close(soundDev);
+    }
 }
 
-int GP2X_mixer_get_volume() {
-	int vol;
-	ioctl(gp2x_dev[0], SOUND_MIXER_READ_PCM, &vol);
-	//warning("GP2X_mixer_get_volume returned %d %d", (int)((vol & 0xff)), (int)((vol >> 8) & 0xff));
-	return (int)((vol & 0xff));
-}
-
-void GP2X_mixer_move_volume(int UpDown) {
-	// Raise volume 5% if 1 passed, lower 5% if 0.
-	int curvol, newvol;
-	ioctl(gp2x_dev[0], SOUND_MIXER_READ_PCM, &curvol);
-	curvol = ((int)((curvol & 0xff)));
-	newvol = ((int)((curvol & 0xff)));
-	//warning("GP2X_mixer_move_volume got current volume @ %d", curvol);
-	if (UpDown == 1) {
-			newvol = (curvol + 5);
-	} else if (UpDown == 0) {
-			newvol = (curvol - 5);
-	}
-	//warning("GP2X_mixer_move_volume is about to set volume @ %d", newvol);
-	GP2X_mixer_set_volume(newvol, newvol);
-	return;
-}
-
-void GP2X_setCpuspeed(unsigned int mhz)
+void setCpuspeed(unsigned int mhz)
 {
 	set_FCLK(mhz);
 	set_DCLK_Div(0);
 	set_920_Div(0);
 }
 
-int GP2X_getBattLevel() {
+int getBattLevel() {
     int devbatt;
     unsigned short currentval=0;
     devbatt = open("/dev/batt", O_RDONLY);
@@ -213,3 +194,6 @@
 	MEM_REG[0x2846>>1]=(MEM_REG[0x2846>>1] | 0x20) & ~2;
 	while (!(MEM_REG[0x2846>>1] & 2));
 }
+
+} /* namespace GP2X_HW */
+

Modified: scummvm/branches/gsoc2009-mods/backends/platform/gp2x/gp2x-hw.h
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/gp2x/gp2x-hw.h	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/gp2x/gp2x-hw.h	2009-08-08 19:09:30 UTC (rev 43134)
@@ -31,17 +31,19 @@
 #ifndef GP2X_HW_H
 #define GP2X_HW_H
 
+namespace GP2X_HW {
+
 #define GP2X_MAXVOL 100 // Highest level permitted by GP2X's mixer
 #define SYS_CLK_FREQ 7372800 // Clock Frequency
 
-extern void	GP2X_device_init();
-extern void	GP2X_device_deinit();
-extern void	GP2X_mixer_set_volume(int, int);
-extern int	GP2X_mixer_get_volume();
-extern void	GP2X_mixer_move_volume(int);
-extern void GP2X_setCpuspeed(unsigned int cpuspeed);
-extern int GP2X_getBattLevel();
+extern int volumeLevel;
 
+extern void	deviceInit();
+extern void	deviceDeinit();
+extern void	mixerMoveVolume(int);
+extern void setCpuspeed(unsigned int cpuspeed);
+extern int getBattLevel();
+
 extern void save_system_regs(void); /* save some registers */
 extern void set_display_clock_div(unsigned div);
 extern void set_FCLK(unsigned MHZ); /* adjust the clock frequency (in Mhz units) */
@@ -50,4 +52,6 @@
 extern void Disable_940(void); /* 940t down */
 extern void gp2x_video_wait_vsync(void);
 
+} /* namespace GP2X_HW */
+
 #endif //GP2X_HW_H

Modified: scummvm/branches/gsoc2009-mods/backends/platform/gp2x/gp2x.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/gp2x/gp2x.cpp	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/gp2x/gp2x.cpp	2009-08-08 19:09:30 UTC (rev 43134)
@@ -34,6 +34,7 @@
 #include "common/archive.h"
 #include "common/config-manager.h"
 #include "common/debug.h"
+#include "common/EventRecorder.h"
 #include "common/events.h"
 #include "common/util.h"
 
@@ -232,16 +233,17 @@
 		// switch. Still, it's a potential future change to keep in mind.
 		_timer = new DefaultTimerManager();
 		_timerID = SDL_AddTimer(10, &timer_handler, _timer);
+	}
 
-	// Initialise any GP2X specific stuff we may want (Volume, Batt Status etc.)
-	GP2X_device_init();
+	/* Initialise any GP2X specific stuff we may want (Batt Status, scaler etc.) */
+	GP2X_HW::deviceInit();
 
+	/* Set Default hardware mixer volume to a preset level (VOLUME_INITIAL). This is done to 'reset' volume level if set by other apps. */
+	GP2X_HW::mixerMoveVolume(0);
+
 	// Set Default hardware mixer volume to a plesent level.
 	// This is done to 'reset' volume level if set by other apps.
-	GP2X_mixer_set_volume(70, 70);
 
-	}
-
 	//if (SDL_GP2X_MouseType() == 0) {
 	//	// No mouse, F100 default state.
 	//	_gp2xInputType = 0;
@@ -318,7 +320,7 @@
 
 uint32 OSystem_GP2X::getMillis() {
 	uint32 millis = SDL_GetTicks();
-	getEventManager()->processMillis(millis);
+	g_eventRec.processMillis(millis);
 	return millis;
 }
 
@@ -446,8 +448,7 @@
 
 	if (_joystick)
 		SDL_JoystickClose(_joystick);
-	//CloseRam();
-	GP2X_device_deinit();
+	GP2X_HW::deviceDeinit();
 
 	SDL_RemoveTimer(_timerID);
 	closeMixer();

Modified: scummvm/branches/gsoc2009-mods/backends/platform/gp2x/graphics.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/gp2x/graphics.cpp	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/gp2x/graphics.cpp	2009-08-08 19:09:30 UTC (rev 43134)
@@ -30,6 +30,7 @@
 
 #include "backends/platform/gp2x/gp2x-common.h"
 #include "common/util.h"
+#include "common/mutex.h"
 #include "graphics/font.h"
 #include "graphics/fontman.h"
 #include "graphics/scaler.h"

Modified: scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/build/README-GP2XWIZ
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/build/README-GP2XWIZ	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/build/README-GP2XWIZ	2009-08-08 19:09:30 UTC (rev 43134)
@@ -11,19 +11,27 @@
     * Recent changes <#Recent_changes>
     * How to save <#How_to_save>
     * Controller mappings <#Controller_mappings>
-    * Know issues <#Know_issues>
-    * Major TODO's <#Major_TODOs>
+    * Known issues <#Knonw_issues>
     * Additional resources/links <#Additional_resourceslinks>
     * Credits <#Credits>
 
+------------------------------------------------------------------------
 
+Please refer to the:
+
+GP2X/GP2XWiz ScummVM Forum: <http://forums.scummvm.org/viewforum.php?f=14> 
+WiKi: <http://wiki.scummvm.org/index.php/GP2XWiz> 
+
+for the most current information on the port and any updates to this 
+documentation.
+
 ------------------------------------------------------------------------
 About the backend/port
 
-This is the readme for the offficial GP2X WIZ ScummVM backend (also known as
-the GP2X WIZ port).
+This is the readme for the official GP2XWiz ScummVM backend (also known as
+the GP2XWiz port).
 
-This is an SVN test release of ScummVM for the GP2X WIZ, it would be
+This is an SVN test release of ScummVM for the GP2XWiz, it would be
 appreciated if this SVN test distribution was not mirrored and that
 people be directed to http://scummvm.distant-earth.com/ instead for
 updated SVN builds.
@@ -35,19 +43,12 @@
 This build is in an active state of development and as such no
 "expected" behavior can be guaranteed ;).
 
-SVN builds are quickly tested with firmware 1.0.0 for reference.
-
-Please refer to the GP2X/GP2X WIZ ScummVM forum
-<http://forums.scummvm.org/viewforum.php?f=14> and WiKi
-<http://wiki.scummvm.org/index.php/GP2X> for the latest information on
-the port.
-
 ------------------------------------------------------------------------
 Game compatibility
 
 For information on the compatability of a specific game please refer to
-the GP2X compatability section of the ScummVM WiKi
-<http://wiki.scummvm.org/index.php/GP2X#Compatibility_List>.
+the GP2XWiz compatability section of the ScummVM WiKi
+<http://wiki.scummvm.org/index.php/GP2XWiz#Compatibility_List>.
 
 Please note the version and date of the ScummVM build you are running
 when reviewing the above list.
@@ -105,22 +106,20 @@
 Select: Escape
 Y: Space Bar (Pause)
 Menu: Game Menu (Save, Load, Quit etc.)
-Volume Buttons: Increase and Decrease volume (5% per press)
+Volume Buttons: Increase and Decrease volume
 
 Fancy button combos:
 
 NOTE: To use button combos press and hold the Left Trigger then...
 
-Right Trigger: 0 (For skipping the copy protection in Monkey Island 2)
+Right Trigger: Display Virtual Keyboard 
 Menu: Bring up the Global main menu for ScummVM
 Select: Exit ScummVM completely (and gracefully)
 
 ------------------------------------------------------------------------
-Know issues
+Known issues
 
-Possible random crash (well SegFault). I have had this happen twice and
-have not tracked down the cause.
-It happens very infrequently, both times it was in the DOTT CD intro.
+No major known issues
 
 ------------------------------------------------------------------------
 Additional resources/links
@@ -128,7 +127,7 @@
     * ScummVM WiKi GP2X page <http://wiki.scummvm.org/index.php/GP2X>
     * ScummVM forums GP2X forum
       <http://forums.scummvm.org/viewforum.php?f=14>
-    * My own ScummVM page <http://www.distant-earth.com/scummvm> (for
+    * My own ScummVM page <http://scummvm.distant-earth.com/> (for
       SVN/test builds)
     * Main ScummVM site <http://www.scummvm.org> (for official supported
       release builds)

Modified: scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/build/bundle.sh
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/build/bundle.sh	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/build/bundle.sh	2009-08-08 19:09:30 UTC (rev 43134)
@@ -8,7 +8,9 @@
 mkdir "scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/saves"
 mkdir "scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/plugins"
 mkdir "scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/engine-data"
+mkdir "scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/lib"
 
+
 echo "Please put your save games in this dir" >> "scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/saves/PUT_SAVES_IN_THIS_DIR"
 
 cp ./scummvm.gpe ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/
@@ -27,6 +29,13 @@
 cp ../../../../dists/engine-data/* ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/engine-data
 cp ../../../../plugins/* ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/plugins
 
+# Copy over dynamic libs needed by the app (as the ones in the default filesystem are broken).
+f=`which arm-open2x-linux-g++`
+loc=`dirname "$f"`
+cp $loc/../lib/libz.so.1.2.3 ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/lib/libz.so.1
+cp $loc/../lib/libvorbisidec.so.1.0.2 ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/lib/libvorbisidec.so.1
+
+
 echo Making Stripped exe.
 arm-open2x-linux-strip ./scummvm-wiz-`date '+%Y-%m-%d'`/scummvm/scummvm.wiz
 

Modified: scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/build/scummvm.gpe
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/build/scummvm.gpe	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/build/scummvm.gpe	2009-08-08 19:09:30 UTC (rev 43134)
@@ -1,5 +1,9 @@
 #!/bin/sh
 
+# Export the location of any libs ScummVM depends on
+# (to avoid installing to the NAND and overwriting the broken ones there).
+export LD_LIBRARY_PATH=`pwd`/lib:$LD_LIBRARY_PATH
+
 # Run ScummVM, important this bit.
 ./scummvm.wiz --fullscreen --gfx-mode=1x --config=$(pwd)/.scummvmrc 
 

Modified: scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-events.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-events.cpp	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-events.cpp	2009-08-08 19:09:30 UTC (rev 43134)
@@ -81,8 +81,13 @@
 }
 
 void OSystem_GP2XWIZ::fillMouseEvent(Common::Event &event, int x, int y) {
-	event.mouse.x = x;
-	event.mouse.y = y;
+    if(_videoMode.mode == GFX_HALF && !_overlayVisible){
+	    event.mouse.x = x*2;
+	    event.mouse.y = y*2;
+    } else {
+        event.mouse.x = x;
+	    event.mouse.y = y;
+    }
 
 	// Update the "keyboard mouse" coords
 	_km.x = x;
@@ -203,7 +208,7 @@
 
 	Combos:
 
-	GP2X_BUTTON_VOLUP &	GP2X_BUTTON_VOLDOWN		0 (For Monkey 2 CP)
+	GP2X_BUTTON_VOLUP &	GP2X_BUTTON_VOLDOWN		0 (For Monkey 2 CP) or Virtual Keyboard if enabled
 	GP2X_BUTTON_L &	GP2X_BUTTON_SELECT			Common::EVENT_QUIT (Calls Sync() to make sure SD is flushed)
 	GP2X_BUTTON_L &	GP2X_BUTTON_MENU			Common::EVENT_MAINMENU (ScummVM Global Main Menu)
 	GP2X_BUTTON_L &	GP2X_BUTTON_A				Common::EVENT_PREDICTIVE_DIALOG for predictive text entry box (AGI games)

Modified: scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-graphics.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-graphics.cpp	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-graphics.cpp	2009-08-08 19:09:30 UTC (rev 43134)
@@ -24,10 +24,433 @@
  */
 
 #include "backends/platform/gp2xwiz/gp2xwiz-sdl.h"
+#include "backends/platform/gp2xwiz/gp2xwiz-scaler.h" // TODO: Make GFX_HALF/HalfScale generic.
 
+#include "common/mutex.h"
+#include "graphics/font.h"
+#include "graphics/fontman.h"
+#include "graphics/scaler.h"
+#include "graphics/scaler/intern.h"
+#include "graphics/surface.h"
 
-/* TODO: Add code to ensure that overlay is always 320*240 and maybe invoke some custom scale code. */
+static const OSystem::GraphicsMode s_supportedGraphicsModes[] = {
+	{"1x", "Fullscreen", GFX_NORMAL},
+//	{"\xBDx", "Downscale", GFX_HALF},
+	{0, 0, 0}
+};
 
+
+const OSystem::GraphicsMode *OSystem_GP2XWIZ::getSupportedGraphicsModes() const {
+	return s_supportedGraphicsModes;
+}
+
+int OSystem_GP2XWIZ::getDefaultGraphicsMode() const {
+	return GFX_NORMAL;
+}
+
+bool OSystem_GP2XWIZ::setGraphicsMode(int mode) {
+	Common::StackLock lock(_graphicsMutex);
+
+	assert(_transactionMode == kTransactionActive);
+
+	if (_oldVideoMode.setup && _oldVideoMode.mode == mode)
+		return true;
+
+	int newScaleFactor = 1;
+
+	switch(mode) {
+	case GFX_NORMAL:
+		newScaleFactor = 1;
+		break;
+    case GFX_HALF:
+        newScaleFactor = 1;
+        break;
+	default:
+		warning("unknown gfx mode %d", mode);
+		return false;
+	}
+
+	_transactionDetails.normal1xScaler = (mode == GFX_NORMAL);
+	if (_oldVideoMode.setup && _oldVideoMode.scaleFactor != newScaleFactor)
+		_transactionDetails.needHotswap = true;
+
+	_transactionDetails.needUpdatescreen = true;
+
+	_videoMode.mode = mode;
+	_videoMode.scaleFactor = newScaleFactor;
+
+	return true;
+}
+
+void OSystem_GP2XWIZ::setGraphicsModeIntern() {
+	Common::StackLock lock(_graphicsMutex);
+	ScalerProc *newScalerProc = 0;
+
+	switch (_videoMode.mode) {
+	case GFX_NORMAL:
+		newScalerProc = Normal1x;
+		break;
+    case GFX_HALF:
+        newScalerProc = HalfScale;
+        break;
+
+	default:
+		error("Unknown gfx mode %d", _videoMode.mode);
+	}
+
+	_scalerProc = newScalerProc;
+
+	if (!_screen || !_hwscreen)
+		return;
+
+	// Blit everything to the screen
+	_forceFull = true;
+
+	// Even if the old and new scale factors are the same, we may have a
+	// different scaler for the cursor now.
+	blitCursor();
+}
+
+
+void OSystem_GP2XWIZ::initSize(uint w, uint h) {
+    assert(_transactionMode == kTransactionActive);
+
+	// Avoid redundant res changes
+	if ((int)w == _videoMode.screenWidth && (int)h == _videoMode.screenHeight)
+		return;
+
+    _videoMode.screenWidth = w;
+	_videoMode.screenHeight = h;
+    if(w > 320 || h > 240){
+        setGraphicsMode(GFX_HALF);
+        setGraphicsModeIntern();
+        toggleMouseGrab();
+    }
+
+	_cksumNum = (w * h / (8 * 8));
+
+	_transactionDetails.sizeChanged = true;
+
+	free(_dirtyChecksums);
+	_dirtyChecksums = (uint32 *)calloc(_cksumNum * 2, sizeof(uint32));
+}
+
 bool OSystem_GP2XWIZ::loadGFXMode() {
+	_videoMode.overlayWidth = 320;
+	_videoMode.overlayHeight = 240;
+	_videoMode.fullscreen = true;
+
+	if (_videoMode.screenHeight != 200 && _videoMode.screenHeight != 400)
+		_videoMode.aspectRatioCorrection = false;
+
 	OSystem_SDL::loadGFXMode();
 }
+
+void OSystem_GP2XWIZ::drawMouse() {
+	if (!_mouseVisible || !_mouseSurface) {
+		_mouseBackup.x = _mouseBackup.y = _mouseBackup.w = _mouseBackup.h = 0;
+		return;
+	}
+
+	SDL_Rect dst;
+	int scale;
+	int width, height;
+	int hotX, hotY;
+
+    if(_videoMode.mode == GFX_HALF && !_overlayVisible){
+	    dst.x = _mouseCurState.x/2;
+	    dst.y = _mouseCurState.y/2;
+    } else {
+        dst.x = _mouseCurState.x;
+	    dst.y = _mouseCurState.y;
+    }
+
+	if (!_overlayVisible) {
+		scale = _videoMode.scaleFactor;
+		width = _videoMode.screenWidth;
+		height = _videoMode.screenHeight;
+		dst.w = _mouseCurState.vW;
+		dst.h = _mouseCurState.vH;
+		hotX = _mouseCurState.vHotX;
+		hotY = _mouseCurState.vHotY;
+	} else {
+		scale = 1;
+		width = _videoMode.overlayWidth;
+		height = _videoMode.overlayHeight;
+		dst.w = _mouseCurState.rW;
+		dst.h = _mouseCurState.rH;
+		hotX = _mouseCurState.rHotX;
+		hotY = _mouseCurState.rHotY;
+	}
+
+	// The mouse is undrawn using virtual coordinates, i.e. they may be
+	// scaled and aspect-ratio corrected.
+
+	_mouseBackup.x = dst.x - hotX;
+	_mouseBackup.y = dst.y - hotY;
+	_mouseBackup.w = dst.w;
+	_mouseBackup.h = dst.h;
+
+	// We draw the pre-scaled cursor image, so now we need to adjust for
+	// scaling, shake position and aspect ratio correction manually.
+
+	if (!_overlayVisible) {
+		dst.y += _currentShakePos;
+	}
+
+	if (_videoMode.aspectRatioCorrection && !_overlayVisible)
+		dst.y = real2Aspect(dst.y);
+
+	dst.x = scale * dst.x - _mouseCurState.rHotX;
+	dst.y = scale * dst.y - _mouseCurState.rHotY;
+	dst.w = _mouseCurState.rW;
+	dst.h = _mouseCurState.rH;
+
+	// Note that SDL_BlitSurface() and addDirtyRect() will both perform any
+	// clipping necessary
+
+	if (SDL_BlitSurface(_mouseSurface, NULL, _hwscreen, &dst) != 0)
+		error("SDL_BlitSurface failed: %s", SDL_GetError());
+
+	// The screen will be updated using real surface coordinates, i.e.
+	// they will not be scaled or aspect-ratio corrected.
+    addDirtyRect(dst.x, dst.y, dst.w, dst.h, true);
+}
+
+void OSystem_GP2XWIZ::undrawMouse() {
+	const int x = _mouseBackup.x;
+	const int y = _mouseBackup.y;
+
+	// When we switch bigger overlay off mouse jumps. Argh!
+	// This is intended to prevent undrawing offscreen mouse
+	if (!_overlayVisible && (x >= _videoMode.screenWidth || y >= _videoMode.screenHeight))
+		return;
+
+	if (_mouseBackup.w != 0 && _mouseBackup.h != 0){
+        if(_videoMode.mode == GFX_HALF && !_overlayVisible){
+		    addDirtyRect(x*2, y*2, _mouseBackup.w*2, _mouseBackup.h*2);
+        } else {
+            addDirtyRect(x, y, _mouseBackup.w, _mouseBackup.h);
+        }
+    }
+}
+
+void OSystem_GP2XWIZ::internUpdateScreen() {
+	SDL_Surface *srcSurf, *origSurf;
+	int height, width;
+	ScalerProc *scalerProc;
+	int scale1;
+
+#if defined (DEBUG) && ! defined(_WIN32_WCE) // definitions not available for non-DEBUG here. (needed this to compile in SYMBIAN32 & linux?)
+	assert(_hwscreen != NULL);
+	assert(_hwscreen->map->sw_data != NULL);
+#endif
+
+	// If the shake position changed, fill the dirty area with blackness
+	if (_currentShakePos != _newShakePos) {
+		SDL_Rect blackrect = {0, 0, _videoMode.screenWidth * _videoMode.scaleFactor, _newShakePos * _videoMode.scaleFactor};
+
+		if (_videoMode.aspectRatioCorrection && !_overlayVisible)
+			blackrect.h = real2Aspect(blackrect.h - 1) + 1;
+
+		SDL_FillRect(_hwscreen, &blackrect, 0);
+
+		_currentShakePos = _newShakePos;
+
+		_forceFull = true;
+	}
+
+	// Check whether the palette was changed in the meantime and update the
+	// screen surface accordingly.
+	if (_screen && _paletteDirtyEnd != 0) {
+		SDL_SetColors(_screen, _currentPalette + _paletteDirtyStart,
+			_paletteDirtyStart,
+			_paletteDirtyEnd - _paletteDirtyStart);
+
+		_paletteDirtyEnd = 0;
+
+		_forceFull = true;
+	}
+
+#ifdef USE_OSD
+	// OSD visible (i.e. non-transparent)?
+	if (_osdAlpha != SDL_ALPHA_TRANSPARENT) {
+		// Updated alpha value
+		const int diff = SDL_GetTicks() - _osdFadeStartTime;
+		if (diff > 0) {
+			if (diff >= kOSDFadeOutDuration) {
+				// Back to full transparency
+				_osdAlpha = SDL_ALPHA_TRANSPARENT;
+			} else {
+				// Do a linear fade out...
+				const int startAlpha = SDL_ALPHA_TRANSPARENT + kOSDInitialAlpha * (SDL_ALPHA_OPAQUE - SDL_ALPHA_TRANSPARENT) / 100;
+				_osdAlpha = startAlpha + diff * (SDL_ALPHA_TRANSPARENT - startAlpha) / kOSDFadeOutDuration;
+			}
+			SDL_SetAlpha(_osdSurface, SDL_RLEACCEL | SDL_SRCCOLORKEY | SDL_SRCALPHA, _osdAlpha);
+			_forceFull = true;
+		}
+	}
+#endif
+
+	if (!_overlayVisible) {
+		origSurf = _screen;
+		srcSurf = _tmpscreen;
+		width = _videoMode.screenWidth;
+		height = _videoMode.screenHeight;
+		scalerProc = _scalerProc;
+		scale1 = _videoMode.scaleFactor;
+	} else {
+		origSurf = _overlayscreen;
+		srcSurf = _tmpscreen2;
+		width = _videoMode.overlayWidth;
+		height = _videoMode.overlayHeight;
+		scalerProc = Normal1x;
+
+		scale1 = 1;
+	}
+
+	// Add the area covered by the mouse cursor to the list of dirty rects if
+	// we have to redraw the mouse.
+	if (_mouseNeedsRedraw)
+		undrawMouse();
+
+	// Force a full redraw if requested
+	if (_forceFull) {
+		_numDirtyRects = 1;
+		_dirtyRectList[0].x = 0;
+		_dirtyRectList[0].y = 0;
+		_dirtyRectList[0].w = width;
+		_dirtyRectList[0].h = height;
+	}
+
+	// Only draw anything if necessary
+	if (_numDirtyRects > 0 || _mouseNeedsRedraw) {
+		SDL_Rect *r;
+		SDL_Rect dst;
+		uint32 srcPitch, dstPitch;
+		SDL_Rect *lastRect = _dirtyRectList + _numDirtyRects;
+
+		for (r = _dirtyRectList; r != lastRect; ++r) {
+			dst = *r;
+			dst.x++;	// Shift rect by one since 2xSai needs to access the data around
+			dst.y++;	// any pixel to scale it, and we want to avoid mem access crashes.
+
+			if (SDL_BlitSurface(origSurf, r, srcSurf, &dst) != 0)
+				error("SDL_BlitSurface failed: %s", SDL_GetError());
+		}
+
+		SDL_LockSurface(srcSurf);
+		SDL_LockSurface(_hwscreen);
+
+		srcPitch = srcSurf->pitch;
+		dstPitch = _hwscreen->pitch;
+
+		for (r = _dirtyRectList; r != lastRect; ++r) {
+			register int dst_y = r->y + _currentShakePos;
+			register int dst_h = 0;
+            register int dst_w = r->w;
+			register int orig_dst_y = 0;
+			register int dst_x = r->x;
+            register int src_y;
+            register int src_x;
+
+			if (dst_y < height) {
+				dst_h = r->h;
+				if (dst_h > height - dst_y)
+					dst_h = height - dst_y;
+
+				orig_dst_y = dst_y;
+                src_x = dst_x;
+                src_y = dst_y;
+
+				if (_videoMode.aspectRatioCorrection && !_overlayVisible)
+					dst_y = real2Aspect(dst_y);
+
+				assert(scalerProc != NULL);
+
+                if(_videoMode.mode == GFX_HALF && scalerProc == HalfScale){
+                    if(dst_x%2==1){
+                        dst_x--;
+                        dst_w++;
+                    }
+                    if(dst_y%2==1){
+                        dst_y--;
+                        dst_h++;
+                    }
+                    src_x = dst_x;
+                    src_y = dst_y;
+                    dst_x = dst_x / 2;
+                    dst_y = dst_y / 2;
+                }
+                scalerProc((byte *)srcSurf->pixels + (src_x * 2 + 2) + (src_y + 1) * srcPitch, srcPitch,
+						   (byte *)_hwscreen->pixels + dst_x * 2 + dst_y * dstPitch, dstPitch, dst_w, dst_h);
+			}
+
+            if(_videoMode.mode == GFX_HALF && scalerProc == HalfScale){
+			    r->w = r->w / 2;
+			    r->h = dst_h / 2;
+            } else {
+			    r->w = r->w;
+			    r->h = dst_h;
+            }
+
+		    r->x = dst_x;
+		    r->y = dst_y;
+
+
+#ifndef DISABLE_SCALERS
+			if (_videoMode.aspectRatioCorrection && orig_dst_y < height && !_overlayVisible)
+				r->h = stretch200To240((uint8 *) _hwscreen->pixels, dstPitch, r->w, r->h, r->x, r->y, orig_dst_y * scale1);
+#endif
+		}
+		SDL_UnlockSurface(srcSurf);
+		SDL_UnlockSurface(_hwscreen);
+
+		// Readjust the dirty rect list in case we are doing a full update.
+		// This is necessary if shaking is active.
+		if (_forceFull) {
+			_dirtyRectList[0].y = 0;
+			_dirtyRectList[0].h = (_videoMode.mode == GFX_HALF) ? effectiveScreenHeight()/2 : effectiveScreenHeight();
+		}
+
+		drawMouse();
+
+#ifdef USE_OSD
+		if (_osdAlpha != SDL_ALPHA_TRANSPARENT) {
+			SDL_BlitSurface(_osdSurface, 0, _hwscreen, 0);
+		}
+#endif
+		// Finally, blit all our changes to the screen
+		SDL_UpdateRects(_hwscreen, _numDirtyRects, _dirtyRectList);
+	}
+
+	_numDirtyRects = 0;
+	_forceFull = false;
+	_mouseNeedsRedraw = false;
+}
+
+void OSystem_GP2XWIZ::showOverlay() {
+    if(_videoMode.mode == GFX_HALF){
+        _mouseCurState.x = _mouseCurState.x / 2;
+        _mouseCurState.y = _mouseCurState.y / 2;
+    }
+	OSystem_SDL::showOverlay();
+}
+
+void OSystem_GP2XWIZ::hideOverlay() {
+    if(_videoMode.mode == GFX_HALF){
+        _mouseCurState.x = _mouseCurState.x * 2;
+        _mouseCurState.y = _mouseCurState.y * 2;
+    }
+	OSystem_SDL::hideOverlay();
+}
+
+void OSystem_GP2XWIZ::warpMouse(int x, int y) {
+	if (_mouseCurState.x != x || _mouseCurState.y != y) {
+        if(_videoMode.mode == GFX_HALF && !_overlayVisible){
+            x = x / 2;
+            y = y / 2;
+        }
+	}
+	OSystem_SDL::warpMouse(x, y);
+}

Modified: scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-hw.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-hw.cpp	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-hw.cpp	2009-08-08 19:09:30 UTC (rev 43134)
@@ -48,7 +48,7 @@
 	VOLUME_UP				= 2,
 	VOLUME_CHANGE_RATE		= 8,
 	VOLUME_MIN				= 0,
-	VOLUME_INITIAL			= 70,
+	VOLUME_INITIAL			= 60,
 	VOLUME_MAX				= 100
 };
 

Modified: scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-main.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-main.cpp	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-main.cpp	2009-08-08 19:09:30 UTC (rev 43134)
@@ -148,9 +148,9 @@
 	WIZ_HW::mixerMoveVolume(0);
 
 	/* Up default volume values as we use a seperate system level volume anyway. */
-	ConfMan.registerDefault("music_volume", 220);
-	ConfMan.registerDefault("sfx_volume", 220);
-	ConfMan.registerDefault("speech_volume", 220);
+	ConfMan.registerDefault("music_volume", 192);
+	ConfMan.registerDefault("sfx_volume", 192);
+	ConfMan.registerDefault("speech_volume", 192);
 
 	/* Trigger autosave every 4 minutes - On low batts 5 mins is about your warning time. */
 	ConfMan.registerDefault("autosave_period", 4 * 60);

Copied: scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-scaler.cpp (from rev 43133, scummvm/trunk/backends/platform/gp2xwiz/gp2xwiz-scaler.cpp)
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-scaler.cpp	                        (rev 0)
+++ scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-scaler.cpp	2009-08-08 19:09:30 UTC (rev 43134)
@@ -0,0 +1,40 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+#include "graphics/scaler/intern.h"
+#include "backends/platform/gp2xwiz/gp2xwiz-sdl.h"
+
+SDL_PixelFormat *screenPixelFormat;
+
+extern "C" {
+	void PocketPCHalfARM(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height, int mask, int round);
+	// Rounding constants and masks used for different pixel formats
+	int roundingconstants[] = { 0x00200802, 0x00201002 };
+	int redbluegreenMasks[] = { 0x03E07C1F, 0x07E0F81F };
+}
+
+void HalfScale(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) {
+	int maskUsed = (gBitFormat == 565);
+	PocketPCHalfARM(srcPtr, srcPitch, dstPtr, dstPitch, width, height, redbluegreenMasks[maskUsed],roundingconstants[maskUsed]);
+}

Copied: scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-scaler.h (from rev 43133, scummvm/trunk/backends/platform/gp2xwiz/gp2xwiz-scaler.h)
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-scaler.h	                        (rev 0)
+++ scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-scaler.h	2009-08-08 19:09:30 UTC (rev 43134)
@@ -0,0 +1,42 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#ifndef GP2XWIZ_SCALER_H
+#define GP2XWIZ_SCALER_H
+
+#include "common/scummsys.h"
+#include "common/system.h"
+#include "graphics/scaler.h"
+#include "graphics/scaler/intern.h"
+
+// FIXME: For now keep hacks in this header to save polluting the SDL backend.
+enum {
+    GFX_HALF = 12
+};
+
+// TODO/FIXME: Move this platform specific scaler into /graphics/scaler and properly merge with the WinCE PocketPCHalf that it is based on.
+DECLARE_SCALER(HalfScale);
+
+#endif

Modified: scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-sdl.h
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-sdl.h	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/gp2xwiz-sdl.h	2009-08-08 19:09:30 UTC (rev 43134)
@@ -27,6 +27,7 @@
 #define GP2XWIZ_SDL_H
 
 #include "backends/platform/sdl/sdl.h"
+#include "backends/platform/gp2xwiz/gp2xwiz-scaler.h"
 
 #include <SDL.h>
 
@@ -42,12 +43,24 @@
 	OSystem_GP2XWIZ() {}
 
 	/* Graphics */
-	bool loadGFXMode();
+    void initSize(uint w, uint h);
+    void setGraphicsModeIntern();
+    bool setGraphicsMode(int mode);
+    void internUpdateScreen();
+    const OSystem::GraphicsMode *getSupportedGraphicsModes() const;
+	bool setGraphicsMode(const char *name);
+    int getDefaultGraphicsMode() const;
+    bool loadGFXMode();
+    void drawMouse();
+    void undrawMouse();
+    void showOverlay();
+    void hideOverlay();
 
 	/* Event Stuff */
 	bool pollEvent(Common::Event &event);
 	void moveStick();
 	void fillMouseEvent(Common::Event&, int, int);
+	void warpMouse(int, int);
 	bool remapKey(SDL_Event&, Common::Event&);
 
 	/* Platform Setup Stuff */

Modified: scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/module.mk
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/module.mk	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/gp2xwiz/module.mk	2009-08-08 19:09:30 UTC (rev 43134)
@@ -1,6 +1,8 @@
 MODULE := backends/platform/gp2xwiz
 
 MODULE_OBJS := \
+	gp2xwiz-scaler.o \
+	../wince/ARMscaler.o \
 	gp2xwiz-graphics.o \
 	gp2xwiz-events.o \
 	gp2xwiz-hw.o \


Property changes on: scummvm/branches/gsoc2009-mods/backends/platform/iphone/osys_main.cpp
___________________________________________________________________
Modified: svn:mergeinfo
   - 
   + /scummvm/trunk/backends/platform/iphone/osys_main.cpp:42569-43133


Property changes on: scummvm/branches/gsoc2009-mods/backends/platform/iphone/osys_main.h
___________________________________________________________________
Modified: svn:mergeinfo
   - 
   + /scummvm/trunk/backends/platform/iphone/osys_main.h:42569-43133

Modified: scummvm/branches/gsoc2009-mods/backends/platform/sdl/graphics.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/sdl/graphics.cpp	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/sdl/graphics.cpp	2009-08-08 19:09:30 UTC (rev 43134)
@@ -364,7 +364,7 @@
 
 	int hwW, hwH;
 
-#ifndef __MAEMO__
+#if !defined(__MAEMO__) && !defined(GP2XWIZ)
 	_videoMode.overlayWidth = _videoMode.screenWidth * _videoMode.scaleFactor;
 	_videoMode.overlayHeight = _videoMode.screenHeight * _videoMode.scaleFactor;
 
@@ -675,7 +675,7 @@
 
 		for (r = _dirtyRectList; r != lastRect; ++r) {
 			dst = *r;
-			dst.x++;	// Shift rect by one since 2xSai needs to acces the data around
+			dst.x++;	// Shift rect by one since 2xSai needs to access the data around
 			dst.y++;	// any pixel to scale it, and we want to avoid mem access crashes.
 
 			if (SDL_BlitSurface(origSurf, r, srcSurf, &dst) != 0)

Modified: scummvm/branches/gsoc2009-mods/backends/platform/sdl/sdl.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/sdl/sdl.cpp	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/sdl/sdl.cpp	2009-08-08 19:09:30 UTC (rev 43134)
@@ -33,7 +33,7 @@
 #include "common/archive.h"
 #include "common/config-manager.h"
 #include "common/debug.h"
-#include "common/events.h"
+#include "common/EventRecorder.h"
 #include "common/util.h"
 
 #ifdef UNIX
@@ -263,7 +263,7 @@
 
 uint32 OSystem_SDL::getMillis() {
 	uint32 millis = SDL_GetTicks();
-	getEventManager()->processMillis(millis);
+	g_eventRec.processMillis(millis);
 	return millis;
 }
 

Modified: scummvm/branches/gsoc2009-mods/backends/platform/wii/osystem_events.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/wii/osystem_events.cpp	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/wii/osystem_events.cpp	2009-08-08 19:09:30 UTC (rev 43134)
@@ -316,20 +316,28 @@
 #endif
 
 	if (bd || bu) {
-		PAD_EVENT(PADS_Z, Common::KEYCODE_RETURN, Common::ASCII_RETURN, 0);
-		PAD_EVENT(PADS_X, Common::KEYCODE_ESCAPE, Common::ASCII_ESCAPE, 0);
-		PAD_EVENT(PADS_Y, Common::KEYCODE_PERIOD, '.', 0);
-		PAD_EVENT(PADS_START, Common::KEYCODE_F5, Common::ASCII_F5, 0);
-		PAD_EVENT(PADS_UP, Common::KEYCODE_F5, Common::ASCII_F5, Common::KBD_CTRL);
-		PAD_EVENT(PADS_DOWN, Common::KEYCODE_F7, Common::ASCII_F7, 0);
-		//PAD_EVENT(PADS_LEFT, Common::KEYCODE_F8, Common::ASCII_F8, 0);
+		byte flags = 0;
 
+		if (bh & PADS_UP) {
+			PAD_EVENT(PADS_START, Common::KEYCODE_F5, Common::ASCII_F5, Common::KBD_CTRL);
+
+			flags = Common::KBD_SHIFT;
+		}
+
 		if (bd & PADS_RIGHT) {
 			event.type = Common::EVENT_PREDICTIVE_DIALOG;
 
 			return true;
 		}
 
+		PAD_EVENT(PADS_Z, Common::KEYCODE_RETURN, Common::ASCII_RETURN, flags);
+		PAD_EVENT(PADS_X, Common::KEYCODE_ESCAPE, Common::ASCII_ESCAPE, flags);
+		PAD_EVENT(PADS_Y, Common::KEYCODE_PERIOD, '.', flags);
+		PAD_EVENT(PADS_START, Common::KEYCODE_F5, Common::ASCII_F5, flags);
+		PAD_EVENT(PADS_UP, Common::KEYCODE_LSHIFT, 0, flags);
+		PAD_EVENT(PADS_DOWN, Common::KEYCODE_F7, Common::ASCII_F7, flags);
+		//PAD_EVENT(PADS_LEFT, Common::KEYCODE_F8, Common::ASCII_F8, 0);
+
 		if ((bd | bu) & (PADS_A | PADS_B)) {
 			if (bd & PADS_A)
 				event.type = Common::EVENT_LBUTTONDOWN;

Modified: scummvm/branches/gsoc2009-mods/backends/platform/wince/CEActionsPocket.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/backends/platform/wince/CEActionsPocket.cpp	2009-08-08 18:23:14 UTC (rev 43133)
+++ scummvm/branches/gsoc2009-mods/backends/platform/wince/CEActionsPocket.cpp	2009-08-08 19:09:30 UTC (rev 43134)
@@ -133,12 +133,14 @@
 	bool is_tucker = (gameid == "tucker");
 	bool is_groovie = (gameid == "groovie");
 	bool is_tinsel = (gameid == "tinsel");
+	bool is_cruise = (gameid == "cruise");
+	bool is_made = (gameid == "made");
 
 	GUI_Actions::initInstanceGame();
 
 	// See if a right click mapping could be needed
 	if (is_sword1 || is_sword2 || is_sky || is_queen || is_comi || is_gob || is_tinsel ||
-			is_samnmax || is_cine || is_touche || is_parallaction || is_drascula)
+			is_samnmax || is_cine || is_touche || is_parallaction || is_drascula || is_cruise)
 		_right_click_needed = true;
 

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