[Scummvm-cvs-logs] SF.net SVN: scummvm:[33624] scummvm/branches/gsoc2008-rtl
cpage88 at users.sourceforge.net
cpage88 at users.sourceforge.net
Tue Aug 5 00:35:19 CEST 2008
Revision: 33624
http://scummvm.svn.sourceforge.net/scummvm/?rev=33624&view=rev
Author: cpage88
Date: 2008-08-04 22:34:07 +0000 (Mon, 04 Aug 2008)
Log Message:
-----------
Merged revisions 33188-33189,33191-33193,33196,33198,33202-33203,33206,33210,33212,33218-33220,33222,33224-33226,33229-33243,33246,33248-33250,33252,33258-33261,33263,33266,33270,33272-33283,33285,33287-33290,33295-33298,33321,33325-33330,33332-33335,33337-33340,33342,33345,33347,33349-33350,33352-33357,33359-33367,33369-33371,33373,33375-33377,33379-33380,33383-33385,33387-33389,33392-33394,33400-33402,33404-33405,33407-33410,33412-33416,33418-33419,33425-33427,33432,33436-33438,33444,33446,33452-33453,33455-33459,33463-33464,33466-33471,33473-33474,33478,33490,33492,33495-33496,33509-33512,33518-33519,33522-33527,33529-33530,33537,33541,33544,33546,33550,33552-33554,33556,33558,33561-33562,33565,33568,33570,33574,33576,33578-33581,33584-33587,33590,33596,33604-33611,33614-33615,33617-33618,33620-33621 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk
Modified Paths:
--------------
scummvm/branches/gsoc2008-rtl/AUTHORS
scummvm/branches/gsoc2008-rtl/NEWS
scummvm/branches/gsoc2008-rtl/backends/fs/abstract-fs.h
scummvm/branches/gsoc2008-rtl/backends/fs/posix/posix-fs.cpp
scummvm/branches/gsoc2008-rtl/backends/fs/windows/windows-fs.cpp
scummvm/branches/gsoc2008-rtl/backends/platform/PalmOS/Src/be_base.cpp
scummvm/branches/gsoc2008-rtl/backends/platform/gp2x/gp2x.cpp
scummvm/branches/gsoc2008-rtl/backends/platform/iphone/blit_arm.s
scummvm/branches/gsoc2008-rtl/backends/platform/iphone/iphone_keyboard.h
scummvm/branches/gsoc2008-rtl/backends/platform/iphone/iphone_keyboard.m
scummvm/branches/gsoc2008-rtl/backends/platform/iphone/iphone_main.m
scummvm/branches/gsoc2008-rtl/backends/platform/iphone/iphone_video.h
scummvm/branches/gsoc2008-rtl/backends/platform/iphone/iphone_video.m
scummvm/branches/gsoc2008-rtl/backends/platform/iphone/osys_iphone.cpp
scummvm/branches/gsoc2008-rtl/backends/platform/iphone/osys_iphone.h
scummvm/branches/gsoc2008-rtl/backends/platform/sdl/sdl.cpp
scummvm/branches/gsoc2008-rtl/backends/platform/sdl/sdl.h
scummvm/branches/gsoc2008-rtl/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl
scummvm/branches/gsoc2008-rtl/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in
scummvm/branches/gsoc2008-rtl/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
scummvm/branches/gsoc2008-rtl/backends/platform/symbian/src/SymbianActions.cpp
scummvm/branches/gsoc2008-rtl/backends/platform/symbian/src/SymbianOS.cpp
scummvm/branches/gsoc2008-rtl/backends/platform/symbian/src/SymbianOS.h
scummvm/branches/gsoc2008-rtl/backends/platform/symbian/src/main_features.inl
scummvm/branches/gsoc2008-rtl/backends/platform/symbian/src/portdefs.h
scummvm/branches/gsoc2008-rtl/backends/plugins/win32/win32-provider.cpp
scummvm/branches/gsoc2008-rtl/backends/saves/default/default-saves.cpp
scummvm/branches/gsoc2008-rtl/backends/saves/default/default-saves.h
scummvm/branches/gsoc2008-rtl/base/commandLine.cpp
scummvm/branches/gsoc2008-rtl/base/game.h
scummvm/branches/gsoc2008-rtl/base/main.cpp
scummvm/branches/gsoc2008-rtl/base/plugins.cpp
scummvm/branches/gsoc2008-rtl/common/advancedDetector.cpp
scummvm/branches/gsoc2008-rtl/common/advancedDetector.h
scummvm/branches/gsoc2008-rtl/common/algorithm.h
scummvm/branches/gsoc2008-rtl/common/config-file.cpp
scummvm/branches/gsoc2008-rtl/common/config-manager.cpp
scummvm/branches/gsoc2008-rtl/common/config-manager.h
scummvm/branches/gsoc2008-rtl/common/file.cpp
scummvm/branches/gsoc2008-rtl/common/file.h
scummvm/branches/gsoc2008-rtl/common/fs.cpp
scummvm/branches/gsoc2008-rtl/common/fs.h
scummvm/branches/gsoc2008-rtl/common/func.h
scummvm/branches/gsoc2008-rtl/common/hashmap.h
scummvm/branches/gsoc2008-rtl/common/ptr.h
scummvm/branches/gsoc2008-rtl/common/rect.h
scummvm/branches/gsoc2008-rtl/common/savefile.h
scummvm/branches/gsoc2008-rtl/common/str.cpp
scummvm/branches/gsoc2008-rtl/common/str.h
scummvm/branches/gsoc2008-rtl/common/stream.cpp
scummvm/branches/gsoc2008-rtl/common/stream.h
scummvm/branches/gsoc2008-rtl/common/system.cpp
scummvm/branches/gsoc2008-rtl/common/system.h
scummvm/branches/gsoc2008-rtl/common/unarj.cpp
scummvm/branches/gsoc2008-rtl/common/unarj.h
scummvm/branches/gsoc2008-rtl/configure
scummvm/branches/gsoc2008-rtl/dists/engine-data/kyra.dat
scummvm/branches/gsoc2008-rtl/dists/msvc7/kyra.vcproj
scummvm/branches/gsoc2008-rtl/dists/msvc7/parallaction.vcproj
scummvm/branches/gsoc2008-rtl/dists/msvc7/scummvm.sln
scummvm/branches/gsoc2008-rtl/dists/msvc7/scummvm.vcproj
scummvm/branches/gsoc2008-rtl/dists/msvc71/kyra.vcproj
scummvm/branches/gsoc2008-rtl/dists/msvc71/parallaction.vcproj
scummvm/branches/gsoc2008-rtl/dists/msvc71/scummvm.sln
scummvm/branches/gsoc2008-rtl/dists/msvc71/scummvm.vcproj
scummvm/branches/gsoc2008-rtl/dists/msvc8/kyra.vcproj
scummvm/branches/gsoc2008-rtl/dists/msvc8/parallaction.vcproj
scummvm/branches/gsoc2008-rtl/dists/msvc8/scummvm.sln
scummvm/branches/gsoc2008-rtl/dists/msvc8/scummvm.vcproj
scummvm/branches/gsoc2008-rtl/dists/msvc9/kyra.vcproj
scummvm/branches/gsoc2008-rtl/dists/msvc9/parallaction.vcproj
scummvm/branches/gsoc2008-rtl/dists/msvc9/scummvm.sln
scummvm/branches/gsoc2008-rtl/dists/msvc9/scummvm.vcproj
scummvm/branches/gsoc2008-rtl/engines/agos/agos.cpp
scummvm/branches/gsoc2008-rtl/engines/agos/debug.cpp
scummvm/branches/gsoc2008-rtl/engines/agos/saveload.cpp
scummvm/branches/gsoc2008-rtl/engines/cine/anim.cpp
scummvm/branches/gsoc2008-rtl/engines/cine/anim.h
scummvm/branches/gsoc2008-rtl/engines/cine/bg.cpp
scummvm/branches/gsoc2008-rtl/engines/cine/bg.h
scummvm/branches/gsoc2008-rtl/engines/cine/bg_list.cpp
scummvm/branches/gsoc2008-rtl/engines/cine/bg_list.h
scummvm/branches/gsoc2008-rtl/engines/cine/cine.h
scummvm/branches/gsoc2008-rtl/engines/cine/gfx.cpp
scummvm/branches/gsoc2008-rtl/engines/cine/gfx.h
scummvm/branches/gsoc2008-rtl/engines/cine/main_loop.cpp
scummvm/branches/gsoc2008-rtl/engines/cine/object.h
scummvm/branches/gsoc2008-rtl/engines/cine/part.cpp
scummvm/branches/gsoc2008-rtl/engines/cine/script.h
scummvm/branches/gsoc2008-rtl/engines/cine/script_fw.cpp
scummvm/branches/gsoc2008-rtl/engines/cine/script_os.cpp
scummvm/branches/gsoc2008-rtl/engines/cine/various.cpp
scummvm/branches/gsoc2008-rtl/engines/cine/various.h
scummvm/branches/gsoc2008-rtl/engines/cruise/volume.cpp
scummvm/branches/gsoc2008-rtl/engines/drascula/drascula.cpp
scummvm/branches/gsoc2008-rtl/engines/drascula/interface.cpp
scummvm/branches/gsoc2008-rtl/engines/drascula/sound.cpp
scummvm/branches/gsoc2008-rtl/engines/engines.mk
scummvm/branches/gsoc2008-rtl/engines/gob/dataio.cpp
scummvm/branches/gsoc2008-rtl/engines/gob/dataio.h
scummvm/branches/gsoc2008-rtl/engines/gob/gob.cpp
scummvm/branches/gsoc2008-rtl/engines/gob/gob.h
scummvm/branches/gsoc2008-rtl/engines/gob/inter.cpp
scummvm/branches/gsoc2008-rtl/engines/gob/saveload.cpp
scummvm/branches/gsoc2008-rtl/engines/gob/saveload.h
scummvm/branches/gsoc2008-rtl/engines/gob/saveload_v2.cpp
scummvm/branches/gsoc2008-rtl/engines/gob/saveload_v3.cpp
scummvm/branches/gsoc2008-rtl/engines/gob/saveload_v4.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/detection.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/gui_lok.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/gui_lok.h
scummvm/branches/gsoc2008-rtl/engines/kyra/gui_v2.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/gui_v2.h
scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_hof.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_hof.h
scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_lok.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_v1.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_v1.h
scummvm/branches/gsoc2008-rtl/engines/kyra/module.mk
scummvm/branches/gsoc2008-rtl/engines/kyra/resource.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/saveload.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/screen.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/screen.h
scummvm/branches/gsoc2008-rtl/engines/kyra/screen_v2.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/screen_v2.h
scummvm/branches/gsoc2008-rtl/engines/kyra/script_hof.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/script_tim.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/script_tim.h
scummvm/branches/gsoc2008-rtl/engines/kyra/sequences_hof.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/sound.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/sound.h
scummvm/branches/gsoc2008-rtl/engines/kyra/sound_adlib.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/sound_towns.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/staticres.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/wsamovie.h
scummvm/branches/gsoc2008-rtl/engines/parallaction/balloons.cpp
scummvm/branches/gsoc2008-rtl/engines/parallaction/callables_ns.cpp
scummvm/branches/gsoc2008-rtl/engines/parallaction/detection.cpp
scummvm/branches/gsoc2008-rtl/engines/parallaction/dialogue.cpp
scummvm/branches/gsoc2008-rtl/engines/parallaction/disk.h
scummvm/branches/gsoc2008-rtl/engines/parallaction/disk_br.cpp
scummvm/branches/gsoc2008-rtl/engines/parallaction/exec.h
scummvm/branches/gsoc2008-rtl/engines/parallaction/exec_br.cpp
scummvm/branches/gsoc2008-rtl/engines/parallaction/exec_ns.cpp
scummvm/branches/gsoc2008-rtl/engines/parallaction/font.cpp
scummvm/branches/gsoc2008-rtl/engines/parallaction/gfxbase.cpp
scummvm/branches/gsoc2008-rtl/engines/parallaction/graphics.cpp
scummvm/branches/gsoc2008-rtl/engines/parallaction/graphics.h
scummvm/branches/gsoc2008-rtl/engines/parallaction/gui_br.cpp
scummvm/branches/gsoc2008-rtl/engines/parallaction/gui_ns.cpp
scummvm/branches/gsoc2008-rtl/engines/parallaction/input.cpp
scummvm/branches/gsoc2008-rtl/engines/parallaction/input.h
scummvm/branches/gsoc2008-rtl/engines/parallaction/inventory.cpp
scummvm/branches/gsoc2008-rtl/engines/parallaction/inventory.h
scummvm/branches/gsoc2008-rtl/engines/parallaction/module.mk
scummvm/branches/gsoc2008-rtl/engines/parallaction/objects.cpp
scummvm/branches/gsoc2008-rtl/engines/parallaction/objects.h
scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction.cpp
scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction.h
scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction_br.cpp
scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction_ns.cpp
scummvm/branches/gsoc2008-rtl/engines/parallaction/parser.cpp
scummvm/branches/gsoc2008-rtl/engines/parallaction/parser.h
scummvm/branches/gsoc2008-rtl/engines/parallaction/parser_br.cpp
scummvm/branches/gsoc2008-rtl/engines/parallaction/parser_ns.cpp
scummvm/branches/gsoc2008-rtl/engines/parallaction/walk.cpp
scummvm/branches/gsoc2008-rtl/engines/parallaction/walk.h
scummvm/branches/gsoc2008-rtl/engines/queen/queen.h
scummvm/branches/gsoc2008-rtl/engines/queen/sound.cpp
scummvm/branches/gsoc2008-rtl/engines/saga/displayinfo.h
scummvm/branches/gsoc2008-rtl/engines/saga/font.cpp
scummvm/branches/gsoc2008-rtl/engines/saga/font.h
scummvm/branches/gsoc2008-rtl/engines/saga/font_map.cpp
scummvm/branches/gsoc2008-rtl/engines/saga/interface.cpp
scummvm/branches/gsoc2008-rtl/engines/saga/itedata.cpp
scummvm/branches/gsoc2008-rtl/engines/saga/itedata.h
scummvm/branches/gsoc2008-rtl/engines/saga/saga.h
scummvm/branches/gsoc2008-rtl/engines/saga/sprite.cpp
scummvm/branches/gsoc2008-rtl/engines/scumm/charset.cpp
scummvm/branches/gsoc2008-rtl/engines/scumm/charset.h
scummvm/branches/gsoc2008-rtl/engines/scumm/debugger.cpp
scummvm/branches/gsoc2008-rtl/engines/scumm/file.cpp
scummvm/branches/gsoc2008-rtl/engines/scumm/file.h
scummvm/branches/gsoc2008-rtl/engines/scumm/file_nes.cpp
scummvm/branches/gsoc2008-rtl/engines/scumm/file_nes.h
scummvm/branches/gsoc2008-rtl/engines/scumm/gfx.cpp
scummvm/branches/gsoc2008-rtl/engines/scumm/he/script_v60he.cpp
scummvm/branches/gsoc2008-rtl/engines/scumm/he/script_v72he.cpp
scummvm/branches/gsoc2008-rtl/engines/scumm/he/script_v80he.cpp
scummvm/branches/gsoc2008-rtl/engines/scumm/he/wiz_he.cpp
scummvm/branches/gsoc2008-rtl/engines/scumm/imuse_digi/dimuse.cpp
scummvm/branches/gsoc2008-rtl/engines/scumm/resource.cpp
scummvm/branches/gsoc2008-rtl/engines/scumm/saveload.cpp
scummvm/branches/gsoc2008-rtl/engines/scumm/saveload.h
scummvm/branches/gsoc2008-rtl/engines/scumm/scumm-md5.h
scummvm/branches/gsoc2008-rtl/engines/scumm/scumm.h
scummvm/branches/gsoc2008-rtl/engines/scumm/string.cpp
scummvm/branches/gsoc2008-rtl/engines/sky/control.cpp
scummvm/branches/gsoc2008-rtl/engines/sky/disk.cpp
scummvm/branches/gsoc2008-rtl/engines/sky/logic.cpp
scummvm/branches/gsoc2008-rtl/engines/sky/sound.cpp
scummvm/branches/gsoc2008-rtl/engines/sky/sound.h
scummvm/branches/gsoc2008-rtl/engines/sword1/resman.cpp
scummvm/branches/gsoc2008-rtl/engines/sword2/resman.cpp
scummvm/branches/gsoc2008-rtl/graphics/font.cpp
scummvm/branches/gsoc2008-rtl/gui/credits.h
scummvm/branches/gsoc2008-rtl/gui/launcher.cpp
scummvm/branches/gsoc2008-rtl/gui/massadd.cpp
scummvm/branches/gsoc2008-rtl/ports.mk
scummvm/branches/gsoc2008-rtl/sound/midiparser_xmidi.cpp
scummvm/branches/gsoc2008-rtl/sound/softsynth/mt32.cpp
scummvm/branches/gsoc2008-rtl/test/common/ptr.h
scummvm/branches/gsoc2008-rtl/test/common/seekablesubreadstream.h
scummvm/branches/gsoc2008-rtl/test/common/str.h
scummvm/branches/gsoc2008-rtl/test/common/subreadstream.h
scummvm/branches/gsoc2008-rtl/tools/create_kyradat/create_kyradat.cpp
scummvm/branches/gsoc2008-rtl/tools/create_kyradat/create_kyradat.h
scummvm/branches/gsoc2008-rtl/tools/create_kyradat/hof_cd.h
scummvm/branches/gsoc2008-rtl/tools/create_kyradat/hof_demo.h
scummvm/branches/gsoc2008-rtl/tools/create_kyradat/misc.h
scummvm/branches/gsoc2008-rtl/tools/credits.pl
scummvm/branches/gsoc2008-rtl/tools/scumm-md5.txt
Added Paths:
-----------
scummvm/branches/gsoc2008-rtl/dists/msvc8/tinsel.vcproj
scummvm/branches/gsoc2008-rtl/dists/msvc9/tinsel.vcproj
scummvm/branches/gsoc2008-rtl/engines/kyra/lol.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/lol.h
scummvm/branches/gsoc2008-rtl/engines/kyra/screen_lol.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/screen_lol.h
scummvm/branches/gsoc2008-rtl/engines/parallaction/gui.cpp
scummvm/branches/gsoc2008-rtl/engines/parallaction/gui.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/
scummvm/branches/gsoc2008-rtl/engines/tinsel/actors.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/actors.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/anim.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/anim.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/background.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/background.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/bg.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/cliprect.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/cliprect.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/config.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/config.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/coroutine.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/cursor.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/cursor.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/debugger.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/debugger.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/detection.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/dw.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/effect.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/events.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/events.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/faders.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/faders.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/film.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/font.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/font.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/graphics.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/graphics.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/handle.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/handle.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/heapmem.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/heapmem.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/inventory.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/inventory.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/mareels.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/module.mk
scummvm/branches/gsoc2008-rtl/engines/tinsel/move.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/move.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/multiobj.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/multiobj.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/music.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/music.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/object.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/object.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/palette.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/palette.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/pcode.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/pcode.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/pdisplay.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/pid.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/play.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/polygons.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/polygons.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/rince.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/rince.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/saveload.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/savescn.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/savescn.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/scene.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/scene.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/sched.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/sched.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/scn.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/scn.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/scroll.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/scroll.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/serializer.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/sound.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/sound.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/strres.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/strres.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/text.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/text.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/timers.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/timers.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/tinlib.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/tinlib.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/tinsel.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/tinsel.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/token.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/token.h
scummvm/branches/gsoc2008-rtl/test/common/bufferedreadstream.h
scummvm/branches/gsoc2008-rtl/test/common/bufferedseekablereadstream.h
scummvm/branches/gsoc2008-rtl/test/common/func.h
scummvm/branches/gsoc2008-rtl/tools/create_kyradat/lol_demo.h
Removed Paths:
-------------
scummvm/branches/gsoc2008-rtl/engines/tinsel/actors.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/actors.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/anim.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/anim.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/background.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/background.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/bg.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/cliprect.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/cliprect.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/config.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/config.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/coroutine.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/cursor.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/cursor.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/debugger.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/debugger.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/detection.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/dw.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/effect.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/events.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/events.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/faders.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/faders.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/film.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/font.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/font.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/graphics.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/graphics.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/handle.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/handle.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/heapmem.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/heapmem.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/inventory.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/inventory.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/mareels.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/module.mk
scummvm/branches/gsoc2008-rtl/engines/tinsel/move.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/move.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/multiobj.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/multiobj.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/music.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/music.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/object.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/object.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/palette.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/palette.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/pcode.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/pcode.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/pdisplay.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/pid.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/play.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/polygons.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/polygons.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/rince.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/rince.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/saveload.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/savescn.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/savescn.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/scene.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/scene.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/sched.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/sched.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/scn.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/scn.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/scroll.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/scroll.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/serializer.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/sound.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/sound.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/strres.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/strres.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/text.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/text.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/timers.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/timers.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/tinlib.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/tinlib.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/tinsel.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/tinsel.h
scummvm/branches/gsoc2008-rtl/engines/tinsel/token.cpp
scummvm/branches/gsoc2008-rtl/engines/tinsel/token.h
Property Changed:
----------------
scummvm/branches/gsoc2008-rtl/
scummvm/branches/gsoc2008-rtl/tools/create_drascula/
Property changes on: scummvm/branches/gsoc2008-rtl
___________________________________________________________________
Modified: svnmerge-integrated
- /scummvm/branches/gsoc2008-gui:1-31703 /scummvm/branches/gsoc2008-rtl:1-32741 /scummvm/branches/gsoc2008-tfmx:1-31765
+ /scummvm/trunk:1-33621
Modified: scummvm/branches/gsoc2008-rtl/AUTHORS
===================================================================
--- scummvm/branches/gsoc2008-rtl/AUTHORS 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/AUTHORS 2008-08-04 22:34:07 UTC (rev 33624)
@@ -6,6 +6,11 @@
Max Horn
Eugene Sandulenko
+ Retired Project Leaders
+ -----------------------
+ Vincent Hamm - ScummVM co-founder, Original Cruise/CinE author
+ Ludvig Strigeus - Original ScummVM and SimonVM author
+
Engine Teams
------------
SCUMM:
@@ -94,10 +99,19 @@
SAGA:
Torbjorn Andersson
+ Sven Hesse
Filippos Karapetis
Andrew Kurushin
Eugene Sandulenko
+ Tinsel;:
+ Torbjorn Andersson
+ Paul Gilbert
+ Sven Hesse
+ Max Horn
+ Filippos Karapetis
+ Joost Peters
+
Touche:
Gregory Montoir
@@ -176,12 +190,10 @@
Ralph Brorsen - Help with GUI implementation
Jamieson Christian - iMUSE, MIDI, all things musical
Ruediger Hanke - Port: MorphOS
- Vincent Hamm - ScummVM co-founder, Original Cruise/CinE author
Felix Jakschitsch - Zak256 reverse engineering
Mutwin Kraus - Original MacOS porter
Peter Moraliyski - Port: GP32
Jeremy Newman - Former webmaster
- Ludvig Strigeus - Original ScummVM and SimonVM author
Lionel Ulmer - Port: X11
Won Star - Former GP32 porter
Modified: scummvm/branches/gsoc2008-rtl/NEWS
===================================================================
--- scummvm/branches/gsoc2008-rtl/NEWS 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/NEWS 2008-08-04 22:34:07 UTC (rev 33624)
@@ -1,6 +1,10 @@
For a more comprehensive changelog for the latest experimental SVN code, see:
http://scummvm.sourceforge.net/daily/ChangeLog
+0.13.0 (????-??-??)
+ New Games:
+ - Added support for Discworld.
+
0.12.0 (????-??-??)
New Games:
- Added support for The Legend of Kyrandia: Book Two: Hand of Fate
@@ -19,11 +23,19 @@
- Plugged numerous memory leaks in all engines (part of GSoC'08 task)
AGOS:
+ - Fixed crashes during certain music in Amiga versions of Elvira 1 and
+ Simon the Sorcerer 1.
- Fixed palette issues in Amiga versions of Simon the Sorcerer 1.
+ Queen:
+ - Speech is played at the correct sample rate. (It used to be pitched a bit
+ too low.)
+
SCUMM:
- Rewrote parts of Digital iMUSE, fixing some bugs.
- Rewrote the internal timer code, fixing some speed issues in e.g. COMI.
+ - Improved support for sound effects in Amiga version of Zak McKracken.
+ - Added support for mixed Adlib/MIDI mode in Monkey Island 1 (Floppy).
0.11.1 (2008-02-29)
SCUMM:
@@ -675,9 +687,10 @@
OS X.
- Loading COMI savegames for disk 2 doesn't anymore require disk 1 first.
- Rewritten iMUSE engine, and many Music fixes (exp. Monkey Island 2).
-- Support for music in Humongous games and simon2dos/simon2talkie (XMIDI
+- Support for music in DOS versions of Humongous Entertainment games and
+ Simon the Sorcerer 2 (XMIDI format).
+- Support for music in floppy demo of Simon the Sorcerer 1 (Proprietary
format).
-- Support for music in simon1demo (Proprietary format).
- Complete music support for Simon the Sorcerer 2.
- Improved music and sound support in Zak256.
- Added Aspect Ratio option.
Modified: scummvm/branches/gsoc2008-rtl/backends/fs/abstract-fs.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/fs/abstract-fs.h 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/fs/abstract-fs.h 2008-08-04 22:34:07 UTC (rev 33624)
@@ -64,7 +64,7 @@
*
* @param name String containing the name of the child to create a new node.
*/
- virtual AbstractFilesystemNode *getChild(const String &name) const = 0;
+ virtual AbstractFilesystemNode *getChild(const Common::String &name) const = 0;
/**
* The parent node of this directory.
@@ -100,7 +100,7 @@
*
* @note By default, this method returns the value of getName().
*/
- virtual String getDisplayName() const { return getName(); }
+ virtual Common::String getDisplayName() const { return getName(); }
/**
* Returns the last component of the path pointed by this FilesystemNode.
@@ -111,12 +111,12 @@
*
* @note This method is very architecture dependent, please check the concrete implementation for more information.
*/
- virtual String getName() const = 0;
+ virtual Common::String getName() const = 0;
/**
* Returns the 'path' of the current node, usable in fopen().
*/
- virtual String getPath() const = 0;
+ virtual Common::String getPath() const = 0;
/**
* Indicates whether this path refers to a directory or not.
Modified: scummvm/branches/gsoc2008-rtl/backends/fs/posix/posix-fs.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/fs/posix/posix-fs.cpp 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/fs/posix/posix-fs.cpp 2008-08-04 22:34:07 UTC (rev 33624)
@@ -42,8 +42,8 @@
*/
class POSIXFilesystemNode : public AbstractFilesystemNode {
protected:
- String _displayName;
- String _path;
+ Common::String _displayName;
+ Common::String _path;
bool _isDirectory;
bool _isValid;
@@ -59,17 +59,17 @@
* @param path String with the path the new node should point to.
* @param verify true if the isValid and isDirectory flags should be verified during the construction.
*/
- POSIXFilesystemNode(const String &path, bool verify);
+ POSIXFilesystemNode(const Common::String &path, bool verify);
virtual bool exists() const { return access(_path.c_str(), F_OK) == 0; }
- virtual String getDisplayName() const { return _displayName; }
- virtual String getName() const { return _displayName; }
- virtual String getPath() const { return _path; }
+ virtual Common::String getDisplayName() const { return _displayName; }
+ virtual Common::String getName() const { return _displayName; }
+ virtual Common::String getPath() const { return _path; }
virtual bool isDirectory() const { return _isDirectory; }
virtual bool isReadable() const { return access(_path.c_str(), R_OK) == 0; }
virtual bool isWritable() const { return access(_path.c_str(), W_OK) == 0; }
- virtual AbstractFilesystemNode *getChild(const String &n) const;
+ virtual AbstractFilesystemNode *getChild(const Common::String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual AbstractFilesystemNode *getParent() const;
@@ -119,7 +119,7 @@
_isDirectory = true;
}
-POSIXFilesystemNode::POSIXFilesystemNode(const String &p, bool verify) {
+POSIXFilesystemNode::POSIXFilesystemNode(const Common::String &p, bool verify) {
assert(p.size() > 0);
// Expand "~/" to the value of the HOME env variable
@@ -142,12 +142,12 @@
}
}
-AbstractFilesystemNode *POSIXFilesystemNode::getChild(const String &n) const {
+AbstractFilesystemNode *POSIXFilesystemNode::getChild(const Common::String &n) const {
// FIXME: Pretty lame implementation! We do no error checking to speak
// of, do not check if this is a special node, etc.
assert(_isDirectory);
- String newPath(_path);
+ Common::String newPath(_path);
if (_path.lastChar() != '/')
newPath += '/';
newPath += n;
@@ -175,7 +175,7 @@
continue;
}
- String newPath(_path);
+ Common::String newPath(_path);
if (newPath.lastChar() != '/')
newPath += '/';
newPath += dp->d_name;
@@ -236,7 +236,7 @@
const char *start = _path.c_str();
const char *end = lastPathComponent(_path);
- return new POSIXFilesystemNode(String(start, end - start), true);
+ return new POSIXFilesystemNode(Common::String(start, end - start), true);
}
#endif //#if defined(UNIX)
Modified: scummvm/branches/gsoc2008-rtl/backends/fs/windows/windows-fs.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/fs/windows/windows-fs.cpp 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/fs/windows/windows-fs.cpp 2008-08-04 22:34:07 UTC (rev 33624)
@@ -245,7 +245,7 @@
_isDirectory = ((fileAttribs & FILE_ATTRIBUTE_DIRECTORY) != 0);
_isValid = true;
// Add a trailing slash, if necessary.
- if (_path.lastChar() != '\\') {
+ if (_isDirectory && _path.lastChar() != '\\') {
_path += '\\';
}
}
Modified: scummvm/branches/gsoc2008-rtl/backends/platform/PalmOS/Src/be_base.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/PalmOS/Src/be_base.cpp 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/PalmOS/Src/be_base.cpp 2008-08-04 22:34:07 UTC (rev 33624)
@@ -30,6 +30,9 @@
#include "backends/timer/default/default-timer.h"
#include "sound/mixer.h"
+#define DEFAULT_SAVE_PATH "/PALM/Programs/ScummVM/Saved"
+
+
OSystem_PalmBase::OSystem_PalmBase() {
_overlayVisible = false;
@@ -100,7 +103,7 @@
// Create the savefile manager, if none exists yet (we check for this to
// allow subclasses to provide their own).
if (_saveMgr == 0) {
- _saveMgr = new DefaultSaveFileManager();
+ _saveMgr = new DefaultSaveFileManager(DEFAULT_SAVE_PATH);
}
// Create and hook up the mixer, if none exists yet (we check for this to
Modified: scummvm/branches/gsoc2008-rtl/backends/platform/gp2x/gp2x.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/gp2x/gp2x.cpp 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/gp2x/gp2x.cpp 2008-08-04 22:34:07 UTC (rev 33624)
@@ -219,7 +219,7 @@
// Create the savefile manager, if none exists yet (we check for this to
// allow subclasses to provide their own).
if (_savefile == 0) {
- _savefile = new DefaultSaveFileManager();
+ _savefile = new DefaultSaveFileManager(savePath);
}
// Create and hook up the mixer, if none exists yet (we check for this to
Modified: scummvm/branches/gsoc2008-rtl/backends/platform/iphone/blit_arm.s
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/iphone/blit_arm.s 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/iphone/blit_arm.s 2008-08-04 22:34:07 UTC (rev 33624)
@@ -36,47 +36,47 @@
@ r3 = h
@ <> = _screenWidth
@ <> = _screenHeight
- MOV r12,r13
- STMFD r13!,{r4-r11,r14}
- LDMFD r12,{r12,r14} @ r12 = _screenWidth
+ mov r12,r13
+ stmfd r13!,{r4-r11,r14}
+ ldmfd r12,{r12,r14} @ r12 = _screenWidth
@ r14 = _screenHeight
- ADD r14,r14,r3 @ r14 = _screenHeight + h
- MVN r11,#0
- MLA r11,r3,r12,r11 @ r11= _screenWidth*h-1
- ADD r12,r12,r12
+ add r14,r14,r3 @ r14 = _screenHeight + h
+ mvn r11,#0
+ mla r11,r3,r12,r11 @ r11= _screenWidth*h-1
+ add r12,r12,r12
xloop:
- SUBS r4,r3,#5 @ r4 = y = h
- BLE thin
+ subs r4,r3,#5 @ r4 = y = h
+ ble thin
yloop:
- LDRH r5, [r1],r12 @ r5 = *src src += _screenWidth
- LDRH r6, [r1],r12 @ r6 = *src src += _screenWidth
- LDRH r7, [r1],r12 @ r7 = *src src += _screenWidth
- LDRH r8, [r1],r12 @ r8 = *src src += _screenWidth
- LDRH r9, [r1],r12 @ r9 = *src src += _screenWidth
- LDRH r10,[r1],r12 @ r10= *src src += _screenWidth
- SUBS r4,r4,#6
- STRH r5, [r0],#2 @ *dst++ = r5
- STRH r6, [r0],#2 @ *dst++ = r6
- STRH r7, [r0],#2 @ *dst++ = r7
- STRH r8, [r0],#2 @ *dst++ = r8
- STRH r9, [r0],#2 @ *dst++ = r9
- STRH r10,[r0],#2 @ *dst++ = r10
- BGT yloop
+ ldrh r5, [r1],r12 @ r5 = *src src += _screenWidth
+ ldrh r6, [r1],r12 @ r6 = *src src += _screenWidth
+ ldrh r7, [r1],r12 @ r7 = *src src += _screenWidth
+ ldrh r8, [r1],r12 @ r8 = *src src += _screenWidth
+ ldrh r9, [r1],r12 @ r9 = *src src += _screenWidth
+ ldrh r10,[r1],r12 @ r10= *src src += _screenWidth
+ subs r4,r4,#6
+ strh r5, [r0],#2 @ *dst++ = r5
+ strh r6, [r0],#2 @ *dst++ = r6
+ strh r7, [r0],#2 @ *dst++ = r7
+ strh r8, [r0],#2 @ *dst++ = r8
+ strh r9, [r0],#2 @ *dst++ = r9
+ strh r10,[r0],#2 @ *dst++ = r10
+ bgt yloop
thin:
- ADDS r4,r4,#5
- BEQ lineend
+ adds r4,r4,#5
+ beq lineend
thin_loop:
- LDRH r5,[r1],r12 @ r5 = *src src += _screenWidth
- SUBS r4,r4,#1
- STRH r5,[r0],#2 @ *dst++ = r5
- BGT thin_loop
+ ldrh r5,[r1],r12 @ r5 = *src src += _screenWidth
+ subs r4,r4,#1
+ strh r5,[r0],#2 @ *dst++ = r5
+ bgt thin_loop
lineend:
- SUB r0,r0,r14,LSL #1 @ dst -= _screenHeight + h
- SUB r1,r1,r11,LSL #1 @ src += 1-_screenWidth*h
- SUBS r2,r2,#1
- BGT xloop
+ sub r0,r0,r14,LSL #1 @ dst -= _screenHeight + h
+ sub r1,r1,r11,LSL #1 @ src += 1-_screenWidth*h
+ subs r2,r2,#1
+ bgt xloop
- LDMFD r13!,{r4-r11,PC}
+ ldmfd r13!,{r4-r11,PC}
_blitLandscapeScreenRect8bpp:
@ r0 = dst
@@ -86,55 +86,55 @@
@ <> = _palette
@ <> = _screenWidth
@ <> = _screenHeight
- MOV r12,r13
- STMFD r13!,{r4-r11,r14}
- LDMFD r12,{r11,r12,r14} @ r11 = _palette
+ mov r12,r13
+ stmfd r13!,{r4-r11,r14}
+ ldmfd r12,{r11,r12,r14} @ r11 = _palette
@ r12 = _screenWidth
@ r14 = _screenHeight
- ADD r14,r14,r3 @ r14 = _screenHeight + h
- MVN r6,#0
- MLA r6,r3,r12,r6 @ r6 = _screenWidth*h-1
+ add r14,r14,r3 @ r14 = _screenHeight + h
+ mvn r6,#0
+ mla r6,r3,r12,r6 @ r6 = _screenWidth*h-1
xloop8:
- MOV r4,r3 @ r4 = y = h
- SUBS r4,r3,#4 @ r4 = y = h
- BLE thin8
+ mov r4,r3 @ r4 = y = h
+ subs r4,r3,#4 @ r4 = y = h
+ ble thin8
yloop8:
- LDRB r5, [r1],r12 @ r5 = *src src += _screenWidth
- LDRB r7, [r1],r12 @ r7 = *src src += _screenWidth
- LDRB r8, [r1],r12 @ r8 = *src src += _screenWidth
- LDRB r9, [r1],r12 @ r9 = *src src += _screenWidth
- LDRB r10,[r1],r12 @ r10= *src src += _screenWidth
- ADD r5, r5, r5
- ADD r7, r7, r7
- ADD r8, r8, r8
- ADD r9, r9, r9
- ADD r10,r10,r10
- LDRH r5, [r11,r5]
- LDRH r7, [r11,r7]
- LDRH r8, [r11,r8]
- LDRH r9, [r11,r9]
- LDRH r10,[r11,r10]
- SUBS r4,r4,#5
- STRH r5, [r0],#2 @ *dst++ = r5
- STRH r7, [r0],#2 @ *dst++ = r7
- STRH r8, [r0],#2 @ *dst++ = r8
- STRH r9, [r0],#2 @ *dst++ = r9
- STRH r10,[r0],#2 @ *dst++ = r10
- BGT yloop8
+ ldrb r5, [r1],r12 @ r5 = *src src += _screenWidth
+ ldrb r7, [r1],r12 @ r7 = *src src += _screenWidth
+ ldrb r8, [r1],r12 @ r8 = *src src += _screenWidth
+ ldrb r9, [r1],r12 @ r9 = *src src += _screenWidth
+ ldrb r10,[r1],r12 @ r10= *src src += _screenWidth
+ add r5, r5, r5
+ add r7, r7, r7
+ add r8, r8, r8
+ add r9, r9, r9
+ add r10,r10,r10
+ ldrh r5, [r11,r5]
+ ldrh r7, [r11,r7]
+ ldrh r8, [r11,r8]
+ ldrh r9, [r11,r9]
+ ldrh r10,[r11,r10]
+ subs r4,r4,#5
+ strh r5, [r0],#2 @ *dst++ = r5
+ strh r7, [r0],#2 @ *dst++ = r7
+ strh r8, [r0],#2 @ *dst++ = r8
+ strh r9, [r0],#2 @ *dst++ = r9
+ strh r10,[r0],#2 @ *dst++ = r10
+ bgt yloop8
thin8:
- ADDS r4,r4,#4
- BEQ lineend8
+ adds r4,r4,#4
+ beq lineend8
thin_loop8:
- LDRB r5,[r1],r12 @ r5 = *src src += _screenWidth
- ADD r5,r5,r5
- LDRH r5,[r11,r5]
- SUBS r4,r4,#1
- STRH r5,[r0],#2 @ *dst++ = r5
- BGT thin_loop8
+ ldrb r5,[r1],r12 @ r5 = *src src += _screenWidth
+ add r5,r5,r5
+ ldrh r5,[r11,r5]
+ subs r4,r4,#1
+ strh r5,[r0],#2 @ *dst++ = r5
+ bgt thin_loop8
lineend8:
- SUB r0,r0,r14,LSL #1 @ dst -= _screenHeight + h
- SUB r1,r1,r6 @ src += 1-_screenWidth*h
- SUBS r2,r2,#1
- BGT xloop8
+ sub r0,r0,r14,LSL #1 @ dst -= _screenHeight + h
+ sub r1,r1,r6 @ src += 1-_screenWidth*h
+ subs r2,r2,#1
+ bgt xloop8
- LDMFD r13!,{r4-r11,PC}
+ ldmfd r13!,{r4-r11,PC}
Modified: scummvm/branches/gsoc2008-rtl/backends/platform/iphone/iphone_keyboard.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/iphone/iphone_keyboard.h 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/iphone/iphone_keyboard.h 2008-08-04 22:34:07 UTC (rev 33624)
@@ -26,11 +26,7 @@
#import <UIKit/UIKit.h>
#import <UIKit/UITextView.h>
- at protocol KeyboardInputProtocol
-- (void)handleKeyPress:(unichar)c;
- at end
-
- at interface SoftKeyboard : UIKeyboard<KeyboardInputProtocol> {
+ at interface SoftKeyboard : UIView {
id inputDelegate;
UITextView* inputView;
}
Modified: scummvm/branches/gsoc2008-rtl/backends/platform/iphone/iphone_keyboard.m
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/iphone/iphone_keyboard.m 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/iphone/iphone_keyboard.m 2008-08-04 22:34:07 UTC (rev 33624)
@@ -25,19 +25,6 @@
#import "iphone_keyboard.h"
-// Override settings of the default keyboard implementation
- at implementation UIKeyboardImpl (DisableFeatures)
-
-- (BOOL)autoCapitalizationPreference {
- return false;
-}
-
-- (BOOL)autoCorrectionPreference {
- return false;
-}
-
- at end
-
@implementation TextInputHandler
- (id)initWithKeyboard:(SoftKeyboard*)keyboard; {
@@ -67,7 +54,8 @@
@implementation SoftKeyboard
- (id)initWithFrame:(CGRect)frame {
- self = [super initWithFrame:frame];
+ //self = [super initWithFrame:frame];
+ self = [super initWithFrame:CGRectMake(0.0f, 0.0f, 0.0f, 0.0f)];
inputDelegate = nil;
inputView = [[TextInputHandler alloc] initWithKeyboard:self];
return self;
Modified: scummvm/branches/gsoc2008-rtl/backends/platform/iphone/iphone_main.m
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/iphone/iphone_main.m 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/iphone/iphone_main.m 2008-08-04 22:34:07 UTC (rev 33624)
@@ -46,9 +46,14 @@
gArgc = argc;
gArgv = argv;
- [[NSAutoreleasePool alloc] init];
+ NSAutoreleasePool *autoreleasePool = [
+ [ NSAutoreleasePool alloc ] init
+ ];
- return UIApplicationMain(argc, argv, [iPhoneMain class]);
+ UIApplicationUseLegacyEvents(1);
+ int returnCode = UIApplicationMain(argc, argv, [iPhoneMain class]);
+ [ autoreleasePool release ];
+ return returnCode;
}
@implementation iPhoneMain
@@ -74,8 +79,11 @@
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
// hide the status bar
[UIHardware _setStatusBarHeight:0.0f];
- [self setStatusBarMode:2 orientation:0 duration:0.0f fenceID:0];
+ //[self setStatusBarMode:2 orientation:0 duration:0.0f fenceID:0];
+ //[self setStatusBarStyle:UIStatusBarStyleBlackTranslucent animated:NO];
+ [self setStatusBarHidden:YES animated:YES];
+
_window = [[UIWindow alloc] initWithContentRect: [UIHardware fullScreenApplicationContentRect]];
[_window retain];
@@ -96,7 +104,7 @@
- (void)applicationResume:(GSEventRef)event {
[self removeApplicationBadge];
[UIHardware _setStatusBarHeight:0.0f];
- [self setStatusBarMode:2 orientation:0 duration:0.0f fenceID:0];
+ [self setStatusBarHidden:YES animated:YES];
[_view applicationResume];
}
Modified: scummvm/branches/gsoc2008-rtl/backends/platform/iphone/iphone_video.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/iphone/iphone_video.h 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/iphone/iphone_video.h 2008-08-04 22:34:07 UTC (rev 33624)
@@ -27,12 +27,11 @@
#define _IPHONE_VIDEO__H
#import <UIKit/UIKit.h>
-#import <UIKit/UIView-Geometry.h>
#import <GraphicsServices/GraphicsServices.h>
#import <Foundation/Foundation.h>
#import <CoreSurface/CoreSurface.h>
-#import <LayerKit/LKLayer.h>
+#import <QuartzCore/QuartzCore.h>
#import "iphone_keyboard.h"
@interface iPhoneView : UIView
@@ -41,7 +40,7 @@
NSMutableArray* _events;
NSLock* _lock;
SoftKeyboard* _keyboardView;
- LKLayer* _screenLayer;
+ CALayer* _screenLayer;
int _fullWidth;
int _fullHeight;
Modified: scummvm/branches/gsoc2008-rtl/backends/platform/iphone/iphone_video.m
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/iphone/iphone_video.m 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/iphone/iphone_video.m 2008-08-04 22:34:07 UTC (rev 33624)
@@ -31,8 +31,8 @@
#import <GraphicsServices/GraphicsServices.h>
#import <Foundation/Foundation.h>
#import <CoreSurface/CoreSurface.h>
-#import <LayerKit/LKLayer.h>
#import <UIKit/UIKeyboardLayoutQWERTY.h>
+#import <QuartzCore/QuartzCore.h>
static iPhoneView *sharedInstance = nil;
static int _width = 0;
@@ -53,8 +53,8 @@
}
void iPhone_updateScreenRect(int x1, int y1, int x2, int y2) {
- NSRect rect = NSMakeRect(x1, y1, x2, y2);
- [sharedInstance performSelectorOnMainThread:@selector(updateScreenRect:) withObject: [NSValue valueWithRect:rect] waitUntilDone: NO];
+ //CGRect rect = CGRectMake(x1, y1, x2, y2);
+ //[sharedInstance performSelectorOnMainThread:@selector(updateScreenRect:) withObject: [NSValue valueWithRect:rect] waitUntilDone: NO];
}
void iPhone_lockSurface() {
@@ -146,9 +146,9 @@
}
- (void)updateScreenRect:(id)rect {
- NSRect nsRect = [rect rectValue];
- CGRect cgRect = CGRectMake(nsRect.origin.x, nsRect.origin.y, nsRect.size.width, nsRect.size.height);
- [sharedInstance setNeedsDisplayInRect: cgRect];
+ // NSRect nsRect = [rect rectValue];
+ // CGRect cgRect = CGRectMake(nsRect.origin.x, nsRect.origin.y, nsRect.size.width, nsRect.size.height);
+ // [sharedInstance setNeedsDisplayInRect: cgRect];
}
- (void)initSurface {
@@ -178,7 +178,7 @@
//printf("Surface created.\n");
CoreSurfaceBufferLock(_screenSurface, 3);
- LKLayer* screenLayer = [[LKLayer layer] retain];
+ CALayer* screenLayer = [[CALayer layer] retain];
if (_keyboardView != nil) {
[_keyboardView removeFromSuperview];
@@ -213,7 +213,7 @@
_keyboardView = [[SoftKeyboard alloc] initWithFrame:keyFrame];
[_keyboardView setInputDelegate:self];
}
-
+
[self addSubview:[_keyboardView inputView]];
[self addSubview: _keyboardView];
[[_keyboardView inputView] becomeFirstResponder];
@@ -283,11 +283,13 @@
}
- (void)mouseDown:(GSEvent*)event {
- struct CGPoint point = GSEventGetLocationInWindow(event);
-
+ //printf("mouseDown()\n");
+ CGRect rect = GSEventGetLocationInWindow(event);
+ CGPoint point = CGPointMake(rect.origin.x, rect.origin.y);
+
if (!getLocalMouseCoords(&point))
return;
-
+
[self addEvent:
[[NSDictionary alloc] initWithObjectsAndKeys:
[NSNumber numberWithInt:kInputMouseDown], @"type",
@@ -298,12 +300,18 @@
];
}
+- (void)touchesBegan {
+ //printf("touchesBegan()\n");
+}
+
- (void)mouseUp:(GSEvent*)event {
- struct CGPoint point = GSEventGetLocationInWindow(event);
-
+ //printf("mouseUp()\n");
+ CGRect rect = GSEventGetLocationInWindow(event);
+ CGPoint point = CGPointMake(rect.origin.x, rect.origin.y);
+
if (!getLocalMouseCoords(&point))
return;
-
+
[self addEvent:
[[NSDictionary alloc] initWithObjectsAndKeys:
[NSNumber numberWithInt:kInputMouseUp], @"type",
@@ -316,11 +324,12 @@
- (void)mouseDragged:(GSEvent*)event {
//printf("mouseDragged()\n");
- struct CGPoint point = GSEventGetLocationInWindow(event);
-
+ CGRect rect = GSEventGetLocationInWindow(event);
+ CGPoint point = CGPointMake(rect.origin.x, rect.origin.y);
+
if (!getLocalMouseCoords(&point))
return;
-
+
[self addEvent:
[[NSDictionary alloc] initWithObjectsAndKeys:
[NSNumber numberWithInt:kInputMouseDragged], @"type",
@@ -333,19 +342,21 @@
- (void)mouseEntered:(GSEvent*)event {
//printf("mouseEntered()\n");
- // struct CGPoint point = GSEventGetLocationInWindow(event);
- //
- // if (!getLocalMouseCoords(&point))
- // return;
- //
- // [self addEvent:
- // [[NSDictionary alloc] initWithObjectsAndKeys:
- // [NSNumber numberWithInt:kInputMouseSecondToggled], @"type",
- // [NSNumber numberWithFloat:point.x], @"x",
- // [NSNumber numberWithFloat:point.y], @"y",
- // nil
- // ]
- // ];
+ CGRect rect = GSEventGetLocationInWindow(event);
+ CGPoint point = CGPointMake(rect.origin.x, rect.origin.y);
+
+
+ if (!getLocalMouseCoords(&point))
+ return;
+
+ [self addEvent:
+ [[NSDictionary alloc] initWithObjectsAndKeys:
+ [NSNumber numberWithInt:kInputMouseSecondToggled], @"type",
+ [NSNumber numberWithFloat:point.x], @"x",
+ [NSNumber numberWithFloat:point.y], @"y",
+ nil
+ ]
+ ];
}
- (void)mouseExited:(GSEvent*)event {
@@ -361,19 +372,19 @@
- (void)mouseMoved:(GSEvent*)event
{
//printf("mouseMoved()\n");
- struct CGPoint point = GSEventGetLocationInWindow(event);
-
- if (!getLocalMouseCoords(&point))
- return;
-
- [self addEvent:
- [[NSDictionary alloc] initWithObjectsAndKeys:
- [NSNumber numberWithInt:kInputMouseSecondToggled], @"type",
- [NSNumber numberWithFloat:point.x], @"x",
- [NSNumber numberWithFloat:point.y], @"y",
- nil
- ]
- ];
+ // struct CGPoint point = GSEventGetLocationInWindow(event);
+ //
+ // if (!getLocalMouseCoords(&point))
+ // return;
+ //
+ // [self addEvent:
+ // [[NSDictionary alloc] initWithObjectsAndKeys:
+ // [NSNumber numberWithInt:kInputMouseSecondToggled], @"type",
+ // [NSNumber numberWithFloat:point.x], @"x",
+ // [NSNumber numberWithFloat:point.y], @"y",
+ // nil
+ // ]
+ // ];
}
- (void)handleKeyPress:(unichar)c {
@@ -391,7 +402,7 @@
return TRUE;
}
-- (int)swipe:(UIViewSwipeDirection)num withEvent:(GSEvent*)event {
+- (int)swipe:(int)num withEvent:(GSEvent*)event {
//printf("swipe: %i\n", num);
[self addEvent:
Modified: scummvm/branches/gsoc2008-rtl/backends/platform/iphone/osys_iphone.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/iphone/osys_iphone.cpp 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/iphone/osys_iphone.cpp 2008-08-04 22:34:07 UTC (rev 33624)
@@ -25,8 +25,6 @@
#if defined(IPHONE_BACKEND)
-#include <CoreGraphics/CGDirectDisplay.h>
-#include <CoreSurface/CoreSurface.h>
#include <unistd.h>
#include <pthread.h>
@@ -41,11 +39,16 @@
#include "backends/saves/default/default-saves.h"
#include "backends/timer/default/default-timer.h"
#include "sound/mixer.h"
+#include "sound/mixer_intern.h"
#include "gui/message.h"
#include "osys_iphone.h"
#include "blit_arm.h"
+#include <sys/time.h>
+#include <CoreGraphics/CGDirectDisplay.h>
+#include <CoreSurface/CoreSurface.h>
+
const OSystem::GraphicsMode OSystem_IPHONE::s_supportedGraphicsModes[] = {
{0, 0, 0}
};
@@ -85,13 +88,13 @@
}
void OSystem_IPHONE::initBackend() {
- _savefile = new DefaultSaveFileManager();
- _mixer = new Audio::Mixer();
+ _savefile = new DefaultSaveFileManager(SCUMMVM_SAVE_PATH);
_timer = new DefaultTimerManager();
gettimeofday(&_startTime, NULL);
- setSoundCallback(Audio::Mixer::mixCallback, _mixer);
+ setupMixer();
+
setTimerCallback(&OSystem_IPHONE::timerHandler, 10);
OSystem::initBackend();
@@ -871,7 +874,7 @@
suspendLoop();
break;
- case kInputKeyPressed:
+ case kInputKeyPressed: {
int keyPressed = (int)xUnit;
int ascii = keyPressed;
//printf("key: %i\n", keyPressed);
@@ -932,6 +935,7 @@
event.kbd.ascii = _queuedInputEvent.kbd.ascii = ascii;
_needEventRestPeriod = true;
break;
+ }
case kInputSwipe: {
Common::KeyCode keycode = Common::KEYCODE_INVALID;
@@ -1088,11 +1092,22 @@
AudioQueueStop(s_AudioQueue.queue, false);
}
-bool OSystem_IPHONE::setSoundCallback(SoundProc proc, void *param) {
+void OSystem_IPHONE::mixCallback(void *sys, byte *samples, int len) {
+ OSystem_IPHONE *this_ = (OSystem_IPHONE *)sys;
+ assert(this_);
+
+ if (this_->_mixer)
+ this_->_mixer->mixCallback(samples, len);
+}
+
+void OSystem_IPHONE::setupMixer() {
//printf("setSoundCallback()\n");
- s_soundCallback = proc;
- s_soundParam = param;
+ _mixer = new Audio::MixerImpl(this);
+ s_soundCallback = mixCallback;
+ s_soundParam = this;
+
+
s_AudioQueue.dataFormat.mSampleRate = AUDIO_SAMPLE_RATE;
s_AudioQueue.dataFormat.mFormatID = kAudioFormatLinearPCM;
s_AudioQueue.dataFormat.mFormatFlags = kLinearPCMFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked;
@@ -1105,7 +1120,8 @@
if (AudioQueueNewOutput(&s_AudioQueue.dataFormat, AQBufferCallback, &s_AudioQueue, 0, kCFRunLoopCommonModes, 0, &s_AudioQueue.queue)) {
printf("Couldn't set the AudioQueue callback!\n");
- return false;
+ _mixer->setReady(false);
+ return;
}
uint32 bufferBytes = s_AudioQueue.frameCount * s_AudioQueue.dataFormat.mBytesPerFrame;
@@ -1113,7 +1129,8 @@
for (int i = 0; i < AUDIO_BUFFERS; i++) {
if (AudioQueueAllocateBuffer(s_AudioQueue.queue, bufferBytes, &s_AudioQueue.buffers[i])) {
printf("Error allocating AudioQueue buffer!\n");
- return false;
+ _mixer->setReady(false);
+ return;
}
AQBufferCallback(&s_AudioQueue, s_AudioQueue.queue, s_AudioQueue.buffers[i]);
@@ -1122,10 +1139,12 @@
AudioQueueSetParameter(s_AudioQueue.queue, kAudioQueueParam_Volume, 1.0);
if (AudioQueueStart(s_AudioQueue.queue, NULL)) {
printf("Error starting the AudioQueue!\n");
- return false;
+ _mixer->setReady(false);
+ return;
}
-
- return true;
+
+ _mixer->setOutputRate(AUDIO_SAMPLE_RATE);
+ _mixer->setReady(true);
}
int OSystem_IPHONE::getOutputSampleRate() const {
@@ -1146,6 +1165,11 @@
void OSystem_IPHONE::quit() {
}
+void OSystem_IPHONE::getTimeAndDate(struct tm &t) const {
+ time_t curTime = time(0);
+ t = *localtime(&curTime);
+}
+
void OSystem_IPHONE::setWindowCaption(const char *caption) {
}
@@ -1169,19 +1193,9 @@
}
const char* OSystem_IPHONE::getConfigPath() {
- if (s_is113OrHigher)
- return SCUMMVM_PREFS_PATH;
- else
- return SCUMMVM_OLD_PREFS_PATH;
+ return SCUMMVM_PREFS_PATH;
}
-const char* OSystem_IPHONE::getSavePath() {
- if (s_is113OrHigher)
- return SCUMMVM_SAVE_PATH;
- else
- return SCUMMVM_OLD_SAVE_PATH;
-}
-
void OSystem_IPHONE::migrateApp() {
// Migrate to the new 1.1.3 directory structure, if needed.
@@ -1193,7 +1207,7 @@
if (!file.exists()) {
system("mkdir " SCUMMVM_ROOT_PATH);
system("mkdir " SCUMMVM_SAVE_PATH);
-
+
// Copy over the prefs file
system("cp " SCUMMVM_OLD_PREFS_PATH " " SCUMMVM_PREFS_PATH);
@@ -1207,24 +1221,24 @@
void iphone_main(int argc, char *argv[]) {
- OSystem_IPHONE::migrateApp();
+ //OSystem_IPHONE::migrateApp();
- // Redirect stdout and stderr if we're launching from the Springboard.
- if (argc == 2 && strcmp(argv[1], "--launchedFromSB") == 0) {
- FILE *newfp = fopen("/tmp/scummvm.log", "a");
- if (newfp != NULL) {
- fclose(stdout);
- fclose(stderr);
- *stdout = *newfp;
- *stderr = *newfp;
- setbuf(stdout, NULL);
- setbuf(stderr, NULL);
+ FILE *newfp = fopen("/var/mobile/.scummvm.log", "a");
+ if (newfp != NULL) {
+ fclose(stdout);
+ fclose(stderr);
+ *stdout = *newfp;
+ *stderr = *newfp;
+ setbuf(stdout, NULL);
+ setbuf(stderr, NULL);
- //extern int gDebugLevel;
- //gDebugLevel = 10;
- }
+ //extern int gDebugLevel;
+ //gDebugLevel = 10;
}
+ system("mkdir " SCUMMVM_ROOT_PATH);
+ system("mkdir " SCUMMVM_SAVE_PATH);
+
g_system = OSystem_IPHONE_create();
assert(g_system);
Modified: scummvm/branches/gsoc2008-rtl/backends/platform/iphone/osys_iphone.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/iphone/osys_iphone.h 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/iphone/osys_iphone.h 2008-08-04 22:34:07 UTC (rev 33624)
@@ -29,6 +29,8 @@
#include "iphone_common.h"
#include "common/system.h"
#include "common/events.h"
+#include "sound/mixer_intern.h"
+#include "backends/fs/posix/posix-fs-factory.h"
#include <AudioToolbox/AudioQueue.h>
@@ -62,7 +64,7 @@
static bool s_is113OrHigher;
Common::SaveFileManager *_savefile;
- Audio::Mixer *_mixer;
+ Audio::MixerImpl *_mixer;
Common::TimerManager *_timer;
Graphics::Surface _framebuffer;
@@ -152,12 +154,16 @@
virtual void unlockMutex(MutexRef mutex);
virtual void deleteMutex(MutexRef mutex);
- virtual bool setSoundCallback(SoundProc proc, void *param);
+ static void mixCallback(void *sys, byte *samples, int len);
+ virtual void setupMixer(void);
virtual int getOutputSampleRate() const;
virtual void setTimerCallback(TimerProc callback, int interval);
virtual void quit();
+ FilesystemFactory *getFilesystemFactory() { return &POSIXFilesystemFactory::instance(); }
+ virtual void getTimeAndDate(struct tm &t) const;
+
virtual void setWindowCaption(const char *caption);
virtual Common::SaveFileManager *getSavefileManager();
@@ -166,7 +172,6 @@
static void migrateApp();
static const char* getConfigPath();
- static const char* getSavePath();
protected:
inline void addDirtyRect(int16 x1, int16 y1, int16 w, int16 h);
Modified: scummvm/branches/gsoc2008-rtl/backends/platform/sdl/sdl.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/sdl/sdl.cpp 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/sdl/sdl.cpp 2008-08-04 22:34:07 UTC (rev 33624)
@@ -26,6 +26,11 @@
#include "backends/platform/sdl/sdl.h"
#include "common/config-manager.h"
#include "common/events.h"
+#include "common/file.h"
+#if defined(WIN32) && defined(ARRAYSIZE)
+// winnt.h defines ARRAYSIZE, but we want our own one... - this is needed before including util.h
+#undef ARRAYSIZE
+#endif
#include "common/util.h"
#include "backends/saves/default/default-saves.h"
@@ -40,6 +45,7 @@
#define SAMPLES_PER_SEC 22050
//#define SAMPLES_PER_SEC 44100
+
/*
* Include header files needed for the getFilesystemFactory() method.
*/
@@ -52,6 +58,18 @@
#endif
+#if defined(UNIX)
+#ifdef MACOSX
+#define DEFAULT_CONFIG_FILE "Library/Preferences/ScummVM Preferences"
+#else
+#define DEFAULT_CONFIG_FILE ".scummvmrc"
+#endif
+#else
+#define DEFAULT_CONFIG_FILE "scummvm.ini"
+#endif
+
+
+
static Uint32 timer_handler(Uint32 interval, void *param) {
((DefaultTimerManager *)param)->handler();
return interval;
@@ -170,6 +188,10 @@
_joystick(0),
_currentShakePos(0), _newShakePos(0),
_paletteDirtyStart(0), _paletteDirtyEnd(0),
+#ifdef MIXER_DOUBLE_BUFFERING
+ _soundMutex(0), _soundCond(0), _soundThread(0),
+ _soundThreadIsRunning(false), _soundThreadShouldQuit(false),
+#endif
_savefile(0),
_mixer(0),
_timer(0),
@@ -241,6 +263,92 @@
#endif
}
+static Common::String getDefaultConfigFileName() {
+ char configFile[MAXPATHLEN];
+#if defined (WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
+ OSVERSIONINFO win32OsVersion;
+ ZeroMemory(&win32OsVersion, sizeof(OSVERSIONINFO));
+ win32OsVersion.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+ GetVersionEx(&win32OsVersion);
+ // Check for non-9X version of Windows.
+ if (win32OsVersion.dwPlatformId != VER_PLATFORM_WIN32_WINDOWS) {
+ // Use the Application Data directory of the user profile.
+ if (win32OsVersion.dwMajorVersion >= 5) {
+ if (!GetEnvironmentVariable("APPDATA", configFile, sizeof(configFile)))
+ error("Unable to access application data directory");
+ } else {
+ if (!GetEnvironmentVariable("USERPROFILE", configFile, sizeof(configFile)))
+ error("Unable to access user profile directory");
+
+ strcat(configFile, "\\Application Data");
+ CreateDirectory(configFile, NULL);
+ }
+
+ strcat(configFile, "\\ScummVM");
+ CreateDirectory(configFile, NULL);
+ strcat(configFile, "\\" DEFAULT_CONFIG_FILE);
+
+ if (fopen(configFile, "r") == NULL) {
+ // Check windows directory
+ char oldConfigFile[MAXPATHLEN];
+ GetWindowsDirectory(oldConfigFile, MAXPATHLEN);
+ strcat(oldConfigFile, "\\" DEFAULT_CONFIG_FILE);
+ if (fopen(oldConfigFile, "r")) {
+ printf("The default location of the config file (scummvm.ini) in ScummVM has changed,\n");
+ printf("under Windows NT4/2000/XP/Vista. You may want to consider moving your config\n");
+ printf("file from the old default location:\n");
+ printf("%s\n", oldConfigFile);
+ printf("to the new default location:\n");
+ printf("%s\n\n", configFile);
+ strcpy(configFile, oldConfigFile);
+ }
+ }
+ } else {
+ // Check windows directory
+ GetWindowsDirectory(configFile, MAXPATHLEN);
+ strcat(configFile, "\\" DEFAULT_CONFIG_FILE);
+ }
+#elif defined(UNIX)
+ // On UNIX type systems, by default we store the config file inside
+ // to the HOME directory of the user.
+ //
+ // GP2X is Linux based but Home dir can be read only so do not use
+ // it and put the config in the executable dir.
+ //
+ // On the iPhone, the home dir of the user when you launch the app
+ // from the Springboard, is /. Which we don't want.
+ const char *home = getenv("HOME");
+ if (home != NULL && strlen(home) < MAXPATHLEN)
+ snprintf(configFile, MAXPATHLEN, "%s/%s", home, DEFAULT_CONFIG_FILE);
+ else
+ strcpy(configFile, DEFAULT_CONFIG_FILE);
+#else
+ strcpy(configFile, DEFAULT_CONFIG_FILE);
+#endif
+
+ return configFile;
+}
+
+Common::SeekableReadStream *OSystem_SDL::openConfigFileForReading() {
+ Common::File *confFile = new Common::File();
+ assert(confFile);
+ if (!confFile->open(getDefaultConfigFileName())) {
+ delete confFile;
+ confFile = 0;
+ }
+ return confFile;
+}
+
+Common::WriteStream *OSystem_SDL::openConfigFileForWriting() {
+ Common::DumpFile *confFile = new Common::DumpFile();
+ assert(confFile);
+ if (!confFile->open(getDefaultConfigFileName())) {
+ delete confFile;
+ confFile = 0;
+ }
+ return confFile;
+}
+
void OSystem_SDL::setWindowCaption(const char *caption) {
SDL_WM_SetCaption(caption, caption);
}
Modified: scummvm/branches/gsoc2008-rtl/backends/platform/sdl/sdl.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/sdl/sdl.h 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/sdl/sdl.h 2008-08-04 22:34:07 UTC (rev 33624)
@@ -210,6 +210,9 @@
virtual Common::SaveFileManager *getSavefileManager();
virtual FilesystemFactory *getFilesystemFactory();
+ virtual Common::SeekableReadStream *openConfigFileForReading();
+ virtual Common::WriteStream *openConfigFileForWriting();
+
protected:
bool _inited;
Modified: scummvm/branches/gsoc2008-rtl/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl 2008-08-04 22:34:07 UTC (rev 33624)
@@ -2,12 +2,11 @@
##################################################################################################################
@WorkingEngines = qw(
- scumm agos sky queen gob saga
- kyra lure agi
+ scumm agos sky queen gob saga drascula
+ kyra lure agi touche parallaction
);
@TestingEngines = qw(
- cine cruise touche parallaction
- drascula igor made m4
+ cruise igor made m4 cine
);
@BrokenEngines = qw(
sword1
@@ -29,21 +28,21 @@
);
# these are normally enabled for each variation
- $DefaultFeatures = qw(zlib tremor);
- #$DefaultFeatures = qw(zlib mad tremor);
+ #$DefaultFeatures = qw(zlib,mad);
+ $DefaultFeatures = qw(zlib,mad,tremor);
- # you can use these below for speed & clarity or override with custom settings
- $DefaultTopMacros = "
- MACRO USE_ZLIB // LIB:zlib.lib
- //MACRO USE_MAD // LIB:libmad.lib
- MACRO USE_TREMOR // LIB:libtremor.lib
- ";
+ # you can use these below for speed & clarity or override with custom settings
+ $DefaultTopMacros = "
+ MACRO USE_ZLIB // LIB:zlib.lib
+ MACRO USE_MAD // LIB:libmad.lib
+ MACRO USE_TREMOR // LIB:libtremor.lib
+ ";
- $DefaultBottomMacros = "
- MACRO DISABLE_SWORD1 // LIB:scummvm_sword1.lib
- MACRO DISABLE_SWORD2 // LIB:scummvm_sword2.lib
- ";
+ $DefaultBottomMacros = "
+ MACRO DISABLE_SWORD1 // LIB:scummvm_sword1.lib
+ MACRO DISABLE_SWORD2 // LIB:scummvm_sword2.lib
+ ";
##################################################################################################################
##
Modified: scummvm/branches/gsoc2008-rtl/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in 2008-08-04 22:34:07 UTC (rev 33624)
@@ -50,7 +50,7 @@
END
EPOCSTACKSIZE 80000
-EPOCHEAPSIZE 3000000 64000000
+EPOCHEAPSIZE 5000000 64000000
START BITMAP ScummVM.mbm
TARGETPATH \Resource\Apps
Modified: scummvm/branches/gsoc2008-rtl/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in 2008-08-04 22:34:07 UTC (rev 33624)
@@ -51,7 +51,7 @@
END
EPOCSTACKSIZE 80000
-EPOCHEAPSIZE 3000000 64000000
+EPOCHEAPSIZE 5000000 64000000
START BITMAP ScummVM.mbm
TARGETPATH \Resource\Apps
Modified: scummvm/branches/gsoc2008-rtl/backends/platform/symbian/src/SymbianActions.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/symbian/src/SymbianActions.cpp 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/symbian/src/SymbianActions.cpp 2008-08-04 22:34:07 UTC (rev 33624)
@@ -140,6 +140,8 @@
bool is_touche = (gameid == "touche");
bool is_agi = (gameid == "agi");
bool is_parallaction = (gameid == "parallaction");
+ bool is_lure = (gameid == "lure");
+ bool is_feeble = (gameid == "feeble");
Actions::initInstanceGame();
@@ -175,7 +177,7 @@
// Skip text
if (!is_cine && !is_parallaction)
_action_enabled[ACTION_SKIP_TEXT] = true;
- if (is_simon || is_sky || is_sword2 || is_queen || is_sword1 || is_gob || is_saga || is_kyra || is_touche)
+ if (is_simon || is_sky || is_sword2 || is_queen || is_sword1 || is_gob || is_saga || is_kyra || is_touche || is_lure || is_feeble)
_key_action[ACTION_SKIP_TEXT].setKey(Common::KEYCODE_ESCAPE, Common::KEYCODE_ESCAPE); // Escape key
else {
_key_action[ACTION_SKIP_TEXT].setKey(SDLK_PERIOD);
Modified: scummvm/branches/gsoc2008-rtl/backends/platform/symbian/src/SymbianOS.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/symbian/src/SymbianOS.cpp 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/symbian/src/SymbianOS.cpp 2008-08-04 22:34:07 UTC (rev 33624)
@@ -30,6 +30,7 @@
#include "backends/platform/symbian/src/SymbianActions.h"
#include "common/config-manager.h"
#include "common/events.h"
+#include "common/file.h"
#include "gui/Actions.h"
#include "gui/Key.h"
#include "gui/message.h"
@@ -42,6 +43,10 @@
#define SAMPLES_PER_SEC 16000
#endif
+
+#define DEFAULT_CONFIG_FILE "scummvm.ini"
+
+
#define KInputBufferLength 128
// Symbian libc file functionality in order to provide shared file handles
struct TSymbianFileEntry {
@@ -122,6 +127,34 @@
return &SymbianFilesystemFactory::instance();
}
+static Common::String getDefaultConfigFileName() {
+ char configFile[MAXPATHLEN];
+ strcpy(configFile, Symbian::GetExecutablePath());
+ strcat(configFile, DEFAULT_CONFIG_FILE);
+ return configFile;
+}
+
+Common::SeekableReadStream *OSystem_SDL_Symbian::openConfigFileForReading() {
+ Common::File *confFile = new Common::File();
+ assert(confFile);
+ if (!confFile->open(getDefaultConfigFileName())) {
+ delete confFile;
+ confFile = 0;
+ }
+ return confFile;
+}
+
+Common::WriteStream *OSystem_SDL_Symbian::openConfigFileForWriting() {
+ Common::DumpFile *confFile = new Common::DumpFile();
+ assert(confFile);
+ if (!confFile->open(getDefaultConfigFileName())) {
+ delete confFile;
+ confFile = 0;
+ }
+ return confFile;
+}
+
+
OSystem_SDL_Symbian::zoneDesc OSystem_SDL_Symbian::_zones[TOTAL_ZONES] = {
{ 0, 0, 320, 145 },
{ 0, 145, 150, 55 },
@@ -617,9 +650,13 @@
long int symbian_ftell(FILE* handle) {
TInt pos = 0;
+ TSymbianFileEntry* entry = ((TSymbianFileEntry*)(handle));
- ((TSymbianFileEntry*)(handle))->iFileHandle.Seek(ESeekCurrent, pos);
-
+ entry->iFileHandle.Seek(ESeekCurrent, pos);
+ if(entry->iInputPos != KErrNotFound)
+ {
+ pos+=(entry->iInputPos - entry->iInputBufferLen);
+ }
return pos;
}
@@ -627,6 +664,7 @@
TSeek seekMode = ESeekStart;
TInt pos = offset;
+ TSymbianFileEntry* entry = ((TSymbianFileEntry*)(handle));
switch(whence) {
case SEEK_SET:
@@ -634,6 +672,9 @@
break;
case SEEK_CUR:
seekMode = ESeekCurrent;
+ if(entry->iInputPos != KErrNotFound) {
+ pos+=(entry->iInputPos - entry->iInputBufferLen);
+ }
break;
case SEEK_END:
seekMode = ESeekEnd;
@@ -641,9 +682,9 @@
}
- ((TSymbianFileEntry*)(handle))->iInputPos = KErrNotFound;
+ entry->iInputPos = KErrNotFound;
- return ((TSymbianFileEntry*)(handle))->iFileHandle.Seek(seekMode, pos);
+ return entry->iFileHandle.Seek(seekMode, pos);
}
void symbian_clearerr(FILE* /*handle*/) {
Modified: scummvm/branches/gsoc2008-rtl/backends/platform/symbian/src/SymbianOS.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/symbian/src/SymbianOS.h 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/symbian/src/SymbianOS.h 2008-08-04 22:34:07 UTC (rev 33624)
@@ -71,6 +71,9 @@
static void symbianMixCallback(void *s, byte *samples, int len);
virtual FilesystemFactory *getFilesystemFactory();
+
+ virtual Common::SeekableReadStream *openConfigFileForReading();
+ virtual Common::WriteStream *openConfigFileForWriting();
public:
// vibration support
#ifdef USE_VIBRA_SE_PXXX
Modified: scummvm/branches/gsoc2008-rtl/backends/platform/symbian/src/main_features.inl
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/symbian/src/main_features.inl 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/symbian/src/main_features.inl 2008-08-04 22:34:07 UTC (rev 33624)
@@ -27,62 +27,61 @@
// we want a list of supported engines visible in the program,
// because we also release special builds with only one engine
-#ifndef DISABLE_SCUMM
+#ifdef ENABLE_SCUMM
"SCUMM "
#endif
-#ifndef DISABLE_AGOS
+#ifdef ENABLE_AGOS
"AGOS "
#endif
-#ifndef DISABLE_SKY
+#ifdef ENABLE_SKY
"Sky "
#endif
-#ifndef DISABLE_QUEEN
+#ifdef ENABLE_QUEEN
"Queen "
#endif
-#ifndef DISABLE_GOB
+#ifdef ENABLE_GOB
"Gob "
#endif
-#ifndef DISABLE_SAGA
+#ifdef ENABLE_SAGA
"Saga "
#endif
-#ifndef DISABLE_KYRA
+#ifdef ENABLE_KYRA
"Kyra "
#endif
-#ifndef DISABLE_SWORD1
+#ifdef ENABLE_SWORD1
"Sword1 "
#endif
-#ifndef DISABLE_SWORD2
+#ifdef ENABLE_SWORD2
"Sword2 "
#endif
-#ifndef DISABLE_CINE
+#ifdef ENABLE_CINE
"Cine "
#endif
-#ifndef DISABLE_LURE
+#ifdef ENABLE_LURE
"Lure "
#endif
-#ifndef DISABLE_AGI
+#ifdef ENABLE_AGI
"AGI "
#endif
-#ifndef DISABLE_TOUCHE
+#ifdef ENABLE_TOUCHE
"Touche "
#endif
-#ifndef DISABLE_DRASCULA
+#ifdef ENABLE_DRASCULA
"Drascula "
#endif
-#ifndef DISABLE_IGOR
+#ifdef ENABLE_IGOR
"Igor "
#endif
-#ifndef DISABLE_PARALLACTION
+#ifdef ENABLE_PARALLACTION
"Parallaction "
#endif
-#ifndef DISABLE_CRUISE
+#ifdef ENABLE_CRUISE
"Cruise "
#endif
-#ifndef DISABLE_MADE
+#ifdef ENABLE_MADE
"MADE "
#endif
-
-#ifndef DISABLE_M4
+#ifdef ENABLE_M4
"M4 "
#endif
Modified: scummvm/branches/gsoc2008-rtl/backends/platform/symbian/src/portdefs.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/platform/symbian/src/portdefs.h 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/platform/symbian/src/portdefs.h 2008-08-04 22:34:07 UTC (rev 33624)
@@ -157,5 +157,6 @@
namespace Symbian {
extern void FatalError(const char *msg);
extern char* GetExecutablePath();
+#define DYNAMIC_MODULES 1
}
#endif
Modified: scummvm/branches/gsoc2008-rtl/backends/plugins/win32/win32-provider.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/plugins/win32/win32-provider.cpp 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/plugins/win32/win32-provider.cpp 2008-08-04 22:34:07 UTC (rev 33624)
@@ -50,21 +50,14 @@
virtual VoidFunc findSymbol(const char *symbol) {
#ifndef _WIN32_WCE
- void *func = (void *)GetProcAddress((HMODULE)_dlHandle, symbol);
+ FARPROC func = GetProcAddress((HMODULE)_dlHandle, symbol);
#else
- void *func = (void *)GetProcAddress((HMODULE)_dlHandle, toUnicode(symbol));
+ FARPROC func = GetProcAddress((HMODULE)_dlHandle, toUnicode(symbol));
#endif
if (!func)
debug("Failed loading symbol '%s' from plugin '%s'", symbol, _filename.c_str());
- // FIXME HACK: This is a HACK to circumvent a clash between the ISO C++
- // standard and POSIX: ISO C++ disallows casting between function pointers
- // and data pointers, but dlsym always returns a void pointer. For details,
- // see e.g. <http://www.trilithium.com/johan/2004/12/problem-with-dlsym/>.
- assert(sizeof(VoidFunc) == sizeof(func));
- VoidFunc tmp;
- memcpy(&tmp, &func, sizeof(VoidFunc));
- return tmp;
+ return (void (*)())func;
}
public:
Modified: scummvm/branches/gsoc2008-rtl/backends/saves/default/default-saves.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/saves/default/default-saves.cpp 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/saves/default/default-saves.cpp 2008-08-04 22:34:07 UTC (rev 33624)
@@ -41,79 +41,42 @@
#include <sys/stat.h>
#endif
-
-class StdioSaveFile : public Common::InSaveFile, public Common::OutSaveFile {
-private:
- FILE *fh;
-public:
- StdioSaveFile(const char *filename, bool saveOrLoad) {
- fh = ::fopen(filename, (saveOrLoad? "wb" : "rb"));
- }
- ~StdioSaveFile() {
- if (fh)
- ::fclose(fh);
- }
-
- bool eos() const { return feof(fh) != 0; }
- bool ioFailed() const { return ferror(fh) != 0; }
- void clearIOFailed() { clearerr(fh); }
-
- bool isOpen() const { return fh != 0; }
-
- uint32 read(void *dataPtr, uint32 dataSize) {
- assert(fh);
- return fread(dataPtr, 1, dataSize, fh);
- }
- uint32 write(const void *dataPtr, uint32 dataSize) {
- assert(fh);
- return fwrite(dataPtr, 1, dataSize, fh);
- }
-
- uint32 pos() const {
- assert(fh);
- return ftell(fh);
- }
- uint32 size() const {
- assert(fh);
- uint32 oldPos = ftell(fh);
- fseek(fh, 0, SEEK_END);
- uint32 length = ftell(fh);
- fseek(fh, oldPos, SEEK_SET);
- return length;
- }
-
- void seek(int32 offs, int whence = SEEK_SET) {
- assert(fh);
- fseek(fh, offs, whence);
- }
-};
-
-static void join_paths(const char *filename, const char *directory,
- char *buf, int bufsize) {
- buf[bufsize-1] = '\0';
- strncpy(buf, directory, bufsize-1);
-
-#ifdef WIN32
- // Fix for Win98 issue related with game directory pointing to root drive ex. "c:\"
- if ((buf[0] != 0) && (buf[1] == ':') && (buf[2] == '\\') && (buf[3] == 0)) {
- buf[2] = 0;
- }
+#ifdef UNIX
+#ifdef MACOSX
+#define DEFAULT_SAVE_PATH "Documents/ScummVM Savegames"
+#else
+#define DEFAULT_SAVE_PATH ".scummvm"
#endif
-
- const int dirLen = strlen(buf);
-
- if (dirLen > 0) {
-#if defined(__MORPHOS__) || defined(__amigaos4__)
- if (buf[dirLen-1] != ':' && buf[dirLen-1] != '/')
+#elif defined(__SYMBIAN32__)
+#define DEFAULT_SAVE_PATH "Savegames"
#endif
-#if !defined(__GP32__)
- strncat(buf, "/", bufsize-1); // prevent double /
-#endif
+DefaultSaveFileManager::DefaultSaveFileManager() {
+ // Register default savepath
+ // TODO: Remove this code here, and instead leave setting the
+ // default savepath to the ports using this class.
+#ifdef DEFAULT_SAVE_PATH
+ Common::String savePath;
+#if defined(UNIX) && !defined(IPHONE)
+ const char *home = getenv("HOME");
+ if (home && *home && strlen(home) < MAXPATHLEN) {
+ savePath = home;
+ savePath += "/" DEFAULT_SAVE_PATH;
+ ConfMan.registerDefault("savepath", savePath);
}
- strncat(buf, filename, bufsize-1);
+#elif defined(__SYMBIAN32__)
+ savePath = Symbian::GetExecutablePath();
+ savePath += DEFAULT_SAVE_PATH "\\";
+ ConfMan.registerDefault("savepath", savePath);
+#endif
+#endif // #ifdef DEFAULT_SAVE_PATH
}
+DefaultSaveFileManager::DefaultSaveFileManager(const Common::String &defaultSavepath) {
+ ConfMan.registerDefault("savepath", defaultSavepath);
+}
+
+
Common::StringList DefaultSaveFileManager::listSavefiles(const char *pattern) {
FilesystemNode savePath(getSavePath());
FSList savefiles;
@@ -129,7 +92,8 @@
return results;
}
-void DefaultSaveFileManager::checkPath(const Common::String &path) {
+void DefaultSaveFileManager::checkPath(const FilesystemNode &dir) {
+ const Common::String path = dir.getPath();
clearError();
#if defined(UNIX) || defined(__SYMBIAN32__)
@@ -196,23 +160,27 @@
setError(SFM_DIR_NOTDIR, "The given savepath is not a directory: "+path);
}
}
+#else
+ if (!dir.exists()) {
+ // TODO: We could try to mkdir the directory here; or rather, we could
+ // add a mkdir method to FilesystemNode and invoke that here.
+ setError(SFM_DIR_NOENT, "A component of the path does not exist, or the path is an empty string: "+path);
+ } else if (!dir.isDirectory()) {
+ setError(SFM_DIR_NOTDIR, "The given savepath is not a directory: "+path);
+ }
#endif
}
Common::InSaveFile *DefaultSaveFileManager::openForLoading(const char *filename) {
// Ensure that the savepath is valid. If not, generate an appropriate error.
- char buf[256];
- Common::String savePath = getSavePath();
+ FilesystemNode savePath(getSavePath());
checkPath(savePath);
if (getError() == SFM_NO_ERROR) {
- join_paths(filename, savePath.c_str(), buf, sizeof(buf));
- StdioSaveFile *sf = new StdioSaveFile(buf, false);
+ FilesystemNode file = savePath.getChild(filename);
- if (!sf->isOpen()) {
- delete sf;
- sf = 0;
- }
+ // Open the file for reading
+ Common::SeekableReadStream *sf = file.openForReading();
return wrapInSaveFile(sf);
} else {
@@ -222,18 +190,14 @@
Common::OutSaveFile *DefaultSaveFileManager::openForSaving(const char *filename) {
// Ensure that the savepath is valid. If not, generate an appropriate error.
- char buf[256];
- Common::String savePath = getSavePath();
+ FilesystemNode savePath(getSavePath());
checkPath(savePath);
if (getError() == SFM_NO_ERROR) {
- join_paths(filename, savePath.c_str(), buf, sizeof(buf));
- StdioSaveFile *sf = new StdioSaveFile(buf, true);
+ FilesystemNode file = savePath.getChild(filename);
- if (!sf->isOpen()) {
- delete sf;
- sf = 0;
- }
+ // Open the file for saving
+ Common::WriteStream *sf = file.openForWriting();
return wrapOutSaveFile(sf);
} else {
@@ -242,18 +206,19 @@
}
bool DefaultSaveFileManager::removeSavefile(const char *filename) {
- char buf[256];
clearError();
- Common::String filenameStr;
- join_paths(filename, getSavePath().c_str(), buf, sizeof(buf));
- if (remove(buf) != 0) {
+ FilesystemNode savePath(getSavePath());
+ FilesystemNode file = savePath.getChild(filename);
+
+ // TODO: Add new method FilesystemNode::remove()
+ if (remove(file.getPath().c_str()) != 0) {
#ifndef _WIN32_WCE
if (errno == EACCES)
- setError(SFM_DIR_ACCESS, "Search or write permission denied: "+filenameStr);
+ setError(SFM_DIR_ACCESS, "Search or write permission denied: "+file.getName());
if (errno == ENOENT)
- setError(SFM_DIR_NOENT, "A component of the path does not exist, or the path is an empty string: "+filenameStr);
+ setError(SFM_DIR_NOENT, "A component of the path does not exist, or the path is an empty string: "+file.getName());
#endif
return false;
} else {
Modified: scummvm/branches/gsoc2008-rtl/backends/saves/default/default-saves.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/backends/saves/default/default-saves.h 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/backends/saves/default/default-saves.h 2008-08-04 22:34:07 UTC (rev 33624)
@@ -34,6 +34,9 @@
*/
class DefaultSaveFileManager : public Common::SaveFileManager {
public:
+ DefaultSaveFileManager();
+ DefaultSaveFileManager(const Common::String &defaultSavepath);
+
virtual Common::StringList listSavefiles(const char *pattern);
virtual Common::InSaveFile *openForLoading(const char *filename);
virtual Common::OutSaveFile *openForSaving(const char *filename);
@@ -51,7 +54,7 @@
* Checks the given path for read access, existence, etc.
* Sets the internal error and error message accordingly.
*/
- void checkPath(const Common::String &path);
+ void checkPath(const FilesystemNode &dir);
};
#endif
Modified: scummvm/branches/gsoc2008-rtl/base/commandLine.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/base/commandLine.cpp 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/base/commandLine.cpp 2008-08-04 22:34:07 UTC (rev 33624)
@@ -34,22 +34,6 @@
#include "sound/mididrv.h"
-#ifdef IPHONE
-#include "backends/platform/iphone/osys_iphone.h"
-#endif
-
-#ifdef UNIX
-#ifdef MACOSX
-#define DEFAULT_SAVE_PATH "Documents/ScummVM Savegames"
-#else
-#define DEFAULT_SAVE_PATH ".scummvm"
-#endif
-#elif defined(__SYMBIAN32__)
-#define DEFAULT_SAVE_PATH "Savegames"
-#elif defined(PALMOS_MODE)
-#define DEFAULT_SAVE_PATH "/PALM/Programs/ScummVM/Saved"
-#endif
-
#define DETECTOR_TESTING_HACK
namespace Base {
@@ -181,9 +165,6 @@
// Game specific
ConfMan.registerDefault("path", "");
- ConfMan.registerDefault("savepath", "");
-
-// ConfMan.registerDefault("amiga", false);
ConfMan.registerDefault("platform", Common::kPlatformPC);
ConfMan.registerDefault("language", "en");
ConfMan.registerDefault("subtitles", false);
@@ -216,27 +197,6 @@
ConfMan.registerDefault("alsa_port", "65:0");
#endif
- // Register default savepath
-#ifdef DEFAULT_SAVE_PATH
- char savePath[MAXPATHLEN];
-#if defined(UNIX) && !defined(IPHONE)
- const char *home = getenv("HOME");
- if (home && *home && strlen(home) < MAXPATHLEN) {
- snprintf(savePath, MAXPATHLEN, "%s/%s", home, DEFAULT_SAVE_PATH);
- ConfMan.registerDefault("savepath", savePath);
- }
-#elif defined(__SYMBIAN32__)
- strcpy(savePath, Symbian::GetExecutablePath());
- strcat(savePath, DEFAULT_SAVE_PATH);
- ConfMan.registerDefault("savepath", savePath);
-#elif defined (IPHONE)
- ConfMan.registerDefault("savepath", OSystem_IPHONE::getSavePath());
-
-#elif defined(PALMOS_MODE)
- ConfMan.registerDefault("savepath", DEFAULT_SAVE_PATH);
-#endif
-#endif // #ifdef DEFAULT_SAVE_PATH
-
ConfMan.registerDefault("record_mode", "none");
ConfMan.registerDefault("record_file_name", "record.bin");
ConfMan.registerDefault("record_temp_file_name", "record.tmp");
@@ -684,9 +644,9 @@
failure++;
} else if (candidates.size() > 1) {
if (gameidDiffers) {
- printf(" FAILURE: Multiple games detected, some/all with wrong gameid\n");
+ printf(" WARNING: Multiple games detected, some/all with wrong gameid\n");
} else {
- printf(" FAILURE: Multiple games detected, but all have the same gameid\n");
+ printf(" WARNING: Multiple games detected, but all have the same gameid\n");
}
failure++;
} else if (gameidDiffers) {
Modified: scummvm/branches/gsoc2008-rtl/base/game.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/base/game.h 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/base/game.h 2008-08-04 22:34:07 UTC (rev 33624)
@@ -92,6 +92,10 @@
const Common::String &description() const { return getVal("description"); }
Common::Language language() const { return contains("language") ? Common::parseLanguage(getVal("language")) : Common::UNK_LANG; }
Common::Platform platform() const { return contains("platform") ? Common::parsePlatform(getVal("platform")) : Common::kPlatformUnknown; }
+
+ const Common::String &preferredtarget() const {
+ return contains("preferredtarget") ? getVal("preferredtarget") : getVal("gameid");
+ }
};
/** List of games. */
Modified: scummvm/branches/gsoc2008-rtl/base/main.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/base/main.cpp 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/base/main.cpp 2008-08-04 22:34:07 UTC (rev 33624)
@@ -111,36 +111,9 @@
// TODO: specify the possible return values here
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() != '/'
-#if defined(__MORPHOS__) || defined(__amigaos4__)
- && gameDataPath.lastChar() != ':'
-#endif
- && gameDataPath.lastChar() != '\\') {
- gameDataPath += '/';
- ConfMan.set("path", gameDataPath, Common::ConfigManager::kTransientDomain);
- }
+ // Query the game data path, for messages
+ Common::String path = ConfMan.hasKey("path") ? ConfMan.get("path") : ".";
- // We add the game "path" to the file search path via File::addDefaultDirectory(),
- // so that MD5-based detection will be able to properly find files with mixed case
- // filenames.
- // FIXME/TODO: Fingolfin still doesn't like this; if those MD5-based detectors used
- // FSNodes instead of File::open, they wouldn't have to do this.
- Common::String path;
- if (ConfMan.hasKey("path")) {
- path = ConfMan.get("path");
- FilesystemNode dir(path);
- if (!dir.isDirectory()) {
- warning("Game directory does not exist (%s)", path.c_str());
- return 0;
- }
- } else {
- path = ".";
- warning("No path was provided. Assuming the data files are in the current directory");
- }
- Common::File::addDefaultDirectory(path);
-
// Create the game engine
Engine *engine = 0;
PluginError err = (*plugin)->createInstance(&system, &engine);
@@ -182,15 +155,14 @@
system.setWindowCaption(caption.c_str());
}
- if (ConfMan.hasKey("path"))
- Common::File::addDefaultDirectory(ConfMan.get("path"));
- else
- Common::File::addDefaultDirectory(".");
+ // Add the game path to the directory search list
+ Common::File::addDefaultDirectory(path);
// Add extrapath (if any) to the directory search list
if (ConfMan.hasKey("extrapath"))
Common::File::addDefaultDirectoryRecursive(ConfMan.get("extrapath"));
+ // If a second extrapath is specified on the app domain level, add that as well.
if (ConfMan.hasKey("extrapath", Common::ConfigManager::kApplicationDomain))
Common::File::addDefaultDirectoryRecursive(ConfMan.get("extrapath", Common::ConfigManager::kApplicationDomain));
Modified: scummvm/branches/gsoc2008-rtl/base/plugins.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/base/plugins.cpp 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/base/plugins.cpp 2008-08-04 22:34:07 UTC (rev 33624)
@@ -140,6 +140,9 @@
#if PLUGIN_ENABLED_STATIC(SWORD2)
LINK_PLUGIN(SWORD2)
#endif
+ #if PLUGIN_ENABLED_STATIC(TINSEL)
+ LINK_PLUGIN(TINSEL)
+ #endif
#if PLUGIN_ENABLED_STATIC(TOUCHE)
LINK_PLUGIN(TOUCHE)
#endif
Modified: scummvm/branches/gsoc2008-rtl/common/advancedDetector.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/common/advancedDetector.cpp 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/common/advancedDetector.cpp 2008-08-04 22:34:07 UTC (rev 33624)
@@ -34,8 +34,12 @@
namespace Common {
-using namespace AdvancedDetector;
+/**
+ * A list of pointers to ADGameDescription structs (or subclasses thereof).
+ */
+typedef Array<const ADGameDescription*> ADGameDescList;
+
/**
* Detect games in specified directory.
* Parameters language and platform are used to pass on values
@@ -48,7 +52,7 @@
* @param platform restrict results to specified platform only
* @return list of ADGameDescription (or subclass) pointers corresponding to matched games
*/
-static ADGameDescList detectGame(const FSList *fslist, const Common::ADParams ¶ms, Language language, Platform platform, const Common::String extra);
+static ADGameDescList detectGame(const FSList &fslist, const Common::ADParams ¶ms, Language language, Platform platform, const Common::String extra);
/**
@@ -90,6 +94,8 @@
warning("Target upgraded from %s to %s", o->from, o->to);
+ // WORKAROUND: Fix for bug #1719463: "DETECTOR: Launching
+ // undefined target adds launcher entry"
if (ConfMan.hasKey("id_came_from_command_line")) {
warning("Target came from command line. Skipping save");
} else {
@@ -194,7 +200,7 @@
}
GameList AdvancedMetaEngine::detectGames(const FSList &fslist) const {
- ADGameDescList matches = detectGame(&fslist, params, Common::UNK_LANG, Common::kPlatformUnknown, "");
+ ADGameDescList matches = detectGame(fslist, params, Common::UNK_LANG, Common::kPlatformUnknown, "");
GameList detectedGames;
// Use fallback detector if there were no matches by other means
@@ -233,8 +239,22 @@
Common::String gameid = ConfMan.get("gameid");
- ADGameDescList matches = detectGame(0, params, language, platform, extra);
+ Common::String path;
+ if (ConfMan.hasKey("path")) {
+ path = ConfMan.get("path");
+ } else {
+ path = ".";
+ warning("No path was provided. Assuming the data files are in the current directory");
+ }
+ FilesystemNode dir(path);
+ FSList files;
+ if (!dir.isDirectory() || !dir.getChildren(files, FilesystemNode::kListAll)) {
+ warning("Game data path does not exist or is not a directory (%s)", path.c_str());
+ return kNoGameDataFoundError;
+ }
+ ADGameDescList matches = detectGame(files, params, language, platform, extra);
+
if (params.singleid == NULL) {
for (uint i = 0; i < matches.size(); i++) {
if (matches[i]->gameid == gameid) {
@@ -268,10 +288,10 @@
return kNoError;
}
-typedef HashMap<String, bool> StringSet;
-typedef HashMap<String, int32> IntMap;
+typedef HashMap<String, bool, IgnoreCase_Hash, IgnoreCase_EqualTo> StringSet;
+typedef HashMap<String, int32, IgnoreCase_Hash, IgnoreCase_EqualTo> IntMap;
-static void reportUnknown(StringMap &filesMD5, IntMap &filesSize) {
+static void reportUnknown(const StringMap &filesMD5, const IntMap &filesSize) {
// TODO: This message should be cleaned up / made more specific.
// For example, we should specify at least which engine triggered this.
//
@@ -287,96 +307,77 @@
printf("\n");
}
-static ADGameDescList detectGame(const FSList *fslist, const Common::ADParams ¶ms, Language language, Platform platform, const Common::String extra) {
- StringSet filesList;
+static ADGameDescList detectGameFilebased(const StringMap &allFiles, const Common::ADParams ¶ms);
+static ADGameDescList detectGame(const FSList &fslist, const Common::ADParams ¶ms, Language language, Platform platform, const Common::String extra) {
+ StringMap allFiles;
+
+ StringSet detectFiles;
StringMap filesMD5;
IntMap filesSize;
- IntMap allFiles;
- File testFile;
-
- String tstr;
-
- uint i;
- char md5str[32+1];
-
- bool fileMissing;
const ADGameFileDescription *fileDesc;
const ADGameDescription *g;
const byte *descPtr;
debug(3, "Starting detection");
- // First we compose list of files which we need MD5s for
+ // First we compose an efficient to query set of all files in fslist.
+ // Includes nifty stuff like removing trailing dots and ignoring case.
+ for (FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
+ if (file->isDirectory())
+ continue;
+
+ String tstr = file->getName();
+
+ // Strip any trailing dot
+ if (tstr.lastChar() == '.')
+ tstr.deleteLastChar();
+
+ allFiles[tstr] = file->getPath(); // Record the presence of this file
+ }
+
+ // Compute the set of files for which we need MD5s for. I.e. files which are
+ // included in some ADGameDescription *and* present in fslist.
for (descPtr = params.descs; ((const ADGameDescription *)descPtr)->gameid != 0; descPtr += params.descItemSize) {
g = (const ADGameDescription *)descPtr;
for (fileDesc = g->filesDescriptions; fileDesc->fileName; fileDesc++) {
- tstr = String(fileDesc->fileName);
- tstr.toLowercase();
- filesList[tstr] = true;
+ String tstr = fileDesc->fileName;
+ if (allFiles.contains(tstr))
+ detectFiles[tstr] = true;
}
}
- // TODO/FIXME: Fingolfin says: It's not good that we have two different code paths here,
- // one using a FSList, one using File::open, as that will lead to discrepancies and subtle
- // problems caused by those.
- if (fslist != 0) {
- // Get the information of the existing files
- for (FSList::const_iterator file = fslist->begin(); file != fslist->end(); ++file) {
- if (file->isDirectory()) continue;
- tstr = file->getName();
- tstr.toLowercase();
+ // Get the information for all detection files, if they exist
+ for (StringSet::const_iterator file = detectFiles.begin(); file != detectFiles.end(); ++file) {
+ String fname = file->_key;
- // Strip any trailing dot
- if (tstr.lastChar() == '.')
- tstr.deleteLastChar();
+ debug(3, "+ %s", fname.c_str());
- allFiles[tstr] = true;
+ char md5str[32+1];
+ if (!md5_file_string(allFiles[fname].c_str(), md5str, params.md5Bytes))
+ continue;
+ filesMD5[fname] = md5str;
- debug(3, "+ %s", tstr.c_str());
+ debug(3, "> %s: %s", fname.c_str(), md5str);
- if (!filesList.contains(tstr)) continue;
-
- if (!md5_file_string(*file, md5str, params.md5Bytes))
- continue;
- filesMD5[tstr] = md5str;
-
- debug(3, "> %s: %s", tstr.c_str(), md5str);
-
- if (testFile.open(file->getPath())) {
- filesSize[tstr] = (int32)testFile.size();
- testFile.close();
- }
+ File testFile;
+ if (testFile.open(allFiles[fname])) {
+ filesSize[fname] = (int32)testFile.size();
+ testFile.close();
}
- } else {
- // Get the information of the requested files
- for (StringSet::const_iterator file = filesList.begin(); file != filesList.end(); ++file) {
- tstr = file->_key;
-
- debug(3, "+ %s", tstr.c_str());
- if (!filesMD5.contains(tstr)) {
- if (testFile.open(tstr) || testFile.open(tstr + ".")) {
- filesSize[tstr] = (int32)testFile.size();
- testFile.close();
-
- if (md5_file_string(file->_key.c_str(), md5str, params.md5Bytes)) {
- filesMD5[tstr] = md5str;
- debug(3, "> %s: %s", tstr.c_str(), md5str);
- }
- }
- }
- }
}
+
ADGameDescList matched;
int maxFilesMatched = 0;
// MD5 based matching
+ uint i;
for (i = 0, descPtr = params.descs; ((const ADGameDescription *)descPtr)->gameid != 0; descPtr += params.descItemSize, ++i) {
g = (const ADGameDescription *)descPtr;
- fileMissing = false;
+ bool fileMissing = false;
// Do not even bother to look at entries which do not have matching
// language and platform (if specified).
@@ -385,32 +386,28 @@
continue;
}
- if ((params.flags & kADFlagUseExtraAsHint) && extra != "" && g->extra != extra)
+ if ((params.flags & kADFlagUseExtraAsHint) && !extra.empty() && g->extra != extra)
continue;
// Try to match all files for this game
for (fileDesc = g->filesDescriptions; fileDesc->fileName; fileDesc++) {
- tstr = fileDesc->fileName;
- tstr.toLowercase();
+ String tstr = fileDesc->fileName;
if (!filesMD5.contains(tstr)) {
fileMissing = true;
break;
}
- if (fileDesc->md5 != NULL) {
- if (fileDesc->md5 != filesMD5[tstr]) {
- debug(3, "MD5 Mismatch. Skipping (%s) (%s)", fileDesc->md5, filesMD5[tstr].c_str());
- fileMissing = true;
- break;
- }
+
+ if (fileDesc->md5 != NULL && fileDesc->md5 != filesMD5[tstr]) {
+ debug(3, "MD5 Mismatch. Skipping (%s) (%s)", fileDesc->md5, filesMD5[tstr].c_str());
+ fileMissing = true;
+ break;
}
- if (fileDesc->fileSize != -1) {
- if (fileDesc->fileSize != filesSize[tstr]) {
- debug(3, "Size Mismatch. Skipping");
- fileMissing = true;
- break;
- }
+ if (fileDesc->fileSize != -1 && fileDesc->fileSize != filesSize[tstr]) {
+ debug(3, "Size Mismatch. Skipping");
+ fileMissing = true;
+ break;
}
debug(3, "Matched file: %s", tstr.c_str());
@@ -448,85 +445,68 @@
}
}
- // We've found a match
- if (!matched.empty())
- return matched;
+ // We didn't find a match
+ if (matched.empty()) {
+ if (!filesMD5.empty())
+ reportUnknown(filesMD5, filesSize);
+
+ // Filename based fallback
+ if (params.fileBasedFallback != 0)
+ matched = detectGameFilebased(allFiles, params);
+ }
- if (!filesMD5.empty())
- reportUnknown(filesMD5, filesSize);
+ return matched;
+}
- // Filename based fallback
- if (params.fileBasedFallback != 0) {
- const ADFileBasedFallback *ptr = params.fileBasedFallback;
- const char* const* filenames = 0;
+/**
+ * Check for each ADFileBasedFallback record whether all files listed
+ * in it are present. If multiple pass this test, we pick the one with
+ * the maximal number of matching files. In case of a tie, the entry
+ * coming first in the list is chosen.
+ */
+static ADGameDescList detectGameFilebased(const StringMap &allFiles, const Common::ADParams ¶ms) {
+ const ADFileBasedFallback *ptr;
+ const char* const* filenames;
- // First we create list of files required for detection.
- // The filenames can be different than the MD5 based match ones.
- for (; ptr->desc; ptr++) {
- filenames = ptr->filenames;
- for (; *filenames; filenames++) {
- tstr = String(*filenames);
- tstr.toLowercase();
+ int maxNumMatchedFiles = 0;
+ const ADGameDescription *matchedDesc = 0;
- if (!allFiles.contains(tstr)) {
- if (testFile.open(tstr) || testFile.open(tstr + ".")) {
- allFiles[tstr] = true;
- testFile.close();
- }
- }
- }
- }
+ for (ptr = params.fileBasedFallback; ptr->desc; ++ptr) {
+ const ADGameDescription *agdesc = (const ADGameDescription *)ptr->desc;
+ int numMatchedFiles = 0;
+ bool fileMissing = false;
- // Then we perform the actual filename matching. If there are
- // several matches, only the one with the maximum numbers of
- // files is considered.
- int maxNumMatchedFiles = 0;
- const ADGameDescription *matchedDesc = 0;
-
- ptr = params.fileBasedFallback;
-
- for (; ptr->desc; ptr++) {
- const ADGameDescription *agdesc = (const ADGameDescription *)ptr->desc;
- int numMatchedFiles = 0;
- fileMissing = false;
-
- filenames = ptr->filenames;
- for (; *filenames; filenames++) {
- if (fileMissing) {
- continue;
- }
-
- tstr = String(*filenames);
- tstr.toLowercase();
-
- debug(3, "++ %s", *filenames);
- if (!allFiles.contains(tstr)) {
- fileMissing = true;
- continue;
- }
-
- numMatchedFiles++;
+ for (filenames = ptr->filenames; *filenames; ++filenames) {
+ debug(3, "++ %s", *filenames);
+ if (!allFiles.contains(*filenames)) {
+ fileMissing = true;
+ break;
}
- if (!fileMissing)
- debug(4, "Matched: %s", agdesc->gameid);
+ numMatchedFiles++;
+ }
- if (!fileMissing && numMatchedFiles > maxNumMatchedFiles) {
+ if (!fileMissing) {
+ debug(4, "Matched: %s", agdesc->gameid);
+
+ if (numMatchedFiles > maxNumMatchedFiles) {
matchedDesc = agdesc;
maxNumMatchedFiles = numMatchedFiles;
-
+
debug(4, "and overriden");
}
}
+ }
- if (matchedDesc) { // We got a match
- matched.push_back(matchedDesc);
- if (params.flags & kADFlagPrintWarningOnFileBasedFallback) {
- printf("Your game version has been detected using filename matching as a\n");
- printf("variant of %s.\n", matchedDesc->gameid);
- printf("If this is an original and unmodified version, please report any\n");
- printf("information previously printed by ScummVM to the team.\n");
- }
+ ADGameDescList matched;
+
+ if (matchedDesc) { // We got a match
+ matched.push_back(matchedDesc);
+ if (params.flags & kADFlagPrintWarningOnFileBasedFallback) {
+ printf("Your game version has been detected using filename matching as a\n");
+ printf("variant of %s.\n", matchedDesc->gameid);
+ printf("If this is an original and unmodified version, please report any\n");
+ printf("information previously printed by ScummVM to the team.\n");
}
}
Modified: scummvm/branches/gsoc2008-rtl/common/advancedDetector.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/common/advancedDetector.h 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/common/advancedDetector.h 2008-08-04 22:34:07 UTC (rev 33624)
@@ -69,11 +69,6 @@
};
/**
- * A list of pointers to ADGameDescription structs (or subclasses thereof).
- */
-typedef Array<const ADGameDescription*> ADGameDescList;
-
-/**
* End marker for a table of ADGameDescription structs. Use this to
* terminate a list to be passed to the AdvancedDetector API.
*/
Modified: scummvm/branches/gsoc2008-rtl/common/algorithm.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/common/algorithm.h 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/common/algorithm.h 2008-08-04 22:34:07 UTC (rev 33624)
@@ -29,6 +29,11 @@
namespace Common {
+/**
+ * Copies data from the range [first, last) to [dst, dst + (last - first)).
+ * It requires the range [dst, dst + (last - first)) to be valid.
+ * It also requires dst not to be in the range [first, last).
+ */
template<class In, class Out>
Out copy(In first, In last, Out dst) {
while (first != last)
@@ -36,6 +41,13 @@
return dst;
}
+/**
+ * Copies data from the range [first, last) to [dst - (last - first), dst).
+ * It requires the range [dst - (last - first), dst) to be valid.
+ * It also requires dst not to be in the range [first, last).
+ *
+ * Unlike copy copy_backward copies the data from the end to the beginning.
+ */
template<class In, class Out>
Out copy_backward(In first, In last, Out dst) {
while (first != last)
@@ -43,6 +55,15 @@
return dst;
}
+/**
+ * Copies data from the range [first, last) to [dst, dst + (last - first)).
+ * It requires the range [dst, dst + (last - first)) to be valid.
+ * It also requires dst not to be in the range [first, last).
+ *
+ * Unlike copy or copy_backward it does not copy all data. It only copies
+ * a data element when operator() of the op parameter returns true for the
+ * passed data element.
+ */
template<class In, class Out, class Op>
Out copy_if(In first, In last, Out dst, Op op) {
while (first != last) {
@@ -76,6 +97,9 @@
return last;
}
+/**
+ * Sets all elements in the range [first, last) to val.
+ */
template<class In, class Value>
In set_to(In first, In last, Value val) {
while (first != last)
@@ -83,6 +107,10 @@
return first;
}
+/**
+ * Finds the first data value in the range [first, last) matching v.
+ * For data comperance it uses operator == of the data elements.
+ */
template<class In, class T>
In find(In first, In last, const T &v) {
while (first != last) {
@@ -93,6 +121,10 @@
return last;
}
+/**
+ * Finds the first data value in the range [first, last) for which
+ * the specified predicate p returns true.
+ */
template<class In, class Pred>
In find_if(In first, In last, Pred p) {
while (first != last) {
@@ -103,15 +135,22 @@
return last;
}
+/**
+ * Applies the function f on all elements of the range [first, last).
+ * The processing order is from beginning to end.
+ */
template<class In, class Op>
Op for_each(In first, In last, Op f) {
while (first != last) f(*first++);
return f;
}
-// Simple sort function, modeled after std::sort.
-// Use it like this: sort(container.begin(), container.end()).
-// Also work on plain old int arrays etc.
+/**
+ * Simple sort function, modeled after std::sort.
+ * Use it like this: sort(container.begin(), container.end()).
+ * Also works on plain old i.e. int arrays etc. For comperance
+ * operator < is used.
+ */
template<class T>
void sort(T first, T last) {
if (first == last)
@@ -131,8 +170,13 @@
}
}
-// Using this with: Common::Less from common/func.h
-// will give the same results as the function above.
+/**
+ * Simple sort function, modeled after std::sort.
+ * It compares data with the given comparator object comp.
+ *
+ * Note: Using this with: Common::Less from common/func.h
+ * will give the same results as the plain sort function.
+ */
template<class T, class StrictWeakOrdering>
void sort(T first, T last, StrictWeakOrdering comp) {
if (first == last)
Modified: scummvm/branches/gsoc2008-rtl/common/config-file.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/common/config-file.cpp 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/common/config-file.cpp 2008-08-04 22:34:07 UTC (rev 33624)
@@ -58,7 +58,7 @@
bool ConfigFile::loadFromFile(const String &filename) {
File file;
- if (file.open(filename, File::kFileReadMode))
+ if (file.open(filename))
return loadFromStream(file);
else
return false;
@@ -171,8 +171,8 @@
}
bool ConfigFile::saveToFile(const String &filename) {
- File file;
- if (file.open(filename, File::kFileWriteMode))
+ DumpFile file;
+ if (file.open(filename))
return saveToStream(file);
else
return false;
Modified: scummvm/branches/gsoc2008-rtl/common/config-manager.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/common/config-manager.cpp 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/common/config-manager.cpp 2008-08-04 22:34:07 UTC (rev 33624)
@@ -23,38 +23,13 @@
*
*/
-#if defined(WIN32)
-#include <windows.h>
-// winnt.h defines ARRAYSIZE, but we want our own one...
-#undef ARRAYSIZE
-#endif
-
#include "common/config-manager.h"
#include "common/file.h"
#include "common/util.h"
+#include "common/system.h"
DECLARE_SINGLETON(Common::ConfigManager);
-#ifdef __PLAYSTATION2__
-#include "backends/platform/ps2/systemps2.h"
-#endif
-
-#ifdef IPHONE
-#include "backends/platform/iphone/osys_iphone.h"
-#endif
-
-#if defined(UNIX)
-#ifdef MACOSX
-#define DEFAULT_CONFIG_FILE "Library/Preferences/ScummVM Preferences"
-#else
-#define DEFAULT_CONFIG_FILE ".scummvmrc"
-#endif
-#else
-#define DEFAULT_CONFIG_FILE "scummvm.ini"
-#endif
-
-#define MAXLINELEN 256
-
static bool isValidDomainName(const Common::String &domName) {
const char *p = domName.c_str();
while (*p && (isalnum(*p) || *p == '-' || *p == '_'))
@@ -85,242 +60,180 @@
void ConfigManager::loadDefaultConfigFile() {
- char configFile[MAXPATHLEN];
- // GP2X is Linux based but Home dir can be read only so do not use it and put the config in the executable dir.
- // On the iPhone, the home dir of the user when you launch the app from the Springboard, is /. Which we don't want.
-#if defined(UNIX) && !defined(GP2X) && !defined(IPHONE)
- const char *home = getenv("HOME");
- if (home != NULL && strlen(home) < MAXPATHLEN)
- snprintf(configFile, MAXPATHLEN, "%s/%s", home, DEFAULT_CONFIG_FILE);
- else
- strcpy(configFile, DEFAULT_CONFIG_FILE);
-#else
- #if defined (WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
- OSVERSIONINFO win32OsVersion;
- ZeroMemory(&win32OsVersion, sizeof(OSVERSIONINFO));
- win32OsVersion.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
- GetVersionEx(&win32OsVersion);
- // Check for non-9X version of Windows.
- if (win32OsVersion.dwPlatformId != VER_PLATFORM_WIN32_WINDOWS) {
- // Use the Application Data directory of the user profile.
- if (win32OsVersion.dwMajorVersion >= 5) {
- if (!GetEnvironmentVariable("APPDATA", configFile, sizeof(configFile)))
- error("Unable to access application data directory");
- } else {
- if (!GetEnvironmentVariable("USERPROFILE", configFile, sizeof(configFile)))
- error("Unable to access user profile directory");
+ // Open the default config file
+ SeekableReadStream *stream = g_system->openConfigFileForReading();
+ _filename.clear(); // clear the filename to indicate that we are using the default config file
- strcat(configFile, "\\Application Data");
- CreateDirectory(configFile, NULL);
- }
+ // ... load it ...
+ assert(stream);
+ loadFromStream(*stream);
+
+ // ... and close it again.
+ delete stream;
- strcat(configFile, "\\ScummVM");
- CreateDirectory(configFile, NULL);
- strcat(configFile, "\\" DEFAULT_CONFIG_FILE);
-
- if (fopen(configFile, "r") == NULL) {
- // Check windows directory
- char oldConfigFile[MAXPATHLEN];
- GetWindowsDirectory(oldConfigFile, MAXPATHLEN);
- strcat(oldConfigFile, "\\" DEFAULT_CONFIG_FILE);
- if (fopen(oldConfigFile, "r")) {
- printf("The default location of the config file (scummvm.ini) in ScummVM has changed,\n");
- printf("under Windows NT4/2000/XP/Vista. You may want to consider moving your config\n");
- printf("file from the old default location:\n");
- printf("%s\n", oldConfigFile);
- printf("to the new default location:\n");
- printf("%s\n\n", configFile);
- strcpy(configFile, oldConfigFile);
- }
- }
- } else {
- // Check windows directory
- GetWindowsDirectory(configFile, MAXPATHLEN);
- strcat(configFile, "\\" DEFAULT_CONFIG_FILE);
- }
-
- #elif defined(PALMOS_MODE)
- strcpy(configFile,"/PALM/Programs/ScummVM/" DEFAULT_CONFIG_FILE);
- #elif defined(IPHONE)
- strcpy(configFile, OSystem_IPHONE::getConfigPath());
- #elif defined(__PLAYSTATION2__)
- ((OSystem_PS2*)g_system)->makeConfigPath(configFile);
- #elif defined(__PSP__)
- strcpy(configFile, "ms0:/" DEFAULT_CONFIG_FILE);
- #elif defined (__SYMBIAN32__)
- strcpy(configFile, Symbian::GetExecutablePath());
- strcat(configFile, DEFAULT_CONFIG_FILE);
- #else
- strcpy(configFile, DEFAULT_CONFIG_FILE);
- #endif
-#endif
-
- loadConfigFile(configFile);
flushToDisk();
}
void ConfigManager::loadConfigFile(const String &filename) {
- _appDomain.clear();
- _gameDomains.clear();
- _transientDomain.clear();
-
_filename = filename;
- _domainSaveOrder.clear();
- loadFile(_filename);
- printf("Using configuration file: %s\n", _filename.c_str());
-}
-void ConfigManager::loadFile(const String &filename) {
File cfg_file;
-
if (!cfg_file.open(filename)) {
printf("Creating configuration file: %s\n", filename.c_str());
} else {
- String domain;
- String comment;
- int lineno = 0;
+ printf("Using configuration file: %s\n", _filename.c_str());
+ loadFromStream(cfg_file);
+ }
+}
- // TODO: Detect if a domain occurs multiple times (or likewise, if
- // a key occurs multiple times inside one domain).
+void ConfigManager::loadFromStream(SeekableReadStream &stream) {
+ String domain;
+ String comment;
+ int lineno = 0;
- while (!cfg_file.eof() && !cfg_file.ioFailed()) {
- lineno++;
+ _appDomain.clear();
+ _gameDomains.clear();
+ _transientDomain.clear();
+ _domainSaveOrder.clear();
- // Read a line
- String line;
- while (line.lastChar() != '\n') {
- char buf[MAXLINELEN];
- if (!cfg_file.readLine_NEW(buf, MAXLINELEN))
- break;
- line += buf;
- }
+ // TODO: Detect if a domain occurs multiple times (or likewise, if
+ // a key occurs multiple times inside one domain).
- if (line.size() == 0) {
- // Do nothing
- } else if (line[0] == '#') {
- // Accumulate comments here. Once we encounter either the start
- // of a new domain, or a key-value-pair, we associate the value
- // of the 'comment' variable with that entity.
- comment += line;
- } else if (line[0] == '[') {
- // It's a new domain which begins here.
- const char *p = line.c_str() + 1;
- // Get the domain name, and check whether it's valid (that
- // is, verify that it only consists of alphanumerics,
- // dashes and underscores).
- while (*p && (isalnum(*p) || *p == '-' || *p == '_'))
- p++;
+ while (!stream.eos() && !stream.ioFailed()) {
+ lineno++;
- switch (*p) {
- case '\0':
- error("Config file buggy: missing ] in line %d", lineno);
- break;
- case ']':
- domain = String(line.c_str() + 1, p - (line.c_str() + 1));
- //domain = String(line.c_str() + 1, p); // TODO: Pending Common::String changes
- break;
- default:
- error("Config file buggy: Invalid character '%c' occured in domain name in line %d", *p, lineno);
- }
+ // Read a line
+ String line;
+ while (line.lastChar() != '\n') {
+ char buf[256];
+ if (!stream.readLine_NEW(buf, 256))
+ break;
+ line += buf;
+ }
- // Store domain comment
- if (domain == kApplicationDomain) {
- _appDomain.setDomainComment(comment);
- } else {
- _gameDomains[domain].setDomainComment(comment);
- }
- comment.clear();
+ if (line.size() == 0) {
+ // Do nothing
+ } else if (line[0] == '#') {
+ // Accumulate comments here. Once we encounter either the start
+ // of a new domain, or a key-value-pair, we associate the value
+ // of the 'comment' variable with that entity.
+ comment += line;
+ } else if (line[0] == '[') {
+ // It's a new domain which begins here.
+ const char *p = line.c_str() + 1;
+ // Get the domain name, and check whether it's valid (that
+ // is, verify that it only consists of alphanumerics,
+ // dashes and underscores).
+ while (*p && (isalnum(*p) || *p == '-' || *p == '_'))
+ p++;
- _domainSaveOrder.push_back(domain);
- } else {
- // This line should be a line with a 'key=value' pair, or an empty one.
-
- // Skip leading whitespaces
- const char *t = line.c_str();
- while (isspace(*t))
- t++;
+ if (*p == '\0')
+ error("Config file buggy: missing ] in line %d", lineno);
+ else if (*p != ']')
+ error("Config file buggy: Invalid character '%c' occured in section name in line %d", *p, lineno);
- // Skip empty lines / lines with only whitespace
- if (*t == 0)
- continue;
+ domain = String(line.c_str() + 1, p);
- // If no domain has been set, this config file is invalid!
- if (domain.empty()) {
- error("Config file buggy: Key/value pair found outside a domain in line %d", lineno);
- }
+ // Store domain comment
+ if (domain == kApplicationDomain) {
+ _appDomain.setDomainComment(comment);
+ } else {
+ _gameDomains[domain].setDomainComment(comment);
+ }
+ comment.clear();
- // Split string at '=' into 'key' and 'value'. First, find the "=" delimeter.
- const char *p = strchr(t, '=');
- if (!p)
- error("Config file buggy: Junk found in line line %d: '%s'", lineno, t);
+ _domainSaveOrder.push_back(domain);
+ } else {
+ // This line should be a line with a 'key=value' pair, or an empty one.
+
+ // Skip leading whitespaces
+ const char *t = line.c_str();
+ while (isspace(*t))
+ t++;
- // Trim spaces before the '=' to obtain the key
- const char *p2 = p;
- while (p2 > t && isspace(*(p2-1)))
- p2--;
- String key(t, p2 - t);
-
- // Skip spaces after the '='
- t = p + 1;
- while (isspace(*t))
- t++;
+ // Skip empty lines / lines with only whitespace
+ if (*t == 0)
+ continue;
- // Trim trailing spaces
- p2 = t + strlen(t);
- while (p2 > t && isspace(*(p2-1)))
- p2--;
+ // If no domain has been set, this config file is invalid!
+ if (domain.empty()) {
+ error("Config file buggy: Key/value pair found outside a domain in line %d", lineno);
+ }
- String value(t, p2 - t);
+ // Split string at '=' into 'key' and 'value'. First, find the "=" delimeter.
+ const char *p = strchr(t, '=');
+ if (!p)
+ error("Config file buggy: Junk found in line line %d: '%s'", lineno, t);
- // Finally, store the key/value pair in the active domain
- set(key, value, domain);
+ // Extract the key/value pair
+ String key(t, p);
+ String value(p + 1);
+
+ // Trim of spaces
+ key.trim();
+ value.trim();
- // Store comment
- if (domain == kApplicationDomain) {
- _appDomain.setKVComment(key, comment);
- } else {
- _gameDomains[domain].setKVComment(key, comment);
- }
- comment.clear();
+ // Finally, store the key/value pair in the active domain
+ set(key, value, domain);
+
+ // Store comment
+ if (domain == kApplicationDomain) {
+ _appDomain.setKVComment(key, comment);
+ } else {
+ _gameDomains[domain].setKVComment(key, comment);
}
+ comment.clear();
}
}
}
void ConfigManager::flushToDisk() {
#ifndef __DC__
- File cfg_file;
+ WriteStream *stream;
-// TODO
-// if (!willwrite)
-// return;
-
- if (!cfg_file.open(_filename, File::kFileWriteMode)) {
- warning("Unable to write configuration file: %s", _filename.c_str());
+ if (_filename.empty()) {
+ // Write to the default config file
+ stream = g_system->openConfigFileForWriting();
+ if (!stream) // If writing to the config file is not possible, do nothing
+ return;
} else {
- // First write the domains in _domainSaveOrder, in that order.
- // Note: It's possible for _domainSaveOrder to list domains which
- // are not present anymore.
- StringList::const_iterator i;
- for (i = _domainSaveOrder.begin(); i != _domainSaveOrder.end(); ++i) {
- if (kApplicationDomain == *i) {
- writeDomain(cfg_file, *i, _appDomain);
- } else if (_gameDomains.contains(*i)) {
- writeDomain(cfg_file, *i, _gameDomains[*i]);
- }
+ DumpFile *dump = new DumpFile();
+ assert(dump);
+
+ if (!dump->open(_filename)) {
+ warning("Unable to write configuration file: %s", _filename.c_str());
+ delete dump;
+ return;
}
+
+ stream = dump;
+ }
- DomainMap::const_iterator d;
+ // First write the domains in _domainSaveOrder, in that order.
+ // Note: It's possible for _domainSaveOrder to list domains which
+ // are not present anymore.
+ StringList::const_iterator i;
+ for (i = _domainSaveOrder.begin(); i != _domainSaveOrder.end(); ++i) {
+ if (kApplicationDomain == *i) {
+ writeDomain(*stream, *i, _appDomain);
+ } else if (_gameDomains.contains(*i)) {
+ writeDomain(*stream, *i, _gameDomains[*i]);
+ }
+ }
+ DomainMap::const_iterator d;
- // Now write the domains which haven't been written yet
- if (find(_domainSaveOrder.begin(), _domainSaveOrder.end(), kApplicationDomain) == _domainSaveOrder.end())
- writeDomain(cfg_file, kApplicationDomain, _appDomain);
- for (d = _gameDomains.begin(); d != _gameDomains.end(); ++d) {
- if (find(_domainSaveOrder.begin(), _domainSaveOrder.end(), d->_key) == _domainSaveOrder.end())
- writeDomain(cfg_file, d->_key, d->_value);
- }
+
+ // Now write the domains which haven't been written yet
+ if (find(_domainSaveOrder.begin(), _domainSaveOrder.end(), kApplicationDomain) == _domainSaveOrder.end())
+ writeDomain(*stream, kApplicationDomain, _appDomain);
+ for (d = _gameDomains.begin(); d != _gameDomains.end(); ++d) {
+ if (find(_domainSaveOrder.begin(), _domainSaveOrder.end(), d->_key) == _domainSaveOrder.end())
+ writeDomain(*stream, d->_key, d->_value);
}
+
+ delete stream;
+
#endif // !__DC__
}
@@ -328,6 +241,12 @@
if (domain.empty())
return; // Don't bother writing empty domains.
+ // WORKAROUND: Fix for bug #1972625 "ALL: On-the-fly targets are
+ // written to the config file": Do not save domains that came from
+ // the command line
+ if (domain.contains("id_came_from_command_line"))
+ return;
+
String comment;
// Write domain comment (if any)
@@ -642,6 +561,10 @@
// the given name already exists?
_gameDomains[domName];
+
+ // Add it to the _domainSaveOrder, if it's not already in there
+ if (find(_domainSaveOrder.begin(), _domainSaveOrder.end(), domName) == _domainSaveOrder.end())
+ _domainSaveOrder.push_back(domName);
}
void ConfigManager::removeGameDomain(const String &domName) {
Modified: scummvm/branches/gsoc2008-rtl/common/config-manager.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/common/config-manager.h 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/common/config-manager.h 2008-08-04 22:34:07 UTC (rev 33624)
@@ -36,8 +36,8 @@
namespace Common {
class WriteStream;
+class SeekableReadStream;
-
/**
* The (singleton) configuration manager, used to query & set configuration
* values using string keys.
@@ -144,19 +144,11 @@
bool hasGameDomain(const String &domName) const;
const DomainMap & getGameDomains() const { return _gameDomains; }
-/*
- TODO: Callback/change notification system
- typedef void (*ConfigCallback)(const ConstString &key, void *refCon);
-
- void registerCallback(ConfigCallback cfgc, void *refCon, const ConstString &key = String::emptyString)
- void unregisterCallback(ConfigCallback cfgc, const ConstString &key = String::emptyString)
-*/
-
private:
friend class Singleton<SingletonBaseType>;
ConfigManager();
- void loadFile(const String &filename);
+ void loadFromStream(SeekableReadStream &stream);
void writeDomain(WriteStream &stream, const String &name, const Domain &domain);
Domain _transientDomain;
Modified: scummvm/branches/gsoc2008-rtl/common/file.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/common/file.cpp 2008-08-04 20:00:56 UTC (rev 33623)
+++ scummvm/branches/gsoc2008-rtl/common/file.cpp 2008-08-04 22:34:07 UTC (rev 33624)
@@ -104,7 +104,7 @@
//#define fgets(str, size, file) DS::std_fgets(str, size, file) // not used
//#define getc(handle) DS::std_getc(handle) // not used
//#define getcwd(dir, dunno) DS::std_getcwd(dir, dunno) // not used
- //#define ferror(handle) DS::std_ferror(handle) // not used
+ #define ferror(handle) DS::std_ferror(handle)
#endif
@@ -273,59 +273,44 @@
: _handle(0), _ioFailed(false) {
}
-//#define DEBUG_FILE_REFCOUNT
-
File::~File() {
-#ifdef DEBUG_FILE_REFCOUNT
- warning("File::~File on file '%s'", _name.c_str());
-#endif
close();
}
-bool File::open(const String &filename, AccessMode mode) {
- assert(mode == kFileReadMode || mode == kFileWriteMode);
+bool File::open(const String &filename) {
+ assert(!filename.empty());
+ assert(!_handle);
- if (filename.empty()) {
- error("File::open: No filename was specified");
- }
-
- if (_handle) {
- error("File::open: This file object already is opened (%s), won't open '%s'", _name.c_str(), filename.c_str());
- }
-
_name.clear();
clearIOFailed();
String fname(filename);
fname.toLowercase();
- const char *modeStr = (mode == kFileReadMode) ? "rb" : "wb";
- if (mode == kFileWriteMode) {
- _handle = fopenNoCase(filename, "", modeStr);
- } else if (_filesMap && _filesMap->contains(fname)) {
+ if (_filesMap && _filesMap->contains(fname)) {
fname = (*_filesMap)[fname];
debug(3, "Opening hashed: %s", fname.c_str());
- _handle = fopen(fname.c_str(), modeStr);
+ _handle = fopen(fname.c_str(), "rb");
} else if (_filesMap && _filesMap->contains(fname + ".")) {
// WORKAROUND: Bug #1458388: "SIMON1: Game Detection fails"
// sometimes instead of "GAMEPC" we get "GAMEPC." (note trailing dot)
fname = (*_filesMap)[fname + "."];
debug(3, "Opening hashed: %s", fname.c_str());
- _handle = fopen(fname.c_str(), modeStr);
+ _handle = fopen(fname.c_str(), "rb");
} else {
if (_defaultDirectories) {
// Try all default directories
StringIntMap::const_iterator x(_defaultDirectories->begin());
for (; _handle == NULL && x != _defaultDirectories->end(); ++x) {
- _handle = fopenNoCase(filename, x->_key, modeStr);
+ _handle = fopenNoCase(filename, x->_key, "rb");
}
}
// Last resort: try the current directory
if (_handle == NULL)
- _handle = fopenNoCase(filename, "", modeStr);
+ _handle = fopenNoCase(filename, "", "rb");
// Last last (really) resort: try looking inside the application bundle on Mac OS X for the lowercase file.
#if defined(MACOSX) || defined(IPHONE)
@@ -335,7 +320,7 @@
if (fileUrl) {
UInt8 buf[256];
if (CFURLGetFileSystemRepresentation(fileUrl, false, (UInt8 *)buf, 256)) {
- _handle = fopen((char *)buf, modeStr);
+ _handle = fopen((char *)buf, "rb");
}
CFRelease(fileUrl);
}
@@ -345,26 +330,15 @@
}
- if (_handle == NULL) {
- if (mode == kFileReadMode)
- debug(2, "File %s not found", filename.c_str());
- else
- debug(2, "File %s not opened", filename.c_str());
- return false;
- }
+ if (_handle == NULL)
+ debug(2, "File %s not opened", filename.c_str());
+ else
+ _name = filename;
-
- _name = filename;
-
-#ifdef DEBUG_FILE_REFCOUNT
- warning("File::open on file '%s'", _name.c_str());
-#endif
-
- return true;
+ return _handle != NULL;
}
-bool File::open(const FilesystemNode &node, AccessMode mode) {
- assert(mode == kFileReadMode || mode == kFileWriteMode);
+bool File::open(const FilesystemNode &node) {
if (!node.exists()) {
warning("File::open: Trying to open a FilesystemNode which does not exist");
@@ -389,25 +363,14 @@
clearIOFailed();
_name.clear();
- const char *modeStr = (mode == kFileReadMode) ? "rb" : "wb";
+ _handle = fopen(node.getPath().c_str(), "rb");
- _handle = fopen(node.getPath().c_str(), modeStr);
+ if (_handle == NULL)
+ debug(2, "File %s not found", filename.c_str());
+ else
+ _name = filename;
- if (_handle == NULL) {
- if (mode == kFileReadMode)
- debug(2, "File %s not found", filename.c_str());
- else
- debug(2, "File %s not opened", filename.c_str());
- return false;
- }
-
- _name = filename;
-
-#ifdef DEBUG_FILE_REFCOUNT
- warning("File::open on file '%s'", _name.c_str());
-#endif
-
- return true;
+ return _handle != NULL;
}
bool File::exists(const String &filename) {
@@ -438,7 +401,7 @@
//Try opening the file inside the local directory as a last resort
File tmp;
- return tmp.open(filename, kFileReadMode);
+ return tmp.open(filename);
}
void File::close() {
@@ 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