[Scummvm-cvs-logs] SF.net SVN: scummvm:[50840] scummvm/branches/gsoc2010-opengl

vgvgf at users.sourceforge.net vgvgf at users.sourceforge.net
Tue Jul 13 06:31:18 CEST 2010


Revision: 50840
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50840&view=rev
Author:   vgvgf
Date:     2010-07-13 04:31:15 +0000 (Tue, 13 Jul 2010)

Log Message:
-----------
Merged from trunk, from Rev 49499 to HEAD

Revision Links:
--------------
    http://scummvm.svn.sourceforge.net/scummvm/?rev=49499&view=rev

Modified Paths:
--------------
    scummvm/branches/gsoc2010-opengl/AUTHORS
    scummvm/branches/gsoc2010-opengl/Makefile
    scummvm/branches/gsoc2010-opengl/Makefile.common
    scummvm/branches/gsoc2010-opengl/NEWS
    scummvm/branches/gsoc2010-opengl/backends/events/sdl/sdl-events.cpp
    scummvm/branches/gsoc2010-opengl/backends/events/symbiansdl/symbiansdl-events.cpp
    scummvm/branches/gsoc2010-opengl/backends/fs/amigaos4/amigaos4-fs.cpp
    scummvm/branches/gsoc2010-opengl/backends/fs/ds/ds-fs-factory.cpp
    scummvm/branches/gsoc2010-opengl/backends/fs/ds/ds-fs.cpp
    scummvm/branches/gsoc2010-opengl/backends/fs/ds/ds-fs.h
    scummvm/branches/gsoc2010-opengl/backends/fs/psp/psp-stream.cpp
    scummvm/branches/gsoc2010-opengl/backends/graphics/graphics.h
    scummvm/branches/gsoc2010-opengl/backends/graphics/opengl/opengl-graphics.h
    scummvm/branches/gsoc2010-opengl/backends/graphics/openglsdl/openglsdl-graphics.cpp
    scummvm/branches/gsoc2010-opengl/backends/graphics/openglsdl/openglsdl-graphics.h
    scummvm/branches/gsoc2010-opengl/backends/graphics/sdl/sdl-graphics.cpp
    scummvm/branches/gsoc2010-opengl/backends/graphics/sdl/sdl-graphics.h
    scummvm/branches/gsoc2010-opengl/backends/keymapper/remap-dialog.cpp
    scummvm/branches/gsoc2010-opengl/backends/midi/alsa.cpp
    scummvm/branches/gsoc2010-opengl/backends/midi/camd.cpp
    scummvm/branches/gsoc2010-opengl/backends/midi/coreaudio.cpp
    scummvm/branches/gsoc2010-opengl/backends/midi/coremidi.cpp
    scummvm/branches/gsoc2010-opengl/backends/midi/dmedia.cpp
    scummvm/branches/gsoc2010-opengl/backends/midi/seq.cpp
    scummvm/branches/gsoc2010-opengl/backends/midi/stmidi.cpp
    scummvm/branches/gsoc2010-opengl/backends/midi/timidity.cpp
    scummvm/branches/gsoc2010-opengl/backends/midi/windows.cpp
    scummvm/branches/gsoc2010-opengl/backends/midi/ypa1.cpp
    scummvm/branches/gsoc2010-opengl/backends/midi/zodiac.cpp
    scummvm/branches/gsoc2010-opengl/backends/modular-backend.cpp
    scummvm/branches/gsoc2010-opengl/backends/modular-backend.h
    scummvm/branches/gsoc2010-opengl/backends/module.mk
    scummvm/branches/gsoc2010-opengl/backends/platform/PalmOS/Src/launcher/forms/formSkins.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/PalmOS/Src/launcher/forms/formmusic.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/PalmOS/Src/launcher/launch.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/android/README.build
    scummvm/branches/gsoc2010-opengl/backends/platform/android/android.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/android/android.mk
    scummvm/branches/gsoc2010-opengl/backends/platform/android/module.mk
    scummvm/branches/gsoc2010-opengl/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java
    scummvm/branches/gsoc2010-opengl/backends/platform/android/org/inodes/gus/scummvm/ScummVMActivity.java
    scummvm/branches/gsoc2010-opengl/backends/platform/android/org/inodes/gus/scummvm/Unpacker.java
    scummvm/branches/gsoc2010-opengl/backends/platform/dc/dc.h
    scummvm/branches/gsoc2010-opengl/backends/platform/dc/display.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm7/source/main.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/makefile
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/blitters.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/blitters.h
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/cdaudio.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/cdaudio.h
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/dsmain.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/dsmain.h
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/dsoptions.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/dsoptions.h
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/fat/gba_nds_fat.c
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/fat/io_nmmc.c
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/gbampsave.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/gbampsave.h
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/keys.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/keys.h
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/osystem_ds.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/osystem_ds.h
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/portdefs.h
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/scummhelp.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/scummhelp.h
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/touchkeyboard.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/touchkeyboard.h
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/wordcompletion.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/wordcompletion.h
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/zipreader.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/zipreader.h
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/commoninclude/NDS/scummvm_ipc.h
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/ds.mk
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/module.mk
    scummvm/branches/gsoc2010-opengl/backends/platform/gp2x/build/bundle.sh
    scummvm/branches/gsoc2010-opengl/backends/platform/gp2xwiz/build/bundle.sh
    scummvm/branches/gsoc2010-opengl/backends/platform/iphone/osys_events.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/psp/Makefile
    scummvm/branches/gsoc2010-opengl/backends/platform/psp/README.PSP
    scummvm/branches/gsoc2010-opengl/backends/platform/psp/README.PSP.in
    scummvm/branches/gsoc2010-opengl/backends/platform/psp/display_manager.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/psp/display_manager.h
    scummvm/branches/gsoc2010-opengl/backends/platform/psp/module.mk
    scummvm/branches/gsoc2010-opengl/backends/platform/psp/mp3.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/psp/mp3.h
    scummvm/branches/gsoc2010-opengl/backends/platform/psp/osys_psp.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/psp/osys_psp.h
    scummvm/branches/gsoc2010-opengl/backends/platform/psp/powerman.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/psp/powerman.h
    scummvm/branches/gsoc2010-opengl/backends/platform/psp/psp_main.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/psp/psploader.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/psp/thread.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/psp/thread.h
    scummvm/branches/gsoc2010-opengl/backends/platform/psp/trace.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/psp/trace.h
    scummvm/branches/gsoc2010-opengl/backends/platform/symbian/src/SymbianActions.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/wii/options.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/wii/osystem.h
    scummvm/branches/gsoc2010-opengl/backends/platform/wii/osystem_gfx.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/wince/CEActionsPocket.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/wince/CEActionsSmartphone.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/wince/CELauncherDialog.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/wince/wince-sdl.cpp
    scummvm/branches/gsoc2010-opengl/backends/plugins/psp/psp-provider.cpp
    scummvm/branches/gsoc2010-opengl/backends/plugins/win32/win32-provider.cpp
    scummvm/branches/gsoc2010-opengl/backends/vkeybd/virtual-keyboard.cpp
    scummvm/branches/gsoc2010-opengl/base/commandLine.cpp
    scummvm/branches/gsoc2010-opengl/base/internal_version.h
    scummvm/branches/gsoc2010-opengl/base/internal_version.h.in
    scummvm/branches/gsoc2010-opengl/base/main.cpp
    scummvm/branches/gsoc2010-opengl/base/plugins.cpp
    scummvm/branches/gsoc2010-opengl/common/config-file.cpp
    scummvm/branches/gsoc2010-opengl/common/error.cpp
    scummvm/branches/gsoc2010-opengl/common/error.h
    scummvm/branches/gsoc2010-opengl/common/events.h
    scummvm/branches/gsoc2010-opengl/common/file.cpp
    scummvm/branches/gsoc2010-opengl/common/macresman.cpp
    scummvm/branches/gsoc2010-opengl/common/module.mk
    scummvm/branches/gsoc2010-opengl/common/savefile.h
    scummvm/branches/gsoc2010-opengl/common/str.cpp
    scummvm/branches/gsoc2010-opengl/common/str.h
    scummvm/branches/gsoc2010-opengl/common/stream.cpp
    scummvm/branches/gsoc2010-opengl/common/stream.h
    scummvm/branches/gsoc2010-opengl/common/system.h
    scummvm/branches/gsoc2010-opengl/common/textconsole.cpp
    scummvm/branches/gsoc2010-opengl/common/unzip.cpp
    scummvm/branches/gsoc2010-opengl/common/unzip.h
    scummvm/branches/gsoc2010-opengl/common/util.cpp
    scummvm/branches/gsoc2010-opengl/common/util.h
    scummvm/branches/gsoc2010-opengl/configure
    scummvm/branches/gsoc2010-opengl/dists/android/mkmanifest.pl
    scummvm/branches/gsoc2010-opengl/dists/iphone/Info.plist
    scummvm/branches/gsoc2010-opengl/engines/advancedDetector.cpp
    scummvm/branches/gsoc2010-opengl/engines/advancedDetector.h
    scummvm/branches/gsoc2010-opengl/engines/agi/agi.cpp
    scummvm/branches/gsoc2010-opengl/engines/agi/agi.h
    scummvm/branches/gsoc2010-opengl/engines/agi/console.cpp
    scummvm/branches/gsoc2010-opengl/engines/agi/cycle.cpp
    scummvm/branches/gsoc2010-opengl/engines/agi/detection.cpp
    scummvm/branches/gsoc2010-opengl/engines/agi/keyboard.cpp
    scummvm/branches/gsoc2010-opengl/engines/agi/loader_v2.cpp
    scummvm/branches/gsoc2010-opengl/engines/agi/loader_v3.cpp
    scummvm/branches/gsoc2010-opengl/engines/agi/module.mk
    scummvm/branches/gsoc2010-opengl/engines/agi/op_cmd.cpp
    scummvm/branches/gsoc2010-opengl/engines/agi/op_test.cpp
    scummvm/branches/gsoc2010-opengl/engines/agi/picture.cpp
    scummvm/branches/gsoc2010-opengl/engines/agi/preagi.cpp
    scummvm/branches/gsoc2010-opengl/engines/agi/saveload.cpp
    scummvm/branches/gsoc2010-opengl/engines/agi/sound.cpp
    scummvm/branches/gsoc2010-opengl/engines/agi/sound.h
    scummvm/branches/gsoc2010-opengl/engines/agi/sprite.cpp
    scummvm/branches/gsoc2010-opengl/engines/agi/sprite.h
    scummvm/branches/gsoc2010-opengl/engines/agi/text.cpp
    scummvm/branches/gsoc2010-opengl/engines/agi/view.cpp
    scummvm/branches/gsoc2010-opengl/engines/agi/view.h
    scummvm/branches/gsoc2010-opengl/engines/agos/agos.cpp
    scummvm/branches/gsoc2010-opengl/engines/agos/agos.h
    scummvm/branches/gsoc2010-opengl/engines/agos/cursor.cpp
    scummvm/branches/gsoc2010-opengl/engines/agos/detection.cpp
    scummvm/branches/gsoc2010-opengl/engines/agos/draw.cpp
    scummvm/branches/gsoc2010-opengl/engines/agos/event.cpp
    scummvm/branches/gsoc2010-opengl/engines/agos/gfx.cpp
    scummvm/branches/gsoc2010-opengl/engines/agos/icons.cpp
    scummvm/branches/gsoc2010-opengl/engines/agos/input.cpp
    scummvm/branches/gsoc2010-opengl/engines/agos/verb.cpp
    scummvm/branches/gsoc2010-opengl/engines/agos/vga_e2.cpp
    scummvm/branches/gsoc2010-opengl/engines/agos/vga_s2.cpp
    scummvm/branches/gsoc2010-opengl/engines/cine/detection.cpp
    scummvm/branches/gsoc2010-opengl/engines/cine/gfx.cpp
    scummvm/branches/gsoc2010-opengl/engines/cine/gfx.h
    scummvm/branches/gsoc2010-opengl/engines/cine/saveload.cpp
    scummvm/branches/gsoc2010-opengl/engines/cine/saveload.h
    scummvm/branches/gsoc2010-opengl/engines/cruise/decompiler.cpp
    scummvm/branches/gsoc2010-opengl/engines/cruise/detection.cpp
    scummvm/branches/gsoc2010-opengl/engines/dialogs.cpp
    scummvm/branches/gsoc2010-opengl/engines/draci/animation.cpp
    scummvm/branches/gsoc2010-opengl/engines/draci/barchive.cpp
    scummvm/branches/gsoc2010-opengl/engines/draci/detection.cpp
    scummvm/branches/gsoc2010-opengl/engines/draci/draci.cpp
    scummvm/branches/gsoc2010-opengl/engines/draci/game.cpp
    scummvm/branches/gsoc2010-opengl/engines/draci/game.h
    scummvm/branches/gsoc2010-opengl/engines/draci/script.cpp
    scummvm/branches/gsoc2010-opengl/engines/draci/sound.cpp
    scummvm/branches/gsoc2010-opengl/engines/draci/sound.h
    scummvm/branches/gsoc2010-opengl/engines/drascula/actors.cpp
    scummvm/branches/gsoc2010-opengl/engines/drascula/animation.cpp
    scummvm/branches/gsoc2010-opengl/engines/drascula/converse.cpp
    scummvm/branches/gsoc2010-opengl/engines/drascula/detection.cpp
    scummvm/branches/gsoc2010-opengl/engines/drascula/drascula.cpp
    scummvm/branches/gsoc2010-opengl/engines/drascula/drascula.h
    scummvm/branches/gsoc2010-opengl/engines/drascula/graphics.cpp
    scummvm/branches/gsoc2010-opengl/engines/drascula/interface.cpp
    scummvm/branches/gsoc2010-opengl/engines/drascula/module.mk
    scummvm/branches/gsoc2010-opengl/engines/drascula/objects.cpp
    scummvm/branches/gsoc2010-opengl/engines/drascula/palette.cpp
    scummvm/branches/gsoc2010-opengl/engines/drascula/rooms.cpp
    scummvm/branches/gsoc2010-opengl/engines/drascula/talk.cpp
    scummvm/branches/gsoc2010-opengl/engines/engine.cpp
    scummvm/branches/gsoc2010-opengl/engines/game.cpp
    scummvm/branches/gsoc2010-opengl/engines/game.h
    scummvm/branches/gsoc2010-opengl/engines/gob/detection.cpp
    scummvm/branches/gsoc2010-opengl/engines/gob/gob.cpp
    scummvm/branches/gsoc2010-opengl/engines/gob/inter_v1.cpp
    scummvm/branches/gsoc2010-opengl/engines/groovie/cursor.cpp
    scummvm/branches/gsoc2010-opengl/engines/groovie/detection.cpp
    scummvm/branches/gsoc2010-opengl/engines/groovie/font.cpp
    scummvm/branches/gsoc2010-opengl/engines/groovie/groovie.cpp
    scummvm/branches/gsoc2010-opengl/engines/groovie/groovie.h
    scummvm/branches/gsoc2010-opengl/engines/groovie/music.cpp
    scummvm/branches/gsoc2010-opengl/engines/groovie/music.h
    scummvm/branches/gsoc2010-opengl/engines/groovie/script.cpp
    scummvm/branches/gsoc2010-opengl/engines/kyra/detection.cpp
    scummvm/branches/gsoc2010-opengl/engines/kyra/kyra_v1.cpp
    scummvm/branches/gsoc2010-opengl/engines/kyra/sound_intern.h
    scummvm/branches/gsoc2010-opengl/engines/kyra/sound_towns.cpp
    scummvm/branches/gsoc2010-opengl/engines/lure/detection.cpp
    scummvm/branches/gsoc2010-opengl/engines/lure/sound.cpp
    scummvm/branches/gsoc2010-opengl/engines/m4/animation.cpp
    scummvm/branches/gsoc2010-opengl/engines/m4/animation.h
    scummvm/branches/gsoc2010-opengl/engines/m4/assets.cpp
    scummvm/branches/gsoc2010-opengl/engines/m4/assets.h
    scummvm/branches/gsoc2010-opengl/engines/m4/console.cpp
    scummvm/branches/gsoc2010-opengl/engines/m4/detection.cpp
    scummvm/branches/gsoc2010-opengl/engines/m4/events.cpp
    scummvm/branches/gsoc2010-opengl/engines/m4/events.h
    scummvm/branches/gsoc2010-opengl/engines/m4/font.cpp
    scummvm/branches/gsoc2010-opengl/engines/m4/font.h
    scummvm/branches/gsoc2010-opengl/engines/m4/globals.cpp
    scummvm/branches/gsoc2010-opengl/engines/m4/globals.h
    scummvm/branches/gsoc2010-opengl/engines/m4/graphics.cpp
    scummvm/branches/gsoc2010-opengl/engines/m4/graphics.h
    scummvm/branches/gsoc2010-opengl/engines/m4/m4.cpp
    scummvm/branches/gsoc2010-opengl/engines/m4/m4.h
    scummvm/branches/gsoc2010-opengl/engines/m4/mads_anim.cpp
    scummvm/branches/gsoc2010-opengl/engines/m4/mads_anim.h
    scummvm/branches/gsoc2010-opengl/engines/m4/mads_logic.cpp
    scummvm/branches/gsoc2010-opengl/engines/m4/mads_logic.h
    scummvm/branches/gsoc2010-opengl/engines/m4/mads_menus.cpp
    scummvm/branches/gsoc2010-opengl/engines/m4/mads_scene.cpp
    scummvm/branches/gsoc2010-opengl/engines/m4/mads_scene.h
    scummvm/branches/gsoc2010-opengl/engines/m4/mads_views.cpp
    scummvm/branches/gsoc2010-opengl/engines/m4/mads_views.h
    scummvm/branches/gsoc2010-opengl/engines/m4/midi.cpp
    scummvm/branches/gsoc2010-opengl/engines/m4/module.mk
    scummvm/branches/gsoc2010-opengl/engines/m4/scene.cpp
    scummvm/branches/gsoc2010-opengl/engines/m4/sound.cpp
    scummvm/branches/gsoc2010-opengl/engines/m4/sound.h
    scummvm/branches/gsoc2010-opengl/engines/m4/sprite.cpp
    scummvm/branches/gsoc2010-opengl/engines/m4/sprite.h
    scummvm/branches/gsoc2010-opengl/engines/made/detection.cpp
    scummvm/branches/gsoc2010-opengl/engines/made/made.cpp
    scummvm/branches/gsoc2010-opengl/engines/mohawk/console.cpp
    scummvm/branches/gsoc2010-opengl/engines/mohawk/console.h
    scummvm/branches/gsoc2010-opengl/engines/mohawk/detection.cpp
    scummvm/branches/gsoc2010-opengl/engines/mohawk/dialogs.cpp
    scummvm/branches/gsoc2010-opengl/engines/mohawk/graphics.cpp
    scummvm/branches/gsoc2010-opengl/engines/mohawk/resource.cpp
    scummvm/branches/gsoc2010-opengl/engines/mohawk/riven.cpp
    scummvm/branches/gsoc2010-opengl/engines/mohawk/riven.h
    scummvm/branches/gsoc2010-opengl/engines/mohawk/riven_external.cpp
    scummvm/branches/gsoc2010-opengl/engines/mohawk/riven_external.h
    scummvm/branches/gsoc2010-opengl/engines/mohawk/riven_saveload.cpp
    scummvm/branches/gsoc2010-opengl/engines/mohawk/riven_saveload.h
    scummvm/branches/gsoc2010-opengl/engines/mohawk/riven_scripts.cpp
    scummvm/branches/gsoc2010-opengl/engines/mohawk/riven_scripts.h
    scummvm/branches/gsoc2010-opengl/engines/mohawk/riven_vars.cpp
    scummvm/branches/gsoc2010-opengl/engines/mohawk/sound.cpp
    scummvm/branches/gsoc2010-opengl/engines/parallaction/callables_ns.cpp
    scummvm/branches/gsoc2010-opengl/engines/parallaction/detection.cpp
    scummvm/branches/gsoc2010-opengl/engines/parallaction/exec.cpp
    scummvm/branches/gsoc2010-opengl/engines/parallaction/exec_br.cpp
    scummvm/branches/gsoc2010-opengl/engines/parallaction/gfxbase.cpp
    scummvm/branches/gsoc2010-opengl/engines/parallaction/graphics.cpp
    scummvm/branches/gsoc2010-opengl/engines/parallaction/gui_br.cpp
    scummvm/branches/gsoc2010-opengl/engines/parallaction/input.cpp
    scummvm/branches/gsoc2010-opengl/engines/parallaction/parallaction.h
    scummvm/branches/gsoc2010-opengl/engines/parallaction/parallaction_br.cpp
    scummvm/branches/gsoc2010-opengl/engines/parallaction/parallaction_ns.cpp
    scummvm/branches/gsoc2010-opengl/engines/parallaction/parser.h
    scummvm/branches/gsoc2010-opengl/engines/parallaction/parser_br.cpp
    scummvm/branches/gsoc2010-opengl/engines/parallaction/walk.cpp
    scummvm/branches/gsoc2010-opengl/engines/queen/music.cpp
    scummvm/branches/gsoc2010-opengl/engines/saga/actor.cpp
    scummvm/branches/gsoc2010-opengl/engines/saga/console.cpp
    scummvm/branches/gsoc2010-opengl/engines/saga/detection.cpp
    scummvm/branches/gsoc2010-opengl/engines/saga/events.cpp
    scummvm/branches/gsoc2010-opengl/engines/saga/font.h
    scummvm/branches/gsoc2010-opengl/engines/saga/interface.cpp
    scummvm/branches/gsoc2010-opengl/engines/saga/music.cpp
    scummvm/branches/gsoc2010-opengl/engines/saga/music.h
    scummvm/branches/gsoc2010-opengl/engines/saga/puzzle.cpp
    scummvm/branches/gsoc2010-opengl/engines/saga/render.cpp
    scummvm/branches/gsoc2010-opengl/engines/saga/saga.cpp
    scummvm/branches/gsoc2010-opengl/engines/saga/saga.h
    scummvm/branches/gsoc2010-opengl/engines/saga/scene.cpp
    scummvm/branches/gsoc2010-opengl/engines/saga/script.h
    scummvm/branches/gsoc2010-opengl/engines/saga/sfuncs.cpp
    scummvm/branches/gsoc2010-opengl/engines/saga/sfuncs_ihnm.cpp
    scummvm/branches/gsoc2010-opengl/engines/saga/sndres.cpp
    scummvm/branches/gsoc2010-opengl/engines/saga/sound.cpp
    scummvm/branches/gsoc2010-opengl/engines/saga/sound.h
    scummvm/branches/gsoc2010-opengl/engines/saga/sthread.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/console.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/console.h
    scummvm/branches/gsoc2010-opengl/engines/sci/debug.h
    scummvm/branches/gsoc2010-opengl/engines/sci/decompressor.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/detection.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/detection_tables.h
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/features.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/features.h
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/gc.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/gc.h
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/kernel.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/kernel.h
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/kernel32.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/kevent.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/kfile.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/kgraphics.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/klists.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/kmath.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/kmenu.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/kmisc.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/kmovement.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/kparse.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/kpathing.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/kscripts.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/ksound.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/kstring.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/message.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/savegame.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/savegame.h
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/script.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/script.h
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/scriptdebug.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/seg_manager.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/seg_manager.h
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/segment.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/segment.h
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/selector.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/selector.h
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/state.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/state.h
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/static_selectors.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/vm.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/vm.h
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/vm_types.h
    scummvm/branches/gsoc2010-opengl/engines/sci/event.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/event.h
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/animate.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/animate.h
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/cache.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/cache.h
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/compare.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/compare.h
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/controls.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/coordadjuster.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/cursor.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/cursor.h
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/font.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/fontsjis.h
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/frameout.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/frameout.h
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/maciconbar.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/menu.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/menu.h
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/paint.h
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/paint16.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/paint16.h
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/paint32.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/paint32.h
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/palette.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/palette.h
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/picture.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/portrait.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/portrait.h
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/ports.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/ports.h
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/robot.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/robot.h
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/screen.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/screen.h
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/text16.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/text16.h
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/transitions.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/transitions.h
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/view.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/view.h
    scummvm/branches/gsoc2010-opengl/engines/sci/module.mk
    scummvm/branches/gsoc2010-opengl/engines/sci/parser/vocabulary.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/resource.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/resource.h
    scummvm/branches/gsoc2010-opengl/engines/sci/resource_audio.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/sci.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/sci.h
    scummvm/branches/gsoc2010-opengl/engines/sci/sound/audio.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/sound/audio.h
    scummvm/branches/gsoc2010-opengl/engines/sci/sound/drivers/adlib.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/sound/drivers/fb01.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/sound/drivers/midi.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/sound/drivers/mididriver.h
    scummvm/branches/gsoc2010-opengl/engines/sci/sound/midiparser_sci.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/sound/midiparser_sci.h
    scummvm/branches/gsoc2010-opengl/engines/sci/sound/music.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/sound/music.h
    scummvm/branches/gsoc2010-opengl/engines/sci/sound/soundcmd.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/sound/soundcmd.h
    scummvm/branches/gsoc2010-opengl/engines/scumm/charset.cpp
    scummvm/branches/gsoc2010-opengl/engines/scumm/detection.cpp
    scummvm/branches/gsoc2010-opengl/engines/scumm/detection_tables.h
    scummvm/branches/gsoc2010-opengl/engines/scumm/dialogs.cpp
    scummvm/branches/gsoc2010-opengl/engines/scumm/saveload.cpp
    scummvm/branches/gsoc2010-opengl/engines/scumm/script_v5.cpp
    scummvm/branches/gsoc2010-opengl/engines/scumm/scumm-md5.h
    scummvm/branches/gsoc2010-opengl/engines/scumm/scumm.cpp
    scummvm/branches/gsoc2010-opengl/engines/scumm/sound.cpp
    scummvm/branches/gsoc2010-opengl/engines/scumm/string.cpp
    scummvm/branches/gsoc2010-opengl/engines/scumm/verbs.h
    scummvm/branches/gsoc2010-opengl/engines/sky/sky.cpp
    scummvm/branches/gsoc2010-opengl/engines/sword1/music.cpp
    scummvm/branches/gsoc2010-opengl/engines/teenagent/detection.cpp
    scummvm/branches/gsoc2010-opengl/engines/tinsel/cliprect.cpp
    scummvm/branches/gsoc2010-opengl/engines/tinsel/detection.cpp
    scummvm/branches/gsoc2010-opengl/engines/tinsel/graphics.cpp
    scummvm/branches/gsoc2010-opengl/engines/tinsel/pcode.cpp
    scummvm/branches/gsoc2010-opengl/engines/tinsel/tinlib.cpp
    scummvm/branches/gsoc2010-opengl/engines/tinsel/tinsel.cpp
    scummvm/branches/gsoc2010-opengl/engines/tinsel/tinsel.h
    scummvm/branches/gsoc2010-opengl/engines/touche/detection.cpp
    scummvm/branches/gsoc2010-opengl/engines/touche/midi.cpp
    scummvm/branches/gsoc2010-opengl/engines/touche/touche.cpp
    scummvm/branches/gsoc2010-opengl/engines/tucker/detection.cpp
    scummvm/branches/gsoc2010-opengl/graphics/fontman.cpp
    scummvm/branches/gsoc2010-opengl/graphics/fontman.h
    scummvm/branches/gsoc2010-opengl/graphics/scaler/thumbnail_intern.cpp
    scummvm/branches/gsoc2010-opengl/graphics/scaler.h
    scummvm/branches/gsoc2010-opengl/graphics/video/codecs/qdm2.cpp
    scummvm/branches/gsoc2010-opengl/graphics/video/codecs/qdm2.h
    scummvm/branches/gsoc2010-opengl/graphics/video/qt_decoder.cpp
    scummvm/branches/gsoc2010-opengl/gui/EditTextWidget.cpp
    scummvm/branches/gsoc2010-opengl/gui/EditTextWidget.h
    scummvm/branches/gsoc2010-opengl/gui/GuiManager.cpp
    scummvm/branches/gsoc2010-opengl/gui/GuiManager.h
    scummvm/branches/gsoc2010-opengl/gui/KeysDialog.cpp
    scummvm/branches/gsoc2010-opengl/gui/ListWidget.cpp
    scummvm/branches/gsoc2010-opengl/gui/ListWidget.h
    scummvm/branches/gsoc2010-opengl/gui/PopUpWidget.cpp
    scummvm/branches/gsoc2010-opengl/gui/PopUpWidget.h
    scummvm/branches/gsoc2010-opengl/gui/ScrollBarWidget.cpp
    scummvm/branches/gsoc2010-opengl/gui/ScrollBarWidget.h
    scummvm/branches/gsoc2010-opengl/gui/TabWidget.cpp
    scummvm/branches/gsoc2010-opengl/gui/TabWidget.h
    scummvm/branches/gsoc2010-opengl/gui/ThemeEngine.cpp
    scummvm/branches/gsoc2010-opengl/gui/ThemeEngine.h
    scummvm/branches/gsoc2010-opengl/gui/ThemeParser.cpp
    scummvm/branches/gsoc2010-opengl/gui/about.cpp
    scummvm/branches/gsoc2010-opengl/gui/browser.cpp
    scummvm/branches/gsoc2010-opengl/gui/chooser.cpp
    scummvm/branches/gsoc2010-opengl/gui/console.cpp
    scummvm/branches/gsoc2010-opengl/gui/credits.h
    scummvm/branches/gsoc2010-opengl/gui/dialog.cpp
    scummvm/branches/gsoc2010-opengl/gui/dialog.h
    scummvm/branches/gsoc2010-opengl/gui/editable.cpp
    scummvm/branches/gsoc2010-opengl/gui/editable.h
    scummvm/branches/gsoc2010-opengl/gui/error.cpp
    scummvm/branches/gsoc2010-opengl/gui/launcher.cpp
    scummvm/branches/gsoc2010-opengl/gui/massadd.cpp
    scummvm/branches/gsoc2010-opengl/gui/message.cpp
    scummvm/branches/gsoc2010-opengl/gui/options.cpp
    scummvm/branches/gsoc2010-opengl/gui/options.h
    scummvm/branches/gsoc2010-opengl/gui/saveload.cpp
    scummvm/branches/gsoc2010-opengl/gui/themebrowser.cpp
    scummvm/branches/gsoc2010-opengl/gui/themes/default.inc
    scummvm/branches/gsoc2010-opengl/gui/themes/scummclassic/classic_gfx.stx
    scummvm/branches/gsoc2010-opengl/gui/themes/scummclassic/classic_layout.stx
    scummvm/branches/gsoc2010-opengl/gui/themes/scummclassic/classic_layout_lowres.stx
    scummvm/branches/gsoc2010-opengl/gui/themes/scummclassic.zip
    scummvm/branches/gsoc2010-opengl/gui/themes/scummmodern/scummmodern_gfx.stx
    scummvm/branches/gsoc2010-opengl/gui/themes/scummmodern/scummmodern_layout.stx
    scummvm/branches/gsoc2010-opengl/gui/themes/scummmodern/scummmodern_layout_lowres.stx
    scummvm/branches/gsoc2010-opengl/gui/themes/scummmodern.zip
    scummvm/branches/gsoc2010-opengl/gui/widget.cpp
    scummvm/branches/gsoc2010-opengl/gui/widget.h
    scummvm/branches/gsoc2010-opengl/ports.mk
    scummvm/branches/gsoc2010-opengl/sound/audiostream.cpp
    scummvm/branches/gsoc2010-opengl/sound/audiostream.h
    scummvm/branches/gsoc2010-opengl/sound/decoders/adpcm.h
    scummvm/branches/gsoc2010-opengl/sound/decoders/aiff.cpp
    scummvm/branches/gsoc2010-opengl/sound/decoders/aiff.h
    scummvm/branches/gsoc2010-opengl/sound/decoders/flac.cpp
    scummvm/branches/gsoc2010-opengl/sound/decoders/flac.h
    scummvm/branches/gsoc2010-opengl/sound/decoders/mp3.h
    scummvm/branches/gsoc2010-opengl/sound/decoders/vag.h
    scummvm/branches/gsoc2010-opengl/sound/decoders/voc.h
    scummvm/branches/gsoc2010-opengl/sound/decoders/vorbis.cpp
    scummvm/branches/gsoc2010-opengl/sound/decoders/vorbis.h
    scummvm/branches/gsoc2010-opengl/sound/decoders/wave.h
    scummvm/branches/gsoc2010-opengl/sound/fmopl.cpp
    scummvm/branches/gsoc2010-opengl/sound/mididrv.cpp
    scummvm/branches/gsoc2010-opengl/sound/mididrv.h
    scummvm/branches/gsoc2010-opengl/sound/midiparser.cpp
    scummvm/branches/gsoc2010-opengl/sound/midiparser.h
    scummvm/branches/gsoc2010-opengl/sound/mods/protracker.h
    scummvm/branches/gsoc2010-opengl/sound/musicplugin.cpp
    scummvm/branches/gsoc2010-opengl/sound/musicplugin.h
    scummvm/branches/gsoc2010-opengl/sound/null.cpp
    scummvm/branches/gsoc2010-opengl/sound/softsynth/adlib.cpp
    scummvm/branches/gsoc2010-opengl/sound/softsynth/fluidsynth.cpp
    scummvm/branches/gsoc2010-opengl/sound/softsynth/mt32.cpp
    scummvm/branches/gsoc2010-opengl/sound/softsynth/pcspk.cpp
    scummvm/branches/gsoc2010-opengl/sound/softsynth/sid.cpp
    scummvm/branches/gsoc2010-opengl/sound/softsynth/ym2612.cpp
    scummvm/branches/gsoc2010-opengl/tools/convbdf.c
    scummvm/branches/gsoc2010-opengl/tools/create_msvc/create_msvc.cpp
    scummvm/branches/gsoc2010-opengl/tools/credits.pl
    scummvm/branches/gsoc2010-opengl/tools/make-scumm-fontdata.c
    scummvm/branches/gsoc2010-opengl/tools/md5table.c
    scummvm/branches/gsoc2010-opengl/tools/module.mk
    scummvm/branches/gsoc2010-opengl/tools/scumm-md5.txt

Added Paths:
-----------
    scummvm/branches/gsoc2010-opengl/backends/platform/android/video.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/android/video.h
    scummvm/branches/gsoc2010-opengl/backends/platform/gp2x/gp2x-bundle.mk
    scummvm/branches/gsoc2010-opengl/backends/platform/gp2xwiz/build/bundle-debug.sh
    scummvm/branches/gsoc2010-opengl/backends/platform/gp2xwiz/build/scummvm-gdb.gpe
    scummvm/branches/gsoc2010-opengl/backends/platform/gp2xwiz/gp2xwiz-bundle.mk
    scummvm/branches/gsoc2010-opengl/backends/platform/psp/rtc.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/psp/rtc.h
    scummvm/branches/gsoc2010-opengl/common/messages.cpp
    scummvm/branches/gsoc2010-opengl/common/translation.cpp
    scummvm/branches/gsoc2010-opengl/common/translation.h
    scummvm/branches/gsoc2010-opengl/dists/android/AndroidManifest.xml
    scummvm/branches/gsoc2010-opengl/dists/android/AndroidManifest.xml.in
    scummvm/branches/gsoc2010-opengl/dists/android/res/drawable/scummvm.png
    scummvm/branches/gsoc2010-opengl/dists/android/res/drawable/scummvm_big.png
    scummvm/branches/gsoc2010-opengl/dists/iphone/icon-72.png
    scummvm/branches/gsoc2010-opengl/engines/agi/detection_tables.h
    scummvm/branches/gsoc2010-opengl/engines/agi/sound_2gs.cpp
    scummvm/branches/gsoc2010-opengl/engines/agi/sound_2gs.h
    scummvm/branches/gsoc2010-opengl/engines/agi/sound_coco3.cpp
    scummvm/branches/gsoc2010-opengl/engines/agi/sound_coco3.h
    scummvm/branches/gsoc2010-opengl/engines/agi/sound_midi.cpp
    scummvm/branches/gsoc2010-opengl/engines/agi/sound_midi.h
    scummvm/branches/gsoc2010-opengl/engines/agi/sound_pcjr.cpp
    scummvm/branches/gsoc2010-opengl/engines/agi/sound_pcjr.h
    scummvm/branches/gsoc2010-opengl/engines/agi/sound_sarien.cpp
    scummvm/branches/gsoc2010-opengl/engines/agi/sound_sarien.h
    scummvm/branches/gsoc2010-opengl/engines/cine/detection_tables.h
    scummvm/branches/gsoc2010-opengl/engines/drascula/console.cpp
    scummvm/branches/gsoc2010-opengl/engines/drascula/console.h
    scummvm/branches/gsoc2010-opengl/engines/gob/detection_tables.h
    scummvm/branches/gsoc2010-opengl/engines/kyra/detection_tables.h
    scummvm/branches/gsoc2010-opengl/engines/m4/mads_player.cpp
    scummvm/branches/gsoc2010-opengl/engines/m4/mads_player.h
    scummvm/branches/gsoc2010-opengl/engines/mohawk/detection_tables.h
    scummvm/branches/gsoc2010-opengl/engines/sci/resource_intern.h
    scummvm/branches/gsoc2010-opengl/engines/tinsel/detection_tables.h
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/Arial.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/Arial12.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/ArialBold.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/README
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/clR6x12-iso-8859-1.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/clR6x12-iso-8859-5.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/clR6x12.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/courr12-iso-8859-1.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/fixed5x8-iso-8859-1.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/fixed5x8-iso-8859-5.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/helvB12-iso-8859-1.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/helvB12-iso-8859-5.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/helvB12.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/helvBO12-iso-8859-1.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/helvBO12.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/helvR12-iso-8859-1.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/helvR12.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/topaz/
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/topaz/README.ScummVM
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/topaz/topazLT.font
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/topaz/topazLT.readme
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/topaz/topazlt/
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/topaz/topazlt/8
    scummvm/branches/gsoc2010-opengl/gui/themes/scummmodern/radiobutton.bmp
    scummvm/branches/gsoc2010-opengl/gui/themes/scummmodern/radiobutton_empty.bmp
    scummvm/branches/gsoc2010-opengl/po/
    scummvm/branches/gsoc2010-opengl/po/POTFILES
    scummvm/branches/gsoc2010-opengl/po/ca_ES.po
    scummvm/branches/gsoc2010-opengl/po/de_DE.po
    scummvm/branches/gsoc2010-opengl/po/fr_FR.po
    scummvm/branches/gsoc2010-opengl/po/hu_HU.po
    scummvm/branches/gsoc2010-opengl/po/it_IT.po
    scummvm/branches/gsoc2010-opengl/po/module.mk
    scummvm/branches/gsoc2010-opengl/po/remove-potcdate.sed
    scummvm/branches/gsoc2010-opengl/po/ru_RU.po
    scummvm/branches/gsoc2010-opengl/po/scummvm.pot
    scummvm/branches/gsoc2010-opengl/sound/null.h
    scummvm/branches/gsoc2010-opengl/tools/po2c

Removed Paths:
-------------
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/compressor/lz.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/compressor/lz.h
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/libcartreset/cartreset.c
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/libcartreset/cartreset_nolibfat.h
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/portdefs.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/ramsave.cpp
    scummvm/branches/gsoc2010-opengl/backends/platform/ds/arm9/source/ramsave.h
    scummvm/branches/gsoc2010-opengl/engines/sci/engine/game.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/gui.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/gui.h
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/gui32.cpp
    scummvm/branches/gsoc2010-opengl/engines/sci/graphics/gui32.h
    scummvm/branches/gsoc2010-opengl/engines/sci/sound/iterator/
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/Arial.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/Arial12.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/ArialBold.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/README
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/clR6x12-iso-8859-1.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/clR6x12-iso-8859-5.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/clR6x12.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/courr12-iso-8859-1.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/fixed5x8-iso-8859-1.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/fixed5x8-iso-8859-5.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/helvB12-iso-8859-1.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/helvB12-iso-8859-5.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/helvB12.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/helvBO12-iso-8859-1.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/helvBO12.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/helvR12-iso-8859-1.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/helvR12.bdf
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/topaz/
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/topaz/README.ScummVM
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/topaz/topazLT.font
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/topaz/topazLT.readme
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/topaz/topazlt/
    scummvm/branches/gsoc2010-opengl/gui/themes/fonts/topaz/topazlt/8
    scummvm/branches/gsoc2010-opengl/po/POTFILES
    scummvm/branches/gsoc2010-opengl/po/ca_ES.po
    scummvm/branches/gsoc2010-opengl/po/de_DE.po
    scummvm/branches/gsoc2010-opengl/po/fr_FR.po
    scummvm/branches/gsoc2010-opengl/po/hu_HU.po
    scummvm/branches/gsoc2010-opengl/po/it_IT.po
    scummvm/branches/gsoc2010-opengl/po/module.mk
    scummvm/branches/gsoc2010-opengl/po/remove-potcdate.sed
    scummvm/branches/gsoc2010-opengl/po/ru_RU.po
    scummvm/branches/gsoc2010-opengl/po/scummvm.pot

Property Changed:
----------------
    scummvm/branches/gsoc2010-opengl/
    scummvm/branches/gsoc2010-opengl/backends/platform/android/org/inodes/gus/scummvm/
    scummvm/branches/gsoc2010-opengl/dists/android/mkmanifest.pl
    scummvm/branches/gsoc2010-opengl/dists/iphone/
    scummvm/branches/gsoc2010-opengl/dists/iphone/scummvm.xcodeproj/
    scummvm/branches/gsoc2010-opengl/engines/draci/script.cpp
    scummvm/branches/gsoc2010-opengl/engines/draci/script.h


Property changes on: scummvm/branches/gsoc2010-opengl
___________________________________________________________________
Modified: svn:mergeinfo
   - /scummvm/branches/gsoc2009-draci:41389-44325
/scummvm/trunk:49204-49497
   + /scummvm/branches/gsoc2009-draci:41389-44325
/scummvm/trunk:49204-50837

Modified: scummvm/branches/gsoc2010-opengl/AUTHORS
===================================================================
--- scummvm/branches/gsoc2010-opengl/AUTHORS	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/AUTHORS	2010-07-13 04:31:15 UTC (rev 50840)
@@ -318,6 +318,29 @@
        Chris Gray            - (retired)
        Johannes Schickel
 
+  Translations
+  ------------
+     Thierry Crozat        - Translation Lead
+
+    Catalan:
+       Jordi Vilalta Prat
+
+    French:
+       Thierry Crozat
+
+    German:
+       Simon Sawatzki
+       Lothar Serra Mari
+
+    Hungarian:
+       Alex Bevilacqua
+
+    Italian:
+       Matteo Angelino
+
+    Russian:
+       Eugene Sandulenko
+
   Websites (design)
   -----------------
      Dobo Balazs           - Website design
@@ -395,7 +418,7 @@
      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
+     Rickard Lind          - MT-32->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

Modified: scummvm/branches/gsoc2010-opengl/Makefile
===================================================================
--- scummvm/branches/gsoc2010-opengl/Makefile	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/Makefile	2010-07-13 04:31:15 UTC (rev 50840)
@@ -25,7 +25,7 @@
 	# Turn off some annoying and not-so-useful warnings
 	CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder
 	# Enable even more warnings...
-	CXXFLAGS+= -Wpointer-arith -Wcast-qual -Wcast-align
+	CXXFLAGS+= -Wpointer-arith -Wcast-qual
 	CXXFLAGS+= -Wshadow -Wimplicit -Wnon-virtual-dtor -Wwrite-strings
 
 	# Currently we disable this gcc flag, since it will also warn in cases,

Modified: scummvm/branches/gsoc2010-opengl/Makefile.common
===================================================================
--- scummvm/branches/gsoc2010-opengl/Makefile.common	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/Makefile.common	2010-07-13 04:31:15 UTC (rev 50840)
@@ -28,6 +28,7 @@
 	engines \
 	graphics \
 	common \
+	po
 
 ifdef USE_MT32EMU
 MODULES += sound/softsynth/mt32

Modified: scummvm/branches/gsoc2010-opengl/NEWS
===================================================================
--- scummvm/branches/gsoc2010-opengl/NEWS	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/NEWS	2010-07-13 04:31:15 UTC (rev 50840)
@@ -8,11 +8,36 @@
  General:
    - Switched to the "fast" DOSBox OPL emulator.
    - Fixed a crash in the rjp1 player code affecting the FOTAQ Amiga version.
+   - Added support for more original media layouts.
+   - Added support for GUI localization.
+   - Improved GUI by adding tooltips and radiobuttons.
+   - Improved GUI usability by hiding more irrelevant options not supported by
+     specific games.
 
+ AGI:
+   - Fixed number of GFX glitches.
+   - Made PIC drawing code picture perfect.
+   - Added support of MIDI devices.
+   - Added support for accurate Tandy sound emulation. Switched to it as default.
+
+ Drascula:
+   - Fixed number of GFX glitches.
+   - Made many cutscenes smoother.
+   - Changed behavior of items menu. Now it shows up on mouse up.
+
  Groovie:
    - Added support for the Macintosh version of The 7th Guest.
    - Added support for custom MT-32 instruments.
 
+ Parallaction:
+   - Made part one of The Big Red Adventure completable.
+
+ SAGA:
+   - Fixed graphics glitches in several scenes.
+
+ SCUMM:
+   - Several improvements in Maniac Mansion NES.
+
  PSP port:
    - Switched to new backend design which fixes minor graphical issues,
      speeds things up, and provides 16-bit support.

Modified: scummvm/branches/gsoc2010-opengl/backends/events/sdl/sdl-events.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/events/sdl/sdl-events.cpp	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/events/sdl/sdl-events.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -213,6 +213,7 @@
 	}
 
 	SDL_Event ev;
+	ev.type = SDL_NOEVENT;
 	while (SDL_PollEvent(&ev)) {
 		preprocessEvents(&ev);
 		if (dispatchSDLEvent(ev, event))

Modified: scummvm/branches/gsoc2010-opengl/backends/events/symbiansdl/symbiansdl-events.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/events/symbiansdl/symbiansdl-events.cpp	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/events/symbiansdl/symbiansdl-events.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -28,6 +28,7 @@
 #include "backends/events/symbiansdl/symbiansdl-events.h"
 #include "backends/platform/symbian/src/SymbianActions.h"
 #include "gui/message.h"
+#include "common/translation.h"
 
 #include <bautils.h>
 
@@ -183,7 +184,7 @@
 
 			case GUI::ACTION_QUIT:
 				{
-					GUI::MessageDialog alert("Do you want to quit ?", "Yes", "No");
+					GUI::MessageDialog alert(_("Do you want to quit ?"), _("Yes"), _("No"));
 					if (alert.runModal() == GUI::kMessageOK)
 						g_system->quit();
 

Modified: scummvm/branches/gsoc2010-opengl/backends/fs/amigaos4/amigaos4-fs.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/fs/amigaos4/amigaos4-fs.cpp	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/fs/amigaos4/amigaos4-fs.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -368,7 +368,7 @@
 		}
 
 		if (ERROR_NO_MORE_ENTRIES != IDOS->IoErr() ) {
-			debug(6, "An error occured during ExamineDir");
+			debug(6, "An error occurred during ExamineDir");
 			ret = false;
 		} else {
 			ret = true;

Modified: scummvm/branches/gsoc2010-opengl/backends/fs/ds/ds-fs-factory.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/fs/ds/ds-fs-factory.cpp	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/fs/ds/ds-fs-factory.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -27,7 +27,7 @@
 #include "backends/fs/ds/ds-fs.h"
 #include "dsmain.h" //for the isGBAMPAvailable() function
 
-DECLARE_SINGLETON(DSFilesystemFactory);
+DECLARE_SINGLETON(DSFilesystemFactory)
 
 AbstractFSNode *DSFilesystemFactory::makeRootFileNode() const {
 	if (DS::isGBAMPAvailable()) {

Modified: scummvm/branches/gsoc2010-opengl/backends/fs/ds/ds-fs.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/fs/ds/ds-fs.cpp	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/fs/ds/ds-fs.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -8,16 +8,19 @@
  * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
+ * $URL$
+ * $Id$
+ *
  */
 
 #include "common/str.h"
@@ -115,7 +118,7 @@
 //	consolePrintf("Found: %d, Dir: %d\n", _isValid, _isDirectory);
 }
 
-DSFileSystemNode::DSFileSystemNode(const DSFileSystemNode* node) {
+DSFileSystemNode::DSFileSystemNode(const DSFileSystemNode *node) {
 	//TODO: not implemented?
 }
 
@@ -144,7 +147,7 @@
 			_zipFile->changeToRoot();
 
 /*			// This is the root dir, so add the RAM folder
-			DSFileSystemNode* dsfsn = new DSFileSystemNode("ds:/ram");
+			DSFileSystemNode *dsfsn = new DSFileSystemNode("ds:/ram");
 			dsfsn->_isDirectory = true;
 			dirList->push_back(wrap(dsfsn));
 */
@@ -162,7 +165,7 @@
 			if ( (_zipFile->isDirectory() && ((mode == Common::FSNode::kListDirectoriesOnly) || (mode == Common::FSNode::kListAll)) )
 				|| (!_zipFile->isDirectory() && ((mode == Common::FSNode::kListFilesOnly) || (mode == Common::FSNode::kListAll)) ) )
 			{
-				DSFileSystemNode* dsfsn = new DSFileSystemNode("ds:/" + Common::String(n), _zipFile->isDirectory());
+				DSFileSystemNode *dsfsn = new DSFileSystemNode("ds:/" + Common::String(n), _zipFile->isDirectory());
 				dsfsn->_isDirectory = _zipFile->isDirectory();
 				dirList.push_back((dsfsn));
 			}
@@ -173,15 +176,15 @@
 	return true;
 }
 
-AbstractFSNode* DSFileSystemNode::getParent() const {
+AbstractFSNode *DSFileSystemNode::getParent() const {
 //	consolePrintf("parent\n");
 	DSFileSystemNode *p;
 
 	if (_path != "ds:/") {
-		char *path = (char *) _path.c_str();
+		const char *path = (const char *)_path.c_str();
 		int lastSlash = 4;
 
-		for (int r = 4; r < (int) _path.size(); r++) {
+		for (uint r = 4; r < _path.size(); r++) {
 			if (path[r] == '\\') {
 				lastSlash = r;
 			}
@@ -259,7 +262,7 @@
 	_path = path;
 }
 
-GBAMPFileSystemNode::GBAMPFileSystemNode(const Common::String& path, bool isDirectory) {
+GBAMPFileSystemNode::GBAMPFileSystemNode(const Common::String& path, bool isDir) {
 	//consolePrintf("'%s'",path.c_str());
 
 	int lastSlash = 3;
@@ -272,11 +275,11 @@
 	_displayName = Common::String(path.c_str() + lastSlash + 1);
 	_path = path;
 	_isValid = true;
-	_isDirectory = isDirectory;
+	_isDirectory = isDir;
 }
 
 
-GBAMPFileSystemNode::GBAMPFileSystemNode(const GBAMPFileSystemNode* node) {
+GBAMPFileSystemNode::GBAMPFileSystemNode(const GBAMPFileSystemNode *node) {
 	//TODO: not implemented?
 }
 
@@ -319,7 +322,7 @@
 
 		if ( ((entryType == TYPE_DIR) && ((mode == Common::FSNode::kListDirectoriesOnly) || (mode == Common::FSNode::kListAll)))
 		||   ((entryType == TYPE_FILE) && ((mode == Common::FSNode::kListFilesOnly) || (mode == Common::FSNode::kListAll))) ) {
-			GBAMPFileSystemNode* dsfsn;
+			GBAMPFileSystemNode *dsfsn;
 
 			//consolePrintf("Fname: %s\n", fname);
 
@@ -348,15 +351,15 @@
 	return true;
 }
 
-AbstractFSNode* GBAMPFileSystemNode::getParent() const {
+AbstractFSNode *GBAMPFileSystemNode::getParent() const {
 //	consolePrintf("parent\n");
 	GBAMPFileSystemNode *p;
 
 	if (_path != "mp:/") {
-		char *path = (char *) _path.c_str();
+		const char *path = (const char *)_path.c_str();
 		int lastSlash = 4;
 
-		for (int r = 4; r < (int) strlen((char *) path); r++) {
+		for (uint r = 4; r < strlen(path); r++) {
 			if (path[r] == '/') {
 				lastSlash = r;
 			}
@@ -413,18 +416,12 @@
 }
 
 int32 DSFileStream::pos() const {
-	if (_writeBufferPos > 0) {
-		// Discard constness.  Bad, but I can't see another way.
-		((DSFileStream *) (this))->flush();
-	}
+	assert(_writeBufferPos == 0);	// This method may only be called when reading!
 	return std_ftell((FILE *)_handle);
 }
 
 int32 DSFileStream::size() const {
-	if (_writeBufferPos > 0) {
-		// Discard constness.  Bad, but I can't see another way.
-		((DSFileStream *) (this))->flush();
-	}
+	assert(_writeBufferPos == 0);	// This method may only be called when reading!
 	int32 oldPos = std_ftell((FILE *)_handle);
 	std_fseek((FILE *)_handle, 0, SEEK_END);
 	int32 length = std_ftell((FILE *)_handle);
@@ -444,16 +441,15 @@
 	if (_writeBufferPos > 0) {
 		flush();
 	}
-	return std_fread((byte *)ptr, 1, len, (FILE *)_handle);
+	return std_fread(ptr, 1, len, (FILE *)_handle);
 }
 
 uint32 DSFileStream::write(const void *ptr, uint32 len) {
 	if (_writeBufferPos + len < WRITE_BUFFER_SIZE) {
 		memcpy(_writeBuffer + _writeBufferPos, ptr, len);
 		_writeBufferPos += len;
-	}
-	else
-	{
+		return len;
+	} else {
 		if (_writeBufferPos > 0) {
 			flush();
 		}
@@ -483,31 +479,33 @@
 
 
 // Stdio replacements
-#define MAX_FILE_HANDLES 32
+enum {
+	MAX_FILE_HANDLES = 32
+};
 
-bool inited = false;
-DS::fileHandle handle[MAX_FILE_HANDLES];
+static bool inited = false;
+static DS::fileHandle s_handle[MAX_FILE_HANDLES];
 
-FILE* std_fopen(const char* name, const char* mode) {
+FILE *std_fopen(const char *name, const char *mode) {
 	if (!inited) {
 		for (int r = 0; r < MAX_FILE_HANDLES; r++) {
-			handle[r].used = false;
+			s_handle[r].used = false;
 		}
 		inited = true;
 		currentDir[0] = '\0';
 	}
 
-	char* realName = (char *) name;
+	char realName[MAXPATHLEN];
 
 	// Remove file system prefix
 	if ((name[0] == 'd') && (name[1] == 's') && (name[2] == ':') && (name[3] == '/')) {
-		realName += 4;
+		strlcpy(realName, name + 4, MAXPATHLEN);
+	} else if ((name[0] == 'm') && (name[1] == 'p') && (name[2] == ':') && (name[3] == '/')) {
+		strlcpy(realName, name + 4, MAXPATHLEN);
+	} else {
+		strlcpy(realName, name, MAXPATHLEN);
 	}
 
-	if ((name[0] == 'm') && (name[1] == 'p') && (name[2] == ':') && (name[3] == '/')) {
-		realName += 4;
-	}
-
 //	consolePrintf("Open file:");
 //	consolePrintf("'%s', [%s]", name, realName);
 
@@ -515,13 +513,14 @@
 		FAT_chdir("/");
 
 		// Turn all back slashes into forward slashes for gba_nds_fat
-		char* p = realName;
+		char *p = realName;
 		while (*p) {
-			if (*p == '\\') *p = '/';
+			if (*p == '\\')
+				*p = '/';
 			p++;
 		}
 
-		FAT_FILE* result = FAT_fopen(realName, mode);
+		FAT_FILE *result = FAT_fopen(realName, mode);
 
 		if (result == 0) {
 //			consolePrintf("Error code %d\n", result);
@@ -531,42 +530,21 @@
 		}
 //		MT_memoryReport();
 
-		return (FILE *) result;
+		return (FILE *)result;
 	}
 
 	// Fail to open file for writing.  It's in ROM!
 
 	// Allocate a file handle
 	int r = 0;
-	while (handle[r].used) {
+	while (s_handle[r].used) {
 		r++;
 		assert(r < MAX_FILE_HANDLES);
 	}
 
-#ifdef GBA_SRAM_SAVE
-	if (strchr(mode, 'w')) {
-//		consolePrintf("Writing %s\n", realName);
-		handle[r].sramFile = (DSSaveFile *) DSSaveFileManager::instance()->openSavefile(realName, true);
-	} else {
-//		consolePrintf("Reading %s\n", realName);
-		handle[r].sramFile = (DSSaveFile *) DSSaveFileManager::instance()->openSavefile(realName, false);
-	}
-#endif
+	char *data;
 
-	if (handle[r].sramFile) {
-		handle[r].used = true;
-		handle[r].pos = 0;
-		handle[r].data = NULL;
-		handle[r].size = handle[r].sramFile->getSize();
-//		consolePrintf("Found it");
-		return &handle[r];
-	}
-
-//	consolePrintf("Not in SRAM!");
-
-	char* data;
-
-	ZipFile* zip = DSFileSystemNode::getZip();
+	ZipFile *zip = DSFileSystemNode::getZip();
 	if (!zip) {
 //		consolePrintf("No zip yet!");
 		return NULL;
@@ -578,7 +556,7 @@
 
 	if (currentDir[0] != 0) {
 		char nameWithPath[128];
-		sprintf(nameWithPath, "%s\%s", currentDir, realName);
+		sprintf(nameWithPath, "%s\\%s", currentDir, realName);
 		strcpy(realName, nameWithPath);
 	}
 
@@ -589,17 +567,18 @@
 		zip->setAllFilesVisible(false);
 
 		// Allocate a file handle
-		int r = 0;
-		while (handle[r].used) r++;
+		r = 0;
+		while (s_handle[r].used)
+			r++;
 
 
-		handle[r].used = true;
-		handle[r].pos = 0;
-		handle[r].data = data;
-		handle[r].size = zip->getFileSize();
+		s_handle[r].used = true;
+		s_handle[r].pos = 0;
+		s_handle[r].data = data;
+		s_handle[r].size = zip->getFileSize();
 
 //		consolePrintf("Opened file %d: %s (%s)   ", r, realName, name);
-		return &handle[r];
+		return &s_handle[r];
 	} else {
 		zip->setAllFilesVisible(false);
 //		consolePrintf("Not found: %s (%s)  ", realName, name);
@@ -607,7 +586,7 @@
 	}
 }
 
-void std_fclose(FILE* handle) {
+void std_fclose(FILE *handle) {
 
 	if (DS::isGBAMPAvailable()) {
 		FAT_fclose((FAT_FILE *) handle);
@@ -615,19 +594,15 @@
 	}
 
 	handle->used = false;
-	if (handle->sramFile) {
-		delete handle->sramFile;
-		handle->sramFile = NULL;
-	}
 }
 
-size_t std_fread(const void* ptr, size_t size, size_t numItems, FILE* handle) {
+size_t std_fread(void *ptr, size_t size, size_t numItems, FILE *handle) {
 //	consolePrintf("fread %d,%d %d ", size, numItems, ptr);
 
 	if (DS::isGBAMPAvailable()) {
 		readPastEndOfFile = false;
 
-		int bytes = FAT_fread((void *) ptr, size, numItems, (FAT_FILE *) handle);
+		int bytes = FAT_fread(ptr, size, numItems, (FAT_FILE *) handle);
 		if (!FAT_feof((FAT_FILE *) handle)) {
 			return numItems;
 		} else {
@@ -638,36 +613,22 @@
 		return numItems;
 	}
 
-	if (handle->sramFile) {
-		int bytes = 0;
-		int result = 1;
-		//consolePrintf("fread size=", size * numItems);
-		for (int r = 0; (r < (s32) size * (s32) numItems) && (result > 0); r++) {
-			result = handle->sramFile->read((void *) ( ((char *) (ptr)) + r), 1);
-			bytes += result;
-			//consolePrintf("'%d',", ((char *) (ptr))[0]);
-		}
-
-		handle->pos += bytes;
-
-		return bytes / size;
-	}
-
-	if ((int)(handle->pos + size * numItems) > handle->size) {
+	if (handle->pos > handle->size)
+		numItems = 0;
+	else if ((int)(handle->pos + size * numItems) > handle->size)
 		numItems = (handle->size - handle->pos) / size;
-		if (numItems < 0) numItems = 0;
-	}
 
 //	consolePrintf("read %d  ", size * numItems);
 
-	memcpy((void *) ptr, handle->data + handle->pos, size * numItems);
+	memcpy(ptr, handle->data + handle->pos, size * numItems);
 	handle->pos += size * numItems;
 
 	return numItems;
 }
 
-size_t std_fwrite(const void* ptr, size_t size, size_t numItems, FILE* handle) {
-	if ((handle == stdin)) return 0;
+size_t std_fwrite(const void *ptr, size_t size, size_t numItems, FILE *handle) {
+	if ((handle == stdin))
+		return 0;
 
 	if ((handle == stderr) || (handle == stdout)) {
 //		consolePrintf((char *) ptr);
@@ -677,7 +638,7 @@
 	//consolePrintf("fwrite size=%d\n", size * numItems);
 
 	if (DS::isGBAMPAvailable()) {
-		FAT_fwrite(((char *) (ptr)), size, numItems, (FAT_FILE *) handle);
+		FAT_fwrite(ptr, size, numItems, (FAT_FILE *) handle);
 		return numItems;
 
 		int length = size * numItems;
@@ -694,36 +655,27 @@
 		return numItems;
 	}
 
-	if (handle->sramFile) {
-		handle->sramFile->write(ptr, size);
-		return size;
-	} else {
-		return 0;
-	}
+	return 0;
 }
 
-bool std_feof(FILE* handle) {
+bool std_feof(FILE *handle) {
 //	consolePrintf("feof ");
 
 	if (DS::isGBAMPAvailable()) {
 		return readPastEndOfFile && FAT_feof((FAT_FILE *) handle);
 	}
 
-	if (handle->sramFile) {
-		return handle->sramFile->eos();
-	}
-
 //	consolePrintf("feof %s", handle->pos >= handle->size? "true": "false");
 	return handle->pos >= handle->size;
 }
 
-int std_fflush(FILE* handle) {
+int std_fflush(FILE *handle) {
 	//FIXME: not implemented?
 //	consolePrintf("fflush ");
 	return 0;
 }
 
-long int std_ftell(FILE* handle) {
+long int std_ftell(FILE *handle) {
 	if (DS::isGBAMPAvailable()) {
 		return FAT_ftell((FAT_FILE *) handle);
 	}
@@ -731,7 +683,7 @@
 	return handle->pos;
 }
 
-int std_fseek(FILE* handle, long int offset, int whence) {
+int std_fseek(FILE *handle, long int offset, int whence) {
 //	consolePrintf("fseek %d %d ", offset, whence);
 
 	if (DS::isGBAMPAvailable()) {
@@ -756,14 +708,14 @@
 	return 0;
 }
 
-int std_ferror(FILE* handle) {
+int std_ferror(FILE *handle) {
 	//FIXME: not implemented?
 //	consolePrintf("ferror ");
 
 	return readPastEndOfFile;
 }
 
-void std_clearerr(FILE* handle) {
+void std_clearerr(FILE *handle) {
 	//FIXME: not implemented?
 	readPastEndOfFile = false;
 //	consolePrintf("clearerr ");

Modified: scummvm/branches/gsoc2010-opengl/backends/fs/ds/ds-fs.h
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/fs/ds/ds-fs.h	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/fs/ds/ds-fs.h	2010-07-13 04:31:15 UTC (rev 50840)
@@ -8,27 +8,30 @@
  * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
+ * $URL$
+ * $Id$
+ *
  */
 
 #ifndef _DS_FS_H
 #define _DS_FS_H
 
-//#include <NDS/ARM9/console.h>
 #include "common/fs.h"
+#include "common/stream.h"
+#include "backends/fs/abstract-fs.h"
+
 #include "zipreader.h"
-#include "ramsave.h"
 #include "fat/gba_nds_fat.h"
-#include "backends/fs/abstract-fs.h"
 
 namespace DS {
 
@@ -40,7 +43,7 @@
  */
 class DSFileSystemNode : public AbstractFSNode {
 protected:
-	static ZipFile* _zipFile;
+	static ZipFile *_zipFile;
 
 	Common::String _displayName;
 	Common::String _path;
@@ -96,7 +99,7 @@
 	 * Returns the zip file this node points to.
 	 * TODO: check this documentation.
 	 */
-	static ZipFile* getZip() { return _zipFile; }
+	static ZipFile *getZip() { return _zipFile; }
 };
 
  /**
@@ -161,16 +164,16 @@
 struct fileHandle {
 	int pos;
 	bool used;
-	char* data;
+	char *data;
 	int size;
-
-	DSSaveFile* sramFile;
 };
 
 
 class DSFileStream : public Common::SeekableReadStream, public Common::WriteStream, public Common::NonCopyable {
 protected:
-	static const int WRITE_BUFFER_SIZE = 512;
+	enum {
+		WRITE_BUFFER_SIZE = 512
+	};
 
 	/** File handle to the actual file. */
 	void 	*_handle;
@@ -206,24 +209,24 @@
 #undef stdout
 #undef stdin
 
-#define stdout ((DS::fileHandle*) -1)
-#define stderr ((DS::fileHandle*) -2)
-#define stdin ((DS::fileHandle*) -3)
+#define stdout ((DS::fileHandle *) -1)
+#define stderr ((DS::fileHandle *) -2)
+#define stdin ((DS::fileHandle *) -3)
 
 #define FILE DS::fileHandle
 
 // Please do not remove any of these prototypes that appear not to be required.
-FILE*	std_fopen(const char* name, const char* mode);
-void	std_fclose(FILE* handle);
-size_t	std_fread(const void* ptr, size_t size, size_t numItems, FILE* handle);
-size_t	std_fwrite(const void* ptr, size_t size, size_t numItems, FILE* handle);
-bool	std_feof(FILE* handle);
-long int std_ftell(FILE* handle);
-int		std_fseek(FILE* handle, long int offset, int whence);
-void	std_clearerr(FILE* handle);
-int		std_fflush(FILE* handle);
-int		std_ferror(FILE* handle);
+FILE*	std_fopen(const char *name, const char *mode);
+void	std_fclose(FILE *handle);
+size_t	std_fread(void *ptr, size_t size, size_t numItems, FILE *handle);
+size_t	std_fwrite(const void *ptr, size_t size, size_t numItems, FILE *handle);
+bool	std_feof(FILE *handle);
+long int std_ftell(FILE *handle);
+int		std_fseek(FILE *handle, long int offset, int whence);
+void	std_clearerr(FILE *handle);
+int		std_fflush(FILE *handle);
+int		std_ferror(FILE *handle);
 
-} //namespace DS
+}	// End of namespace DS
 
 #endif //_DS_FS_H

Modified: scummvm/branches/gsoc2010-opengl/backends/fs/psp/psp-stream.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/fs/psp/psp-stream.cpp	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/fs/psp/psp-stream.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -81,10 +81,10 @@
 PSPIoStream::~PSPIoStream() {
 	DEBUG_ENTER_FUNC();
 
-	if (PowerMan.beginCriticalSection() == PowerManager::Blocked)
+	if (PowerMan.beginCriticalSection())
 		PSP_DEBUG_PRINT_FUNC("Suspended\n");
 
-	PowerMan.unregisterSuspend(this); // Unregister with powermanager to be suspended
+	PowerMan.unregisterForSuspend(this); // Unregister with powermanager to be suspended
 									  // Must do this before fclose() or resume() will reopen.
 
 	fclose((FILE *)_handle);		  // We don't need a critical section. Worst case, the handle gets closed on its own
@@ -100,7 +100,7 @@
  */
 void *PSPIoStream::open() {
 	DEBUG_ENTER_FUNC();
-	if (PowerMan.beginCriticalSection() == PowerManager::Blocked) {
+	if (PowerMan.beginCriticalSection()) {
 		// No need to open. Just return the _handle resume() already opened.
 		PSP_DEBUG_PRINT_FUNC("Suspended\n");
 	}
@@ -118,7 +118,7 @@
 		_cache = (char *)memalign(64, CACHE_SIZE);
 	}
 
-	PowerMan.registerSuspend(this);	 // Register with the powermanager to be suspended
+	PowerMan.registerForSuspend(this);	 // Register with the powermanager to be suspended
 
 	PowerMan.endCriticalSection();
 
@@ -233,7 +233,7 @@
 		}		
 	}
 
-	if (PowerMan.beginCriticalSection() == PowerManager::Blocked)
+	if (PowerMan.beginCriticalSection())
 		PSP_DEBUG_PRINT_FUNC("Suspended\n");
 	
 	
@@ -309,7 +309,7 @@
 uint32 PSPIoStream::write(const void *ptr, uint32 len) {
 	DEBUG_ENTER_FUNC();
 	// Check if we can access the file
-	if (PowerMan.beginCriticalSection() == PowerManager::Blocked)
+	if (PowerMan.beginCriticalSection())
 		PSP_DEBUG_PRINT_FUNC("Suspended\n");
 
 	PSP_DEBUG_PRINT_FUNC("filename[%s], len[0x%x]\n", _path.c_str(), len);
@@ -346,7 +346,7 @@
 bool PSPIoStream::flush() {
 	DEBUG_ENTER_FUNC();
 	// Enter critical section
-	if (PowerMan.beginCriticalSection() == PowerManager::Blocked)
+	if (PowerMan.beginCriticalSection())
 		PSP_DEBUG_PRINT_FUNC("Suspended\n");
 
 	int ret = fflush((FILE *)_handle);

Modified: scummvm/branches/gsoc2010-opengl/backends/graphics/graphics.h
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/graphics/graphics.h	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/graphics/graphics.h	2010-07-13 04:31:15 UTC (rev 50840)
@@ -48,7 +48,7 @@
 	virtual int getGraphicsMode() const = 0;
 #ifdef USE_RGB_COLOR
 	virtual Graphics::PixelFormat getScreenFormat() const = 0;
-	virtual Common::List<Graphics::PixelFormat> getSupportedFormats() = 0;
+	virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const = 0;
 #endif
 	virtual void initSize(uint width, uint height, const Graphics::PixelFormat *format = NULL) = 0;
 	virtual int getScreenChangeID() const = 0;

Modified: scummvm/branches/gsoc2010-opengl/backends/graphics/opengl/opengl-graphics.h
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/graphics/opengl/opengl-graphics.h	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/graphics/opengl/opengl-graphics.h	2010-07-13 04:31:15 UTC (rev 50840)
@@ -53,7 +53,7 @@
 	virtual int getGraphicsMode() const;
 #ifdef USE_RGB_COLOR
 	virtual Graphics::PixelFormat getScreenFormat() const;
-	virtual Common::List<Graphics::PixelFormat> getSupportedFormats() = 0;
+	virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const = 0;
 #endif
 	virtual void initSize(uint width, uint height, const Graphics::PixelFormat *format = NULL);
 	virtual int getScreenChangeID() const;

Modified: scummvm/branches/gsoc2010-opengl/backends/graphics/openglsdl/openglsdl-graphics.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/graphics/openglsdl/openglsdl-graphics.cpp	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/graphics/openglsdl/openglsdl-graphics.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -57,7 +57,7 @@
 	Graphics::PixelFormat(2, 4, 4, 4, 4, 12, 8, 4, 0),  // RGBA4444
 };
 
-Common::List<Graphics::PixelFormat> OpenGLSdlGraphicsManager::getSupportedFormats() {
+Common::List<Graphics::PixelFormat> OpenGLSdlGraphicsManager::getSupportedFormats() const {
 	static Common::List<Graphics::PixelFormat> list;
 	static bool inited = false;
 

Modified: scummvm/branches/gsoc2010-opengl/backends/graphics/openglsdl/openglsdl-graphics.h
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/graphics/openglsdl/openglsdl-graphics.h	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/graphics/openglsdl/openglsdl-graphics.h	2010-07-13 04:31:15 UTC (rev 50840)
@@ -45,7 +45,7 @@
 	virtual void init();
 
 #ifdef USE_RGB_COLOR
-	virtual Common::List<Graphics::PixelFormat> getSupportedFormats();
+	virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const;
 #endif
 
 	virtual void warpMouse(int x, int y);

Modified: scummvm/branches/gsoc2010-opengl/backends/graphics/sdl/sdl-graphics.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/graphics/sdl/sdl-graphics.cpp	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/graphics/sdl/sdl-graphics.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -29,6 +29,7 @@
 #include "common/system.h"
 #include "common/config-manager.h"
 #include "common/mutex.h"
+#include "common/translation.h"
 #include "common/util.h"
 #ifdef USE_RGB_COLOR
 #include "common/list.h"
@@ -41,7 +42,7 @@
 #include "backends/events/sdl/sdl-events.h"
 
 static const OSystem::GraphicsMode s_supportedGraphicsModes[] = {
-	{"1x", "Normal (no scaling)", GFX_NORMAL},
+	{"1x", _s("Normal (no scaling)"), GFX_NORMAL},
 #ifdef USE_SCALERS
 	{"2x", "2x", GFX_DOUBLESIZE},
 	{"3x", "3x", GFX_TRIPLESIZE},
@@ -97,11 +98,11 @@
 }
 
 #if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) && defined(USE_SCALERS)
-static const size_t AR_COUNT = 4;
-static const char*       desiredAspectRatioAsStrings[AR_COUNT] = {            "auto",            "4/3",            "16/9",            "16/10" };
-static const AspectRatio desiredAspectRatios[AR_COUNT]         = { AspectRatio(0, 0), AspectRatio(4,3), AspectRatio(16,9), AspectRatio(16,10) };
+static AspectRatio getDesiredAspectRatio() {
+	const size_t AR_COUNT = 4;
+	const char*       desiredAspectRatioAsStrings[AR_COUNT] = {            "auto",            "4/3",            "16/9",            "16/10" };
+	const AspectRatio desiredAspectRatios[AR_COUNT]         = { AspectRatio(0, 0), AspectRatio(4,3), AspectRatio(16,9), AspectRatio(16,10) };
 
-static AspectRatio getDesiredAspectRatio() {
 	//TODO : We could parse an arbitrary string, if we code enough proper validation
 	Common::String desiredAspectRatio = ConfMan.get("desired_screen_aspect_ratio");
 
@@ -359,46 +360,54 @@
 }
 
 #ifdef USE_RGB_COLOR
-const Graphics::PixelFormat RGBList[] = {
+Common::List<Graphics::PixelFormat> SdlGraphicsManager::getSupportedFormats() const {
+	assert(!_supportedFormats.empty());
+	return _supportedFormats;
+}
+
+void SdlGraphicsManager::detectSupportedFormats() {
+
+	// Clear old list
+	_supportedFormats.clear();
+
+	// Some tables with standard formats that we always list
+	// as "supported". If frontend code tries to use one of
+	// these, we will perform the necessary format
+	// conversion in the background. Of course this incurs a
+	// performance hit, but on desktop ports this should not
+	// matter. We still push the currently active format to
+	// the front, so if frontend code just uses the first
+	// available format, it will get one that is "cheap" to
+	// use.
+	const Graphics::PixelFormat RGBList[] = {
 #ifdef ENABLE_32BIT
-	// RGBA8888, ARGB8888, RGB888
-	Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0),
-	Graphics::PixelFormat(4, 8, 8, 8, 8, 16, 8, 0, 24),
-	Graphics::PixelFormat(3, 8, 8, 8, 0, 16, 8, 0, 0),
+		// RGBA8888, ARGB8888, RGB888
+		Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0),
+		Graphics::PixelFormat(4, 8, 8, 8, 8, 16, 8, 0, 24),
+		Graphics::PixelFormat(3, 8, 8, 8, 0, 16, 8, 0, 0),
 #endif
-	// RGB565, XRGB1555, RGB555, RGBA4444, ARGB4444
-	Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0),
-	Graphics::PixelFormat(2, 5, 5, 5, 1, 10, 5, 0, 15),
-	Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0),
-	Graphics::PixelFormat(2, 4, 4, 4, 4, 12, 8, 4, 0),
-	Graphics::PixelFormat(2, 4, 4, 4, 4, 8, 4, 0, 12)
-};
-const Graphics::PixelFormat BGRList[] = {
+		// RGB565, XRGB1555, RGB555, RGBA4444, ARGB4444
+		Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0),
+		Graphics::PixelFormat(2, 5, 5, 5, 1, 10, 5, 0, 15),
+		Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0),
+		Graphics::PixelFormat(2, 4, 4, 4, 4, 12, 8, 4, 0),
+		Graphics::PixelFormat(2, 4, 4, 4, 4, 8, 4, 0, 12)
+	};
+	const Graphics::PixelFormat BGRList[] = {
 #ifdef ENABLE_32BIT
-	// ABGR8888, BGRA8888, BGR888
-	Graphics::PixelFormat(4, 8, 8, 8, 8, 0, 8, 16, 24),
-	Graphics::PixelFormat(4, 8, 8, 8, 8, 8, 16, 24, 0),
-	Graphics::PixelFormat(3, 8, 8, 8, 0, 0, 8, 16, 0),
+		// ABGR8888, BGRA8888, BGR888
+		Graphics::PixelFormat(4, 8, 8, 8, 8, 0, 8, 16, 24),
+		Graphics::PixelFormat(4, 8, 8, 8, 8, 8, 16, 24, 0),
+		Graphics::PixelFormat(3, 8, 8, 8, 0, 0, 8, 16, 0),
 #endif
-	// BGR565, XBGR1555, BGR555, ABGR4444, BGRA4444
-	Graphics::PixelFormat(2, 5, 6, 5, 0, 0, 5, 11, 0),
-	Graphics::PixelFormat(2, 5, 5, 5, 1, 0, 5, 10, 15),
-	Graphics::PixelFormat(2, 5, 5, 5, 0, 0, 5, 10, 0),
-	Graphics::PixelFormat(2, 4, 4, 4, 4, 0, 4, 8, 12),
-	Graphics::PixelFormat(2, 4, 4, 4, 4, 4, 8, 12, 0)
-};
+		// BGR565, XBGR1555, BGR555, ABGR4444, BGRA4444
+		Graphics::PixelFormat(2, 5, 6, 5, 0, 0, 5, 11, 0),
+		Graphics::PixelFormat(2, 5, 5, 5, 1, 0, 5, 10, 15),
+		Graphics::PixelFormat(2, 5, 5, 5, 0, 0, 5, 10, 0),
+		Graphics::PixelFormat(2, 4, 4, 4, 4, 0, 4, 8, 12),
+		Graphics::PixelFormat(2, 4, 4, 4, 4, 4, 8, 12, 0)
+	};
 
-// TODO: prioritize matching alpha masks
-Common::List<Graphics::PixelFormat> SdlGraphicsManager::getSupportedFormats() {
-	static Common::List<Graphics::PixelFormat> list;
-	static bool inited = false;
-
-	if (inited)
-		return list;
-
-	bool BGR = false;
-	int listLength = ARRAYSIZE(RGBList);
-
 	Graphics::PixelFormat format = Graphics::PixelFormat::createFormatCLUT8();
 	if (_hwscreen) {
 		// Get our currently set hardware format
@@ -413,30 +422,30 @@
 			format.aLoss = 8;
 
 		// Push it first, as the prefered format.
-		list.push_back(format);
+		_supportedFormats.push_back(format);
+	}
 
-		if (format.bShift > format.rShift)
-			BGR = true;
+	// TODO: prioritize matching alpha masks
+	int i;
 
-		// Mark that we don't need to do this any more.
-		inited = true;
+	// Push some RGB formats
+	for (i = 0; i < ARRAYSIZE(RGBList); i++) {
+		if (_hwscreen && (RGBList[i].bytesPerPixel > format.bytesPerPixel))
+			continue;
+		if (RGBList[i] != format)
+			_supportedFormats.push_back(RGBList[i]);
 	}
 
-	for (int i = 0; i < listLength; i++) {
-		if (inited && (RGBList[i].bytesPerPixel > format.bytesPerPixel))
+	// Push some BGR formats
+	for (i = 0; i < ARRAYSIZE(BGRList); i++) {
+		if (_hwscreen && (BGRList[i].bytesPerPixel > format.bytesPerPixel))
 			continue;
-		if (BGR) {
-			if (BGRList[i] != format)
-				list.push_back(BGRList[i]);
-			list.push_back(RGBList[i]);
-		} else {
-			if (RGBList[i] != format)
-				list.push_back(RGBList[i]);
-			list.push_back(BGRList[i]);
-		}
+		if (BGRList[i] != format)
+			_supportedFormats.push_back(BGRList[i]);
 	}
-	list.push_back(Graphics::PixelFormat::createFormatCLUT8());
-	return list;
+
+	// Finally, we always supposed 8 bit palette graphics
+	_supportedFormats.push_back(Graphics::PixelFormat::createFormatCLUT8());
 }
 #endif
 
@@ -718,6 +727,10 @@
 	_hwscreen = SDL_SetVideoMode(_videoMode.hardwareWidth, _videoMode.hardwareHeight, 16,
 		_videoMode.fullscreen ? (SDL_FULLSCREEN|SDL_SWSURFACE) : SDL_SWSURFACE
 	);
+#ifdef USE_RGB_COLOR
+	detectSupportedFormats();
+#endif
+
 	if (_hwscreen == NULL) {
 		// DON'T use error(), as this tries to bring up the debug
 		// console, which WON'T WORK now that _hwscreen is hosed.
@@ -1531,6 +1544,10 @@
 void SdlGraphicsManager::warpMouse(int x, int y) {
 	int y1 = y;
 
+	// Don't change mouse position, when mouse is outside of our window (in case of windowed mode)
+	if (!(SDL_GetAppState( ) & SDL_APPMOUSEFOCUS))
+		return;
+
 	if (_videoMode.aspectRatioCorrection && !_overlayVisible)
 		y1 = real2Aspect(y);
 

Modified: scummvm/branches/gsoc2010-opengl/backends/graphics/sdl/sdl-graphics.h
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/graphics/sdl/sdl-graphics.h	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/graphics/sdl/sdl-graphics.h	2010-07-13 04:31:15 UTC (rev 50840)
@@ -87,7 +87,7 @@
 	virtual int getGraphicsMode() const;
 #ifdef USE_RGB_COLOR
 	virtual Graphics::PixelFormat getScreenFormat() const { return _screenFormat; }
-	virtual Common::List<Graphics::PixelFormat> getSupportedFormats();
+	virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const;
 #endif
 	virtual void initSize(uint w, uint h, const Graphics::PixelFormat *format = NULL);
 	virtual int getScreenChangeID() const { return _screenChangeCount; }
@@ -160,6 +160,13 @@
 #ifdef USE_RGB_COLOR
 	Graphics::PixelFormat _screenFormat;
 	Graphics::PixelFormat _cursorFormat;
+	Common::List<Graphics::PixelFormat> _supportedFormats;
+
+	/**
+	 * Update the list of supported pixel formats.
+	 * This method is invoked by loadGFXMode().
+	 */
+	void detectSupportedFormats();
 #endif
 
 	/** Temporary screen (for scalers) */

Modified: scummvm/branches/gsoc2010-opengl/backends/keymapper/remap-dialog.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/keymapper/remap-dialog.cpp	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/keymapper/remap-dialog.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -31,6 +31,8 @@
 #include "gui/ScrollBarWidget.h"
 #include "gui/ThemeEval.h"
 
+#include "common/translation.h"
+
 namespace Common {
 
 enum {
@@ -44,12 +46,12 @@
 	_keymapper = g_system->getEventManager()->getKeymapper();
 	assert(_keymapper);
 
-	_kmPopUpDesc = new GUI::StaticTextWidget(this, "KeyMapper.PopupDesc", "Keymap:");
+	_kmPopUpDesc = new GUI::StaticTextWidget(this, "KeyMapper.PopupDesc", _("Keymap:"));
 	_kmPopUp = new GUI::PopUpWidget(this, "KeyMapper.Popup");
 
 	_scrollBar = new GUI::ScrollBarWidget(this, 0, 0, 0, 0);
 
-	new GUI::ButtonWidget(this, "KeyMapper.Close", "Close", kCloseCmd);
+	new GUI::ButtonWidget(this, "KeyMapper.Close", _("Close"), 0, kCloseCmd);
 }
 
 RemapDialog::~RemapDialog() {
@@ -61,7 +63,7 @@
 	const Stack<Keymapper::MapRecord> &activeKeymaps = _keymapper->getActiveStack();
 
 	if (!(activeKeymaps.size() > 0)) {
-		_kmPopUp->appendEntry(activeKeymaps.top().keymap->getName() + " (Active)");
+		_kmPopUp->appendEntry(activeKeymaps.top().keymap->getName() + _(" (Active)"));
 		divider = true;
 	}
 
@@ -95,7 +97,7 @@
 		if (divider)
 			_kmPopUp->appendEntry("");
 		for (it = _globalKeymaps->begin(); it != _globalKeymaps->end(); ++it) {
-			_kmPopUp->appendEntry(it->_value->getName() + " (Global)", idx);
+			_kmPopUp->appendEntry(it->_value->getName() + _(" (Global)"), idx);
 			_keymapTable[idx++] = it->_value;
 		}
 		divider = true;
@@ -105,7 +107,7 @@
 		if (divider)
 			_kmPopUp->appendEntry("");
 		for (it = _gameKeymaps->begin(); it != _gameKeymaps->end(); ++it) {
-			_kmPopUp->appendEntry(it->_value->getName() + " (Game)", idx);
+			_kmPopUp->appendEntry(it->_value->getName() + _(" (Game)"), idx);
 			_keymapTable[idx++] = it->_value;
 		}
 	}
@@ -168,7 +170,7 @@
 			widg.actionText =
 				new GUI::StaticTextWidget(this, 0, 0, 0, 0, "", Graphics::kTextAlignRight);
 			widg.keyButton =
-				new GUI::ButtonWidget(this, 0, 0, 0, 0, "", kRemapCmd + i);
+				new GUI::ButtonWidget(this, 0, 0, 0, 0, "", 0, kRemapCmd + i);
 			_keymapWidgets.push_back(widg);
 		} else {
 			widg = _keymapWidgets[i];

Modified: scummvm/branches/gsoc2010-opengl/backends/midi/alsa.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/midi/alsa.cpp	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/midi/alsa.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -269,7 +269,7 @@
 	}
 
 	MusicDevices getDevices() const;
-	Common::Error createInstance(MidiDriver **mididriver) const;
+	Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const;
 };
 
 #define perm_ok(pinfo,bits) ((snd_seq_port_info_get_capability(pinfo) & (bits)) == (bits))
@@ -315,21 +315,12 @@
 	return devices;
 }
 
-Common::Error AlsaMusicPlugin::createInstance(MidiDriver **mididriver) const {
+Common::Error AlsaMusicPlugin::createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle) const {
 	*mididriver = new MidiDriver_ALSA();
 
 	return Common::kNoError;
 }
 
-MidiDriver *MidiDriver_ALSA_create() {
-	MidiDriver *mididriver;
-
-	AlsaMusicPlugin p;
-	p.createInstance(&mididriver);
-
-	return mididriver;
-}
-
 //#if PLUGIN_ENABLED_DYNAMIC(ALSA)
 	//REGISTER_PLUGIN_DYNAMIC(ALSA, PLUGIN_TYPE_MUSIC, AlsaMusicPlugin);
 //#else

Modified: scummvm/branches/gsoc2010-opengl/backends/midi/camd.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/midi/camd.cpp	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/midi/camd.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -177,7 +177,7 @@
 	}
 
 	MusicDevices getDevices() const;
-	Common::Error createInstance(MidiDriver **mididriver) const;
+	Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const;
 };
 
 MusicDevices CamdMusicPlugin::getDevices() const {
@@ -188,21 +188,12 @@
 	return devices;
 }
 
-Common::Error CamdMusicPlugin::createInstance(MidiDriver **mididriver) const {
+Common::Error CamdMusicPlugin::createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle) const {
 	*mididriver = new MidiDriver_CAMD();
 
 	return Common::kNoError;
 }
 
-MidiDriver *MidiDriver_CAMD_create() {
-	MidiDriver *mididriver;
-
-	CamdMusicPlugin p;
-	p.createInstance(&mididriver);
-
-	return mididriver;
-}
-
 //#if PLUGIN_ENABLED_DYNAMIC(CAMD)
 	//REGISTER_PLUGIN_DYNAMIC(CAMD, PLUGIN_TYPE_MUSIC, CamdMusicPlugin);
 //#else

Modified: scummvm/branches/gsoc2010-opengl/backends/midi/coreaudio.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/midi/coreaudio.cpp	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/midi/coreaudio.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -218,7 +218,7 @@
 	}
 
 	MusicDevices getDevices() const;
-	Common::Error createInstance(MidiDriver **mididriver) const;
+	Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const;
 };
 
 MusicDevices CoreAudioMusicPlugin::getDevices() const {
@@ -229,21 +229,12 @@
 	return devices;
 }
 
-Common::Error CoreAudioMusicPlugin::createInstance(MidiDriver **mididriver) const {
+Common::Error CoreAudioMusicPlugin::createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle) const {
 	*mididriver = new MidiDriver_CORE();
 
 	return Common::kNoError;
 }
 
-MidiDriver *MidiDriver_CORE_create() {
-	MidiDriver *mididriver;
-
-	CoreAudioMusicPlugin p;
-	p.createInstance(&mididriver);
-
-	return mididriver;
-}
-
 //#if PLUGIN_ENABLED_DYNAMIC(COREAUDIO)
 	//REGISTER_PLUGIN_DYNAMIC(COREAUDIO, PLUGIN_TYPE_MUSIC, CoreAudioMusicPlugin);
 //#else

Modified: scummvm/branches/gsoc2010-opengl/backends/midi/coremidi.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/midi/coremidi.cpp	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/midi/coremidi.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -190,7 +190,7 @@
 	}
 
 	MusicDevices getDevices() const;
-	Common::Error createInstance(MidiDriver **mididriver) const;
+	Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const;
 };
 
 MusicDevices CoreMIDIMusicPlugin::getDevices() const {
@@ -201,21 +201,12 @@
 	return devices;
 }
 
-Common::Error CoreMIDIMusicPlugin::createInstance(MidiDriver **mididriver) const {
+Common::Error CoreMIDIMusicPlugin::createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle) const {
 	*mididriver = new MidiDriver_CoreMIDI();
 
 	return Common::kNoError;
 }
 
-MidiDriver *MidiDriver_CoreMIDI_create() {
-	MidiDriver *mididriver;
-
-	CoreMIDIMusicPlugin p;
-	p.createInstance(&mididriver);
-
-	return mididriver;
-}
-
 //#if PLUGIN_ENABLED_DYNAMIC(COREMIDI)
 	//REGISTER_PLUGIN_DYNAMIC(COREMIDI, PLUGIN_TYPE_MUSIC, CoreMIDIMusicPlugin);
 //#else

Modified: scummvm/branches/gsoc2010-opengl/backends/midi/dmedia.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/midi/dmedia.cpp	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/midi/dmedia.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -199,7 +199,7 @@
 	}
 
 	MusicDevices getDevices() const;
-	Common::Error createInstance(MidiDriver **mididriver) const;
+	Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const;
 };
 
 MusicDevices DMediaMusicPlugin::getDevices() const {
@@ -224,21 +224,12 @@
 	return devices;
 }
 
-Common::Error DMediaMusicPlugin::createInstance(MidiDriver **mididriver) const {
+Common::Error DMediaMusicPlugin::createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle) const {
 	*mididriver = new MidiDriver_DMEDIA();
 
 	return Common::kNoError;
 }
 
-MidiDriver *MidiDriver_DMEDIA_create() {
-	MidiDriver *mididriver;
-
-	DMediaMusicPlugin p;
-	p.createInstance(&mididriver);
-
-	return mididriver;
-}
-
 //#if PLUGIN_ENABLED_DYNAMIC(DMEDIA)
 	//REGISTER_PLUGIN_DYNAMIC(DMEDIA, PLUGIN_TYPE_MUSIC, DMediaMusicPlugin);
 //#else

Modified: scummvm/branches/gsoc2010-opengl/backends/midi/seq.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/midi/seq.cpp	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/midi/seq.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -28,7 +28,7 @@
  *    both the QuickTime support and (vkeybd http://www.alsa-project.org/~iwai/alsa.html)
  */
 
-#if defined(UNIX) && !defined(__BEOS__) && !defined(__MAEMO__) && !defined(__MINT__)
+#if defined(UNIX) && !defined(__BEOS__) && !defined(__MAEMO__) && !defined(__MINT__) && !defined(__ANDROID__)
 
 #include "common/util.h"
 #include "sound/musicplugin.h"
@@ -184,7 +184,7 @@
 	}
 
 	MusicDevices getDevices() const;
-	Common::Error createInstance(MidiDriver **mididriver) const;
+	Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const;
 };
 
 MusicDevices SeqMusicPlugin::getDevices() const {
@@ -195,21 +195,12 @@
 	return devices;
 }
 
-Common::Error SeqMusicPlugin::createInstance(MidiDriver **mididriver) const {
+Common::Error SeqMusicPlugin::createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle) const {
 	*mididriver = new MidiDriver_SEQ();
 
 	return Common::kNoError;
 }
 
-MidiDriver *MidiDriver_SEQ_create() {
-	MidiDriver *mididriver;
-
-	SeqMusicPlugin p;
-	p.createInstance(&mididriver);
-
-	return mididriver;
-}
-
 //#if PLUGIN_ENABLED_DYNAMIC(SEQ)
 	//REGISTER_PLUGIN_DYNAMIC(SEQ, PLUGIN_TYPE_MUSIC, SeqMusicPlugin);
 //#else

Modified: scummvm/branches/gsoc2010-opengl/backends/midi/stmidi.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/midi/stmidi.cpp	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/midi/stmidi.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -127,8 +127,7 @@
         }
 
         MusicDevices getDevices() const;
-        Common::Error createInstance(MidiDriver **mididriver)
- const;
+		Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const;
 };
 
 MusicDevices StMidiMusicPlugin::getDevices() const {
@@ -139,21 +138,12 @@
         return devices;
 }
 
-Common::Error StMidiMusicPlugin::createInstance(MidiDriver **mididriver) const {
+Common::Error StMidiMusicPlugin::createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle) const {
         *mididriver = new MidiDriver_STMIDI();
 
         return Common::kNoError;
 }
 
-MidiDriver *MidiDriver_STMIDI_create() {
-        MidiDriver *mididriver;
-
-        StMidiMusicPlugin p;
-        p.createInstance(&mididriver);
-
-        return mididriver;
-}
-
 //#if PLUGIN_ENABLED_DYNAMIC(STMIDI)
         //REGISTER_PLUGIN_DYNAMIC(STMIDI, PLUGIN_TYPE_MUSIC, StMidiMusicPlugin);
 //#else

Modified: scummvm/branches/gsoc2010-opengl/backends/midi/timidity.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/midi/timidity.cpp	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/midi/timidity.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -530,7 +530,7 @@
 	}
 
 	MusicDevices getDevices() const;
-	Common::Error createInstance(MidiDriver **mididriver) const;
+	Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const;
 };
 
 MusicDevices TimidityMusicPlugin::getDevices() const {
@@ -539,21 +539,12 @@
 	return devices;
 }
 
-Common::Error TimidityMusicPlugin::createInstance(MidiDriver **mididriver) const {
+Common::Error TimidityMusicPlugin::createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle) const {
 	*mididriver = new MidiDriver_TIMIDITY();
 
 	return Common::kNoError;
 }
 
-MidiDriver *MidiDriver_TIMIDITY_create() {
-	MidiDriver *mididriver;
-
-	TimidityMusicPlugin p;
-	p.createInstance(&mididriver);
-
-	return mididriver;
-}
-
 //#if PLUGIN_ENABLED_DYNAMIC(TIMIDITY)
 	//REGISTER_PLUGIN_DYNAMIC(TIMIDITY, PLUGIN_TYPE_MUSIC, TimidityMusicPlugin);
 //#else

Modified: scummvm/branches/gsoc2010-opengl/backends/midi/windows.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/midi/windows.cpp	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/midi/windows.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -24,12 +24,15 @@
 
 #if defined(WIN32) && !defined(_WIN32_WCE)
 
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 // winnt.h defines ARRAYSIZE, but we want our own one...
 #undef ARRAYSIZE
 
 #include "sound/musicplugin.h"
 #include "sound/mpu401.h"
+#include "common/config-manager.h"
+#include "common/translation.h"
 
 #include <mmsystem.h>
 
@@ -46,11 +49,12 @@
 	HANDLE _streamEvent;
 	HMIDIOUT _mo;
 	bool _isOpen;
+	int _device;
 
 	void check_error(MMRESULT result);
 
 public:
-	MidiDriver_WIN() : _isOpen(false) { }
+	MidiDriver_WIN(int deviceIndex) : _isOpen(false), _device(deviceIndex) { }
 	int open();
 	void close();
 	void send(uint32 b);
@@ -62,7 +66,7 @@
 		return MERR_ALREADY_OPEN;
 
 	_streamEvent = CreateEvent(NULL, true, true, NULL);
-	MMRESULT res = midiOutOpen((HMIDIOUT *)&_mo, MIDI_MAPPER, (DWORD_PTR)_streamEvent, 0, CALLBACK_EVENT);
+	MMRESULT res = midiOutOpen((HMIDIOUT *)&_mo, _device, (DWORD_PTR)_streamEvent, 0, CALLBACK_EVENT);
 	if (res != MMSYSERR_NOERROR) {
 		check_error(res);
 		CloseHandle(_streamEvent);
@@ -150,7 +154,7 @@
 class WindowsMusicPlugin : public MusicPluginObject {
 public:
 	const char *getName() const {
-		return "Windows MIDI";
+		return _s("Windows MIDI");
 	}
 
 	const char *getId() const {
@@ -158,32 +162,43 @@
 	}
 
 	MusicDevices getDevices() const;
-	Common::Error createInstance(MidiDriver **mididriver) const;
+	Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const;
 };
 
 MusicDevices WindowsMusicPlugin::getDevices() const {
 	MusicDevices devices;
-	// TODO: Return a different music type depending on the configuration
-	// TODO: List the available devices
-	devices.push_back(MusicDevice(this, "", MT_GM));
+	int numDevs = midiOutGetNumDevs();
+	MIDIOUTCAPS tmp;
+
+	for (int i = 0; i < numDevs; i++) {
+		if (midiOutGetDevCaps(i, &tmp, sizeof(MIDIOUTCAPS)) != MMSYSERR_NOERROR)
+			break;
+		// There is no way to detect the "MusicType" so I just set it to MT_GM
+		// The user will have to manually select his MT32 type device and his GM type device.
+		devices.push_back(MusicDevice(this, tmp.szPname, MT_GM));
+	}
 	return devices;
 }
 
-Common::Error WindowsMusicPlugin::createInstance(MidiDriver **mididriver) const {
-	*mididriver = new MidiDriver_WIN();
+Common::Error WindowsMusicPlugin::createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle dev) const {
+	int devIndex = 0;
+	bool found = false;
 
+	if (dev) {
+		MusicDevices i = getDevices();
+		for (MusicDevices::iterator d = i.begin(); d != i.end(); d++) {
+			if (d->getCompleteId().equals(MidiDriver::getDeviceString(dev, MidiDriver::kDeviceId))) {
+				found = true;
+				break;
+			}
+			devIndex++;
+		}
+	}
+
+	*mididriver = new MidiDriver_WIN(found ? devIndex : 0);
 	return Common::kNoError;
 }
 
-MidiDriver *MidiDriver_WIN_create() {
-	MidiDriver *mididriver;
-
-	WindowsMusicPlugin p;
-	p.createInstance(&mididriver);
-
-	return mididriver;
-}
-
 //#if PLUGIN_ENABLED_DYNAMIC(WINDOWS)
 	//REGISTER_PLUGIN_DYNAMIC(WINDOWS, PLUGIN_TYPE_MUSIC, WindowsMusicPlugin);
 //#else

Modified: scummvm/branches/gsoc2010-opengl/backends/midi/ypa1.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/midi/ypa1.cpp	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/midi/ypa1.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -117,7 +117,7 @@
 	}
 
 	MusicDevices getDevices() const;
-	Common::Error createInstance(MidiDriver **mididriver) const;
+	Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const;
 };
 
 MusicDevices YamahaPa1MusicPlugin::getDevices() const {
@@ -128,21 +128,12 @@
 	return devices;
 }
 
-Common::Error YamahaPa1MusicPlugin::createInstance(MidiDriver **mididriver) const {
+Common::Error YamahaPa1MusicPlugin::createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle) const {
 	*mididriver = new MidiDriver_YamahaPa1();
 
 	return Common::kNoError;
 }
 
-MidiDriver *MidiDriver_YamahaPa1_create() {
-	MidiDriver *mididriver;
-
-	YamahaPa1MusicPlugin p;
-	p.createInstance(&mididriver);
-
-	return mididriver;
-}
-
 //#if PLUGIN_ENABLED_DYNAMIC(YPA1)
 	//REGISTER_PLUGIN_DYNAMIC(YPA1, PLUGIN_TYPE_MUSIC, YamahaPa1MusicPlugin);
 //#else

Modified: scummvm/branches/gsoc2010-opengl/backends/midi/zodiac.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/midi/zodiac.cpp	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/midi/zodiac.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -135,7 +135,7 @@
 	}
 
 	MusicDevices getDevices() const;
-	Common::Error createInstance(MidiDriver **mididriver) const;
+	Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const;
 };
 
 MusicDevices ZodiacMusicPlugin::getDevices() const {
@@ -146,21 +146,12 @@
 	return devices;
 }
 
-Common::Error ZodiacMusicPlugin::createInstance(MidiDriver **mididriver) const {
+Common::Error ZodiacMusicPlugin::createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle) const {
 	*mididriver = new MidiDriver_Zodiac();
 
 	return Common::kNoError;
 }
 
-MidiDriver *MidiDriver_Zodiac_create() {
-	MidiDriver *mididriver;
-
-	ZodiacMusicPlugin p;
-	p.createInstance(&mididriver);
-
-	return mididriver;
-}
-
 //#if PLUGIN_ENABLED_DYNAMIC(ZODIAC)
 	//REGISTER_PLUGIN_DYNAMIC(ZODIAC, PLUGIN_TYPE_MUSIC, ZodiacMusicPlugin);
 //#else

Modified: scummvm/branches/gsoc2010-opengl/backends/modular-backend.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/modular-backend.cpp	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/modular-backend.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -92,13 +92,15 @@
 }
 
 #ifdef USE_RGB_COLOR
+
 Graphics::PixelFormat ModularBackend::getScreenFormat() const {
 	return _graphicsManager->getScreenFormat();
 }
 
-Common::List<Graphics::PixelFormat> ModularBackend::getSupportedFormats() {
+Common::List<Graphics::PixelFormat> ModularBackend::getSupportedFormats() const {
 	return _graphicsManager->getSupportedFormats();
 }
+
 #endif
 
 void ModularBackend::initSize(uint w, uint h, const Graphics::PixelFormat *format ) {

Modified: scummvm/branches/gsoc2010-opengl/backends/modular-backend.h
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/modular-backend.h	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/modular-backend.h	2010-07-13 04:31:15 UTC (rev 50840)
@@ -76,7 +76,7 @@
 	virtual int getGraphicsMode() const;
 #ifdef USE_RGB_COLOR
 	virtual Graphics::PixelFormat getScreenFormat() const;
-	virtual Common::List<Graphics::PixelFormat> getSupportedFormats();
+	virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const;
 #endif
 	virtual void initSize(uint width, uint height, const Graphics::PixelFormat *format = NULL);
 	virtual int getScreenChangeID() const;

Modified: scummvm/branches/gsoc2010-opengl/backends/module.mk
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/module.mk	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/module.mk	2010-07-13 04:31:15 UTC (rev 50840)
@@ -29,6 +29,7 @@
 	graphics/gp2xwizsdl/gp2xwizsdl-graphics.o \
 	graphics/linuxmotosdl/linuxmotosdl-graphics.o \
 	graphics/opengl/glerrorcheck.o \
+	graphics/opengl/gltexture.o \
 	graphics/opengl/opengl-graphics.o \
 	graphics/openglsdl/openglsdl-graphics.o \
 	graphics/sdl/sdl-graphics.o \

Modified: scummvm/branches/gsoc2010-opengl/backends/platform/PalmOS/Src/launcher/forms/formSkins.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/platform/PalmOS/Src/launcher/forms/formSkins.cpp	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/platform/PalmOS/Src/launcher/forms/formSkins.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -107,7 +107,7 @@
 	listP = (ListType *)GetObjectPtr(SkinsSkinList);
 	selected = LstGetSelection(listP);
 
-	if (bSave && selected == -1)	{	// may never occured...
+	if (bSave && selected == -1)	{	// may never occurred...
 		FrmCustomAlert(FrmWarnAlert, "You didn't select a skin.", 0, 0);
 		return;
 	}
@@ -164,7 +164,7 @@
 	listP = (ListType *)GetObjectPtr(SkinsSkinList);
 	selected = LstGetSelection(listP);
 
-	if (selected == -1)	{	// may never occured...
+	if (selected == -1)	{	// may never occurred...
 		FrmCustomAlert(FrmWarnAlert, "You didn't select a skin.", 0, 0);
 		return;
 	}
@@ -187,7 +187,7 @@
 	listP = (ListType *)GetObjectPtr(SkinsSkinList);
 	selected = LstGetSelection(listP);
 
-	if (selected == -1)	{	// may never occured...
+	if (selected == -1)	{	// may never occurred...
 		FrmCustomAlert(FrmInfoAlert, "You didn't select a skin.", 0, 0);
 		return;
 	}

Modified: scummvm/branches/gsoc2010-opengl/backends/platform/PalmOS/Src/launcher/forms/formmusic.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/platform/PalmOS/Src/launcher/forms/formmusic.cpp	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/platform/PalmOS/Src/launcher/forms/formmusic.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -258,7 +258,7 @@
 		ogameInfoP = (GameInfoType *)MemHandleLock(recordH);
 
 		if (!ogameInfoP) {
-			FrmCustomAlert(FrmErrorAlert, "An error occured.",0,0);
+			FrmCustomAlert(FrmErrorAlert, "An error occurred.",0,0);
 			return;
 		}
 

Modified: scummvm/branches/gsoc2010-opengl/backends/platform/PalmOS/Src/launcher/launch.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/platform/PalmOS/Src/launcher/launch.cpp	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/platform/PalmOS/Src/launcher/launch.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -468,7 +468,7 @@
 		return false;
 	}
 
-	// reset mode if screen rotation occured (DIA only)
+	// reset mode if screen rotation occurred (DIA only)
 	if (!direct && OPTIONS_TST(kOptCollapsible)) {
 		UInt8 mode = PalmScreenSize(0,0, &(gVars->screenFullWidth), &(gVars->screenFullHeight));
 		OPTIONS_RST(kOptModeLandscape);

Modified: scummvm/branches/gsoc2010-opengl/backends/platform/android/README.build
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/platform/android/README.build	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/platform/android/README.build	2010-07-13 04:31:15 UTC (rev 50840)
@@ -2,41 +2,38 @@
 =================================
 
 You will need these things to build:
-1. Android EGL headers and library
-2. Android SDK
-3. An arm-android-eabi GCC toolchain
+1. Android SDK
+2. An arm-oe-linux-androideabi GCC toolchain(*)
 
 In the example commands, we are going to build against the Android 1.5
 native ABI (but using the Android 1.6 SDK tools).  Other version
 combinations might/should be possible with a bit of tweaking.
 
-In detail:
+(*) Any other sane Android toolchain should be easy to use, but this
+is the toolchain prefix that is used by default.  You can trivially
+find and modify the single location where it appears in ./configure if
+you have some other prefix variation.
 
-1. Android EGL headers and library
 
-You can build these from the full Android source, but it is far easier
-to just download the 3 Android EGL headers from here:
- http://android.git.kernel.org/?p=platform/frameworks/base.git;a=tree;f=opengl/include/EGL;hb=HEAD
- (copy them to a directory called "EGL" somewhere)
+In detail:
 
-... and grab libEGL.so off an existing phone/emulator:
- adb pull /system/lib/libEGL.so /tmp
+1. Android SDK
 
-2. Android SDK
+Download the SDK from http://developer.android.com/ and install
+somewhere.  You will need both the API level 8 (aka Android 2.2) and
+API level 3 (aka Android 1.5) platforms.
 
-Download and install somewhere.
+2. arm-*-linux-androideabi GCC toolchain
 
-3. arm-android-eabi GCC toolchain
-
 You have several choices for toolchains:
 
-- Use Google arm-eabi prebuilt toolchain.
+ - Use Google arm-eabi prebuilt toolchain.
 
 This is shipped with both the Android source release and Android NDK.
 The problem is that "arm-eabi-gcc" can't actually link anything
 successfully without extra command line flags.  To use this with the
 ScummVM configure/build environment you will need to create a family
-of shell wrapper scripts that convert "arm-android-eabi-foo" to
+of shell wrapper scripts that convert "arm-oe-linux-androideabi-foo" to
 "arm-eabi-foo -mandroid".
 
 For example, I use this script:
@@ -44,18 +41,25 @@
  exec arm-eabi-${0##*-} -mandroid -DANDROID "$@"
 
 ... and create a family of symlinks/hardlinks pointing to it called
-arm-android-eabi-gcc, arm-android-eabi-g++, etc.  For tools that don't
-take a "-mandroid" argument - like arm-eabi-strip - I bypass the shell
-wrapper and just create an arm-android-eabi-strip symlink to the tool
-directly.
+arm-oe-android-linuxeabi-gcc, arm-oe-android-linuxeabi-g++, etc.  For
+tools that don't take a "-mandroid" argument - like arm-eabi-strip - I
+bypass the shell wrapper and just create an arm-oe-android-linuxeabi-strip
+symlink to the tool directly.
 
-- Build your own arm-android-eabi toolchain from GCC source.
+In practice you will probably need significant linker command line
+massaging in order to get the crtbegin/end and libraries all linked in
+the right way.  It's not hard to do manually, but it is annoying to
+script in a general purpose way.
 
-This is lots of fun.  I suggest my Android openembedded patches, see:
-  http://wiki.github.com/anguslees/openembedded-android/
-(You just need to have lots of disk space and type a few commands)
-If you get stuck, ask 
+ - Build your own arm-*-linux-androideabi toolchain from GCC source.
 
+This is lots of fun, but will become significantly easier once gcc-4.6
+is released.  In the interim, I suggest using my precompiled Android
+openembedded-based toolchain:
+ wget http://commondatastorage.googleapis.com/anr/sdk/android-2.2-i686-linux-armv5te-linux-androideabi-toolchain-android.tar.bz2
+ sudo tar jxf android-2.2-i686-linux-armv5te-linux-androideabi-toolchain-android.tar.bz2 -C /
+ . /usr/local/android/arm/environment-setup
+
 Alternatively, do a websearch - there are several other cross-compile
 toolchains around.
 
@@ -63,18 +67,25 @@
 Building ScummVM
 ================
 
+Apply the theme engine patch:
+
+ patch -p1 < backends/platform/android/scummvm-android-themeengine.patch
+
+(Optionally) compress scummmodern.zip:
+(ScummVM usually ships it uncompressed, but Android can read it more
+efficiently if it is compressed *before* adding it to the apk)
+
+ ( cd gui/themes/scummmodern && zip -f ../scummmodern.zip )
+
+Then build ScummVM:
+
  export ANDROID_SDK=<root of Android SDK>
 
  PATH=$ANDROID_SDK/platforms/android-1.6/tools:$ANDROID_SDK/tools:$PATH
- # You also want to ensure your arm-android-eabi toolchain is in your $PATH
+ # You also want to ensure your arm-oe-linux-androideabi toolchain is in $PATH
 
  export ANDROID_TOP=<root of built Android source>
 
- EGL_INC="-I<location of EGL/ header directory>"
- EGL_LIBS="-L<location of libEGL.so>"
-
- CPPFLAGS="$EGL_INC" \
- LDFLAGS="-g $EGL_LIBS" \
  ./configure --backend=android --host=android --enable-zlib #and any other flags
  make scummvm.apk
 

Modified: scummvm/branches/gsoc2010-opengl/backends/platform/android/android.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/platform/android/android.cpp	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/platform/android/android.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -31,10 +31,6 @@
 
 #if defined(ANDROID_BACKEND)
 
-#define ANDROID_VERSION_GE(major,minor) \
-  (ANDROID_MAJOR_VERSION > (major) || \
-   (ANDROID_MAJOR_VERSION == (major) && ANDROID_MINOR_VERSION >= (minor)))
-
 #include <jni.h>
 
 #include <string.h>
@@ -45,7 +41,6 @@
 
 #include <GLES/gl.h>
 #include <GLES/glext.h>
-#include <EGL/egl.h>
 #include <android/log.h>
 
 #include "common/archive.h"
@@ -78,6 +73,14 @@
 #undef JNIEXPORT
 #define JNIEXPORT __attribute__ ((visibility("default")))
 
+// This replaces the bionic libc assert message with something that
+// actually prints the assertion failure before aborting.
+extern "C"
+void __assert(const char *file, int line, const char *expr) {
+	__android_log_assert(expr, LOG_TAG, "%s:%d: Assertion failure: %s",
+						 file, line, expr);
+}
+
 static JavaVM *cached_jvm;
 static jfieldID FID_Event_type;
 static jfieldID FID_Event_synthetic;
@@ -162,20 +165,19 @@
 	jmethodID MID_getPluginDirectories;
 	jmethodID MID_setupScummVMSurface;
 	jmethodID MID_destroyScummVMSurface;
+	jmethodID MID_swapBuffers;
 
 	int _screen_changeid;
-	EGLDisplay _egl_display;
-	EGLSurface _egl_surface;
-	EGLint _egl_surface_width;
-	EGLint _egl_surface_height;
+	int _egl_surface_width;
+	int _egl_surface_height;
 
 	bool _force_redraw;
 
 	// Game layer
 	GLESPaletteTexture* _game_texture;
 	int _shake_offset;
+	Common::Rect _focus_rect;
 	bool _full_screen_dirty;
-	Common::Array<Common::Rect> _dirty_rects;
 
 	// Overlay layer
 	GLES4444Texture* _overlay_texture;
@@ -195,6 +197,7 @@
 	pthread_t _timer_thread;
 	static void* timerThreadFunc(void* arg);
 
+	bool _enable_zoning;
 	bool _virtkeybd_on;
 
 	Common::SaveFileManager *_savefile;
@@ -217,6 +220,11 @@
 	static OSystem_Android* fromJavaObject(JNIEnv* env, jobject obj);
 	virtual void initBackend();
 	void addPluginDirectories(Common::FSList &dirs) const;
+	void enableZoning(bool enable) { _enable_zoning = enable; }
+	void setSurfaceSize(int width, int height) {
+		_egl_surface_width = width;
+		_egl_surface_height = height;
+	}
 
 	virtual bool hasFeature(Feature f);
 	virtual void setFeatureState(Feature f, bool enable);
@@ -297,8 +305,6 @@
 
 OSystem_Android::OSystem_Android(jobject am)
 	: _back_ptr(0),
-	  _egl_display(EGL_NO_DISPLAY),
-	  _egl_surface(EGL_NO_SURFACE),
 	  _screen_changeid(0),
 	  _force_redraw(false),
 	  _game_texture(NULL),
@@ -307,6 +313,7 @@
 	  _use_mouse_palette(false),
 	  _show_mouse(false),
 	  _show_overlay(false),
+	  _enable_zoning(false),
 	  _savefile(0),
 	  _mixer(0),
 	  _timer(0),
@@ -362,6 +369,7 @@
 	FIND_METHOD(getPluginDirectories, "()[Ljava/lang/String;");
 	FIND_METHOD(setupScummVMSurface, "()V");
 	FIND_METHOD(destroyScummVMSurface, "()V");
+	FIND_METHOD(swapBuffers, "()Z");
 
 #undef FIND_METHOD
 
@@ -574,6 +582,7 @@
 }
 
 void OSystem_Android::setupScummVMSurface() {
+	ENTER("setupScummVMSurface");
 	JNIEnv* env = JNU_GetEnv();
 	env->CallVoidMethod(_back_ptr, MID_setupScummVMSurface);
 	if (env->ExceptionCheck())
@@ -581,37 +590,8 @@
 
 	// EGL set up with a new surface.  Initialise OpenGLES context.
 
-	_egl_display = eglGetCurrentDisplay();
-	_egl_surface = eglGetCurrentSurface(EGL_DRAW);
-
-	static bool log_version = true;
-	if (log_version) {
-		__android_log_print(ANDROID_LOG_INFO, LOG_TAG,
-							"Using EGL %s (%s); GL %s/%s (%s)",
-							eglQueryString(_egl_display, EGL_VERSION),
-							eglQueryString(_egl_display, EGL_VENDOR),
-							glGetString(GL_VERSION),
-							glGetString(GL_RENDERER),
-							glGetString(GL_VENDOR));
-		log_version = false;		// only log this once
-	}
-
 	GLESTexture::initGLExtensions();
 
-	if (!eglQuerySurface(_egl_display, _egl_surface,
-						 EGL_WIDTH, &_egl_surface_width) ||
-		!eglQuerySurface(_egl_display, _egl_surface,
-						 EGL_HEIGHT, &_egl_surface_height)) {
-		JNU_ThrowByName(env, "java/lang/RuntimeException",
-						"Error fetching EGL surface width/height");
-		return;
-	}
-	__android_log_print(ANDROID_LOG_INFO, LOG_TAG,
-						"New surface is %dx%d",
-						_egl_surface_width, _egl_surface_height);
-
-	CHECK_GL_ERROR();
-
 	// Turn off anything that looks like 3D ;)
 	glDisable(GL_CULL_FACE);
 	glDisable(GL_DEPTH_TEST);
@@ -645,20 +625,18 @@
 		_mouse_texture->reinitGL();
 
 	glViewport(0, 0, _egl_surface_width, _egl_surface_height);
+
 	glMatrixMode(GL_PROJECTION);
 	glLoadIdentity();
 	glOrthof(0, _egl_surface_width, _egl_surface_height, 0, -1, 1);
-
 	glMatrixMode(GL_MODELVIEW);
 	glLoadIdentity();
 
+	clearFocusRectangle();
 	CHECK_GL_ERROR();
-
-	_force_redraw = true;
 }
 
 void OSystem_Android::destroyScummVMSurface() {
-	_egl_surface = EGL_NO_SURFACE;
 	JNIEnv* env = JNU_GetEnv();
 	env->CallVoidMethod(_back_ptr, MID_destroyScummVMSurface);
 	// Can't use OpenGLES functions after this
@@ -676,7 +654,7 @@
 	_overlay_texture->allocBuffer(overlay_width, overlay_height);
 
 	// Don't know mouse size yet - it gets reallocated in
-	// setMouseCursor.	We need the palette allocated before
+	// setMouseCursor.  We need the palette allocated before
 	// setMouseCursor however, so just take a guess at the desired
 	// size (it's small).
 	_mouse_texture->allocBuffer(20, 20);
@@ -691,7 +669,7 @@
 }
 
 void OSystem_Android::setPalette(const byte* colors, uint start, uint num) {
-		ENTER("setPalette(%p, %u, %u)", colors, start, num);
+	ENTER("setPalette(%p, %u, %u)", colors, start, num);
 
 	if (!_use_mouse_palette)
 		_setCursorPalette(colors, start, num);
@@ -739,8 +717,11 @@
 
 	glPushMatrix();
 
-	if (_shake_offset != 0) {
-		// This is the only case where _game_texture doesn't
+	if (_shake_offset != 0 ||
+		(!_focus_rect.isEmpty() &&
+		 !Common::Rect(_game_texture->width(),
+					   _game_texture->height()).contains(_focus_rect))) {
+		// These are the only cases where _game_texture doesn't
 		// cover the entire screen.
 		glClearColorx(0, 0, 0, 1 << 16);
 		glClear(GL_COLOR_BUFFER_BIT);
@@ -749,15 +730,29 @@
 		glTranslatex(0, -_shake_offset << 16, 0);
 	}
 
-	_game_texture->drawTexture(0, 0,
-				   _egl_surface_width, _egl_surface_height);
+	if (_focus_rect.isEmpty()) {
+		_game_texture->drawTexture(0, 0,
+								   _egl_surface_width, _egl_surface_height);
+	} else {
+		glPushMatrix();
+		glScalex(xdiv(_egl_surface_width, _focus_rect.width()),
+				 xdiv(_egl_surface_height, _focus_rect.height()),
+				 1 << 16);
+		glTranslatex(-_focus_rect.left << 16, -_focus_rect.top << 16, 0);
+		glScalex(xdiv(_game_texture->width(), _egl_surface_width),
+				 xdiv(_game_texture->height(), _egl_surface_height),
+				 1 << 16);
+		_game_texture->drawTexture(0, 0,
+								   _egl_surface_width, _egl_surface_height);
+		glPopMatrix();
+	}
 
 	CHECK_GL_ERROR();
 
 	if (_show_overlay) {
 		_overlay_texture->drawTexture(0, 0,
-						  _egl_surface_width,
-						  _egl_surface_height);
+									  _egl_surface_width,
+									  _egl_surface_height);
 		CHECK_GL_ERROR();
 	}
 
@@ -765,8 +760,8 @@
 		glPushMatrix();
 
 		glTranslatex(-_mouse_hotspot.x << 16,
-				 -_mouse_hotspot.y << 16,
-				 0);
+					 -_mouse_hotspot.y << 16,
+					 0);
 
 		// Scale up ScummVM -> OpenGL (pixel) coordinates
 		int texwidth, texheight;
@@ -778,8 +773,8 @@
 			texheight = getHeight();
 		}
 		glScalex(xdiv(_egl_surface_width, texwidth),
-			 xdiv(_egl_surface_height, texheight),
-			 1 << 16);
+				 xdiv(_egl_surface_height, texheight),
+				 1 << 16);
 
 		// Note the extra half texel to position the mouse in
 		// the middle of the x,y square:
@@ -801,14 +796,11 @@
 
 	CHECK_GL_ERROR();
 
-	if (!eglSwapBuffers(_egl_display, _egl_surface)) {
-		EGLint error = eglGetError();
-		warning("eglSwapBuffers exited with error 0x%x", error);
-		// Some errors mean we need to reinit GL
-		if (error == EGL_CONTEXT_LOST) {
-			destroyScummVMSurface();
-			setupScummVMSurface();
-		}
+	JNIEnv* env = JNU_GetEnv();
+	if (!env->CallBooleanMethod(_back_ptr, MID_swapBuffers)) {
+		// Context lost -> need to reinit GL
+		destroyScummVMSurface();
+		setupScummVMSurface();
 	}
 }
 
@@ -841,26 +833,18 @@
 void OSystem_Android::setFocusRectangle(const Common::Rect& rect) {
 	ENTER("setFocusRectangle(%d,%d,%d,%d)",
 		  rect.left, rect.top, rect.right, rect.bottom);
-#if 0
-	glMatrixMode(GL_PROJECTION);
-	glLoadIdentity();
-	glOrthof(rect.left, rect.right, rect.top, rect.bottom, 0, 1);
-	glMatrixMode(GL_MODELVIEW);
-
-	_force_redraw = true;
-#endif
+	if (_enable_zoning) {
+		_focus_rect = rect;
+		_force_redraw = true;
+	}
 }
 
 void OSystem_Android::clearFocusRectangle() {
 	ENTER("clearFocusRectangle()");
-#if 0
-	glMatrixMode(GL_PROJECTION);
-	glLoadIdentity();
-	glOrthof(0, _egl_surface_width, _egl_surface_height, 0, -1, 1);
-	glMatrixMode(GL_MODELVIEW);
-
-	_force_redraw = true;
-#endif
+	if (_enable_zoning) {
+		_focus_rect = Common::Rect();
+		_force_redraw = true;
+	}
 }
 
 void OSystem_Android::showOverlay() {
@@ -1338,6 +1322,17 @@
 }
 #endif
 
+static void ScummVM_enableZoning(JNIEnv* env, jobject self, jboolean enable) {
+	OSystem_Android* cpp_obj = OSystem_Android::fromJavaObject(env, self);
+	cpp_obj->enableZoning(enable);
+}
+
+static void ScummVM_setSurfaceSize(JNIEnv* env, jobject self,
+								   jint width, jint height) {
+	OSystem_Android* cpp_obj = OSystem_Android::fromJavaObject(env, self);
+	cpp_obj->setSurfaceSize(width, height);	
+}
+
 const static JNINativeMethod gMethods[] = {
 	{ "create", "(Landroid/content/res/AssetManager;)V",
 	  (void*)ScummVM_create },
@@ -1352,6 +1347,10 @@
 	  (void*)ScummVM_setConfManInt },
 	{ "setConfMan", "(Ljava/lang/String;Ljava/lang/String;)V",
 	  (void*)ScummVM_setConfManString },
+	{ "enableZoning", "(Z)V",
+	  (void*)ScummVM_enableZoning },
+	{ "setSurfaceSize", "(II)V",
+	  (void*)ScummVM_setSurfaceSize },
 };
 
 JNIEXPORT jint JNICALL

Modified: scummvm/branches/gsoc2010-opengl/backends/platform/android/android.mk
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/platform/android/android.mk	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/platform/android/android.mk	2010-07-13 04:31:15 UTC (rev 50840)
@@ -4,7 +4,6 @@
 DX = dx
 APKBUILDER = apkbuilder
 ADB = adb -e
-ANDROID_JAR = $(ANDROID_SDK)/platforms/android-1.6/android.jar
 JAVAC ?= javac
 JAVACFLAGS = -source 1.5 -target 1.5
 
@@ -12,6 +11,14 @@
 #LDFLAGS += -Wl,--gc-sections
 #CXXFLAGS += -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden
 
+resources.ap_: $(srcdir)/dists/android/AndroidManifest.xml $(RESOURCES) $(ASSETS) $(ANDROID_JAR8) $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA)
+	$(INSTALL) -d build.tmp/assets/
+	$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) build.tmp/assets/
+	$(AAPT) package -f -M $< -S $(srcdir)/dists/android/res -A build.tmp/assets -I $(ANDROID_JAR8) -F $@
+
+build.tmp/%/resources.ap_: build.tmp/%/AndroidManifest.xml build.stage/%/res/values/strings.xml build.stage/%/res/drawable/scummvm.png $(ANDROID_JAR8)
+	$(AAPT) package -f -M $< -S build.stage/$*/res -I $(ANDROID_JAR8) -F $@
+
 scummvm.apk: build.tmp/libscummvm.so resources.ap_ classes.dex
 	# Package installer won't delete old libscummvm.so on upgrade so
 	# replace it with a zero size file

Modified: scummvm/branches/gsoc2010-opengl/backends/platform/android/module.mk
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/platform/android/module.mk	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/platform/android/module.mk	2010-07-13 04:31:15 UTC (rev 50840)
@@ -39,14 +39,22 @@
 #ANDROID_VERSIONCODE = 6  Specified in dists/android/AndroidManifest.xml.in
 ANDROID_PLUGIN_VERSIONCODE = 6
 
+# This is a bit silly.  I want to compile against the 1.6 android.jar,
+# to make the compiler check that I don't use something that requires
+# a newer Android.  However, in order to use android:installLocation,
+# we need to give aapt a version >=8 android.jar - even though the
+# result will work ok on 1.5+.
+ANDROID_JAR = $(ANDROID_SDK)/platforms/android-1.5/android.jar
+ANDROID_JAR8 = $(ANDROID_SDK)/platforms/android-8/android.jar
+
 # This library contains scummvm proper
 build.tmp/libscummvm.so: $(OBJS)
 	@$(MKDIR) -p $(@D)
-	$(CXX) $(PLUGIN_LDFLAGS) -shared $(LDFLAGS) -Wl,-soname,$(@F) -Wl,--no-undefined -o $@ $(PRE_OBJS_FLAGS) $(OBJS) $(POST_OBJS_FLAGS) $(LIBS)
+	$(QUIET_LINK)$(CXX) -shared $(LDFLAGS) -Wl,-Bsymbolic -Wl,-soname,$(@F) -Wl,--no-undefined -o $@ $(PRE_OBJS_FLAGS) $(OBJS) $(POST_OBJS_FLAGS) $(LIBS)
 
 
-backends/platform/android/org/inodes/gus/scummvm/R.java backends/platform/android/org/inodes/gus/scummvm/Manifest.java: $(srcdir)/dists/android/AndroidManifest.xml $(filter %.xml,$(RESOURCES)) $(ANDROID_JAR)
-	$(AAPT) package -m -J backends/platform/android -M $< -S $(srcdir)/dists/android/res -I $(ANDROID_JAR)
+backends/platform/android/org/inodes/gus/scummvm/R.java backends/platform/android/org/inodes/gus/scummvm/Manifest.java: $(srcdir)/dists/android/AndroidManifest.xml $(filter %.xml,$(RESOURCES)) $(ANDROID_JAR8)
+	$(AAPT) package -m -J backends/platform/android -M $< -S $(srcdir)/dists/android/res -I $(ANDROID_JAR8)
 
 build.tmp/classes/%.class: $(srcdir)/backends/platform/android/%.java $(srcdir)/backends/platform/android/org/inodes/gus/scummvm/R.java
 	@$(MKDIR) -p $(@D)
@@ -63,14 +71,6 @@
 	@$(MKDIR) -p $(@D)
 	$(DX) --dex --output=$@ build.tmp/classes.plugin
 
-resources.ap_: $(srcdir)/dists/android/AndroidManifest.xml $(RESOURCES) $(ASSETS) $(ANDROID_JAR) $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA)
-	$(INSTALL) -d build.tmp/assets/
-	$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) build.tmp/assets/
-	$(AAPT) package -f -M $< -S $(srcdir)/dists/android/res -A build.tmp/assets -I $(ANDROID_JAR) -F $@
-
-build.tmp/%/resources.ap_: build.tmp/%/AndroidManifest.xml build.stage/%/res/values/strings.xml build.stage/%/res/drawable/scummvm.png $(ANDROID_JAR)
-	$(AAPT) package -f -M $< -S build.stage/$*/res -I $(ANDROID_JAR) -F $@
-
 build.tmp/%/AndroidManifest.xml build.stage/%/res/values/strings.xml: dists/android/mkmanifest.pl configure dists/android/AndroidManifest.xml
 	dists/android/mkmanifest.pl --id=$* --configure=configure \
 	  --version-name=$(VERSION) \


Property changes on: scummvm/branches/gsoc2010-opengl/backends/platform/android/org/inodes/gus/scummvm
___________________________________________________________________
Added: svn:ignore
   + R.java
Manifest.java


Modified: scummvm/branches/gsoc2010-opengl/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java	2010-07-13 04:31:15 UTC (rev 50840)
@@ -12,7 +12,10 @@
 import android.view.Surface;
 import android.view.SurfaceHolder;
 
+import javax.microedition.khronos.opengles.GL;
+import javax.microedition.khronos.opengles.GL10;
 import javax.microedition.khronos.egl.EGL10;
+import javax.microedition.khronos.egl.EGL11;
 import javax.microedition.khronos.egl.EGLConfig;
 import javax.microedition.khronos.egl.EGLContext;
 import javax.microedition.khronos.egl.EGLDisplay;
@@ -30,11 +33,11 @@
 public class ScummVM implements SurfaceHolder.Callback {
 	private final static String LOG_TAG = "ScummVM.java";
 
-	private final int AUDIO_FRAME_SIZE = 2 * 2;  // bytes. 16bit audio * stereo
+	private final int AUDIO_FRAME_SIZE = 2 * 2;	 // bytes. 16bit audio * stereo
 	public static class AudioSetupException extends Exception {}
 
 	private long nativeScummVM;	// native code hangs itself here
-    boolean scummVMRunning = false;
+	boolean scummVMRunning = false;
 
 	private native void create(AssetManager am);
 
@@ -54,49 +57,49 @@
 		destroy();
 	}
 
-    // Surface creation:
-    // GUI thread: create surface, release lock
-    // ScummVM thread: acquire lock (block), read surface
-    //
-    // Surface deletion:
-    // GUI thread: post event, acquire lock (block), return
-    // ScummVM thread: read event, free surface, release lock
-    //
-    // In other words, ScummVM thread does this:
-    //  acquire lock
-    //  setup surface
-    //  when SCREEN_CHANGED arrives:
-    //   destroy surface
-    //   release lock
-    //  back to acquire lock
-    static final int configSpec[] = {
+	// Surface creation:
+	// GUI thread: create surface, release lock
+	// ScummVM thread: acquire lock (block), read surface
+	//
+	// Surface deletion:
+	// GUI thread: post event, acquire lock (block), return
+	// ScummVM thread: read event, free surface, release lock
+	//
+	// In other words, ScummVM thread does this:
+	//	acquire lock
+	//	setup surface
+	//	when SCREEN_CHANGED arrives:
+	//	 destroy surface
+	//	 release lock
+	//	back to acquire lock
+	static final int configSpec[] = {
 		EGL10.EGL_RED_SIZE, 5,
 		EGL10.EGL_GREEN_SIZE, 5,
 		EGL10.EGL_BLUE_SIZE, 5,
 		EGL10.EGL_DEPTH_SIZE, 0,
 		EGL10.EGL_SURFACE_TYPE, EGL10.EGL_WINDOW_BIT,
 		EGL10.EGL_NONE,
-    };
-    EGL10 egl;
-    EGLDisplay eglDisplay = EGL10.EGL_NO_DISPLAY;
-    EGLConfig eglConfig;
-    EGLContext eglContext = EGL10.EGL_NO_CONTEXT;
-    EGLSurface eglSurface = EGL10.EGL_NO_SURFACE;
-    Semaphore surfaceLock = new Semaphore(0, true);
-    SurfaceHolder nativeSurface;
+	};
+	EGL10 egl;
+	EGLDisplay eglDisplay = EGL10.EGL_NO_DISPLAY;
+	EGLConfig eglConfig;
+	EGLContext eglContext = EGL10.EGL_NO_CONTEXT;
+	EGLSurface eglSurface = EGL10.EGL_NO_SURFACE;
+	Semaphore surfaceLock = new Semaphore(0, true);
+	SurfaceHolder nativeSurface;
 
-    public void surfaceCreated(SurfaceHolder holder) {
+	public void surfaceCreated(SurfaceHolder holder) {
 		nativeSurface = holder;
 		surfaceLock.release();
-    }
+	}
 
-    public void surfaceChanged(SurfaceHolder holder, int format,
+	public void surfaceChanged(SurfaceHolder holder, int format,
 							   int width, int height) {
 		// Disabled while I debug GL problems
 		//pushEvent(new Event(Event.EVENT_SCREEN_CHANGED));
-    }
+	}
 
-    public void surfaceDestroyed(SurfaceHolder holder) {
+	public void surfaceDestroyed(SurfaceHolder holder) {
 		pushEvent(new Event(Event.EVENT_SCREEN_CHANGED));
 		try {
 			surfaceLock.acquire();
@@ -104,10 +107,10 @@
 			Log.e(this.toString(),
 				  "Interrupted while waiting for surface lock", e);
 		}
-    }
+	}
 
-    // Called by ScummVM thread (from initBackend)
-    private void createScummVMGLContext() {
+	// Called by ScummVM thread (from initBackend)
+	private void createScummVMGLContext() {
 		egl = (EGL10)EGLContext.getEGL();
 		eglDisplay = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);
 		int[] version = new int[2];
@@ -126,10 +129,11 @@
 
 		eglContext = egl.eglCreateContext(eglDisplay, eglConfig,
 										  EGL10.EGL_NO_CONTEXT, null);
-    }
+	}
 
-    // Called by ScummVM thread
-    protected void setupScummVMSurface() {
+	// Called by ScummVM thread
+	static private boolean _log_version = true;
+	protected void setupScummVMSurface() {
 		try {
 			surfaceLock.acquire();
 		} catch (InterruptedException e) {
@@ -140,10 +144,30 @@
 		eglSurface = egl.eglCreateWindowSurface(eglDisplay, eglConfig,
 												nativeSurface, null);
 		egl.eglMakeCurrent(eglDisplay, eglSurface, eglSurface, eglContext);
-    }
 
-    // Called by ScummVM thread
-    protected void destroyScummVMSurface() {
+		GL10 gl = (GL10)eglContext.getGL();
+
+		if (_log_version) {
+			Log.i(LOG_TAG, String.format("Using EGL %s (%s); GL %s/%s (%s)",
+										 egl.eglQueryString(eglDisplay, EGL10.EGL_VERSION),
+										 egl.eglQueryString(eglDisplay, EGL10.EGL_VENDOR),
+										 gl.glGetString(GL10.GL_VERSION),
+										 gl.glGetString(GL10.GL_RENDERER),
+										 gl.glGetString(GL10.GL_VENDOR)));
+			_log_version = false; // only log this once
+		}
+
+		int[] value = new int[1];
+		egl.eglQuerySurface(eglDisplay, eglSurface, EGL10.EGL_WIDTH, value);
+		int width = value[0];
+		egl.eglQuerySurface(eglDisplay, eglSurface, EGL10.EGL_HEIGHT, value);
+		int height = value[0];
+		Log.i(LOG_TAG, String.format("New surface is %dx%d", width, height));
+		setSurfaceSize(width, height);
+	}
+
+	// Called by ScummVM thread
+	protected void destroyScummVMSurface() {
 		if (eglSurface != null) {
 			egl.eglMakeCurrent(eglDisplay, EGL10.EGL_NO_SURFACE,
 							   EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);
@@ -152,16 +176,28 @@
 		}
 
 		surfaceLock.release();
-    }
+	}
 
-    public void setSurface(SurfaceHolder holder) {
+	public void setSurface(SurfaceHolder holder) {
 		holder.addCallback(this);
-    }
+	}
 
+	final public boolean swapBuffers() {
+		if (!egl.eglSwapBuffers(eglDisplay, eglSurface)) {
+			int error = egl.eglGetError();
+			Log.w(LOG_TAG, String.format("eglSwapBuffers exited with error 0x%x", error));
+			if (error == EGL11.EGL_CONTEXT_LOST)
+				return false;
+		}
+		return true;
+	}
+
 	// Set scummvm config options
 	final public native static void loadConfigFile(String path);
 	final public native static void setConfMan(String key, int value);
 	final public native static void setConfMan(String key, String value);
+	final public native void enableZoning(boolean enable);
+	final public native void setSurfaceSize(int width, int height);
 
 	// Feed an event to ScummVM.  Safe to call from other threads.
 	final public native void pushEvent(Event e);
@@ -179,10 +215,10 @@
 	protected void showVirtualKeyboard(boolean enable) {}
 	protected String[] getSysArchives() { return new String[0]; }
 	protected String[] getPluginDirectories() { return new String[0]; }
-    protected void initBackend() throws AudioSetupException {
+	protected void initBackend() throws AudioSetupException {
 		createScummVMGLContext();
 		initAudio();
-    }
+	}
 
 	private static class AudioThread extends Thread {
 		final private int buf_size;
@@ -239,7 +275,7 @@
 						break;
 					} else if (ret != len) {
 						Log.w(LOG_TAG, String.format(
-							"Short audio write.  Wrote %dB, not %dB",
+							"Short audio write.	 Wrote %dB, not %dB",
 							ret, buf.length));
 						// Buffer is full, so yield cpu for a while
 						Thread.sleep(100);

Modified: scummvm/branches/gsoc2010-opengl/backends/platform/android/org/inodes/gus/scummvm/ScummVMActivity.java
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/platform/android/org/inodes/gus/scummvm/ScummVMActivity.java	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/platform/android/org/inodes/gus/scummvm/ScummVMActivity.java	2010-07-13 04:31:15 UTC (rev 50840)
@@ -1,7 +1,7 @@
 package org.inodes.gus.scummvm;
 
+import android.app.Activity;
 import android.app.AlertDialog;
-import android.app.Activity;
 import android.content.DialogInterface;
 import android.content.res.Configuration;
 import android.media.AudioManager;
@@ -9,13 +9,14 @@
 import android.os.Environment;
 import android.os.Handler;
 import android.os.Message;
+import android.util.DisplayMetrics;
 import android.util.Log;
-import android.view.inputmethod.InputMethodManager;
 import android.view.KeyEvent;
 import android.view.MotionEvent;
 import android.view.SurfaceView;
 import android.view.View;
 import android.view.ViewConfiguration;
+import android.view.inputmethod.InputMethodManager;
 import android.widget.Toast;
 
 import java.io.IOException;
@@ -31,8 +32,27 @@
 	private class MyScummVM extends ScummVM {
 		private boolean scummvmRunning = false;
 
+		private boolean usingSmallScreen() {
+			// Multiple screen sizes came in with Android 1.6.  Have
+			// to use reflection in order to continue supporting 1.5
+			// devices :(
+			DisplayMetrics metrics = new DisplayMetrics();
+			getWindowManager().getDefaultDisplay().getMetrics(metrics);
+			try {
+				// This 'density' term is very confusing.
+				int DENSITY_LOW = metrics.getClass().getField("DENSITY_LOW").getInt(null);
+				int densityDpi = metrics.getClass().getField("densityDpi").getInt(metrics);
+				return densityDpi <= DENSITY_LOW;
+			} catch (Exception e) {
+				return false;
+			}
+		}
+
 		public MyScummVM() {
 			super(ScummVMActivity.this);
+
+			// Enable ScummVM zoning on 'small' screens.
+			enableZoning(usingSmallScreen());
 		}
 
 		@Override

Modified: scummvm/branches/gsoc2010-opengl/backends/platform/android/org/inodes/gus/scummvm/Unpacker.java
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/platform/android/org/inodes/gus/scummvm/Unpacker.java	2010-07-13 03:24:06 UTC (rev 50839)
+++ scummvm/branches/gsoc2010-opengl/backends/platform/android/org/inodes/gus/scummvm/Unpacker.java	2010-07-13 04:31:15 UTC (rev 50840)
@@ -34,6 +34,7 @@
 import java.util.zip.ZipEntry;
 
 public class Unpacker extends Activity {
+	private final static boolean PLUGINS_ENABLED = true;
 	private final static String META_NEXT_ACTIVITY =
 		"org.inodes.gus.unpacker.nextActivity";
 	private ProgressBar mProgress;
@@ -79,7 +80,6 @@
 				if (cn != null) {
 					final Intent origIntent = getIntent();
 					Intent intent = new Intent();
-					intent.setPackage(origIntent.getPackage());
 					intent.setComponent(cn);
 					if (origIntent.getExtras() != null)
 						intent.putExtras(origIntent.getExtras());
@@ -294,7 +294,7 @@
 		Intent intent = new Intent(ScummVMApplication.ACTION_PLUGIN_QUERY);
 		List<ResolveInfo> plugins = getPackageManager()
 			.queryBroadcastReceivers(intent, 0);
-		if (plugins.isEmpty()) {
+		if (PLUGINS_ENABLED && plugins.isEmpty()) {
 			// No plugins installed
 			AlertDialog.Builder alert = new AlertDialog.Builder(this)
 				.setTitle(R.string.no_plugins_title)

Copied: scummvm/branches/gsoc2010-opengl/backends/platform/android/video.cpp (from rev 50837, scummvm/trunk/backends/platform/android/video.cpp)
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/platform/android/video.cpp	                        (rev 0)
+++ scummvm/branches/gsoc2010-opengl/backends/platform/android/video.cpp	2010-07-13 04:31:15 UTC (rev 50840)
@@ -0,0 +1,334 @@
+/* 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: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/backends/platform/null/null.cpp $
+ * $Id: null.cpp 34912 2008-11-06 15:02:50Z fingolfin $
+ *
+ */
+
+#include "base/main.h"
+#include "graphics/surface.h"
+
+#include <GLES/gl.h>
+#include <GLES/glext.h>
+
+#include <android/log.h>
+
+#include "common/rect.h"
+#include "common/array.h"
+#include "common/util.h"
+#include "common/tokenizer.h"
+
+#include "backends/platform/android/video.h"
+
+#undef LOG_TAG
+#define LOG_TAG "ScummVM-video"
+
+#if 0
+#define ENTER(args...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, args)
+#else
+#define ENTER(args...) /**/
+#endif
+
+#if 0
+#define CHECK_GL_ERROR() checkGlError(__FILE__, __LINE__)
+static const char* getGlErrStr(GLenum error) {
+	switch (error) {
+	case GL_NO_ERROR:		   return "GL_NO_ERROR";
+	case GL_INVALID_ENUM:	   return "GL_INVALID_ENUM";
+	case GL_INVALID_OPERATION: return "GL_INVALID_OPERATION";
+	case GL_STACK_OVERFLOW:	   return "GL_STACK_OVERFLOW";
+	case GL_STACK_UNDERFLOW:   return "GL_STACK_UNDERFLOW";
+	case GL_OUT_OF_MEMORY:	   return "GL_OUT_OF_MEMORY";
+	}
+
+	static char buf[40];
+	snprintf(buf, sizeof(buf), "(Unknown GL error code 0x%x)", error);
+	return buf;
+}
+static void checkGlError(const char* file, int line) {
+	GLenum error = glGetError();
+	if (error != GL_NO_ERROR)
+		warning("%s:%d: GL error: %s", file, line, getGlErrStr(error));
+}
+#else
+#define CHECK_GL_ERROR() do {} while (false)
+#endif
+
+// Supported GL extensions
+static bool npot_supported = false;
+#ifdef GL_OES_draw_texture
+static bool draw_tex_supported = false;
+#endif
+
+static inline GLfixed xdiv(int numerator, int denominator) {
+	assert(numerator < (1<<16));
+	return (numerator << 16) / denominator;
+}
+
+template <class T>
+static T nextHigher2(T k) {
+	if (k == 0)
+		return 1;
+	--k;
+	for (uint i = 1; i < sizeof(T)*CHAR_BIT; i <<= 1)
+		k = k | k >> i;
+	return k + 1;
+}
+
+void GLESTexture::initGLExtensions() {
+	const char* ext_string =
+		reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS));
+	__android_log_print(ANDROID_LOG_INFO, LOG_TAG,
+				"Extensions: %s", ext_string);
+	Common::StringTokenizer tokenizer(ext_string, " ");
+	while (!tokenizer.empty()) {
+		Common::String token = tokenizer.nextToken();
+		if (token == "GL_ARB_texture_non_power_of_two")
+			npot_supported = true;
+#ifdef GL_OES_draw_texture
+		if (token == "GL_OES_draw_texture")
+			draw_tex_supported = true;
+#endif
+	}
+}
+
+GLESTexture::GLESTexture() :
+	_texture_width(0),
+	_texture_height(0),
+	_all_dirty(true)
+{
+	glGenTextures(1, &_texture_name);
+	// This all gets reset later in allocBuffer:
+	_surface.w = 0;
+	_surface.h = 0;
+	_surface.pitch = _texture_width;
+	_surface.pixels = NULL;
+	_surface.bytesPerPixel = 0;
+}
+
+GLESTexture::~GLESTexture() {
+	debug("Destroying texture %u", _texture_name);
+	glDeleteTextures(1, &_texture_name);
+}
+
+void GLESTexture::reinitGL() {
+	glGenTextures(1, &_texture_name);
+	setDirty();
+}
+
+void GLESTexture::allocBuffer(GLuint w, GLuint h) {
+	CHECK_GL_ERROR();
+	int bpp = bytesPerPixel();
+	_surface.w = w;
+	_surface.h = h;
+	_surface.bytesPerPixel = bpp;
+
+	if (w <= _texture_width && h <= _texture_height)
+		// Already allocated a sufficiently large buffer
+		return;
+
+	if (npot_supported) {
+		_texture_width = _surface.w;
+		_texture_height = _surface.h;
+	} else {
+		_texture_width = nextHigher2(_surface.w);
+		_texture_height = nextHigher2(_surface.h);
+	}
+	_surface.pitch = _texture_width * bpp;
+
+	// Allocate room for the texture now, but pixel data gets uploaded
+	// later (perhaps with multiple TexSubImage2D operations).
+	CHECK_GL_ERROR();
+	glBindTexture(GL_TEXTURE_2D, _texture_name);
+	CHECK_GL_ERROR();
+	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+	CHECK_GL_ERROR();
+	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+	CHECK_GL_ERROR();
+	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+	CHECK_GL_ERROR();
+	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+	CHECK_GL_ERROR();
+	glTexImage2D(GL_TEXTURE_2D, 0, glFormat(),
+		     _texture_width, _texture_height,
+		     0, glFormat(), glType(), NULL);
+	CHECK_GL_ERROR();
+}
+
+void GLESTexture::updateBuffer(GLuint x, GLuint y, GLuint w, GLuint h,
+							   const void* buf, int pitch) {
+	ENTER("updateBuffer(%u, %u, %u, %u, %p, %d)", x, y, w, h, buf, pitch);
+	glBindTexture(GL_TEXTURE_2D, _texture_name);
+
+	setDirtyRect(Common::Rect(x, y, x+w, y+h));
+
+	if (static_cast<int>(w) * bytesPerPixel() == pitch) {
+		glTexSubImage2D(GL_TEXTURE_2D, 0, x, y, w, h,
+						glFormat(), glType(), buf);
+	} else {
+		// GLES removed the ability to specify pitch, so we
+		// have to do this row by row.
+		const byte* src = static_cast<const byte*>(buf);
+		do {
+			glTexSubImage2D(GL_TEXTURE_2D, 0, x, y,
+							w, 1, glFormat(), glType(), src);
+			++y;
+			src += pitch;
+		} while (--h);
+	}
+}
+
+void GLESTexture::fillBuffer(byte x) {
+	byte tmpbuf[_surface.h * _surface.w * bytesPerPixel()];
+	memset(tmpbuf, 0, _surface.h * _surface.w * bytesPerPixel());
+	glBindTexture(GL_TEXTURE_2D, _texture_name);
+	glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, _surface.w, _surface.h,
+					glFormat(), glType(), tmpbuf);
+	setDirty();
+}
+
+void GLESTexture::drawTexture(GLshort x, GLshort y, GLshort w, GLshort h) {
+	glBindTexture(GL_TEXTURE_2D, _texture_name);
+
+#ifdef GL_OES_draw_texture
+	// Great extension, but only works under specific conditions.
+	// Still a work-in-progress - disabled for now.
+	if (false && draw_tex_supported && paletteSize() == 0) {
+		//glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
+		const GLint crop[4] = {0, _surface.h, _surface.w, -_surface.h};
+		glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop);
+		glDrawTexiOES(x, y, 0, w, h);
+	} else
+#endif
+	{
+		const GLfixed tex_width = xdiv(_surface.w, _texture_width);
+		const GLfixed tex_height = xdiv(_surface.h, _texture_height);
+		const GLfixed texcoords[] = {
+			0, 0,
+			tex_width, 0,
+			0, tex_height,
+			tex_width, tex_height,
+		};
+		glTexCoordPointer(2, GL_FIXED, 0, texcoords);
+
+		const GLshort vertices[] = {
+			x,	 y,
+			x+w, y,
+			x,	 y+h,
+			x+w, y+h,
+		};
+		glVertexPointer(2, GL_SHORT, 0, vertices);
+
+		assert(ARRAYSIZE(vertices) == ARRAYSIZE(texcoords));
+		glDrawArrays(GL_TRIANGLE_STRIP, 0, ARRAYSIZE(vertices)/2);
+	}
+
+	_all_dirty = false;
+	_dirty_rect = Common::Rect();
+}
+
+GLESPaletteTexture::GLESPaletteTexture() :
+	GLESTexture(),
+	_texture(NULL)
+{
+}
+
+GLESPaletteTexture::~GLESPaletteTexture() {
+	delete[] _texture;
+}
+
+void GLESPaletteTexture::allocBuffer(GLuint w, GLuint h) {
+	CHECK_GL_ERROR();
+	int bpp = bytesPerPixel();
+	_surface.w = w;
+	_surface.h = h;
+	_surface.bytesPerPixel = bpp;
+
+	if (w <= _texture_width && h <= _texture_height)
+		// Already allocated a sufficiently large buffer
+		return;
+
+	if (npot_supported) {
+		_texture_width = _surface.w;
+		_texture_height = _surface.h;
+	} else {
+		_texture_width = nextHigher2(_surface.w);
+		_texture_height = nextHigher2(_surface.h);
+	}
+	_surface.pitch = _texture_width * bpp;
+
+	// Texture gets uploaded later (from drawTexture())
+
+	byte* new_buffer = new byte[paletteSize() +
+		_texture_width * _texture_height * bytesPerPixel()];
+	if (_texture) {
+		memcpy(new_buffer, _texture, paletteSize()); // preserve palette
+		delete[] _texture;
+	}
+	_texture = new_buffer;
+	_surface.pixels = _texture + paletteSize();
+}
+
+void GLESPaletteTexture::fillBuffer(byte x) {
+	assert(_surface.pixels);
+	memset(_surface.pixels, x, _surface.pitch * _surface.h);
+	setDirty();
+}
+
+void GLESPaletteTexture::updateBuffer(GLuint x, GLuint y,
+									  GLuint w, GLuint h,
+									  const void* buf, int pitch) {
+	_all_dirty = true;
+
+	const byte* src = static_cast<const byte*>(buf);
+	byte* dst = static_cast<byte*>(_surface.getBasePtr(x, y));
+	do {
+		memcpy(dst, src, w * bytesPerPixel());
+		dst += _surface.pitch;
+		src += pitch;
+	} while (--h);
+}
+
+void GLESPaletteTexture::uploadTexture() const {
+	const size_t texture_size =
+		paletteSize() + _texture_width * _texture_height * bytesPerPixel();
+	glCompressedTexImage2D(GL_TEXTURE_2D, 0, glType(),
+						   _texture_width, _texture_height,
+						   0, texture_size, _texture);
+	CHECK_GL_ERROR();
+}
+
+void GLESPaletteTexture::drawTexture(GLshort x, GLshort y, GLshort w, GLshort h) {
+	if (_all_dirty) {
+		glBindTexture(GL_TEXTURE_2D, _texture_name);
+		CHECK_GL_ERROR();
+		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+		CHECK_GL_ERROR();
+		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+		CHECK_GL_ERROR();
+		uploadTexture();
+		_all_dirty = false;
+	}
+
+	GLESTexture::drawTexture(x, y, w, h);
+}

Copied: scummvm/branches/gsoc2010-opengl/backends/platform/android/video.h (from rev 50837, scummvm/trunk/backends/platform/android/video.h)
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/platform/android/video.h	                        (rev 0)

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