[Scummvm-cvs-logs] SF.net SVN: scummvm: [32130] scummvm/branches/gsoc2008-tfmx

marwanhilmi at users.sourceforge.net marwanhilmi at users.sourceforge.net
Thu May 15 01:47:08 CEST 2008


Revision: 32130
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32130&view=rev
Author:   marwanhilmi
Date:     2008-05-14 16:47:07 -0700 (Wed, 14 May 2008)

Log Message:
-----------
Fixed svnmerge problems. Merged revisions 31895,31897,31899-31900,31902-31920,31922-31935,31937-31962,31964-31970,31972-31973,31975-31981,31984-31989,31993-31994,31996-32014,32016-32020,32022-32025,32027-32028,32030,32034,32037-32038,32040-32058,32060-32087,32089-32093,32095-32124,32126-32128 via svnmerge from scummvm/trunk

Modified Paths:
--------------
    scummvm/branches/gsoc2008-tfmx/NEWS
    scummvm/branches/gsoc2008-tfmx/README
    scummvm/branches/gsoc2008-tfmx/backends/fs/amigaos4/amigaos4-fs.cpp
    scummvm/branches/gsoc2008-tfmx/backends/midi/alsa.cpp
    scummvm/branches/gsoc2008-tfmx/backends/midi/camd.cpp
    scummvm/branches/gsoc2008-tfmx/backends/midi/coreaudio.cpp
    scummvm/branches/gsoc2008-tfmx/backends/midi/coremidi.cpp
    scummvm/branches/gsoc2008-tfmx/backends/midi/dmedia.cpp
    scummvm/branches/gsoc2008-tfmx/backends/midi/quicktime.cpp
    scummvm/branches/gsoc2008-tfmx/backends/midi/seq.cpp
    scummvm/branches/gsoc2008-tfmx/backends/midi/timidity.cpp
    scummvm/branches/gsoc2008-tfmx/backends/midi/windows.cpp
    scummvm/branches/gsoc2008-tfmx/backends/midi/ypa1.cpp
    scummvm/branches/gsoc2008-tfmx/backends/midi/zodiac.cpp
    scummvm/branches/gsoc2008-tfmx/backends/platform/dc/selector.cpp
    scummvm/branches/gsoc2008-tfmx/backends/platform/ds/arm9/source/gbampsave.cpp
    scummvm/branches/gsoc2008-tfmx/backends/platform/ds/arm9/source/osystem_ds.cpp
    scummvm/branches/gsoc2008-tfmx/backends/platform/ds/arm9/source/osystem_ds.h
    scummvm/branches/gsoc2008-tfmx/backends/platform/ds/arm9/source/ramsave.cpp
    scummvm/branches/gsoc2008-tfmx/backends/platform/symbian/src/SymbianOS.cpp
    scummvm/branches/gsoc2008-tfmx/backends/platform/wince/CELauncherDialog.cpp
    scummvm/branches/gsoc2008-tfmx/backends/plugins/dc/dc-provider.cpp
    scummvm/branches/gsoc2008-tfmx/backends/plugins/dc/dc-provider.h
    scummvm/branches/gsoc2008-tfmx/backends/plugins/win32/win32-provider.cpp
    scummvm/branches/gsoc2008-tfmx/backends/plugins/win32/win32-provider.h
    scummvm/branches/gsoc2008-tfmx/base/commandLine.cpp
    scummvm/branches/gsoc2008-tfmx/base/game.cpp
    scummvm/branches/gsoc2008-tfmx/base/game.h
    scummvm/branches/gsoc2008-tfmx/base/main.cpp
    scummvm/branches/gsoc2008-tfmx/base/plugins.cpp
    scummvm/branches/gsoc2008-tfmx/base/plugins.h
    scummvm/branches/gsoc2008-tfmx/common/array.h
    scummvm/branches/gsoc2008-tfmx/configure
    scummvm/branches/gsoc2008-tfmx/dists/engine-data/kyra.dat
    scummvm/branches/gsoc2008-tfmx/dists/msvc7/gob.vcproj
    scummvm/branches/gsoc2008-tfmx/dists/msvc7/kyra.vcproj
    scummvm/branches/gsoc2008-tfmx/dists/msvc7/made.vcproj
    scummvm/branches/gsoc2008-tfmx/dists/msvc7/parallaction.vcproj
    scummvm/branches/gsoc2008-tfmx/dists/msvc7/scumm.vcproj
    scummvm/branches/gsoc2008-tfmx/dists/msvc7/scummvm.vcproj
    scummvm/branches/gsoc2008-tfmx/dists/msvc71/gob.vcproj
    scummvm/branches/gsoc2008-tfmx/dists/msvc71/kyra.vcproj
    scummvm/branches/gsoc2008-tfmx/dists/msvc71/made.vcproj
    scummvm/branches/gsoc2008-tfmx/dists/msvc71/parallaction.vcproj
    scummvm/branches/gsoc2008-tfmx/dists/msvc71/scumm.vcproj
    scummvm/branches/gsoc2008-tfmx/dists/msvc71/scummvm.vcproj
    scummvm/branches/gsoc2008-tfmx/dists/msvc8/gob.vcproj
    scummvm/branches/gsoc2008-tfmx/dists/msvc8/kyra.vcproj
    scummvm/branches/gsoc2008-tfmx/dists/msvc8/made.vcproj
    scummvm/branches/gsoc2008-tfmx/dists/msvc8/parallaction.vcproj
    scummvm/branches/gsoc2008-tfmx/dists/msvc8/scumm.vcproj
    scummvm/branches/gsoc2008-tfmx/dists/msvc8/scummvm.vcproj
    scummvm/branches/gsoc2008-tfmx/dists/msvc8_to_msvc7_71.bat
    scummvm/branches/gsoc2008-tfmx/dists/msvc9/gob.vcproj
    scummvm/branches/gsoc2008-tfmx/dists/msvc9/kyra.vcproj
    scummvm/branches/gsoc2008-tfmx/dists/msvc9/m4.vcproj
    scummvm/branches/gsoc2008-tfmx/dists/msvc9/made.vcproj
    scummvm/branches/gsoc2008-tfmx/dists/msvc9/parallaction.vcproj
    scummvm/branches/gsoc2008-tfmx/dists/msvc9/scummvm.vcproj
    scummvm/branches/gsoc2008-tfmx/engines/agi/preagi_mickey.cpp
    scummvm/branches/gsoc2008-tfmx/engines/agos/agos.cpp
    scummvm/branches/gsoc2008-tfmx/engines/cine/anim.cpp
    scummvm/branches/gsoc2008-tfmx/engines/drascula/animation.cpp
    scummvm/branches/gsoc2008-tfmx/engines/drascula/drascula.cpp
    scummvm/branches/gsoc2008-tfmx/engines/drascula/drascula.h
    scummvm/branches/gsoc2008-tfmx/engines/drascula/rooms.cpp
    scummvm/branches/gsoc2008-tfmx/engines/drascula/talk.cpp
    scummvm/branches/gsoc2008-tfmx/engines/drascula/texts.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/dataio.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/draw_v2.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/gob.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/gob.h
    scummvm/branches/gsoc2008-tfmx/engines/gob/inter_v2.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/module.mk
    scummvm/branches/gsoc2008-tfmx/engines/gob/mult_v2.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/saveload.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/saveload.h
    scummvm/branches/gsoc2008-tfmx/engines/gob/saveload_v2.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/saveload_v3.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/scenery.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/video.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/video.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/animator_hof.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/animator_mr.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/debugger.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/debugger.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/detection.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/gui.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/gui.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/gui_hof.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/gui_mr.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/gui_mr.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/gui_v2.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/gui_v2.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/items_hof.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/items_mr.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/items_v2.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/kyra_hof.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/kyra_hof.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/kyra_mr.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/kyra_mr.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/kyra_v2.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/kyra_v2.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/module.mk
    scummvm/branches/gsoc2008-tfmx/engines/kyra/resource.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/resource.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/saveload.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/saveload_mr.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/scene_hof.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/scene_mr.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/scene_v2.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/screen.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/screen.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/screen_hof.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/screen_hof.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/screen_v2.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/screen_v2.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/script.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/script.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/script_hof.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/script_mr.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/script_tim.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/script_tim.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/script_v2.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/seqplayer.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/seqplayer.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/sequences_hof.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/sequences_mr.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/sequences_v2.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/sound.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/sound.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/sound_adlib.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/sound_digital.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/sound_towns.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/sprites.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/sprites.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/staticres.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/text.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/text.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/text_hof.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/text_hof.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/text_mr.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/timer.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/timer.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/timer_mr.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/vqa.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/vqa.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/wsamovie.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/wsamovie.h
    scummvm/branches/gsoc2008-tfmx/engines/lure/res.cpp
    scummvm/branches/gsoc2008-tfmx/engines/lure/res_struct.cpp
    scummvm/branches/gsoc2008-tfmx/engines/m4/m4.cpp
    scummvm/branches/gsoc2008-tfmx/engines/made/database.cpp
    scummvm/branches/gsoc2008-tfmx/engines/made/database.h
    scummvm/branches/gsoc2008-tfmx/engines/made/detection.cpp
    scummvm/branches/gsoc2008-tfmx/engines/made/made.cpp
    scummvm/branches/gsoc2008-tfmx/engines/made/made.h
    scummvm/branches/gsoc2008-tfmx/engines/made/module.mk
    scummvm/branches/gsoc2008-tfmx/engines/made/pmvplayer.cpp
    scummvm/branches/gsoc2008-tfmx/engines/made/resource.cpp
    scummvm/branches/gsoc2008-tfmx/engines/made/resource.h
    scummvm/branches/gsoc2008-tfmx/engines/made/screen.cpp
    scummvm/branches/gsoc2008-tfmx/engines/made/screen.h
    scummvm/branches/gsoc2008-tfmx/engines/made/script.cpp
    scummvm/branches/gsoc2008-tfmx/engines/made/scriptfuncs.h
    scummvm/branches/gsoc2008-tfmx/engines/metaengine.h
    scummvm/branches/gsoc2008-tfmx/engines/parallaction/callables_ns.cpp
    scummvm/branches/gsoc2008-tfmx/engines/parallaction/debug.cpp
    scummvm/branches/gsoc2008-tfmx/engines/parallaction/dialogue.cpp
    scummvm/branches/gsoc2008-tfmx/engines/parallaction/exec_br.cpp
    scummvm/branches/gsoc2008-tfmx/engines/parallaction/exec_ns.cpp
    scummvm/branches/gsoc2008-tfmx/engines/parallaction/graphics.cpp
    scummvm/branches/gsoc2008-tfmx/engines/parallaction/gui_br.cpp
    scummvm/branches/gsoc2008-tfmx/engines/parallaction/gui_ns.cpp
    scummvm/branches/gsoc2008-tfmx/engines/parallaction/inventory.cpp
    scummvm/branches/gsoc2008-tfmx/engines/parallaction/module.mk
    scummvm/branches/gsoc2008-tfmx/engines/parallaction/objects.cpp
    scummvm/branches/gsoc2008-tfmx/engines/parallaction/objects.h
    scummvm/branches/gsoc2008-tfmx/engines/parallaction/parallaction.cpp
    scummvm/branches/gsoc2008-tfmx/engines/parallaction/parallaction.h
    scummvm/branches/gsoc2008-tfmx/engines/parallaction/parallaction_br.cpp
    scummvm/branches/gsoc2008-tfmx/engines/parallaction/parallaction_ns.cpp
    scummvm/branches/gsoc2008-tfmx/engines/parallaction/parser.cpp
    scummvm/branches/gsoc2008-tfmx/engines/parallaction/parser.h
    scummvm/branches/gsoc2008-tfmx/engines/parallaction/parser_br.cpp
    scummvm/branches/gsoc2008-tfmx/engines/parallaction/parser_ns.cpp
    scummvm/branches/gsoc2008-tfmx/engines/parallaction/staticres.cpp
    scummvm/branches/gsoc2008-tfmx/engines/scumm/detection_tables.h
    scummvm/branches/gsoc2008-tfmx/engines/scumm/dialogs.cpp
    scummvm/branches/gsoc2008-tfmx/engines/scumm/nut_renderer.cpp
    scummvm/branches/gsoc2008-tfmx/engines/scumm/scumm-md5.h
    scummvm/branches/gsoc2008-tfmx/engines/scumm/scumm.cpp
    scummvm/branches/gsoc2008-tfmx/engines/scumm/smush/channel.cpp
    scummvm/branches/gsoc2008-tfmx/engines/scumm/smush/codec37.cpp
    scummvm/branches/gsoc2008-tfmx/engines/scumm/smush/imuse_channel.cpp
    scummvm/branches/gsoc2008-tfmx/engines/scumm/smush/saud_channel.cpp
    scummvm/branches/gsoc2008-tfmx/engines/scumm/smush/smush_player.cpp
    scummvm/branches/gsoc2008-tfmx/engines/sky/sky.cpp
    scummvm/branches/gsoc2008-tfmx/engines/sword2/resman.cpp
    scummvm/branches/gsoc2008-tfmx/graphics/cursorman.h
    scummvm/branches/gsoc2008-tfmx/graphics/imageman.cpp
    scummvm/branches/gsoc2008-tfmx/gui/ListWidget.cpp
    scummvm/branches/gsoc2008-tfmx/gui/ThemeModern.cpp
    scummvm/branches/gsoc2008-tfmx/gui/about.cpp
    scummvm/branches/gsoc2008-tfmx/gui/console.cpp
    scummvm/branches/gsoc2008-tfmx/gui/launcher.cpp
    scummvm/branches/gsoc2008-tfmx/gui/massadd.cpp
    scummvm/branches/gsoc2008-tfmx/gui/newgui.cpp
    scummvm/branches/gsoc2008-tfmx/gui/options.cpp
    scummvm/branches/gsoc2008-tfmx/gui/options.h
    scummvm/branches/gsoc2008-tfmx/gui/theme-config.cpp
    scummvm/branches/gsoc2008-tfmx/gui/theme.cpp
    scummvm/branches/gsoc2008-tfmx/gui/themes/classic080.ini
    scummvm/branches/gsoc2008-tfmx/gui/themes/modern.ini
    scummvm/branches/gsoc2008-tfmx/sound/audiostream.cpp
    scummvm/branches/gsoc2008-tfmx/sound/mididrv.cpp
    scummvm/branches/gsoc2008-tfmx/sound/mididrv.h
    scummvm/branches/gsoc2008-tfmx/sound/null.cpp
    scummvm/branches/gsoc2008-tfmx/sound/softsynth/adlib.cpp
    scummvm/branches/gsoc2008-tfmx/sound/softsynth/fluidsynth.cpp
    scummvm/branches/gsoc2008-tfmx/sound/softsynth/mt32.cpp
    scummvm/branches/gsoc2008-tfmx/sound/softsynth/ym2612.cpp
    scummvm/branches/gsoc2008-tfmx/test/cxxtest/sample/CreatedTest.h
    scummvm/branches/gsoc2008-tfmx/test/cxxtest/sample/FixtureTest.h
    scummvm/branches/gsoc2008-tfmx/tools/create_kyradat/create_kyradat.cpp
    scummvm/branches/gsoc2008-tfmx/tools/create_kyradat/create_kyradat.h
    scummvm/branches/gsoc2008-tfmx/tools/create_kyradat/hof_towns.h
    scummvm/branches/gsoc2008-tfmx/tools/create_kyradat/misc.h
    scummvm/branches/gsoc2008-tfmx/tools/create_kyradat/pak.cpp
    scummvm/branches/gsoc2008-tfmx/tools/create_kyradat/pak.h
    scummvm/branches/gsoc2008-tfmx/tools/scumm-md5.txt

Added Paths:
-----------
    scummvm/branches/gsoc2008-tfmx/COPYING.LGPL
    scummvm/branches/gsoc2008-tfmx/engines/gob/saveload_v4.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/adlib.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/adlib.h
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/bgatmosphere.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/bgatmosphere.h
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/cdrom.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/cdrom.h
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/infogrames.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/infogrames.h
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/pcspeaker.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/pcspeaker.h
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/sound.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/sound.h
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/soundblaster.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/soundblaster.h
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/sounddesc.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/sounddesc.h
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/soundmixer.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/soundmixer.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/animator_lok.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/animator_lok.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/gui_lok.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/gui_lok.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/items_lok.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/kyra_lok.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/kyra_lok.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/kyra_v1.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/kyra_v1.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/saveload_lok.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/scene_lok.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/scene_v1.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/screen_lok.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/screen_lok.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/script_lok.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/script_v1.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/sequences_lok.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/sound_lok.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/text_lok.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/timer_lok.cpp
    scummvm/branches/gsoc2008-tfmx/engines/made/screenfx.cpp
    scummvm/branches/gsoc2008-tfmx/engines/made/screenfx.h
    scummvm/branches/gsoc2008-tfmx/engines/made/scriptfuncs.cpp
    scummvm/branches/gsoc2008-tfmx/engines/parallaction/input.cpp
    scummvm/branches/gsoc2008-tfmx/engines/parallaction/input.h
    scummvm/branches/gsoc2008-tfmx/sound/midiplugin.h
    scummvm/branches/gsoc2008-tfmx/tools/create_kyradat/malcolm.h

Removed Paths:
-------------
    scummvm/branches/gsoc2008-tfmx/engines/gob/cdrom.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/cdrom.h
    scummvm/branches/gsoc2008-tfmx/engines/gob/music.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/music.h
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/adlib.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/adlib.h
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/bgatmosphere.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/bgatmosphere.h
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/cdrom.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/cdrom.h
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/infogrames.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/infogrames.h
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/pcspeaker.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/pcspeaker.h
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/sound.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/sound.h
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/soundblaster.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/soundblaster.h
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/sounddesc.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/sounddesc.h
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/soundmixer.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound/soundmixer.h
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound.cpp
    scummvm/branches/gsoc2008-tfmx/engines/gob/sound.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/animator_v1.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/animator_v1.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/gui_v1.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/gui_v1.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/items_v1.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/kyra.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/kyra.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/kyra_v1.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/kyra_v1.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/saveload_v1.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/scene.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/scene_v1.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/screen_v1.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/screen_v1.h
    scummvm/branches/gsoc2008-tfmx/engines/kyra/script_v1.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/sequences_v1.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/sound_v1.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/text_v1.cpp
    scummvm/branches/gsoc2008-tfmx/engines/kyra/timer_v1.cpp
    scummvm/branches/gsoc2008-tfmx/engines/made/scriptfuncs.cpp
    scummvm/branches/gsoc2008-tfmx/engines/made/scriptfuncs_lgop2.cpp
    scummvm/branches/gsoc2008-tfmx/engines/made/scriptfuncs_mhne.cpp
    scummvm/branches/gsoc2008-tfmx/engines/made/scriptfuncs_rtz.cpp

Property Changed:
----------------
    scummvm/branches/gsoc2008-tfmx/


Property changes on: scummvm/branches/gsoc2008-tfmx
___________________________________________________________________
Name: svn:ignore
   - config.log
scummvm
scummvm-static
config.h
config.mk
.gdb_history
dumps
Credits.rtf
*.mshark

   + config.log
scummvm
scummvm-static
config.h
config.mk
.gdb_history
dumps
Credits.rtf
*.mshark
scummvm_vs_libs
svnmerge.exe
svnmerge-commit-message.txt

Name: svnmerge-integrated
   - /scummvm/trunk:1-31894
   + /scummvm/trunk:1-32128

Copied: scummvm/branches/gsoc2008-tfmx/COPYING.LGPL (from rev 32128, scummvm/trunk/COPYING.LGPL)
===================================================================
--- scummvm/branches/gsoc2008-tfmx/COPYING.LGPL	                        (rev 0)
+++ scummvm/branches/gsoc2008-tfmx/COPYING.LGPL	2008-05-14 23:47:07 UTC (rev 32130)
@@ -0,0 +1,504 @@
+                  GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+                  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+                            NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library 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
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
+

Modified: scummvm/branches/gsoc2008-tfmx/NEWS
===================================================================
--- scummvm/branches/gsoc2008-tfmx/NEWS	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/NEWS	2008-05-14 23:47:07 UTC (rev 32130)
@@ -4,6 +4,7 @@
 0.12.0 (????-??-??)
  New Games:
    - Added support for The Legend of Kyrandia: Book Two: Hand of Fate
+   - Added support for The Legend of Kyrandia: Book Three: Malcolm's Revenge
    - Added support for Lost in Time
    - Added support for the PC version of Waxworks
    - Added support for the Macintosh version of I Have no Mouth, and I

Modified: scummvm/branches/gsoc2008-tfmx/README
===================================================================
--- scummvm/branches/gsoc2008-tfmx/README	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/README	2008-05-14 23:47:07 UTC (rev 32130)
@@ -1793,7 +1793,7 @@
         * To get a version you can run from Finder, type 'make bundle' which
           will create ScummVM.app (this only works out of the box if you
           installed SDL into /sw (as happens if you are using Fink). If you
-          have installed SDL in another way, you will have to edit the Makefile).
+          have installed SDL in another way, you will have to edit ports.mk).
         * For more information refer to:
           http://wiki.scummvm.org/index.php/Compiling_ScummVM/MacOS_X_Crosscompiling
 

Modified: scummvm/branches/gsoc2008-tfmx/backends/fs/amigaos4/amigaos4-fs.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/backends/fs/amigaos4/amigaos4-fs.cpp	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/backends/fs/amigaos4/amigaos4-fs.cpp	2008-05-14 23:47:07 UTC (rev 32130)
@@ -209,7 +209,7 @@
 		if (IDOS->NameFromLock(pLock, (STRPTR)n, bufSize) != DOSFALSE) {
 			_sPath = n;
 			_sDisplayName = pDisplayName ? pDisplayName : IDOS->FilePart((STRPTR)n);
-			delete [] n;
+			delete[] n;
 			break;
 		}
 
@@ -217,12 +217,12 @@
 			_bIsValid = false;
 			debug(6, "IoErr() != ERROR_LINE_TOO_LONG");
 			LEAVE();
-			delete [] n;
+			delete[] n;
 			return;
 		}
 
 		bufSize *= 2;
-		delete [] n;
+		delete[] n;
 	}
 
 	_bIsValid =	false;
@@ -536,7 +536,7 @@
 
 				sprintf(buffer, "%s (%s)", volName, devName);
 
-				delete [] devName;
+				delete[] devName;
 
 				AmigaOSFilesystemNode *entry = new AmigaOSFilesystemNode(volumeLock, buffer);
 				if (entry) {
@@ -554,7 +554,7 @@
 				IDOS->UnLock(volumeLock);
 			}
 
-			delete [] volName;
+			delete[] volName;
 		}
 		dosList	= IDOS->NextDosEntry(dosList, LDF_VOLUMES);
 	}

Modified: scummvm/branches/gsoc2008-tfmx/backends/midi/alsa.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/backends/midi/alsa.cpp	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/backends/midi/alsa.cpp	2008-05-14 23:47:07 UTC (rev 32130)
@@ -26,11 +26,11 @@
 
 #if defined(UNIX) && defined(USE_ALSA)
 
+#include "common/config-manager.h"
+#include "common/util.h"
+#include "sound/midiplugin.h"
 #include "sound/mpu401.h"
 
-#include "common/util.h"
-#include "common/config-manager.h"
-
 #include <alsa/asoundlib.h>
 
 /*
@@ -238,8 +238,89 @@
 		snd_seq_flush_output(seq_handle);
 }
 
-MidiDriver *MidiDriver_ALSA_create() {
-	return new MidiDriver_ALSA();
+
+// Plugin interface
+
+class AlsaMidiPlugin : public MidiPluginObject {
+public:
+	virtual const char *getName() const {
+		return "ALSA";
+	}
+
+	virtual const char *getId() const {
+		return "alsa";
+	}
+
+	virtual int getCapabilities() const {
+		return MDT_MIDI;
+	}
+
+	virtual Common::StringList getDevices() const;
+
+	virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const;
+};
+
+#define perm_ok(pinfo,bits) ((snd_seq_port_info_get_capability(pinfo) & (bits)) == (bits))
+
+static int check_permission(snd_seq_port_info_t *pinfo)
+{
+	if (perm_ok(pinfo, SND_SEQ_PORT_CAP_WRITE|SND_SEQ_PORT_CAP_SUBS_WRITE)) {
+		if (!(snd_seq_port_info_get_capability(pinfo) & SND_SEQ_PORT_CAP_NO_EXPORT))
+			return 1;
+	}
+	return 0;
 }
 
+Common::StringList AlsaMidiPlugin::getDevices() const {
+	Common::StringList devices;
+
+	snd_seq_t *seq;
+	if (snd_seq_open(&seq, "default", SND_SEQ_OPEN_DUPLEX, 0) < 0)
+		return devices; // can't open sequencer
+
+	snd_seq_client_info_t *cinfo;
+	snd_seq_client_info_alloca(&cinfo);
+	snd_seq_port_info_t *pinfo;
+	snd_seq_port_info_alloca(&pinfo);
+	snd_seq_client_info_set_client(cinfo, -1);
+	while (snd_seq_query_next_client(seq, cinfo) >= 0) {
+		bool found_valid_port = false;
+
+		/* reset query info */
+		snd_seq_port_info_set_client(pinfo, snd_seq_client_info_get_client(cinfo));
+		snd_seq_port_info_set_port(pinfo, -1);
+		while (!found_valid_port && snd_seq_query_next_port(seq, pinfo) >= 0) {
+			if (check_permission(pinfo)) {
+				found_valid_port = true;
+				devices.push_back(snd_seq_client_info_get_name(cinfo));
+				//snd_seq_client_info_get_client(cinfo) : snd_seq_port_info_get_port(pinfo)
+			}
+		}
+	}
+	snd_seq_close(seq);
+
+	return devices;
+}
+
+PluginError AlsaMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const {
+	*mididriver = new MidiDriver_ALSA();
+
+	return kNoError;
+}
+
+MidiDriver *MidiDriver_ALSA_create(Audio::Mixer *mixer) {
+	MidiDriver *mididriver;
+
+	AlsaMidiPlugin p;
+	p.createInstance(mixer, &mididriver);
+
+	return mididriver;
+}
+
+//#if PLUGIN_ENABLED_DYNAMIC(ALSA)
+	//REGISTER_PLUGIN_DYNAMIC(ALSA, PLUGIN_TYPE_MIDI, AlsaMidiPlugin);
+//#else
+	REGISTER_PLUGIN_STATIC(ALSA, PLUGIN_TYPE_MIDI, AlsaMidiPlugin);
+//#endif
+
 #endif

Modified: scummvm/branches/gsoc2008-tfmx/backends/midi/camd.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/backends/midi/camd.cpp	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/backends/midi/camd.cpp	2008-05-14 23:47:07 UTC (rev 32130)
@@ -26,9 +26,10 @@
 
 #if defined(__amigaos4__)
 
+#include "common/endian.h"
+#include "common/util.h"
+#include "sound/midiplugin.h"
 #include "sound/mpu401.h"
-#include "common/util.h"
-#include "common/endian.h"
 
 #include <proto/camd.h>
 #include <proto/exec.h>
@@ -162,8 +163,47 @@
 	_isOpen = false;
 }
 
-MidiDriver *MidiDriver_CAMD_create() {
-	return new MidiDriver_CAMD();
+
+// Plugin interface
+
+class CamdMidiPlugin : public MidiPluginObject {
+public:
+	virtual const char *getName() const {
+		return "CAMD";
+	}
+
+	virtual const char *getId() const {
+		return "camd";
+	}
+
+	virtual int getCapabilities() const {
+		return MDT_MIDI;
+	}
+
+	//virtual Common::StringList getDevices() const;
+
+	virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const;
+};
+
+PluginError CamdMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const {
+	*mididriver = new MidiDriver_CAMD();
+
+	return kNoError;
 }
 
+MidiDriver *MidiDriver_CAMD_create(Audio::Mixer *mixer) {
+	MidiDriver *mididriver;
+
+	CamdMidiPlugin p;
+	p.createInstance(mixer, &mididriver);
+
+	return mididriver;
+}
+
+//#if PLUGIN_ENABLED_DYNAMIC(CAMD)
+	//REGISTER_PLUGIN_DYNAMIC(CAMD, PLUGIN_TYPE_MIDI, CamdMidiPlugin);
+//#else
+	REGISTER_PLUGIN_STATIC(CAMD, PLUGIN_TYPE_MIDI, CamdMidiPlugin);
+//#endif
+
 #endif

Modified: scummvm/branches/gsoc2008-tfmx/backends/midi/coreaudio.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/backends/midi/coreaudio.cpp	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/backends/midi/coreaudio.cpp	2008-05-14 23:47:07 UTC (rev 32130)
@@ -26,6 +26,7 @@
 
 #include "common/config-manager.h"
 #include "common/util.h"
+#include "sound/midiplugin.h"
 #include "sound/mpu401.h"
 
 #include <AudioToolbox/AUGraph.h>
@@ -192,8 +193,45 @@
 	MusicDeviceSysEx(_synth, buf, length+2);
 }
 
-MidiDriver *MidiDriver_CORE_create() {
-	return new MidiDriver_CORE();
+
+// Plugin interface
+
+class CoreAudioMidiPlugin : public MidiPluginObject {
+public:
+	virtual const char *getName() const {
+		return "CoreAudio";
+	}
+
+	virtual const char *getId() const {
+		return "core";
+	}
+
+	virtual int getCapabilities() const {
+		return MDT_MIDI;
+	}
+
+	virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const;
+};
+
+PluginError CoreAudioMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const {
+	*mididriver = new MidiDriver_CORE();
+
+	return kNoError;
 }
 
+MidiDriver *MidiDriver_CORE_create(Audio::Mixer *mixer) {
+	MidiDriver *mididriver;
+
+	CoreAudioMidiPlugin p;
+	p.createInstance(mixer, &mididriver);
+
+	return mididriver;
+}
+
+//#if PLUGIN_ENABLED_DYNAMIC(COREAUDIO)
+	//REGISTER_PLUGIN_DYNAMIC(COREAUDIO, PLUGIN_TYPE_MIDI, CoreAudioMidiPlugin);
+//#else
+	REGISTER_PLUGIN_STATIC(COREAUDIO, PLUGIN_TYPE_MIDI, CoreAudioMidiPlugin);
+//#endif
+
 #endif // MACOSX

Modified: scummvm/branches/gsoc2008-tfmx/backends/midi/coremidi.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/backends/midi/coremidi.cpp	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/backends/midi/coremidi.cpp	2008-05-14 23:47:07 UTC (rev 32130)
@@ -26,6 +26,7 @@
 
 #include "common/config-manager.h"
 #include "common/util.h"
+#include "sound/midiplugin.h"
 #include "sound/mpu401.h"
 
 #include <CoreMIDI/CoreMIDI.h>
@@ -175,8 +176,45 @@
 	MIDISend(mOutPort, mDest, packetList);
 }
 
-MidiDriver *MidiDriver_CoreMIDI_create() {
-	return new MidiDriver_CoreMIDI();
+
+// Plugin interface
+
+class CoreMIDIMidiPlugin : public MidiPluginObject {
+public:
+	virtual const char *getName() const {
+		return "CoreMIDI";
+	}
+
+	virtual const char *getId() const {
+		return "coremidi";
+	}
+
+	virtual int getCapabilities() const {
+		return MDT_MIDI;
+	}
+
+	virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const;
+};
+
+PluginError CoreMIDIMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const {
+	*mididriver = new MidiDriver_CoreMIDI();
+
+	return kNoError;
 }
 
+MidiDriver *MidiDriver_CoreMIDI_create(Audio::Mixer *mixer) {
+	MidiDriver *mididriver;
+
+	CoreMIDIMidiPlugin p;
+	p.createInstance(mixer, &mididriver);
+
+	return mididriver;
+}
+
+//#if PLUGIN_ENABLED_DYNAMIC(COREMIDI)
+	//REGISTER_PLUGIN_DYNAMIC(COREMIDI, PLUGIN_TYPE_MIDI, CoreMIDIMidiPlugin);
+//#else
+	REGISTER_PLUGIN_STATIC(COREMIDI, PLUGIN_TYPE_MIDI, CoreMIDIMidiPlugin);
+//#endif
+
 #endif // MACOSX

Modified: scummvm/branches/gsoc2008-tfmx/backends/midi/dmedia.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/backends/midi/dmedia.cpp	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/backends/midi/dmedia.cpp	2008-05-14 23:47:07 UTC (rev 32130)
@@ -18,7 +18,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
- * $URL:$
+ * $URL$
  * $Id: dmedia.cpp$
  */
 
@@ -30,8 +30,9 @@
 #if defined(IRIX)
 
 #include "common/scummsys.h"
+#include "common/util.h"
+#include "sound/midiplugin.h"
 #include "sound/mpu401.h"
-#include "common/util.h"
 
 #include <dmedia/midi.h>
 #include <sys/types.h>
@@ -174,8 +175,45 @@
 	}
 }
 
-MidiDriver *MidiDriver_DMEDIA_create() {
-	return new MidiDriver_DMEDIA();
+
+// Plugin interface
+
+class DMediaMidiPlugin : public MidiPluginObject {
+public:
+	virtual const char *getName() const {
+		return "DMedia";
+	}
+
+	virtual const char *getId() const {
+		return "dmedia";
+	}
+
+	virtual int getCapabilities() const {
+		return MDT_MIDI;
+	}
+
+	virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const;
+};
+
+PluginError DMediaMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const {
+	*mididriver = new MidiDriver_DMEDIA();
+
+	return kNoError;
 }
 
+MidiDriver *MidiDriver_DMEDIA_create(Audio::Mixer *mixer) {
+	MidiDriver *mididriver;
+
+	DMediaMidiPlugin p;
+	p.createInstance(mixer, &mididriver);
+
+	return mididriver;
+}
+
+//#if PLUGIN_ENABLED_DYNAMIC(DMEDIA)
+	//REGISTER_PLUGIN_DYNAMIC(DMEDIA, PLUGIN_TYPE_MIDI, DMediaMidiPlugin);
+//#else
+	REGISTER_PLUGIN_STATIC(DMEDIA, PLUGIN_TYPE_MIDI, DMediaMidiPlugin);
+//#endif
+
 #endif

Modified: scummvm/branches/gsoc2008-tfmx/backends/midi/quicktime.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/backends/midi/quicktime.cpp	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/backends/midi/quicktime.cpp	2008-05-14 23:47:07 UTC (rev 32130)
@@ -24,10 +24,10 @@
 
 #if defined(MACOSX) || defined(macintosh)
 
-
-#include "sound/mpu401.h"
 #include "common/endian.h"
 #include "common/util.h"
+#include "sound/midiplugin.h"
+#include "sound/mpu401.h"
 
 #if defined(MACOSX)
 #include <QuickTime/QuickTimeComponents.h>
@@ -250,8 +250,45 @@
 	}
 }
 
-MidiDriver *MidiDriver_QT_create() {
-	return new MidiDriver_QT();
+
+// Plugin interface
+
+class QuickTimeMidiPlugin : public MidiPluginObject {
+public:
+	virtual const char *getName() const {
+		return "QuickTime";
+	}
+
+	virtual const char *getId() const {
+		return "qt";
+	}
+
+	virtual int getCapabilities() const {
+		return MDT_MIDI;
+	}
+
+	virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const;
+};
+
+PluginError QuickTimeMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const {
+	*mididriver = new MidiDriver_QT();
+
+	return kNoError;
 }
 
+MidiDriver *MidiDriver_QT_create(Audio::Mixer *mixer) {
+	MidiDriver *mididriver;
+
+	QuickTimeMidiPlugin p;
+	p.createInstance(mixer, &mididriver);
+
+	return mididriver;
+}
+
+//#if PLUGIN_ENABLED_DYNAMIC(QUICKTIME)
+	//REGISTER_PLUGIN_DYNAMIC(QUICKTIME, PLUGIN_TYPE_MIDI, QuickTimeMidiPlugin);
+//#else
+	REGISTER_PLUGIN_STATIC(QUICKTIME, PLUGIN_TYPE_MIDI, QuickTimeMidiPlugin);
+//#endif
+
 #endif // MACOSX || macintosh

Modified: scummvm/branches/gsoc2008-tfmx/backends/midi/seq.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/backends/midi/seq.cpp	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/backends/midi/seq.cpp	2008-05-14 23:47:07 UTC (rev 32130)
@@ -30,8 +30,9 @@
 
 #if defined(UNIX) && !defined(__BEOS__) && !defined(__MAEMO__)
 
+#include "common/util.h"
+#include "sound/midiplugin.h"
 #include "sound/mpu401.h"
-#include "common/util.h"
 
 #include <fcntl.h>
 #include <unistd.h>
@@ -169,8 +170,45 @@
 	write (device, buf, position);
 }
 
-MidiDriver *MidiDriver_SEQ_create() {
-	return new MidiDriver_SEQ();
+
+// Plugin interface
+
+class SeqMidiPlugin : public MidiPluginObject {
+public:
+	virtual const char *getName() const {
+		return "SEQ";
+	}
+
+	virtual const char *getId() const {
+		return "seq";
+	}
+
+	virtual int getCapabilities() const {
+		return MDT_MIDI;
+	}
+
+	virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const;
+};
+
+PluginError SeqMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const {
+	*mididriver = new MidiDriver_SEQ();
+
+	return kNoError;
 }
 
+MidiDriver *MidiDriver_SEQ_create(Audio::Mixer *mixer) {
+	MidiDriver *mididriver;
+
+	SeqMidiPlugin p;
+	p.createInstance(mixer, &mididriver);
+
+	return mididriver;
+}
+
+//#if PLUGIN_ENABLED_DYNAMIC(SEQ)
+	//REGISTER_PLUGIN_DYNAMIC(SEQ, PLUGIN_TYPE_MIDI, SeqMidiPlugin);
+//#else
+	REGISTER_PLUGIN_STATIC(SEQ, PLUGIN_TYPE_MIDI, SeqMidiPlugin);
+//#endif
+
 #endif

Modified: scummvm/branches/gsoc2008-tfmx/backends/midi/timidity.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/backends/midi/timidity.cpp	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/backends/midi/timidity.cpp	2008-05-14 23:47:07 UTC (rev 32130)
@@ -36,8 +36,9 @@
 
 #if defined (UNIX)
 
+#include "common/util.h"
+#include "sound/midiplugin.h"
 #include "sound/mpu401.h"
-#include "common/util.h"
 
 #include <fcntl.h>
 #include <unistd.h>
@@ -510,8 +511,45 @@
 	timidity_write_data(buf, position);
 }
 
-MidiDriver *MidiDriver_TIMIDITY_create() {
-	return new MidiDriver_TIMIDITY();
+
+// Plugin interface
+
+class TimidityMidiPlugin : public MidiPluginObject {
+public:
+	virtual const char *getName() const {
+		return "TiMidity";
+	}
+
+	virtual const char *getId() const {
+		return "timidity";
+	}
+
+	virtual int getCapabilities() const {
+		return MDT_MIDI;
+	}
+
+	virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const;
+};
+
+PluginError TimidityMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const {
+	*mididriver = new MidiDriver_TIMIDITY();
+
+	return kNoError;
 }
 
+MidiDriver *MidiDriver_TIMIDITY_create(Audio::Mixer *mixer) {
+	MidiDriver *mididriver;
+
+	TimidityMidiPlugin p;
+	p.createInstance(mixer, &mididriver);
+
+	return mididriver;
+}
+
+//#if PLUGIN_ENABLED_DYNAMIC(TIMIDITY)
+	//REGISTER_PLUGIN_DYNAMIC(TIMIDITY, PLUGIN_TYPE_MIDI, TimidityMidiPlugin);
+//#else
+	REGISTER_PLUGIN_STATIC(TIMIDITY, PLUGIN_TYPE_MIDI, TimidityMidiPlugin);
+//#endif
+
 #endif // defined (UNIX)

Modified: scummvm/branches/gsoc2008-tfmx/backends/midi/windows.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/backends/midi/windows.cpp	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/backends/midi/windows.cpp	2008-05-14 23:47:07 UTC (rev 32130)
@@ -24,12 +24,15 @@
 
 #if defined(WIN32) && !defined(_WIN32_WCE)
 
+#include <windows.h>
+// winnt.h defines ARRAYSIZE, but we want our own one...
+#undef ARRAYSIZE
 
-#include <windows.h>
-#include <mmsystem.h>
+#include "sound/midiplugin.h"
 #include "sound/mpu401.h"
-#include "common/util.h"
 
+#include <mmsystem.h>
+
 ////////////////////////////////////////
 //
 // Windows MIDI driver
@@ -141,8 +144,45 @@
 	}
 }
 
-MidiDriver *MidiDriver_WIN_create() {
-	return new MidiDriver_WIN();
+
+// Plugin interface
+
+class WindowsMidiPlugin : public MidiPluginObject {
+public:
+	virtual const char *getName() const {
+		return "Windows MIDI";
+	}
+
+	virtual const char *getId() const {
+		return "windows";
+	}
+
+	virtual int getCapabilities() const {
+		return MDT_MIDI;
+	}
+
+	virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const;
+};
+
+PluginError WindowsMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const {
+	*mididriver = new MidiDriver_WIN();
+
+	return kNoError;
 }
 
+MidiDriver *MidiDriver_WIN_create(Audio::Mixer *mixer) {
+	MidiDriver *mididriver;
+
+	WindowsMidiPlugin p;
+	p.createInstance(mixer, &mididriver);
+
+	return mididriver;
+}
+
+//#if PLUGIN_ENABLED_DYNAMIC(WINDOWS)
+	//REGISTER_PLUGIN_DYNAMIC(WINDOWS, PLUGIN_TYPE_MIDI, WindowsMidiPlugin);
+//#else
+	REGISTER_PLUGIN_STATIC(WINDOWS, PLUGIN_TYPE_MIDI, WindowsMidiPlugin);
+//#endif
+
 #endif

Modified: scummvm/branches/gsoc2008-tfmx/backends/midi/ypa1.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/backends/midi/ypa1.cpp	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/backends/midi/ypa1.cpp	2008-05-14 23:47:07 UTC (rev 32130)
@@ -22,8 +22,9 @@
  * $Id$
  */
 
+#include "common/util.h"
+#include "sound/midiplugin.h"
 #include "sound/mpu401.h"
-#include "common/util.h"
 
 #include "Pa1Lib.h"
 
@@ -102,6 +103,43 @@
 	}
 }
 
-MidiDriver *MidiDriver_YamahaPa1_create() {
-	return new MidiDriver_YamahaPa1();
+
+// Plugin interface
+
+class YamahaPa1MidiPlugin : public MidiPluginObject {
+public:
+	virtual const char *getName() const {
+		return "Yamaha Pa1";
+	}
+
+	virtual const char *getId() const {
+		return "ypa1";
+	}
+
+	virtual int getCapabilities() const {
+		return MDT_MIDI;
+	}
+
+	virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const;
+};
+
+PluginError YamahaPa1MidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const {
+	*mididriver = new MidiDriver_YamahaPa1();
+
+	return kNoError;
 }
+
+MidiDriver *MidiDriver_YamahaPa1_create(Audio::Mixer *mixer) {
+	MidiDriver *mididriver;
+
+	YamahaPa1MidiPlugin p;
+	p.createInstance(mixer, &mididriver);
+
+	return mididriver;
+}
+
+//#if PLUGIN_ENABLED_DYNAMIC(YPA1)
+	//REGISTER_PLUGIN_DYNAMIC(YPA1, PLUGIN_TYPE_MIDI, YamahaPa1MidiPlugin);
+//#else
+	REGISTER_PLUGIN_STATIC(YPA1, PLUGIN_TYPE_MIDI, YamahaPa1MidiPlugin);
+//#endif

Modified: scummvm/branches/gsoc2008-tfmx/backends/midi/zodiac.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/backends/midi/zodiac.cpp	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/backends/midi/zodiac.cpp	2008-05-14 23:47:07 UTC (rev 32130)
@@ -22,8 +22,9 @@
  * $Id$
  */
 
+#include "common/util.h"
+#include "sound/midiplugin.h"
 #include "sound/mpu401.h"
-#include "common/util.h"
 
 #ifndef DISABLE_TAPWAVE
 
@@ -120,8 +121,45 @@
 	TwMidiSysEx(_midiHandle, 0, (byte *)buf, length + 2);
 }
 
-MidiDriver *MidiDriver_Zodiac_create() {
-	return new MidiDriver_Zodiac();
+
+// Plugin interface
+
+class ZodiacMidiPlugin : public MidiPluginObject {
+public:
+	virtual const char *getName() const {
+		return "Tapwave Zodiac";
+	}
+
+	virtual const char *getId() const {
+		return "zodiac";
+	}
+
+	virtual int getCapabilities() const {
+		return MDT_MIDI;
+	}
+
+	virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const;
+};
+
+PluginError ZodiacMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const {
+	*mididriver = new MidiDriver_Zodiac();
+
+	return kNoError;
 }
 
+MidiDriver *MidiDriver_Zodiac_create(Audio::Mixer *mixer) {
+	MidiDriver *mididriver;
+
+	ZodiacMidiPlugin p;
+	p.createInstance(mixer, &mididriver);
+
+	return mididriver;
+}
+
+//#if PLUGIN_ENABLED_DYNAMIC(ZODIAC)
+	//REGISTER_PLUGIN_DYNAMIC(ZODIAC, PLUGIN_TYPE_MIDI, ZodiacMidiPlugin);
+//#else
+	REGISTER_PLUGIN_STATIC(ZODIAC, PLUGIN_TYPE_MIDI, ZodiacMidiPlugin);
+//#endif
+
 #endif

Modified: scummvm/branches/gsoc2008-tfmx/backends/platform/dc/selector.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/backends/platform/dc/selector.cpp	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/backends/platform/dc/selector.cpp	2008-05-14 23:47:07 UTC (rev 32130)
@@ -151,8 +151,8 @@
 
 static void detectGames(FSList &files, GameList &candidates)
 {
-  const PluginList &plugins = PluginManager::instance().getPlugins();
-  PluginList::const_iterator iter = plugins.begin();
+  const EnginePluginList &plugins = EngineMan.getPlugins();
+  EnginePluginList::const_iterator iter = plugins.begin();
   for (iter = plugins.begin(); iter != plugins.end(); ++iter) {
     candidates.push_back((*iter)->detectGames(files));
   }

Modified: scummvm/branches/gsoc2008-tfmx/backends/platform/ds/arm9/source/gbampsave.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/backends/platform/ds/arm9/source/gbampsave.cpp	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/backends/platform/ds/arm9/source/gbampsave.cpp	2008-05-14 23:47:07 UTC (rev 32130)
@@ -146,7 +146,7 @@
 GBAMPSaveFile* GBAMPSaveFileManager::openSavefile(char const* name, bool saveOrLoad) {
 	char fileSpec[128];
 
-	strcpy(fileSpec, getSavePath());
+	strcpy(fileSpec, getSavePath().c_str());
 
 	if (fileSpec[strlen(fileSpec) - 1] == '/') {
 		sprintf(fileSpec, "%s%s", getSavePath(), name);
@@ -169,7 +169,7 @@
 	enum { TYPE_NO_MORE = 0, TYPE_FILE = 1, TYPE_DIR = 2 };
 	char name[256];
 
-	DS::std_cwd((char *) getSavePath());
+	DS::std_cwd((char*)getSavePath().c_str()); //TODO : Check this suspicious const-cast
 //	consolePrintf("Save path: '%s', pattern: '%s'\n", getSavePath(),pattern);
 
 
@@ -177,7 +177,6 @@
 
 	Common::StringList list;
 
-
 	do {
 
 		if (fileType == TYPE_FILE) {

Modified: scummvm/branches/gsoc2008-tfmx/backends/platform/ds/arm9/source/osystem_ds.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/backends/platform/ds/arm9/source/osystem_ds.cpp	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/backends/platform/ds/arm9/source/osystem_ds.cpp	2008-05-14 23:47:07 UTC (rev 32130)
@@ -57,8 +57,7 @@
 	delete _timer;
 }
 
-int OSystem_DS::timerHandler(int t)
-{
+int OSystem_DS::timerHandler(int t) {
 	DSTimerManager *tm = (DSTimerManager *)g_system->getTimerManager();
 	tm->handler();
 	return t;
@@ -183,8 +182,7 @@
 }
 
 
-void OSystem_DS::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h)
-{
+void OSystem_DS::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) {
 //	consolePrintf("Copy rect %d, %d   %d, %d ", x, y, w, h);
 
 	if (w <= 1) return;
@@ -229,8 +227,7 @@
 
 }
 
-void OSystem_DS::updateScreen()
-{
+void OSystem_DS::updateScreen() {
 
 	if (_frameBufferExists)
 	{
@@ -253,30 +250,25 @@
 	DS::setShakePos(shakeOffset);
 }
 
-void OSystem_DS::showOverlay ()
-{
+void OSystem_DS::showOverlay () {
 //	consolePrintf("showovl\n");
 	DS::displayMode16Bit();
 }
 
-void OSystem_DS::hideOverlay ()
-{
+void OSystem_DS::hideOverlay () {
 	DS::displayMode8Bit();
 }
 
-void OSystem_DS::clearOverlay ()
-{
+void OSystem_DS::clearOverlay () {
 	memset((u16 *) DS::get16BitBackBuffer(), 0, 512 * 256 * 2);
 //	consolePrintf("clearovl\n");
 }
 
-void OSystem_DS::grabOverlay (OverlayColor *buf, int pitch)
-{
+void OSystem_DS::grabOverlay (OverlayColor *buf, int pitch) {
 //	consolePrintf("grabovl\n");
 }
 
-void OSystem_DS::copyRectToOverlay (const OverlayColor *buf, int pitch, int x, int y, int w, int h)
-{
+void OSystem_DS::copyRectToOverlay (const OverlayColor *buf, int pitch, int x, int y, int w, int h) {
 	u16* bg = (u16 *) DS::get16BitBackBuffer();
 	u16* src = (u16 *) buf;
 
@@ -313,27 +305,23 @@
 
 }
 
-int16 OSystem_DS::getOverlayHeight()
-{
+int16 OSystem_DS::getOverlayHeight() {
 //	consolePrintf("getovlheight\n");
 	return getHeight();
 }
 
-int16 OSystem_DS::getOverlayWidth()
-{
+int16 OSystem_DS::getOverlayWidth() {
 //	consolePrintf("getovlwid\n");
 	return getWidth();
 }
 
 
-bool OSystem_DS::showMouse(bool visible)
-{
+bool OSystem_DS::showMouse(bool visible) {
 	DS::setShowCursor(visible);
 	return true;
 }
 
-void OSystem_DS::warpMouse(int x, int y)
-{
+void OSystem_DS::warpMouse(int x, int y) {
 }
 
 void OSystem_DS::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, byte keycolor, int targetCursorScale) {
@@ -344,8 +332,7 @@
 	eventQueue[queuePos++] = e;
 }
 
-bool OSystem_DS::pollEvent(Common::Event &event)
-{
+bool OSystem_DS::pollEvent(Common::Event &event) {
 
 	if (lastPenFrame != DS::getMillis()) {
 
@@ -398,13 +385,11 @@
 	return false;
 }
 
-uint32 OSystem_DS::getMillis()
-{
+uint32 OSystem_DS::getMillis() {
 	return DS::getMillis();
 }
 
-void OSystem_DS::delayMillis(uint msecs)
-{
+void OSystem_DS::delayMillis(uint msecs) {
 	int st = getMillis();
 	DS::addEventsToQueue();
 	DS::CD::update();
@@ -419,25 +404,25 @@
 	DS::addEventsToQueue();
 }
 
-OSystem::MutexRef OSystem_DS::createMutex(void)
-{
+void OSystem_DS::getTimeAndDate(struct tm &t) const {
+	time_t curTime = time(0);
+	t = *localtime(&curTime);
+}
+
+OSystem::MutexRef OSystem_DS::createMutex(void) {
 	return NULL;
 }
 
-void OSystem_DS::lockMutex(MutexRef mutex)
-{
+void OSystem_DS::lockMutex(MutexRef mutex) {
 }
 
-void OSystem_DS::unlockMutex(MutexRef mutex)
-{
+void OSystem_DS::unlockMutex(MutexRef mutex) {
 }
 
-void OSystem_DS::deleteMutex(MutexRef mutex)
-{
+void OSystem_DS::deleteMutex(MutexRef mutex) {
 }
 
-void OSystem_DS::clearSoundCallback()
-{
+void OSystem_DS::clearSoundCallback() {
 	consolePrintf("Clearing sound callback");
 //	DS::setSoundProc(NULL, NULL);
 }
@@ -447,23 +432,19 @@
 	return DS::getSoundFrequency();
 }
 
-bool OSystem_DS::openCD(int drive)
-{
+bool OSystem_DS::openCD(int drive) {
 	return DS::CD::checkCD();
 }
 
-bool OSystem_DS::pollCD()
-{
+bool OSystem_DS::pollCD() {
 	return DS::CD::isPlaying();
 }
 
-void OSystem_DS::playCD(int track, int num_loops, int start_frame, int duration)
-{
+void OSystem_DS::playCD(int track, int num_loops, int start_frame, int duration) {
 	DS::CD::playTrack(track, num_loops, start_frame, duration);
 }
 
-void OSystem_DS::stopCD()
-{
+void OSystem_DS::stopCD() {
 	DS::CD::stopTrack();
 }
 
@@ -471,8 +452,7 @@
 {
 }
 
-void OSystem_DS::quit()
-{
+void OSystem_DS::quit() {
 /*	consolePrintf("Soft resetting...");
 	IPC->reset = 1;
 	REG_IE = 0;
@@ -481,16 +461,13 @@
 	swiSoftReset();*/
 }
 
-void OSystem_DS::setWindowCaption(const char *caption)
-{
+void OSystem_DS::setWindowCaption(const char *caption) {
 }
 
-void OSystem_DS::displayMessageOnOSD(const char *msg)
-{
+void OSystem_DS::displayMessageOnOSD(const char *msg) {
 }
 
-Common::SaveFileManager* OSystem_DS::getSavefileManager()
-{
+Common::SaveFileManager* OSystem_DS::getSavefileManager() {
 	bool forceSram;
 
 	if (ConfMan.hasKey("forcesramsave", "ds")) {

Modified: scummvm/branches/gsoc2008-tfmx/backends/platform/ds/arm9/source/osystem_ds.h
===================================================================
--- scummvm/branches/gsoc2008-tfmx/backends/platform/ds/arm9/source/osystem_ds.h	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/backends/platform/ds/arm9/source/osystem_ds.h	2008-05-14 23:47:07 UTC (rev 32130)
@@ -107,6 +107,7 @@
 	virtual bool pollEvent(Common::Event &event);
 	virtual uint32 getMillis();
 	virtual void delayMillis(uint msecs);
+	virtual void getTimeAndDate(struct tm &t) const;
 
 	virtual MutexRef createMutex(void);
 	virtual void lockMutex(MutexRef mutex);

Modified: scummvm/branches/gsoc2008-tfmx/backends/platform/ds/arm9/source/ramsave.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/backends/platform/ds/arm9/source/ramsave.cpp	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/backends/platform/ds/arm9/source/ramsave.cpp	2008-05-14 23:47:07 UTC (rev 32130)
@@ -383,16 +383,24 @@
 	flushToSaveRAM();
 }
 
-void DSSaveFileManager::removeSavefile(const char *filename) {
-	TODO: Implement this. Most likely, you just have to use the code of deleteFile?
+bool DSSaveFileManager::removeSavefile(const char *filename) {
+	consolePrintf("DSSaveFileManager::removeSavefile : Not implemented yet.\n");
+	assert(false);
+	//TODO: Implement this. Most likely, you just have to use the code of deleteFile?
+	return false;
 }
 
 
 Common::StringList DSSaveFileManager::listSavefiles(const char *pattern) {
+	consolePrintf("DSSaveFileManager::listSavefiles : Not implemented yet.\n");
+	assert(false);
+	return Common::StringList();
+	/*
 	TODO: Implement this. If you don't understand what it should do, just ask
 	(e.g. on scummvm-devel or Fingolfin). It should be pretty simple if you
 	use Common::matchString from common/util.h and read the Doxygen docs,
 	then combine this with the old code below...
+	*/
 
 /*
 void DSSaveFileManager::listSavefiles(const char *prefix, bool *marks, int num) {

Modified: scummvm/branches/gsoc2008-tfmx/backends/platform/symbian/src/SymbianOS.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/backends/platform/symbian/src/SymbianOS.cpp	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/backends/platform/symbian/src/SymbianOS.cpp	2008-05-14 23:47:07 UTC (rev 32130)
@@ -142,7 +142,7 @@
 }
 
 OSystem_SDL_Symbian::~OSystem_SDL_Symbian() {
-	delete []_stereo_mix_buffer;
+	delete[] _stereo_mix_buffer;
 }
 
 int OSystem_SDL_Symbian::getDefaultGraphicsMode() const {

Modified: scummvm/branches/gsoc2008-tfmx/backends/platform/wince/CELauncherDialog.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/backends/platform/wince/CELauncherDialog.cpp	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/backends/platform/wince/CELauncherDialog.cpp	2008-05-14 23:47:07 UTC (rev 32130)
@@ -77,7 +77,7 @@
 	FSList files;
 	node.getChildren(files, FilesystemNode::kListFilesOnly);
 	// detect
-	GameList candidates(PluginManager::instance().detectGames(files));
+	GameList candidates(EngineMan.detectGames(files));
 	// insert
 	if (candidates.size() >= 1) {
 		GameDescriptor result = candidates[0];

Modified: scummvm/branches/gsoc2008-tfmx/backends/plugins/dc/dc-provider.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/backends/plugins/dc/dc-provider.cpp	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/backends/plugins/dc/dc-provider.cpp	2008-05-14 23:47:07 UTC (rev 32130)
@@ -83,9 +83,17 @@
 };
 
 
-Plugin* SDLPluginProvider::createPlugin(const Common::String &filename) const {
+Plugin* DCPluginProvider::createPlugin(const Common::String &filename) const {
 	return new DCPlugin(filename);
 }
 
+bool DCPluginProvider::isPluginFilename(const Common::String &filename) const {
+	// Check the plugin suffix
+	if (!filename.hasSuffix(".PLG"))
+		return false;
 
+	return true;
+}
+
+
 #endif // defined(DYNAMIC_MODULES) && defined(__DC__)

Modified: scummvm/branches/gsoc2008-tfmx/backends/plugins/dc/dc-provider.h
===================================================================
--- scummvm/branches/gsoc2008-tfmx/backends/plugins/dc/dc-provider.h	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/backends/plugins/dc/dc-provider.h	2008-05-14 23:47:07 UTC (rev 32130)
@@ -34,8 +34,7 @@
 protected:
 	Plugin* createPlugin(const Common::String &filename) const;
 
-	virtual const char* getPrefix() const { return ""; }
-	virtual const char* getSuffix() const { return ".PLG"; }
+	bool isPluginFilename(const Common::String &filename) const;
 
 	virtual void addCustomDirectories(Common::StringList &dirs) const {
 		dirs.push_back("/");

Modified: scummvm/branches/gsoc2008-tfmx/backends/plugins/win32/win32-provider.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/backends/plugins/win32/win32-provider.cpp	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/backends/plugins/win32/win32-provider.cpp	2008-05-14 23:47:07 UTC (rev 32130)
@@ -107,5 +107,13 @@
 	return new Win32Plugin(filename);
 }
 
+bool Win32PluginProvider::isPluginFilename(const Common::String &filename) const {
+	// Check the plugin suffix
+	if (!filename.hasSuffix(".dll"))
+		return false;
 
+	return true;
+}
+
+
 #endif // defined(DYNAMIC_MODULES) && defined(_WIN32)

Modified: scummvm/branches/gsoc2008-tfmx/backends/plugins/win32/win32-provider.h
===================================================================
--- scummvm/branches/gsoc2008-tfmx/backends/plugins/win32/win32-provider.h	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/backends/plugins/win32/win32-provider.h	2008-05-14 23:47:07 UTC (rev 32130)
@@ -34,8 +34,7 @@
 protected:
 	Plugin* createPlugin(const Common::String &filename) const;
 
-	virtual const char* getPrefix() const { return ""; }
-	virtual const char* getSuffix() const { return ".dll"; }
+	bool isPluginFilename(const Common::String &filename) const;
 
 	virtual void addCustomDirectories(Common::StringList &dirs) const {}
 };

Modified: scummvm/branches/gsoc2008-tfmx/base/commandLine.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/base/commandLine.cpp	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/base/commandLine.cpp	2008-05-14 23:47:07 UTC (rev 32130)
@@ -23,7 +23,7 @@
  *
  */
 
-#include "engines/engine.h"
+#include "engines/metaengine.h"
 #include "base/commandLine.h"
 #include "base/plugins.h"
 #include "base/version.h"
@@ -559,10 +559,10 @@
 	printf("Game ID              Full Title                                            \n"
 	       "-------------------- ------------------------------------------------------\n");
 
-	const PluginList &plugins = PluginManager::instance().getPlugins();
-	PluginList::const_iterator iter = plugins.begin();
+	const EnginePlugin::list &plugins = EngineMan.getPlugins();
+	EnginePlugin::list::const_iterator iter = plugins.begin();
 	for (iter = plugins.begin(); iter != plugins.end(); ++iter) {
-		GameList list = (*iter)->getSupportedGames();
+		GameList list = (**iter)->getSupportedGames();
 		for (GameList::iterator v = list.begin(); v != list.end(); ++v) {
 			printf("%-20s %s\n", v->gameid().c_str(), v->description().c_str());
 		}
@@ -586,7 +586,7 @@
 			// to find the proper desc. In fact, the platform probably should
 			// be taken into account, too.
 			Common::String gameid(name);
-			GameDescriptor g = Base::findGame(gameid);
+			GameDescriptor g = EngineMan.findGame(gameid);
 			if (g.description().size() > 0)
 				description = g.description();
 		}
@@ -613,8 +613,8 @@
 	gameid.toLowercase();	// Normalize it to lower case
 
 	// Find the plugin that will handle the specified gameid
-	const Plugin *plugin = 0;
-	GameDescriptor game = Base::findGame(gameid, &plugin);
+	const EnginePlugin *plugin = 0;
+	GameDescriptor game = EngineMan.findGame(gameid, &plugin);
 
 	if (!plugin) {
 		error("Could not find any plugin to handle gameid '%s' (target '%s')", gameid.c_str(), target);
@@ -622,7 +622,7 @@
 	}
 
 	// Query the plugin for a list of savegames
-	SaveStateList saveList = plugin->listSaves(target);
+	SaveStateList saveList = (*plugin)->listSaves(target);
 
 	// TODO: Include more info about the target (desc, engine name, ...) ???
 	printf("Saves for target '%s':\n", target);
@@ -667,7 +667,7 @@
 			continue;
 		}
 
-		GameList candidates(PluginManager::instance().detectGames(files));
+		GameList candidates(EngineMan.detectGames(files));
 		bool gameidDiffers = false;
 		GameList::iterator x;
 		for (x = candidates.begin(); x != candidates.end(); ++x) {
@@ -740,7 +740,7 @@
 	// domain (i.e. a target) matching this argument, or alternatively
 	// whether there is a gameid matching that name.
 	if (!command.empty()) {
-		GameDescriptor gd = Base::findGame(command);
+		GameDescriptor gd = EngineMan.findGame(command);
 		if (ConfMan.hasGameDomain(command) || !gd.gameid().empty()) {
 			bool idCameFromCommandLine = false;
 

Modified: scummvm/branches/gsoc2008-tfmx/base/game.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/base/game.cpp	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/base/game.cpp	2008-05-14 23:47:07 UTC (rev 32130)
@@ -75,29 +75,3 @@
 	}
 	_thumbnail = t;
 }
-
-
-namespace Base {
-
-// TODO: Find a better name & place for this function.
-GameDescriptor findGame(const Common::String &gameName, const Plugin **plugin) {
-	// Find the GameDescriptor for this target
-	const PluginList &plugins = PluginManager::instance().getPlugins();
-	GameDescriptor result;
-
-	if (plugin)
-		*plugin = 0;
-
-	PluginList::const_iterator iter = plugins.begin();
-	for (iter = plugins.begin(); iter != plugins.end(); ++iter) {
-		result = (*iter)->findGame(gameName.c_str());
-		if (!result.gameid().empty()) {
-			if (plugin)
-				*plugin = *iter;
-			break;
-		}
-	}
-	return result;
-}
-
-} // End of namespace Base

Modified: scummvm/branches/gsoc2008-tfmx/base/game.h
===================================================================
--- scummvm/branches/gsoc2008-tfmx/base/game.h	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/base/game.h	2008-05-14 23:47:07 UTC (rev 32130)
@@ -179,15 +179,4 @@
 /** List of savestates. */
 typedef Common::Array<SaveStateDescriptor> SaveStateList;
 
-
-class Plugin;
-
-namespace Base {
-
-// TODO: Find a better name & place for this function.
-GameDescriptor findGame(const Common::String &gameName, const Plugin **plugin = NULL);
-
-} // End of namespace Base
-
-
 #endif

Modified: scummvm/branches/gsoc2008-tfmx/base/main.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/base/main.cpp	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/base/main.cpp	2008-05-14 23:47:07 UTC (rev 32130)
@@ -32,6 +32,7 @@
  */
 
 #include "engines/engine.h"
+#include "engines/metaengine.h"
 #include "base/commandLine.h"
 #include "base/plugins.h"
 #include "base/version.h"
@@ -77,8 +78,8 @@
 	return (dlg.runModal() != -1);
 }
 
-static const Plugin *detectPlugin() {
-	const Plugin *plugin = 0;
+static const EnginePlugin *detectPlugin() {
+	const EnginePlugin *plugin = 0;
 
 	// Make sure the gameid is set in the config manager, and that it is lowercase.
 	Common::String gameid(ConfMan.getActiveDomainName());
@@ -90,7 +91,7 @@
 
 	// Query the plugins and find one that will handle the specified gameid
 	printf("Looking for %s\n", gameid.c_str());
-	GameDescriptor game = Base::findGame(gameid, &plugin);
+	GameDescriptor game = EngineMan.findGame(gameid, &plugin);
 
 	if (plugin == 0) {
 		printf("Failed game detection\n");
@@ -105,7 +106,7 @@
 }
 
 // TODO: specify the possible return values here
-static int runGame(const Plugin *plugin, OSystem &system, const Common::String &edebuglevels) {
+static int runGame(const EnginePlugin *plugin, OSystem &system, const Common::String &edebuglevels) {
 	Common::String gameDataPath(ConfMan.get("path"));
 	if (gameDataPath.empty()) {
 	} else if (gameDataPath.lastChar() != '/'
@@ -138,7 +139,7 @@
 
 	// Create the game engine
 	Engine *engine = 0;
-	PluginError err = plugin->createInstance(&system, &engine);
+	PluginError err = (*plugin)->createInstance(&system, &engine);
 	if (!engine || err != kNoError) {
 		// TODO: Show an error dialog or so?
 		// TODO: Also take 'err' into consideration...
@@ -168,7 +169,7 @@
 	// Set the window caption to the game name
 	Common::String caption(ConfMan.get("description"));
 
-	Common::String desc = Base::findGame(ConfMan.get("gameid")).description();
+	Common::String desc = EngineMan.findGame(ConfMan.get("gameid")).description();
 	if (caption.empty() && !desc.empty())
 		caption = desc;
 	if (caption.empty())
@@ -298,11 +299,11 @@
 	// cleanly, so this is now enabled to encourage people to fix bits :)
 	while (0 != ConfMan.getActiveDomain()) {
 		// Try to find a plugin which feels responsible for the specified game.
-		const Plugin *plugin = detectPlugin();
+		const EnginePlugin *plugin = detectPlugin();
 		if (plugin) {
 			// Unload all plugins not needed for this game,
 			// to save memory
-			PluginManager::instance().unloadPluginsExcept(plugin);
+			PluginManager::instance().unloadPluginsExcept(PLUGIN_TYPE_ENGINE, plugin);
 
 			// Try to run the game
 			int result = runGame(plugin, system, specialDebug);
@@ -329,7 +330,7 @@
 
 		launcherDialog(system);
 	}
-	PluginManager::instance().unloadPluginsExcept(NULL);
+	PluginManager::instance().unloadPlugins();
 	PluginManager::destroy();
 	Common::ConfigManager::destroy();
 	GUI::NewGui::destroy();

Modified: scummvm/branches/gsoc2008-tfmx/base/plugins.cpp
===================================================================
--- scummvm/branches/gsoc2008-tfmx/base/plugins.cpp	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/base/plugins.cpp	2008-05-14 23:47:07 UTC (rev 32130)
@@ -24,12 +24,21 @@
  */
 
 #include "base/plugins.h"
-#include "common/util.h"
 
+#ifdef DYNAMIC_MODULES
+#include "common/config-manager.h"
+#endif
+
+// Plugin versioning
+
 int pluginTypeVersions[PLUGIN_TYPE_MAX] = {
 	PLUGIN_TYPE_ENGINE_VERSION,
+	PLUGIN_TYPE_MIDI_VERSION,
 };
 
+
+// Abstract plugins
+
 PluginType Plugin::getType() const {
 	return _type;
 }
@@ -38,31 +47,6 @@
 	return _pluginObject->getName();
 }
 
-const char *Plugin::getCopyright() const {
-	return ((MetaEngine*)_pluginObject)->getCopyright();
-}
-
-PluginError Plugin::createInstance(OSystem *syst, Engine **engine) const {
-	return ((MetaEngine*)_pluginObject)->createInstance(syst, engine);
-}
-
-GameList Plugin::getSupportedGames() const {
-	return ((MetaEngine*)_pluginObject)->getSupportedGames();
-}
-
-GameDescriptor Plugin::findGame(const char *gameid) const {
-	return ((MetaEngine*)_pluginObject)->findGame(gameid);
-}
-
-GameList Plugin::detectGames(const FSList &fslist) const {
-	return ((MetaEngine*)_pluginObject)->detectGames(fslist);
-}
-
-SaveStateList Plugin::listSaves(const char *target) const {
-	return ((MetaEngine*)_pluginObject)->listSaves(target);
-}
-
-
 class StaticPlugin : public Plugin {
 public:
 	StaticPlugin(PluginObject *pluginobject, PluginType type) {
@@ -99,6 +83,7 @@
 		// "Loader" for the static plugins.
 		// Iterate over all registered (static) plugins and load them.
 
+		// Engine plugins
 		#if PLUGIN_ENABLED_STATIC(SCUMM)
 		LINK_PLUGIN(SCUMM)
 		#endif
@@ -157,6 +142,49 @@
 		LINK_PLUGIN(TOUCHE)
 		#endif
 
+		// MIDI plugins
+		// TODO: Use defines to disable or enable each MIDI driver as a
+		// static/dynamic plugin, like it's done for the engines
+		LINK_PLUGIN(NULL)
+		#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
+		LINK_PLUGIN(WINDOWS)
+		#endif
+		#if defined(UNIX) && defined(USE_ALSA)
+		LINK_PLUGIN(ALSA)
+		#endif
+		#if defined(UNIX) && !defined(__BEOS__) && !defined(__MAEMO__)
+		LINK_PLUGIN(SEQ)
+		#endif
+		#if defined(IRIX)
+		LINK_PLUGIN(DMEDIA)
+		#endif
+		#if defined(__amigaos4__)
+		LINK_PLUGIN(CAMD)
+		#endif
+		#if defined(MACOSX)
+		LINK_PLUGIN(COREAUDIO)
+		LINK_PLUGIN(COREMIDI)
+		LINK_PLUGIN(QUICKTIME)
+		#endif
+		#if defined(PALMOS_MODE)
+		#  if defined(COMPILE_CLIE)
+		LINK_PLUGIN(YPA1)
+		#  elif defined(COMPILE_ZODIAC) && (!defined(ENABLE_SCUMM) || !defined(PALMOS_ARM))
+		LINK_PLUGIN(ZODIAC)
+		#  endif
+		#endif
+		#ifdef USE_FLUIDSYNTH
+		LINK_PLUGIN(FLUIDSYNTH)
+		#endif
+		#ifdef USE_MT32EMU
+		LINK_PLUGIN(MT32)
+		#endif
+		LINK_PLUGIN(ADLIB)
+		LINK_PLUGIN(TOWNS)
+		#if defined (UNIX)
+		LINK_PLUGIN(TIMIDITY)
+		#endif
+
 		return pl;
 	}
 };
@@ -167,30 +195,34 @@
 	PluginList pl;
 
 	// Prepare the list of directories to search
-	Common::StringList pluginDirs;
-	// TODO: Add the user specified directory (via config file)
-	pluginDirs.push_back(".");
-	pluginDirs.push_back("plugins");
+	FSList pluginDirs;
 
+	// Add the default directories
+	pluginDirs.push_back(FilesystemNode("."));
+	pluginDirs.push_back(FilesystemNode("plugins"));
+
 	// Add the provider's custom directories
 	addCustomDirectories(pluginDirs);
 
-	Common::StringList::const_iterator d;
-	for (d = pluginDirs.begin(); d != pluginDirs.end(); d++) {
+	// Add the user specified directory
+	Common::String pluginsPath(ConfMan.get("pluginspath"));
+	if (!pluginsPath.empty())
+		pluginDirs.push_back(FilesystemNode(pluginsPath));
+
+	FSList::const_iterator dir;
+	for (dir = pluginDirs.begin(); dir != pluginDirs.end(); dir++) {
 		// Load all plugins.
 		// Scan for all plugins in this directory
-		FilesystemNode dir(*d);
 		FSList files;
-		if (!dir.getChildren(files, FilesystemNode::kListFilesOnly)) {
-			debug(1, "Couldn't open plugin directory '%s'", d->c_str());
+		if (!dir->getChildren(files, FilesystemNode::kListFilesOnly)) {
+			debug(1, "Couldn't open plugin directory '%s'", dir->getPath().c_str());
 			continue;
 		} else {
-			debug(1, "Reading plugins from plugin directory '%s'", d->c_str());
+			debug(1, "Reading plugins from plugin directory '%s'", dir->getPath().c_str());
 		}
 
 		for (FSList::const_iterator i = files.begin(); i != files.end(); ++i) {
-			Common::String name(i->getName());
-			if (name.hasPrefix(getPrefix()) && name.hasSuffix(getSuffix())) {
+			if (isPluginFilename(i->getName())) {
 				pl.push_back(createPlugin(i->getPath()));
 			}
 		}
@@ -199,25 +231,25 @@
 	return pl;
 }
 
-const char* FilePluginProvider::getPrefix() const {
+bool FilePluginProvider::isPluginFilename(const Common::String &filename) const {
 #ifdef PLUGIN_PREFIX
-	return PLUGIN_PREFIX;
-#else
-	return "";
+	// Check the plugin prefix
+	if (!filename.hasPrefix(PLUGIN_PREFIX))
+		return false;
 #endif
-}
 
-const char* FilePluginProvider::getSuffix() const {
 #ifdef PLUGIN_SUFFIX
-	return PLUGIN_SUFFIX;
-#else
-	return "";
+	// Check the plugin suffix
+	if (!filename.hasSuffix(PLUGIN_SUFFIX))
+		return false;
 #endif
+
+	return true;
 }
 
-void FilePluginProvider::addCustomDirectories(Common::StringList &dirs) const {
+void FilePluginProvider::addCustomDirectories(FSList &dirs) const {
 #ifdef PLUGIN_DIRECTORY
-	dirs.push_back(PLUGIN_DIRECTORY);
+	dirs.push_back(FilesystemNode(PLUGIN_DIRECTORY));
 #endif
 }
 
@@ -261,12 +293,13 @@
 }
 
 void PluginManager::unloadPlugins() {
-	unloadPluginsExcept(NULL);
+	for (int i = 0; i < PLUGIN_TYPE_MAX; i++)
+		unloadPluginsExcept((PluginType)i, NULL);
 }
 
-void PluginManager::unloadPluginsExcept(const Plugin *plugin) {
+void PluginManager::unloadPluginsExcept(PluginType type, const Plugin *plugin) {
 	Plugin *found = NULL;
-	for (PluginList::iterator p = _plugins.begin(); p != _plugins.end(); ++p) {
+	for (PluginList::iterator p = _plugins[type].begin(); p != _plugins[type].end(); ++p) {
 		if (*p == plugin) {
 			found = *p;
 		} else {
@@ -274,9 +307,9 @@
 			delete *p;
 		}
 	}
-	_plugins.clear();
+	_plugins[type].clear();
 	if (found != NULL) {
-		_plugins.push_back(found);
+		_plugins[type].push_back(found);
 	}
 }
 
@@ -284,17 +317,27 @@
 	assert(plugin);
 	// Try to load the plugin
 	if (plugin->loadPlugin()) {
-		// If successful, add it to the list of known plugins and return.
-		_plugins.push_back(plugin);
+		// The plugin is valid, see if it provides the same module as an
+		// already loaded one and should replace it.
+		bool found = false;
 
-		// TODO/FIXME: We should perform some additional checks here:
-		// * Check for some kind of "API version" (possibly derived from the
-		//   SVN tree revision?)
-		// * If two plugins provide the same engine, we should only load one.
-		//   To detect this situation, we could just compare the plugin name.
-		//   To handle it, simply prefer modules loaded earlier to those coming.
-		//   Or vice versa... to be determined... :-)
+		PluginList::iterator pl = _plugins[plugin->getType()].begin();
+		while (!found && pl != _plugins[plugin->getType()].end()) {
+			if (!strcmp(plugin->getName(), (*pl)->getName())) {
+				// Found a duplicated module. Replace the old one.
+				found = true;
+				delete *pl;
+				*pl = plugin;
+				debug(1, "Replaced the duplicated plugin: '%s'", plugin->getName());
+			}
+			pl++;
+		}
 
+		if (!found) {
+			// If it provides a new module, just add it to the list of known plugins.
+			_plugins[plugin->getType()].push_back(plugin);
+		}
+
 		return true;
 	} else {
 		// Failed to load the plugin
@@ -303,15 +346,59 @@
 	}
 }
 
-GameList PluginManager::detectGames(const FSList &fslist) const {
+
+// Engine plugins
+
+#include "engines/metaengine.h"
+
+DECLARE_SINGLETON(EngineManager);
+
+GameDescriptor EngineManager::findGame(const Common::String &gameName, const EnginePlugin **plugin) const {
+	// Find the GameDescriptor for this target
+	const EnginePlugin::list &plugins = getPlugins();
+	GameDescriptor result;
+
+	if (plugin)
+		*plugin = 0;
+
+	EnginePlugin::list::const_iterator iter = plugins.begin();
+	for (iter = plugins.begin(); iter != plugins.end(); ++iter) {
+		result = (**iter)->findGame(gameName.c_str());
+		if (!result.gameid().empty()) {
+			if (plugin)
+				*plugin = *iter;
+			break;
+		}
+	}
+	return result;
+}
+
+GameList EngineManager::detectGames(const FSList &fslist) const {
 	GameList candidates;
 
+	const EnginePlugin::list &plugins = getPlugins();
+
 	// Iterate over all known games and for each check if it might be
 	// the game in the presented directory.
-	PluginList::const_iterator iter;
-	for (iter = _plugins.begin(); iter != _plugins.end(); ++iter) {
-		candidates.push_back((*iter)->detectGames(fslist));
+	EnginePlugin::list::const_iterator iter;
+	for (iter = plugins.begin(); iter != plugins.end(); ++iter) {
+		candidates.push_back((**iter)->detectGames(fslist));
 	}
 
 	return candidates;
 }
+
+const EnginePlugin::list &EngineManager::getPlugins() const {
+	return (const EnginePlugin::list&)PluginManager::instance().getPlugins(PLUGIN_TYPE_ENGINE);
+}
+
+
+// MIDI plugins
+
+#include "sound/midiplugin.h"
+
+DECLARE_SINGLETON(MidiManager);
+
+const MidiPlugin::list &MidiManager::getPlugins() const {
+	return (const MidiPlugin::list&)PluginManager::instance().getPlugins(PLUGIN_TYPE_MIDI);
+}

Modified: scummvm/branches/gsoc2008-tfmx/base/plugins.h
===================================================================
--- scummvm/branches/gsoc2008-tfmx/base/plugins.h	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/base/plugins.h	2008-05-14 23:47:07 UTC (rev 32130)
@@ -26,98 +26,81 @@
 #ifndef BASE_PLUGINS_H
 #define BASE_PLUGINS_H
 
-#include "common/array.h"
 #include "common/error.h"
-#include "common/list.h"
 #include "common/singleton.h"
 #include "common/util.h"
-#include "base/game.h"
 
+#ifdef DYNAMIC_MODULES
+#include "common/fs.h"
+#endif
+
 /**
- * Abstract base class for the plugin objects which handle plugins
- * instantiation. Subclasses for this may be used for engine plugins
- * and other types of plugins.
+ * @page pagePlugins An overview of the ScummVM plugin system
+ * This is a brief overview of how plugins (dynamically loadable code modules)
+ * work in ScummVM. We will explain how to write plugins, how they work internally,
+ * and sketch how porters can add support for them in their ports.
+ *
+ * \section secPluginImpl Implementing a plugin
+ * TODO
+ *
+ * \section secPluginUse Using plugins
+ * TODO
+ *
+ * \section secPluginInternals How plugins work internally
+ * TODO
+ *
+ * \section secPluginBackend How to add support for dynamic plugins to a port
+ * TODO
  */
-class PluginObject {
-public:
-	virtual ~PluginObject() {}
 
-	/** Returns the name of the plugin. */
-	virtual const char *getName() const = 0;
-};
 
-#include "engines/metaengine.h"
 
-// Global Plugin API version
+// Plugin versioning
+
+/** Global Plugin API version */
 #define PLUGIN_VERSION 1
 
 enum PluginType {
 	PLUGIN_TYPE_ENGINE = 0,
+	PLUGIN_TYPE_MIDI,
 
 	PLUGIN_TYPE_MAX
 };
 
 // TODO: Make the engine API version depend on ScummVM's version
-// because of the backlinking
+// because of the backlinking (posibly from the SVN revision)
 #define PLUGIN_TYPE_ENGINE_VERSION 1
+#define PLUGIN_TYPE_MIDI_VERSION 1
 
 extern int pluginTypeVersions[PLUGIN_TYPE_MAX];
 
-class Engine;
-class FSList;
-class OSystem;
 
-/**
- * Abstract base class for the plugin system.
- * Subclasses for this can be used to wrap both static and dynamic
- * plugins.
- */
-class Plugin {
-protected:
-	PluginObject *_pluginObject;
-	PluginType _type;
+// Plugin linking
 
-public:
-	Plugin() : _pluginObject(0) {}
-	virtual ~Plugin() {
-		//if (isLoaded())
-			//unloadPlugin();
-	}
-
-//	virtual bool isLoaded() const = 0;	// TODO
-	virtual bool loadPlugin() = 0;	// TODO: Rename to load() ?
-	virtual void unloadPlugin() = 0;	// TODO: Rename to unload() ?
-
-	PluginType getType() const;
-	const char *getName() const;
-	const char *getCopyright() const;
-
-	PluginError createInstance(OSystem *syst, Engine **engine) const;
-	GameList getSupportedGames() const;
-	GameDescriptor findGame(const char *gameid) const;
-	GameList detectGames(const FSList &fslist) const;
-	SaveStateList listSaves(const char *target) const;
-};
-
-
 #define STATIC_PLUGIN 1
 #define DYNAMIC_PLUGIN 2
 
 #define PLUGIN_ENABLED_STATIC(ID) \
 	(defined(ENABLE_##ID) && !PLUGIN_ENABLED_DYNAMIC(ID))
 
+// HACK for MSVC
+#if defined(_MSC_VER)
+	#undef PLUGIN_ENABLED_STATIC
+	#define PLUGIN_ENABLED_STATIC(ID) 1
+#endif
+
 #define PLUGIN_ENABLED_DYNAMIC(ID) \
 	(defined(ENABLE_##ID) && (ENABLE_##ID == DYNAMIC_PLUGIN) && defined(DYNAMIC_MODULES))
 
 /**
- * REGISTER_PLUGIN is a convenience macro meant to ease writing
- * the plugin interface for our modules. In particular, using it
- * makes it possible to compile the very same code in a module
- * both as a static and a dynamic plugin.
+ * REGISTER_PLUGIN_STATIC is a convenience macro which is used to declare
+ * the plugin interface for static plugins. Code (such as game engines)
+ * which needs to implement a static plugin can simply invoke this macro
+ * with a plugin ID, plugin type and PluginObject subclass, and the correct
+ * wrapper code will be inserted.
  *
- * @todo	add some means to query the plugin API version etc.
+ * @see REGISTER_PLUGIN_DYNAMIC
  */
-
 #define REGISTER_PLUGIN_STATIC(ID,TYPE,PLUGINCLASS) \
 	PluginType g_##ID##_type = TYPE; \
 	PluginObject *g_##ID##_getObject() { \
@@ -127,6 +110,15 @@
 
 #ifdef DYNAMIC_MODULES
 
+/**
+ * REGISTER_PLUGIN_DYNAMIC is a convenience macro which is used to declare
+ * the plugin interface for dynamically loadable plugins. Code (such as game engines)
+ * which needs to implement a dynamic plugin can simply invoke this macro
+ * with a plugin ID, plugin type and PluginObject subclass, and the correct
+ * wrapper code will be inserted.
+ *
+ * @see REGISTER_PLUGIN_STATIC
+ */
 #define REGISTER_PLUGIN_DYNAMIC(ID,TYPE,PLUGINCLASS) \
 	extern "C" { \
 		PLUGIN_EXPORT int32 PLUGIN_getVersion() { return PLUGIN_VERSION; } \
@@ -141,44 +133,149 @@
 #endif // DYNAMIC_MODULES
 
 
-/** List of plugins. */
+// Abstract plugins
+
+/**
+ * Abstract base class for the plugin objects which handle plugins
+ * instantiation. Subclasses for this may be used for engine plugins
+ * and other types of plugins.
+ *
+ * FIXME: This class needs better documentation, esp. how it differs from class Plugin
+ */
+class PluginObject {
+public:
+	virtual ~PluginObject() {}
+
+	/** Returns the name of the plugin. */
+	virtual const char *getName() const = 0;
+};
+
+/**
+ * Abstract base class for the plugin system.
+ * Subclasses for this can be used to wrap both static and dynamic
+ * plugins.
+ *
+ * FIXME: This class needs better documentation, esp. how it differs from class PluginObject
+ */
+class Plugin {
+protected:
+	PluginObject *_pluginObject;
+	PluginType _type;
+
+public:
+	Plugin() : _pluginObject(0) {}
+	virtual ~Plugin() {
+		//if (isLoaded())
+			//unloadPlugin();
+	}
+
+//	virtual bool isLoaded() const = 0;	// TODO
+	virtual bool loadPlugin() = 0;	// TODO: Rename to load() ?
+	virtual void unloadPlugin() = 0;	// TODO: Rename to unload() ?
+
+	PluginType getType() const;
+	const char *getName() const;
+};
+
+/** List of Plugin instances. */
 typedef Common::Array<Plugin *> PluginList;
 
+/**
+ * Convenience template to make it easier defining normal Plugin
+ * subclasses. Namely, the PluginSubclass will manage PluginObjects
+ * of a type specified via the PO_t template parameter.
+ */
+template<class PO_t>
+class PluginSubclass : public Plugin {
+public:
+	PO_t *operator->() const {
+		return (PO_t *)_pluginObject;
+	}
 
+	typedef Common::Array<PluginSubclass *> list;
+};
+
+/**
+ * Abstract base class for Plugin factories. Subclasses of this
+ * are responsible for creating plugin objects, e.g. by loading 
+ * loadable modules from storage media; by creating "fake" plugins
+ * from static code; or whatever other means.
+ */
 class PluginProvider {
 public:
 	virtual ~PluginProvider() {}
 
 	/**
 	 * Return a list of Plugin objects. The caller is responsible for actually
-	 * loading/unloading them (by invoking the appropriate methods).
+	 * loading/unloading them (by invoking the appropriate Plugin methods).
 	 * Furthermore, the caller is responsible for deleting these objects
 	 * eventually.
+	 *
+	 * @return a list of Plugin instances
 	 */
 	virtual PluginList getPlugins() = 0;
 };
 
+#ifdef DYNAMIC_MODULES
+
+/**
+ * Abstract base class for Plugin factories which load binary code from files.
+ * Subclasses only have to implement the createPlugin() method, and optionally
+ * can overload the other protected methods to achieve custom behavior.
+ */
 class FilePluginProvider : public PluginProvider {
 public:
+	/**
+	 * Return a list of Plugin objects loaded via createPlugin from disk.
+	 * For this, a list of directories is searched for plugin objects:
+	 * The current dir and its "plugins" subdirectory (if present), a list
+	 * of custom search dirs (see addCustomDirectories) and finally the 
+	 * directory specified via the "pluginspath" config variable (if any).
+	 *
+	 * @return a list of Plugin instances
+	 */
 	virtual PluginList getPlugins();
 
 protected:
+	/**
+	 * Create a Plugin instance from a loadable code module with the specified name.
+	 * Subclasses of FilePluginProvider have to at least overload this method.
+	 * If the file is not found, or does not contain loadable code, 0 is returned instead.
+	 *
+	 * @param filename	the name of the loadable code module
+	 * @return	a pointer to a Plugin instance, or 0 if an error occurred.
+	 */
 	virtual Plugin* createPlugin(const Common::String &filename) const = 0;
 
-	virtual const char* getPrefix() const;
-	virtual const char* getSuffix() const;
+	/**
+	 * Check if the supplied filename corresponds to a loadable plugin file in
+	 * the current platform.
+	 *
+	 * @param filename	the name of the file to check
+	 * @return	true if the filename corresponds to a plugin, false otherwise
+	 */
+	virtual bool isPluginFilename(const Common::String &filename) const;
 
-	virtual void addCustomDirectories(Common::StringList &dirs) const;
+	/**
+	 * Optionally add to the list of directories to be searched for
+	 * plugins by getPlugins().
+	 *
+	 * @param dirs	the reference to the list of directories to be used when
+	 * 		searching for plugins.
+	 */
+	virtual void addCustomDirectories(FSList &dirs) const;
 };
 
+#endif // DYNAMIC_MODULES
+
 /**
- * Instances of this class manage all plugins, including loading them,
- * making wrapper objects of class Plugin available, and unloading them.
+ * Singleton class which manages all plugins, including loading them,
+ * managing all Plugin class instances, and unloading them.
  */
 class PluginManager : public Common::Singleton<PluginManager> {
-	typedef Common::List<PluginProvider *> ProviderList;
+	typedef Common::Array<PluginProvider *> ProviderList;
 private:
-	PluginList _plugins;
+	PluginList _plugins[PLUGIN_TYPE_MAX];
 	ProviderList _providers;
 
 	bool tryLoadPlugin(Plugin *plugin);
@@ -193,11 +290,9 @@
 
 	void loadPlugins();
 	void unloadPlugins();
-	void unloadPluginsExcept(const Plugin *plugin);
+	void unloadPluginsExcept(PluginType type, const Plugin *plugin);
 
-	const PluginList &getPlugins()	{ return _plugins; }
-
-	GameList detectGames(const FSList &fslist) const;
+	const PluginList &getPlugins(PluginType t) { return _plugins[t]; }
 };
 
 #endif

Modified: scummvm/branches/gsoc2008-tfmx/common/array.h
===================================================================
--- scummvm/branches/gsoc2008-tfmx/common/array.h	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/common/array.h	2008-05-14 23:47:07 UTC (rev 32130)
@@ -99,7 +99,7 @@
 		if (this == &array)
 			return *this;
 
-		delete [] _data;
+		delete[] _data;
 		_size = array._size;
 		_capacity = _size + 32;
 		_data = new T[_capacity];
@@ -113,7 +113,7 @@
 	}
 
 	void clear() {
-		delete [] _data;
+		delete[] _data;
 		_data = 0;
 		_size = 0;
 		_capacity = 0;
@@ -151,7 +151,7 @@
 		if (old_data) {
 			// Copy old data
 			copy(old_data, old_data + _size, _data);
-			delete [] old_data;
+			delete[] old_data;
 		}
 	}
 
@@ -166,7 +166,7 @@
 			// Copy old data
 			int cnt = (_size < newSize ? _size : newSize);
 			copy(old_data, old_data + cnt, _data);
-			delete [] old_data;
+			delete[] old_data;
 		}
 		_size = newSize;
 	}

Modified: scummvm/branches/gsoc2008-tfmx/configure
===================================================================
--- scummvm/branches/gsoc2008-tfmx/configure	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/configure	2008-05-14 23:47:07 UTC (rev 32130)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# configue -- custom configure script for ScummVM.
+# configure -- custom configure script for ScummVM.
 #
 # ScummVM is the legal property of its developers, whose names
 # are too numerous to list here. Please refer to the COPYRIGHT
@@ -373,8 +373,15 @@
 		opt=yes
 	fi
 	engine=`echo $eng | sed 's/-/_/g'`
+
+	# Filter the parameter for the subengines
+	if test "`get_engine_sub ${engine}`" != "no" -a "$opt" != "yes" ; then
+		option_error
+		return
+	fi
+
 	if test "$opt" = "static" -o "$opt" = "dynamic" -o "$opt" = "yes" ; then
-		if test "`get_engine_build ${engine}`" != "$opt" ; then
+		if test "`get_engine_name ${engine}`" != "" -a "`get_engine_build ${engine}`" != "$opt" ; then
 			eval _engine_${engine}_build=$opt
 		else
 			option_error
@@ -386,8 +393,14 @@
 
 # Disable the given engine
 engine_disable() {
+	# Filter malformed options
+	if ( echo $1 | grep '=' ) 2> /dev/null > /dev/null ; then
+		option_error
+		return
+	fi
+
 	engine=`echo $1 | sed 's/-/_/g'`
-	if test "`get_engine_build $engine`" != "no" ; then
+	if test "`get_engine_name ${engine}`" != "" -a "`get_engine_build $engine`" != "no" ; then
 		eval _engine_${engine}_build=no
 	else
 		option_error
@@ -453,33 +466,38 @@
 get_engine_build_string() {
 	engine_string=""
 	engine_build=`get_engine_build $1`
-	if test $engine_build = no ; then
-		# The engine is disabled
+	show=no
+
+	# Check if the current engine should be shown for the current status
+	if test $engine_build = $2 ; then
+		show=yes
+	else
+		# Test for disabled sub-engines
 		if test $2 = no ; then
-			engine_string=`get_engine_name $1`
-		else
-			engine_string=""
+			for subeng in `get_engine_subengines $1` ; do
+				if test `get_engine_build $subeng` = no ; then
+					engine_build=no
+					show=yes
+				fi
+			done
 		fi
-	else
-		# The engine is enabled, get the custom string
+	fi
+
+	# Convert static/dynamic to yes to ease the check of subengines
+	if test $engine_build != no ; then
+		engine_build=yes
+	fi
+
+	# The engine should be shown, build the string
+	if test $show = yes ; then
 		build_string_func=get_${1}_build_string
 		if ( type $build_string_func | grep function ) 2> /dev/null > /dev/null ; then
-			engine_string=`$build_string_func $1 $2`
+			engine_string=`$build_string_func $1 $engine_build`
 		else
-			engine_string=`get_subengines_build_string $1 $2`
+			engine_string=`get_subengines_build_string $1 $engine_build`
 		fi
 
-		if test $2 = no ; then
-			if test -n "$engine_string" ; then
-				engine_string="`get_engine_name $1` $engine_string"
-			fi
-		else
-			if test $2 = $engine_build ; then
-				engine_string="`get_engine_name $1` $engine_string"
-			else
-				engine_string=""
-			fi
-		fi
+		engine_string="`get_engine_name $1` $engine_string"
 	fi
 
 	echo $engine_string
@@ -523,10 +541,12 @@
 }
 
 get_scumm_build_string() {
-	if test $2 != no ; then
-		base="[v0-v6 games]"
+	if test `get_engine_build $1` != no ; then
+		if test $2 != no ; then
+			base="[v0-v6 games]"
+		fi
+		get_subengines_build_string $1 $2 "$base"
 	fi
-	get_subengines_build_string $1 $2 "$base"
 }
 
 #
@@ -1061,7 +1081,7 @@
 			type_2_byte='short'
 			type_4_byte='int'
 			;;
-		arm-linux|arm-linux-gnueabi|arm-*-linux-gnueabi)
+		arm-linux|arm*-linux-gnueabi|arm-*-linux|*-angstrom-linux)
 			echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
 			DEFINES="$DEFINES -DUNIX -DUSE_ARM_SOUND_ASM -DUSE_ARM_SMUSH_ASM"
 			#not true for all ARM systems, but the interesting ones are all LE. Most (if not all) BE arm devices don't have a screen

Modified: scummvm/branches/gsoc2008-tfmx/dists/engine-data/kyra.dat
===================================================================
(Binary files differ)

Modified: scummvm/branches/gsoc2008-tfmx/dists/msvc7/gob.vcproj
===================================================================
--- scummvm/branches/gsoc2008-tfmx/dists/msvc7/gob.vcproj	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/dists/msvc7/gob.vcproj	2008-05-14 23:47:07 UTC (rev 32130)
@@ -96,13 +96,64 @@
 		</Configuration>
 	</Configurations>
 	<Files>
+		<Filter
+			Name="sound">
+			<File
+				RelativePath="..\..\engines\gob\sound\adlib.cpp">
+			</File>
+			<File
+				RelativePath="..\..\engines\gob\sound\adlib.h">
+			</File>
+			<File
+				RelativePath="..\..\engines\gob\sound\bgatmosphere.cpp">
+			</File>
+			<File
+				RelativePath="..\..\engines\gob\sound\bgatmosphere.h">
+			</File>
+			<File
+				RelativePath="..\..\engines\gob\sound\cdrom.cpp">
+			</File>
+			<File
+				RelativePath="..\..\engines\gob\sound\cdrom.h">
+			</File>
+			<File
+				RelativePath="..\..\engines\gob\sound\infogrames.cpp">
+			</File>
+			<File
+				RelativePath="..\..\engines\gob\sound\infogrames.h">
+			</File>
+			<File
+				RelativePath="..\..\engines\gob\sound\pcspeaker.cpp">
+			</File>
+			<File
+				RelativePath="..\..\engines\gob\sound\pcspeaker.h">
+			</File>
+			<File
+				RelativePath="..\..\engines\gob\sound\sound.cpp">
+			</File>
+			<File
+				RelativePath="..\..\engines\gob\sound\sound.h">
+			</File>
+			<File
+				RelativePath="..\..\engines\gob\sound\soundblaster.cpp">
+			</File>
+			<File
+				RelativePath="..\..\engines\gob\sound\soundblaster.h">
+			</File>
+			<File
+				RelativePath="..\..\engines\gob\sound\sounddesc.cpp">
+			</File>
+			<File
+				RelativePath="..\..\engines\gob\sound\sounddesc.h">
+			</File>
+			<File
+				RelativePath="..\..\engines\gob\sound\soundmixer.cpp">
+			</File>
+			<File
+				RelativePath="..\..\engines\gob\sound\soundmixer.h">
+			</File>
+		</Filter>
 		<File
-			RelativePath="..\..\engines\gob\cdrom.cpp">
-		</File>
-		<File
-			RelativePath="..\..\engines\gob\cdrom.h">
-		</File>
-		<File
 			RelativePath="..\..\engines\gob\coktelvideo.cpp">
 		</File>
 		<File
@@ -244,12 +295,6 @@
 			RelativePath="..\..\engines\gob\mult_v2.cpp">
 		</File>
 		<File
-			RelativePath="..\..\engines\gob\music.cpp">
-		</File>
-		<File
-			RelativePath="..\..\engines\gob\music.h">
-		</File>
-		<File
 			RelativePath="..\..\engines\gob\palanim.cpp">
 		</File>
 		<File
@@ -280,6 +325,9 @@
 			RelativePath="..\..\engines\gob\saveload_v3.cpp">
 		</File>
 		<File
+			RelativePath="..\..\engines\gob\saveload_v4.cpp">
+		</File>
+		<File
 			RelativePath="..\..\engines\gob\scenery.cpp">
 		</File>
 		<File
@@ -292,12 +340,6 @@
 			RelativePath="..\..\engines\gob\scenery_v2.cpp">
 		</File>
 		<File
-			RelativePath="..\..\engines\gob\sound.cpp">
-		</File>
-		<File
-			RelativePath="..\..\engines\gob\sound.h">
-		</File>
-		<File
 			RelativePath="..\..\engines\gob\util.cpp">
 		</File>
 		<File

Modified: scummvm/branches/gsoc2008-tfmx/dists/msvc7/kyra.vcproj
===================================================================
--- scummvm/branches/gsoc2008-tfmx/dists/msvc7/kyra.vcproj	2008-05-14 23:26:32 UTC (rev 32129)
+++ scummvm/branches/gsoc2008-tfmx/dists/msvc7/kyra.vcproj	2008-05-14 23:47:07 UTC (rev 32130)
@@ -100,13 +100,13 @@
 			RelativePath="..\..\engines\kyra\animator_hof.cpp">
 		</File>
 		<File
-			RelativePath="..\..\engines\kyra\animator_mr.cpp">
+			RelativePath="..\..\engines\kyra\animator_lok.cpp">
 		</File>
 		<File
-			RelativePath="..\..\engines\kyra\animator_v1.cpp">
+			RelativePath="..\..\engines\kyra\animator_lok.h">
 		</File>
 		<File
-			RelativePath="..\..\engines\kyra\animator_v1.h">
+			RelativePath="..\..\engines\kyra\animator_mr.cpp">
 		</File>
 		<File
 			RelativePath="..\..\engines\kyra\animator_v2.cpp">
@@ -133,16 +133,16 @@
 			RelativePath="..\..\engines\kyra\gui_hof.h">
 		</File>
 		<File
-			RelativePath="..\..\engines\kyra\gui_mr.cpp">
+			RelativePath="..\..\engines\kyra\gui_lok.cpp">
 		</File>
 		<File
-			RelativePath="..\..\engines\kyra\gui_mr.h">
+			RelativePath="..\..\engines\kyra\gui_lok.h">
 		</File>
 		<File
-			RelativePath="..\..\engines\kyra\gui_v1.cpp">
+			RelativePath="..\..\engines\kyra\gui_mr.cpp">
 		</File>
 		<File
-			RelativePath="..\..\engines\kyra\gui_v1.h">
+			RelativePath="..\..\engines\kyra\gui_mr.h">
 		</File>
 		<File
 			RelativePath="..\..\engines\kyra\gui_v2.cpp">
@@ -154,25 +154,25 @@
 			RelativePath="..\..\engines\kyra\items_hof.cpp">
 		</File>
 		<File
-			RelativePath="..\..\engines\kyra\items_mr.cpp">
+			RelativePath="..\..\engines\kyra\items_lok.cpp">
 		</File>
 		<File
-			RelativePath="..\..\engines\kyra\items_v1.cpp">
+			RelativePath="..\..\engines\kyra\items_mr.cpp">
 		</File>
 		<File
 			RelativePath="..\..\engines\kyra\items_v2.cpp">
 		</File>
 		<File
-			RelativePath="..\..\engines\kyra\kyra.cpp">
+			RelativePath="..\..\engines\kyra\kyra_hof.cpp">
 		</File>
 		<File
-			RelativePath="..\..\engines\kyra\kyra.h">
+			RelativePath="..\..\engines\kyra\kyra_hof.h">
 		</File>
 		<File
-			RelativePath="..\..\engines\kyra\kyra_hof.cpp">
+			RelativePath="..\..\engines\kyra\kyra_lok.cpp">
 		</File>
 		<File
-			RelativePath="..\..\engines\kyra\kyra_hof.h">
+			RelativePath="..\..\engines\kyra\kyra_lok.h">
 		</File>
 		<File
 			RelativePath="..\..\engines\kyra\kyra_mr.cpp">
@@ -205,16 +205,16 @@
 			RelativePath="..\..\engines\kyra\saveload_hof.cpp">
 		</File>
 		<File
-			RelativePath="..\..\engines\kyra\saveload_mr.cpp">
+			RelativePath="..\..\engines\kyra\saveload_lok.cpp">
 		</File>
 		<File
-			RelativePath="..\..\engines\kyra\saveload_v1.cpp">
+			RelativePath="..\..\engines\kyra\saveload_mr.cpp">
 		</File>
 		<File
-			RelativePath="..\..\engines\kyra\scene.cpp">
+			RelativePath="..\..\engines\kyra\scene_hof.cpp">
 		</File>
 		<File
-			RelativePath="..\..\engines\kyra\scene_hof.cpp">
+			RelativePath="..\..\engines\kyra\scene_lok.cpp">
 		</File>
 		<File
 			RelativePath="..\..\engines\kyra\scene_mr.cpp">
@@ -238,16 +238,16 @@
 			RelativePath="..\..\engines\kyra\screen_hof.h">
 		</File>
 		<File
-			RelativePath="..\..\engines\kyra\screen_mr.cpp">
+			RelativePath="..\..\engines\kyra\screen_lok.cpp">
 		</File>
 		<File
-			RelativePath="..\..\engines\kyra\screen_mr.h">
+			RelativePath="..\..\engines\kyra\screen_lok.h">
 		</File>
 		<File
-			RelativePath="..\..\engines\kyra\screen_v1.cpp">
+			RelativePath="..\..\engines\kyra\screen_mr.cpp">
 		</File>
 		<File
-			RelativePath="..\..\engines\kyra\screen_v1.h">
+			RelativePath="..\..\engines\kyra\screen_mr.h">
 		</File>
 		<File
 			RelativePath="..\..\engines\kyra\screen_v2.cpp">
@@ -265,6 +265,9 @@
 			RelativePath="..\..\engines\kyra\script_hof.cpp">
 		</File>
 		<File
+			RelativePath="..\..\engines\kyra\script_lok.cpp">
+		</File>
+		<File
 			RelativePath="..\..\engines\kyra\script_mr.cpp">
 		</File>
 		<File
@@ -289,10 +292,10 @@
 			RelativePath="..\..\engines\kyra\sequences_hof.cpp">
 		</File>
 		<File
-			RelativePath="..\..\engines\kyra\sequences_mr.cpp">
+			RelativePath="..\..\engines\kyra\sequences_lok.cpp">
 		</File>
 		<File
-			RelativePath="..\..\engines\kyra\sequences_v1.cpp">
+			RelativePath="..\..\engines\kyra\sequences_mr.cpp">
 		</File>
 		<File
 			RelativePath="..\..\engines\kyra\sequences_v2.cpp">
@@ -310,10 +313,10 @@

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