[Scummvm-cvs-logs] SF.net SVN: scummvm:[34749] scummvm/branches/gsoc2008-gui
tanoku at users.sourceforge.net
tanoku at users.sourceforge.net
Sun Oct 5 13:21:09 CEST 2008
Revision: 34749
http://scummvm.svn.sourceforge.net/scummvm/?rev=34749&view=rev
Author: tanoku
Date: 2008-10-05 11:21:07 +0000 (Sun, 05 Oct 2008)
Log Message:
-----------
Merged several revisions from SVNMerge.
Fixed theme loading to use the new ArchiveMember class.
Original SVNMerge.py log:
=====================
Merged revisions 34686,34688-34689,34691-34698,34700-34705,34707-34713,34715-34722,34725-34727,34731-34732,34734-34738,34746 via svnmerge from
https://tanoku@scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk
........
r34686 | cyx | 2008-09-29 21:09:56 +0200 (Mon, 29 Sep 2008) | 1 line
add constructor to SearchSet::Node for proper init of structure members with gcc 3.4.x (see tracker items #2120595, #2106292)
........
r34688 | cyx | 2008-09-29 22:08:26 +0200 (Mon, 29 Sep 2008) | 1 line
restrict _heXmapNum to HE versions, should fix #2135822
........
r34689 | eriktorbjorn | 2008-09-29 22:40:58 +0200 (Mon, 29 Sep 2008) | 4 lines
Since no one has come up with any better suggestion... this should fix #2123258
("COMI: Crash after video (SAN) play"). The eos() function won't return true
until we've tried to read *past* the end of the stream.
........
r34691 | tanoku | 2008-09-30 00:29:07 +0200 (Tue, 30 Sep 2008) | 1 line
Ported ZipArchive::getAllNames() implementation from GUI branch.
........
r34692 | fingolfin | 2008-09-30 11:07:03 +0200 (Tue, 30 Sep 2008) | 1 line
Order alphabetically
........
r34693 | fingolfin | 2008-09-30 11:08:17 +0200 (Tue, 30 Sep 2008) | 1 line
SAGA: Removed patchesCount from SAGAGameDescription
........
r34694 | fingolfin | 2008-09-30 11:09:39 +0200 (Tue, 30 Sep 2008) | 1 line
SCUMM HE: Use FilesystemNode::openForReading() instead of 'new Common::File' (didn't cover all instances, though)
........
r34695 | fingolfin | 2008-09-30 11:11:25 +0200 (Tue, 30 Sep 2008) | 1 line
SAGA: Forgot to commit saga.h
........
r34696 | fingolfin | 2008-09-30 11:12:02 +0200 (Tue, 30 Sep 2008) | 1 line
Added multiple new open() methods to Common::File, which make it possible to use this class as a generic convenience wrapper around all kinds of SeekableReadStream; also renamed the name() method to the less confusing getName()
........
r34697 | fingolfin | 2008-09-30 13:33:43 +0200 (Tue, 30 Sep 2008) | 1 line
cleanup
........
r34698 | tanoku | 2008-09-30 13:53:37 +0200 (Tue, 30 Sep 2008) | 1 line
Fixed functionality of ZipArchive::getAllNames(). Now it expects a possibly non-empty string list and returns the amount of new filenames added to it.
........
r34700 | fingolfin | 2008-09-30 14:27:38 +0200 (Tue, 30 Sep 2008) | 1 line
Renamed Engine::quit to Engine::shouldQuit (previously, it was easily confused with Engine::quitGame); also cleaned up engine.h a bit
........
r34701 | fingolfin | 2008-09-30 14:37:28 +0200 (Tue, 30 Sep 2008) | 1 line
cleanup
........
r34702 | fingolfin | 2008-09-30 14:38:44 +0200 (Tue, 30 Sep 2008) | 1 line
AdvancedDetector: Do not (ab)use paths to keep track of files, rather, use FSNodes -- partial (?) fix for bug #2137680
........
r34703 | fingolfin | 2008-09-30 14:58:27 +0200 (Tue, 30 Sep 2008) | 1 line
SAGA: Some code cleanup
........
r34704 | fingolfin | 2008-09-30 14:59:29 +0200 (Tue, 30 Sep 2008) | 1 line
SKY: Fix detector to not (ab)use FSNode::getPath; if you want to open a FSNode, just pass it to File::open
........
r34705 | thebluegr | 2008-09-30 15:19:14 +0200 (Tue, 30 Sep 2008) | 1 line
Fixed crash when starting IHNM, a regression from commit #34693
........
r34707 | fingolfin | 2008-09-30 17:42:19 +0200 (Tue, 30 Sep 2008) | 1 line
Fixing ConfigManager::loadConfigFile
........
r34708 | fingolfin | 2008-09-30 18:23:35 +0200 (Tue, 30 Sep 2008) | 1 line
AGI: Another case where it is better to use FSNodes directly, instead of converting them to path strings
........
r34709 | fingolfin | 2008-09-30 18:34:38 +0200 (Tue, 30 Sep 2008) | 1 line
Modified FilePluginProvider to use FSNodes (instead of raw filenames / paths) in its API
........
r34710 | fingolfin | 2008-09-30 18:38:46 +0200 (Tue, 30 Sep 2008) | 1 line
AGI: Got rid of yet another unwarranted use of FSNode::getPath
........
r34711 | fingolfin | 2008-09-30 18:53:04 +0200 (Tue, 30 Sep 2008) | 1 line
AGI: Simplify WagFileParser by not reading data into a memory stream first (this was there to improve performance on systems with slow seeking; those systems should use another approach, see scummvm-devel)
........
r34712 | thebluegr | 2008-09-30 18:55:10 +0200 (Tue, 30 Sep 2008) | 1 line
Fix crash when starting ITE, a regression from commit #34705
........
r34713 | fingolfin | 2008-09-30 19:09:41 +0200 (Tue, 30 Sep 2008) | 1 line
Fix ThemeBrowser to use FSNodes, not getPath()
........
r34715 | Kirben | 2008-10-02 16:41:50 +0200 (Thu, 02 Oct 2008) | 1 line
Correct HE version for Putt-Putt Enters the Race (French/Windows).
........
r34716 | fingolfin | 2008-10-02 18:58:59 +0200 (Thu, 02 Oct 2008) | 1 line
Renamed FilesystemNode -> FSNode
........
r34717 | fingolfin | 2008-10-02 19:08:15 +0200 (Thu, 02 Oct 2008) | 1 line
cleanup
........
r34718 | fingolfin | 2008-10-02 19:17:18 +0200 (Thu, 02 Oct 2008) | 1 line
Ignore String::deleteLastChar when called on an empty string
........
r34719 | fingolfin | 2008-10-02 19:20:21 +0200 (Thu, 02 Oct 2008) | 1 line
Fix for bug #2142743: Assertion on clicking "Theme" in Options
........
r34720 | fingolfin | 2008-10-02 19:48:01 +0200 (Thu, 02 Oct 2008) | 7 lines
Engine class changed:
- Moved initCommonGFX() && GUIErrorMessage() out of class Engine
- got rid of the _autosavePeriod member (this prevented users from
changing the autosave period during runtime)
- Got rid of an evil 'using GUI::Dialog' statement
- Clarified some Doxygen comments
........
r34721 | fingolfin | 2008-10-02 19:52:29 +0200 (Thu, 02 Oct 2008) | 1 line
Add the current dir to the global SearchSet, i.e. to SearchMan (this should fix the problems on Windows, and maybe other systems, see 'bug' #2137680)
........
r34722 | fingolfin | 2008-10-02 19:55:08 +0200 (Thu, 02 Oct 2008) | 1 line
Forgot to mention yet another Engine class change: mainMenuDialog -> openMainMenuDialog; and also forgot to commit this related file :/
........
r34725 | fingolfin | 2008-10-02 20:11:40 +0200 (Thu, 02 Oct 2008) | 1 line
typo
........
r34726 | thebluegr | 2008-10-03 00:04:34 +0200 (Fri, 03 Oct 2008) | 1 line
Merged loadHotSpotsMads() and loadHotSpotsM4()
........
r34727 | lordhoto | 2008-10-03 02:16:21 +0200 (Fri, 03 Oct 2008) | 2 lines
Fixed typos (thanks to Raziel^ for spotting them).
........
r34731 | fingolfin | 2008-10-03 18:07:57 +0200 (Fri, 03 Oct 2008) | 1 line
Fixed Engine::hasFeature to use proper types (i.e., MetaEngine::MetaEngineFeature instead of int)
........
r34732 | fingolfin | 2008-10-03 18:14:12 +0200 (Fri, 03 Oct 2008) | 1 line
SCUMM: Added french Monkey VGA variant, see bug #2129199
........
r34734 | lordhoto | 2008-10-03 18:57:40 +0200 (Fri, 03 Oct 2008) | 2 lines
Committed slightly modified patch #2034983 "Case-insensitivy and directory handling for engines".
........
r34735 | lordhoto | 2008-10-03 20:18:42 +0200 (Fri, 03 Oct 2008) | 2 lines
Check all 'kyra.dat' files in setup paths instead of only the first one found.
........
r34736 | lordhoto | 2008-10-03 20:23:57 +0200 (Fri, 03 Oct 2008) | 2 lines
Cleanup.
........
r34737 | dreammaster | 2008-10-04 13:10:25 +0200 (Sat, 04 Oct 2008) | 1 line
Bugfix to prevent NPC characters managing to walk beyond room exits without leaving the room, and thus getting stuck
........
r34738 | fingolfin | 2008-10-04 15:09:01 +0200 (Sat, 04 Oct 2008) | 1 line
Renamed some MetaEngine feature flags; removed explicit numbers from this feature flag list (nothing should rely on their specific values, anyway); added a note that Engine::hasFeature should become independant of MetaEngine::hasFeature
........
r34746 | john_doe | 2008-10-04 23:40:14 +0200 (Sat, 04 Oct 2008) | 3 lines
- Declared all stack functions as inline
- Sleep some ms after 500 opcodes to reduce CPU load
- Fixed odd bug in LGoP2 where text disappeared quickly without waiting for user input by returning 0x38 in sfShowPage
........
Modified Paths:
--------------
scummvm/branches/gsoc2008-gui/AUTHORS
scummvm/branches/gsoc2008-gui/backends/events/default/default-events.cpp
scummvm/branches/gsoc2008-gui/backends/fs/abstract-fs.cpp
scummvm/branches/gsoc2008-gui/backends/fs/abstract-fs.h
scummvm/branches/gsoc2008-gui/backends/fs/amigaos4/amigaos4-fs-factory.cpp
scummvm/branches/gsoc2008-gui/backends/fs/amigaos4/amigaos4-fs-factory.h
scummvm/branches/gsoc2008-gui/backends/fs/amigaos4/amigaos4-fs.cpp
scummvm/branches/gsoc2008-gui/backends/fs/ds/ds-fs-factory.cpp
scummvm/branches/gsoc2008-gui/backends/fs/ds/ds-fs-factory.h
scummvm/branches/gsoc2008-gui/backends/fs/ds/ds-fs.cpp
scummvm/branches/gsoc2008-gui/backends/fs/ds/ds-fs.h
scummvm/branches/gsoc2008-gui/backends/fs/fs-factory.h
scummvm/branches/gsoc2008-gui/backends/fs/palmos/palmos-fs-factory.cpp
scummvm/branches/gsoc2008-gui/backends/fs/palmos/palmos-fs-factory.h
scummvm/branches/gsoc2008-gui/backends/fs/palmos/palmos-fs.cpp
scummvm/branches/gsoc2008-gui/backends/fs/posix/posix-fs-factory.cpp
scummvm/branches/gsoc2008-gui/backends/fs/posix/posix-fs-factory.h
scummvm/branches/gsoc2008-gui/backends/fs/posix/posix-fs.cpp
scummvm/branches/gsoc2008-gui/backends/fs/posix/posix-fs.h
scummvm/branches/gsoc2008-gui/backends/fs/ps2/ps2-fs-factory.cpp
scummvm/branches/gsoc2008-gui/backends/fs/ps2/ps2-fs-factory.h
scummvm/branches/gsoc2008-gui/backends/fs/ps2/ps2-fs.cpp
scummvm/branches/gsoc2008-gui/backends/fs/psp/psp-fs-factory.cpp
scummvm/branches/gsoc2008-gui/backends/fs/psp/psp-fs-factory.h
scummvm/branches/gsoc2008-gui/backends/fs/psp/psp-fs.cpp
scummvm/branches/gsoc2008-gui/backends/fs/symbian/symbian-fs-factory.cpp
scummvm/branches/gsoc2008-gui/backends/fs/symbian/symbian-fs-factory.h
scummvm/branches/gsoc2008-gui/backends/fs/symbian/symbian-fs.cpp
scummvm/branches/gsoc2008-gui/backends/fs/wii/wii-fs-factory.cpp
scummvm/branches/gsoc2008-gui/backends/fs/wii/wii-fs-factory.h
scummvm/branches/gsoc2008-gui/backends/fs/wii/wii-fs.cpp
scummvm/branches/gsoc2008-gui/backends/fs/windows/windows-fs-factory.cpp
scummvm/branches/gsoc2008-gui/backends/fs/windows/windows-fs-factory.h
scummvm/branches/gsoc2008-gui/backends/fs/windows/windows-fs.cpp
scummvm/branches/gsoc2008-gui/backends/platform/dc/dc-fs.cpp
scummvm/branches/gsoc2008-gui/backends/platform/dc/dc.h
scummvm/branches/gsoc2008-gui/backends/platform/dc/selector.cpp
scummvm/branches/gsoc2008-gui/backends/platform/sdl/sdl.cpp
scummvm/branches/gsoc2008-gui/backends/platform/symbian/src/SymbianOS.cpp
scummvm/branches/gsoc2008-gui/backends/platform/wince/CELauncherDialog.cpp
scummvm/branches/gsoc2008-gui/backends/platform/wince/CELauncherDialog.h
scummvm/branches/gsoc2008-gui/backends/plugins/dc/dc-provider.cpp
scummvm/branches/gsoc2008-gui/backends/plugins/dc/dc-provider.h
scummvm/branches/gsoc2008-gui/backends/plugins/posix/posix-provider.cpp
scummvm/branches/gsoc2008-gui/backends/plugins/posix/posix-provider.h
scummvm/branches/gsoc2008-gui/backends/plugins/sdl/sdl-provider.cpp
scummvm/branches/gsoc2008-gui/backends/plugins/sdl/sdl-provider.h
scummvm/branches/gsoc2008-gui/backends/plugins/win32/win32-provider.cpp
scummvm/branches/gsoc2008-gui/backends/plugins/win32/win32-provider.h
scummvm/branches/gsoc2008-gui/backends/saves/default/default-saves.cpp
scummvm/branches/gsoc2008-gui/backends/saves/default/default-saves.h
scummvm/branches/gsoc2008-gui/base/commandLine.cpp
scummvm/branches/gsoc2008-gui/base/plugins.cpp
scummvm/branches/gsoc2008-gui/base/plugins.h
scummvm/branches/gsoc2008-gui/common/advancedDetector.cpp
scummvm/branches/gsoc2008-gui/common/archive.cpp
scummvm/branches/gsoc2008-gui/common/archive.h
scummvm/branches/gsoc2008-gui/common/config-manager.cpp
scummvm/branches/gsoc2008-gui/common/file.cpp
scummvm/branches/gsoc2008-gui/common/file.h
scummvm/branches/gsoc2008-gui/common/fs.cpp
scummvm/branches/gsoc2008-gui/common/fs.h
scummvm/branches/gsoc2008-gui/common/md5.cpp
scummvm/branches/gsoc2008-gui/common/md5.h
scummvm/branches/gsoc2008-gui/common/str.cpp
scummvm/branches/gsoc2008-gui/common/system.cpp
scummvm/branches/gsoc2008-gui/common/unzip.cpp
scummvm/branches/gsoc2008-gui/common/unzip.h
scummvm/branches/gsoc2008-gui/common/xmlparser.h
scummvm/branches/gsoc2008-gui/engines/agi/cycle.cpp
scummvm/branches/gsoc2008-gui/engines/agi/detection.cpp
scummvm/branches/gsoc2008-gui/engines/agi/loader_v3.cpp
scummvm/branches/gsoc2008-gui/engines/agi/op_cmd.cpp
scummvm/branches/gsoc2008-gui/engines/agi/op_test.cpp
scummvm/branches/gsoc2008-gui/engines/agi/preagi_common.cpp
scummvm/branches/gsoc2008-gui/engines/agi/preagi_mickey.cpp
scummvm/branches/gsoc2008-gui/engines/agi/preagi_troll.cpp
scummvm/branches/gsoc2008-gui/engines/agi/preagi_winnie.cpp
scummvm/branches/gsoc2008-gui/engines/agi/saveload.cpp
scummvm/branches/gsoc2008-gui/engines/agi/sound.cpp
scummvm/branches/gsoc2008-gui/engines/agi/sound.h
scummvm/branches/gsoc2008-gui/engines/agi/wagparser.cpp
scummvm/branches/gsoc2008-gui/engines/agi/wagparser.h
scummvm/branches/gsoc2008-gui/engines/agos/agos.cpp
scummvm/branches/gsoc2008-gui/engines/agos/animation.cpp
scummvm/branches/gsoc2008-gui/engines/agos/event.cpp
scummvm/branches/gsoc2008-gui/engines/agos/gfx.cpp
scummvm/branches/gsoc2008-gui/engines/agos/input.cpp
scummvm/branches/gsoc2008-gui/engines/agos/oracle.cpp
scummvm/branches/gsoc2008-gui/engines/agos/saveload.cpp
scummvm/branches/gsoc2008-gui/engines/agos/script.cpp
scummvm/branches/gsoc2008-gui/engines/agos/script_e1.cpp
scummvm/branches/gsoc2008-gui/engines/agos/script_e2.cpp
scummvm/branches/gsoc2008-gui/engines/agos/script_s1.cpp
scummvm/branches/gsoc2008-gui/engines/agos/script_ww.cpp
scummvm/branches/gsoc2008-gui/engines/agos/subroutine.cpp
scummvm/branches/gsoc2008-gui/engines/agos/verb.cpp
scummvm/branches/gsoc2008-gui/engines/agos/window.cpp
scummvm/branches/gsoc2008-gui/engines/cine/main_loop.cpp
scummvm/branches/gsoc2008-gui/engines/dialogs.cpp
scummvm/branches/gsoc2008-gui/engines/engine.cpp
scummvm/branches/gsoc2008-gui/engines/engine.h
scummvm/branches/gsoc2008-gui/engines/gob/game_v1.cpp
scummvm/branches/gsoc2008-gui/engines/gob/game_v2.cpp
scummvm/branches/gsoc2008-gui/engines/gob/inter.cpp
scummvm/branches/gsoc2008-gui/engines/gob/inter_bargon.cpp
scummvm/branches/gsoc2008-gui/engines/gob/inter_v1.cpp
scummvm/branches/gsoc2008-gui/engines/gob/inter_v2.cpp
scummvm/branches/gsoc2008-gui/engines/gob/mult.cpp
scummvm/branches/gsoc2008-gui/engines/gob/palanim.cpp
scummvm/branches/gsoc2008-gui/engines/gob/sound/sound.cpp
scummvm/branches/gsoc2008-gui/engines/gob/util.cpp
scummvm/branches/gsoc2008-gui/engines/gob/video.cpp
scummvm/branches/gsoc2008-gui/engines/gob/videoplayer.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/detection.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/gui.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/gui_hof.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/gui_lok.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/gui_mr.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/gui_v2.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/kyra_hof.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/kyra_lok.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/kyra_mr.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/kyra_v1.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/kyra_v2.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/lol.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/resource.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/resource.h
scummvm/branches/gsoc2008-gui/engines/kyra/resource_intern.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/resource_intern.h
scummvm/branches/gsoc2008-gui/engines/kyra/saveload.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/saveload_lok.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/scene_hof.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/scene_mr.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/screen.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/script.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/script_lok.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/script_mr.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/seqplayer.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/sequences_hof.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/sequences_lok.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/staticres.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/text.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/text_hof.cpp
scummvm/branches/gsoc2008-gui/engines/kyra/text_mr.cpp
scummvm/branches/gsoc2008-gui/engines/lure/events.cpp
scummvm/branches/gsoc2008-gui/engines/lure/fights.cpp
scummvm/branches/gsoc2008-gui/engines/lure/game.cpp
scummvm/branches/gsoc2008-gui/engines/lure/hotspots.cpp
scummvm/branches/gsoc2008-gui/engines/lure/intro.cpp
scummvm/branches/gsoc2008-gui/engines/lure/lure.cpp
scummvm/branches/gsoc2008-gui/engines/lure/menu.cpp
scummvm/branches/gsoc2008-gui/engines/lure/scripts.cpp
scummvm/branches/gsoc2008-gui/engines/lure/surface.cpp
scummvm/branches/gsoc2008-gui/engines/m4/hotspot.cpp
scummvm/branches/gsoc2008-gui/engines/m4/hotspot.h
scummvm/branches/gsoc2008-gui/engines/m4/scene.cpp
scummvm/branches/gsoc2008-gui/engines/made/script.cpp
scummvm/branches/gsoc2008-gui/engines/made/scriptfuncs.cpp
scummvm/branches/gsoc2008-gui/engines/metaengine.h
scummvm/branches/gsoc2008-gui/engines/parallaction/disk.h
scummvm/branches/gsoc2008-gui/engines/parallaction/disk_br.cpp
scummvm/branches/gsoc2008-gui/engines/parallaction/exec_ns.cpp
scummvm/branches/gsoc2008-gui/engines/parallaction/graphics.cpp
scummvm/branches/gsoc2008-gui/engines/parallaction/parallaction.cpp
scummvm/branches/gsoc2008-gui/engines/parallaction/parallaction_br.cpp
scummvm/branches/gsoc2008-gui/engines/parallaction/parallaction_ns.cpp
scummvm/branches/gsoc2008-gui/engines/queen/logic.cpp
scummvm/branches/gsoc2008-gui/engines/queen/queen.cpp
scummvm/branches/gsoc2008-gui/engines/queen/talk.cpp
scummvm/branches/gsoc2008-gui/engines/saga/detection.cpp
scummvm/branches/gsoc2008-gui/engines/saga/detection_tables.h
scummvm/branches/gsoc2008-gui/engines/saga/gfx.cpp
scummvm/branches/gsoc2008-gui/engines/saga/introproc_ihnm.cpp
scummvm/branches/gsoc2008-gui/engines/saga/module.mk
scummvm/branches/gsoc2008-gui/engines/saga/music.cpp
scummvm/branches/gsoc2008-gui/engines/saga/rscfile.cpp
scummvm/branches/gsoc2008-gui/engines/saga/rscfile.h
scummvm/branches/gsoc2008-gui/engines/saga/saga.cpp
scummvm/branches/gsoc2008-gui/engines/saga/saga.h
scummvm/branches/gsoc2008-gui/engines/saga/scene.cpp
scummvm/branches/gsoc2008-gui/engines/saga/sndres.cpp
scummvm/branches/gsoc2008-gui/engines/scumm/actor.cpp
scummvm/branches/gsoc2008-gui/engines/scumm/detection.cpp
scummvm/branches/gsoc2008-gui/engines/scumm/he/cup_player_he.cpp
scummvm/branches/gsoc2008-gui/engines/scumm/he/resource_he.cpp
scummvm/branches/gsoc2008-gui/engines/scumm/he/resource_he.h
scummvm/branches/gsoc2008-gui/engines/scumm/he/script_v60he.cpp
scummvm/branches/gsoc2008-gui/engines/scumm/resource.cpp
scummvm/branches/gsoc2008-gui/engines/scumm/scumm-md5.h
scummvm/branches/gsoc2008-gui/engines/scumm/scumm.cpp
scummvm/branches/gsoc2008-gui/engines/scumm/smush/smush_player.cpp
scummvm/branches/gsoc2008-gui/engines/sky/control.cpp
scummvm/branches/gsoc2008-gui/engines/sky/sky.cpp
scummvm/branches/gsoc2008-gui/engines/sword1/animation.cpp
scummvm/branches/gsoc2008-gui/engines/sword1/control.cpp
scummvm/branches/gsoc2008-gui/engines/sword1/credits.cpp
scummvm/branches/gsoc2008-gui/engines/sword1/sword1.cpp
scummvm/branches/gsoc2008-gui/engines/sword2/animation.cpp
scummvm/branches/gsoc2008-gui/engines/sword2/controls.cpp
scummvm/branches/gsoc2008-gui/engines/sword2/palette.cpp
scummvm/branches/gsoc2008-gui/engines/sword2/resman.cpp
scummvm/branches/gsoc2008-gui/engines/sword2/screen.cpp
scummvm/branches/gsoc2008-gui/engines/sword2/sword2.cpp
scummvm/branches/gsoc2008-gui/engines/tinsel/tinsel.cpp
scummvm/branches/gsoc2008-gui/engines/touche/menu.cpp
scummvm/branches/gsoc2008-gui/engines/touche/touche.cpp
scummvm/branches/gsoc2008-gui/gui/ThemeEngine.cpp
scummvm/branches/gsoc2008-gui/gui/browser.cpp
scummvm/branches/gsoc2008-gui/gui/browser.h
scummvm/branches/gsoc2008-gui/gui/credits.h
scummvm/branches/gsoc2008-gui/gui/launcher.cpp
scummvm/branches/gsoc2008-gui/gui/massadd.cpp
scummvm/branches/gsoc2008-gui/gui/massadd.h
scummvm/branches/gsoc2008-gui/gui/options.cpp
scummvm/branches/gsoc2008-gui/gui/theme.cpp
scummvm/branches/gsoc2008-gui/gui/theme.h
scummvm/branches/gsoc2008-gui/gui/themebrowser.cpp
scummvm/branches/gsoc2008-gui/gui/themebrowser.h
scummvm/branches/gsoc2008-gui/tools/credits.pl
scummvm/branches/gsoc2008-gui/tools/scumm-md5.txt
Property Changed:
----------------
scummvm/branches/gsoc2008-gui/
Property changes on: scummvm/branches/gsoc2008-gui
___________________________________________________________________
Modified: svnmerge-integrated
- /scummvm/trunk:1-34685
+ /scummvm/trunk:1-34747
Modified: scummvm/branches/gsoc2008-gui/AUTHORS
===================================================================
--- scummvm/branches/gsoc2008-gui/AUTHORS 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/AUTHORS 2008-10-05 11:21:07 UTC (rev 34749)
@@ -104,7 +104,7 @@
Andrew Kurushin
Eugene Sandulenko
- Tinsel;:
+ Tinsel:
Torbjorn Andersson
Paul Gilbert
Sven Hesse
@@ -197,7 +197,7 @@
Felix Jakschitsch - Zak256 reverse engineering
Mutwin Kraus - Original MacOS porter
Peter Moraliyski - Port: GP32
- Juha Niemimaki - Formaer AmigaOS 4 packager
+ Juha Niemimaki - Former AmigaOS 4 packager
Jeremy Newman - Former webmaster
Lionel Ulmer - Port: X11
Won Star - Former GP32 porter
Modified: scummvm/branches/gsoc2008-gui/backends/events/default/default-events.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/events/default/default-events.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/events/default/default-events.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -416,7 +416,7 @@
// as an event now and open up the GMM itself it would open the
// menu twice.
if (g_engine && !g_engine->isPaused())
- g_engine->mainMenuDialog();
+ g_engine->openMainMenuDialog();
if (_shouldQuit)
event.type = Common::EVENT_QUIT;
@@ -460,7 +460,7 @@
case Common::EVENT_MAINMENU:
if (g_engine && !g_engine->isPaused())
- g_engine->mainMenuDialog();
+ g_engine->openMainMenuDialog();
if (_shouldQuit)
event.type = Common::EVENT_QUIT;
Modified: scummvm/branches/gsoc2008-gui/backends/fs/abstract-fs.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/abstract-fs.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/abstract-fs.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -24,7 +24,7 @@
#include "backends/fs/abstract-fs.h"
-const char *AbstractFilesystemNode::lastPathComponent(const Common::String &str, const char sep) {
+const char *AbstractFSNode::lastPathComponent(const Common::String &str, const char sep) {
// TODO: Get rid of this eventually! Use Common::lastPathComponent instead
if(str.empty())
return "";
Modified: scummvm/branches/gsoc2008-gui/backends/fs/abstract-fs.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/abstract-fs.h 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/abstract-fs.h 2008-10-05 11:21:07 UTC (rev 34749)
@@ -29,22 +29,22 @@
#include "common/str.h"
#include "common/fs.h"
-class AbstractFilesystemNode;
+class AbstractFSNode;
-typedef Common::Array<AbstractFilesystemNode *> AbstractFSList;
+typedef Common::Array<AbstractFSNode *> AbstractFSList;
/**
* Abstract file system node. Private subclasses implement the actual
* functionality.
*
- * Most of the methods correspond directly to methods in class FilesystemNode,
+ * Most of the methods correspond directly to methods in class FSNode,
* so if they are not documented here, look there for more information about
* the semantics.
*/
-class AbstractFilesystemNode {
+class AbstractFSNode {
protected:
- friend class Common::FilesystemNode;
- typedef Common::FilesystemNode::ListMode ListMode;
+ friend class Common::FSNode;
+ typedef Common::FSNode::ListMode ListMode;
/**
* Returns the child node with the given name. When called on a non-directory
@@ -63,13 +63,13 @@
*
* @param name String containing the name of the child to create a new node.
*/
- virtual AbstractFilesystemNode *getChild(const Common::String &name) const = 0;
+ virtual AbstractFSNode *getChild(const Common::String &name) const = 0;
/**
* The parent node of this directory.
* The parent of the root is the root itself.
*/
- virtual AbstractFilesystemNode *getParent() const = 0;
+ virtual AbstractFSNode *getParent() const = 0;
/**
* Returns the last component of a given path.
@@ -88,7 +88,7 @@
/**
* Destructor.
*/
- virtual ~AbstractFilesystemNode() {}
+ virtual ~AbstractFSNode() {}
/*
* Indicates whether the object referred by this path exists in the filesystem or not.
@@ -115,7 +115,7 @@
virtual Common::String getDisplayName() const { return getName(); }
/**
- * Returns the last component of the path pointed by this FilesystemNode.
+ * Returns the last component of the path pointed by this FSNode.
*
* Examples (POSIX):
* /foo/bar.txt would return /bar.txt
Modified: scummvm/branches/gsoc2008-gui/backends/fs/amigaos4/amigaos4-fs-factory.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/amigaos4/amigaos4-fs-factory.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/amigaos4/amigaos4-fs-factory.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -26,15 +26,15 @@
#include "backends/fs/amigaos4/amigaos4-fs-factory.h"
#include "backends/fs/amigaos4/amigaos4-fs.cpp"
-AbstractFilesystemNode *AmigaOSFilesystemFactory::makeRootFileNode() const {
+AbstractFSNode *AmigaOSFilesystemFactory::makeRootFileNode() const {
return new AmigaOSFilesystemNode();
}
-AbstractFilesystemNode *AmigaOSFilesystemFactory::makeCurrentDirectoryFileNode() const {
+AbstractFSNode *AmigaOSFilesystemFactory::makeCurrentDirectoryFileNode() const {
return new AmigaOSFilesystemNode();
}
-AbstractFilesystemNode *AmigaOSFilesystemFactory::makeFileNodePath(const Common::String &path) const {
+AbstractFSNode *AmigaOSFilesystemFactory::makeFileNodePath(const Common::String &path) const {
return new AmigaOSFilesystemNode(path);
}
#endif
Modified: scummvm/branches/gsoc2008-gui/backends/fs/amigaos4/amigaos4-fs-factory.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/amigaos4/amigaos4-fs-factory.h 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/amigaos4/amigaos4-fs-factory.h 2008-10-05 11:21:07 UTC (rev 34749)
@@ -34,9 +34,9 @@
*/
class AmigaOSFilesystemFactory : public FilesystemFactory {
public:
- virtual AbstractFilesystemNode *makeRootFileNode() const;
- virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
- virtual AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const;
+ virtual AbstractFSNode *makeRootFileNode() const;
+ virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
+ virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
};
#endif /*AMIGAOS_FILESYSTEM_FACTORY_H*/
Modified: scummvm/branches/gsoc2008-gui/backends/fs/amigaos4/amigaos4-fs.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/amigaos4/amigaos4-fs.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/amigaos4/amigaos4-fs.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -47,9 +47,9 @@
/**
* Implementation of the ScummVM file system API.
*
- * Parts of this class are documented in the base interface class, AbstractFilesystemNode.
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
*/
-class AmigaOSFilesystemNode : public AbstractFilesystemNode {
+class AmigaOSFilesystemNode : public AbstractFSNode {
protected:
BPTR _pFileLock;
Common::String _sDisplayName;
@@ -58,7 +58,7 @@
bool _bIsValid;
/**
- * Obtain the FileInfoBlock protection value for this FilesystemNode,
+ * Obtain the FileInfoBlock protection value for this FSNode,
* as defined in the <proto/dos.h> header.
*
* @return -1 if there were errors, 0 or a positive integer otherwise.
@@ -103,9 +103,9 @@
virtual bool isReadable() const;
virtual bool isWritable() const;
- virtual AbstractFilesystemNode *getChild(const Common::String &n) const;
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFilesystemNode *getParent() const;
+ virtual AbstractFSNode *getParent() const;
virtual Common::SeekableReadStream *openForReading();
virtual Common::WriteStream *openForWriting();
@@ -302,7 +302,7 @@
return nodeExists;
}
-AbstractFilesystemNode *AmigaOSFilesystemNode::getChild(const Common::String &n) const {
+AbstractFSNode *AmigaOSFilesystemNode::getChild(const Common::String &n) const {
ENTER();
if (!_bIsDirectory) {
debug(6, "Not a directory");
@@ -371,9 +371,9 @@
struct ExAllData *ead = data;
do {
- if ((mode == Common::FilesystemNode::kListAll) ||
- (EAD_IS_DRAWER(ead) && (mode == Common::FilesystemNode::kListDirectoriesOnly)) ||
- (EAD_IS_FILE(ead) && (mode == Common::FilesystemNode::kListFilesOnly))) {
+ if ((mode == Common::FSNode::kListAll) ||
+ (EAD_IS_DRAWER(ead) && (mode == Common::FSNode::kListDirectoriesOnly)) ||
+ (EAD_IS_FILE(ead) && (mode == Common::FSNode::kListFilesOnly))) {
Common::String full_path = _sPath;
full_path += (char*)ead->ed_Name;
@@ -381,7 +381,7 @@
if (lock) {
AmigaOSFilesystemNode *entry = new AmigaOSFilesystemNode(lock, (char *)ead->ed_Name);
if (entry) {
- //FIXME: since the isValid() function is no longer part of the AbstractFilesystemNode
+ //FIXME: since the isValid() function is no longer part of the AbstractFSNode
// specification, the following call had to be changed:
// if (entry->isValid())
// Please verify that the logic of the code remains coherent. Also, remember
@@ -433,7 +433,7 @@
return fibProt;
}
-AbstractFilesystemNode *AmigaOSFilesystemNode::getParent() const {
+AbstractFSNode *AmigaOSFilesystemNode::getParent() const {
ENTER();
if (!_bIsDirectory) {
@@ -543,7 +543,7 @@
AmigaOSFilesystemNode *entry = new AmigaOSFilesystemNode(volumeLock, buffer);
if (entry) {
- //FIXME: since the isValid() function is no longer part of the AbstractFilesystemNode
+ //FIXME: since the isValid() function is no longer part of the AbstractFSNode
// specification, the following call had to be changed:
// if (entry->isValid())
// Please verify that the logic of the code remains coherent. Also, remember
Modified: scummvm/branches/gsoc2008-gui/backends/fs/ds/ds-fs-factory.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/ds/ds-fs-factory.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/ds/ds-fs-factory.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -29,7 +29,7 @@
DECLARE_SINGLETON(DSFilesystemFactory);
-AbstractFilesystemNode *DSFilesystemFactory::makeRootFileNode() const {
+AbstractFSNode *DSFilesystemFactory::makeRootFileNode() const {
if (DS::isGBAMPAvailable()) {
return new DS::GBAMPFileSystemNode();
} else {
@@ -37,7 +37,7 @@
}
}
-AbstractFilesystemNode *DSFilesystemFactory::makeCurrentDirectoryFileNode() const {
+AbstractFSNode *DSFilesystemFactory::makeCurrentDirectoryFileNode() const {
if (DS::isGBAMPAvailable()) {
return new DS::GBAMPFileSystemNode();
} else {
@@ -45,7 +45,7 @@
}
}
-AbstractFilesystemNode *DSFilesystemFactory::makeFileNodePath(const Common::String &path) const {
+AbstractFSNode *DSFilesystemFactory::makeFileNodePath(const Common::String &path) const {
if (DS::isGBAMPAvailable()) {
return new DS::GBAMPFileSystemNode(path);
} else {
Modified: scummvm/branches/gsoc2008-gui/backends/fs/ds/ds-fs-factory.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/ds/ds-fs-factory.h 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/ds/ds-fs-factory.h 2008-10-05 11:21:07 UTC (rev 34749)
@@ -35,9 +35,9 @@
*/
class DSFilesystemFactory : public FilesystemFactory, public Common::Singleton<DSFilesystemFactory> {
public:
- virtual AbstractFilesystemNode *makeRootFileNode() const;
- virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
- virtual AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const;
+ virtual AbstractFSNode *makeRootFileNode() const;
+ virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
+ virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
protected:
DSFilesystemFactory() {};
Modified: scummvm/branches/gsoc2008-gui/backends/fs/ds/ds-fs.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/ds/ds-fs.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/ds/ds-fs.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -125,7 +125,7 @@
//TODO: not implemented?
}
-AbstractFilesystemNode *DSFileSystemNode::getChild(const Common::String& n) const {
+AbstractFSNode *DSFileSystemNode::getChild(const Common::String& n) const {
if (_path.lastChar() == '\\') {
return new DSFileSystemNode(_path + n);
} else {
@@ -168,8 +168,8 @@
_zipFile->getFileName(n);
// consolePrintf("file: %s\n", n);
- if ( (_zipFile->isDirectory() && ((mode == Common::FilesystemNode::kListDirectoriesOnly) || (mode == Common::FilesystemNode::kListAll)) )
- || (!_zipFile->isDirectory() && ((mode == Common::FilesystemNode::kListFilesOnly) || (mode == Common::FilesystemNode::kListAll)) ) )
+ if ( (_zipFile->isDirectory() && ((mode == Common::FSNode::kListDirectoriesOnly) || (mode == Common::FSNode::kListAll)) )
+ || (!_zipFile->isDirectory() && ((mode == Common::FSNode::kListFilesOnly) || (mode == Common::FSNode::kListAll)) ) )
{
DSFileSystemNode* dsfsn = new DSFileSystemNode("ds:/" + Common::String(n), _zipFile->isDirectory());
dsfsn->_isDirectory = _zipFile->isDirectory();
@@ -182,7 +182,7 @@
return true;
}
-AbstractFilesystemNode* DSFileSystemNode::getParent() const {
+AbstractFSNode* DSFileSystemNode::getParent() const {
// consolePrintf("parent\n");
DSFileSystemNode *p;
@@ -285,7 +285,7 @@
//TODO: not implemented?
}
-AbstractFilesystemNode *GBAMPFileSystemNode::getChild(const Common::String& n) const {
+AbstractFSNode *GBAMPFileSystemNode::getChild(const Common::String& n) const {
if (_path.lastChar() == '\\') {
return new DSFileSystemNode(_path + n);
} else {
@@ -322,8 +322,8 @@
while (entryType != TYPE_NO_MORE) {
- if ( ((entryType == TYPE_DIR) && ((mode == Common::FilesystemNode::kListDirectoriesOnly) || (mode == Common::FilesystemNode::kListAll)))
- || ((entryType == TYPE_FILE) && ((mode == Common::FilesystemNode::kListFilesOnly) || (mode == Common::FilesystemNode::kListAll))) ) {
+ if ( ((entryType == TYPE_DIR) && ((mode == Common::FSNode::kListDirectoriesOnly) || (mode == Common::FSNode::kListAll)))
+ || ((entryType == TYPE_FILE) && ((mode == Common::FSNode::kListFilesOnly) || (mode == Common::FSNode::kListAll))) ) {
GBAMPFileSystemNode* dsfsn;
consolePrintf("Fname: %s\n", fname);
@@ -353,7 +353,7 @@
return true;
}
-AbstractFilesystemNode* GBAMPFileSystemNode::getParent() const {
+AbstractFSNode* GBAMPFileSystemNode::getParent() const {
// consolePrintf("parent\n");
GBAMPFileSystemNode *p;
Modified: scummvm/branches/gsoc2008-gui/backends/fs/ds/ds-fs.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/ds/ds-fs.h 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/ds/ds-fs.h 2008-10-05 11:21:07 UTC (rev 34749)
@@ -37,9 +37,9 @@
* Implementation of the ScummVM file system API.
* This class is used when a Flash cart is in use.
*
- * Parts of this class are documented in the base interface class, AbstractFilesystemNode.
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
*/
-class DSFileSystemNode : public AbstractFilesystemNode {
+class DSFileSystemNode : public AbstractFSNode {
protected:
static ZipFile* _zipFile;
@@ -85,10 +85,10 @@
/**
* Returns a copy of this node.
*/
- virtual AbstractFilesystemNode *clone() const { return new DSFileSystemNode(this); }
- virtual AbstractFilesystemNode *getChild(const Common::String& name) const;
+ virtual AbstractFSNode *clone() const { return new DSFileSystemNode(this); }
+ virtual AbstractFSNode *getChild(const Common::String& name) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFilesystemNode *getParent() const;
+ virtual AbstractFSNode *getParent() const;
virtual Common::SeekableReadStream *openForReading();
virtual Common::WriteStream *openForWriting();
@@ -104,9 +104,9 @@
* Implementation of the ScummVM file system API.
* This class is used when the GBAMP (GBA Movie Player) is used with a CompactFlash card.
*
- * Parts of this class are documented in the base interface class, AbstractFilesystemNode.
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
*/
-class GBAMPFileSystemNode : public AbstractFilesystemNode {
+class GBAMPFileSystemNode : public AbstractFSNode {
protected:
Common::String _displayName;
Common::String _path;
@@ -150,10 +150,10 @@
/**
* Returns a copy of this node.
*/
- virtual AbstractFilesystemNode *clone() const { return new GBAMPFileSystemNode(this); }
- virtual AbstractFilesystemNode *getChild(const Common::String& name) const;
+ virtual AbstractFSNode *clone() const { return new GBAMPFileSystemNode(this); }
+ virtual AbstractFSNode *getChild(const Common::String& name) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFilesystemNode *getParent() const;
+ virtual AbstractFSNode *getParent() const;
virtual Common::SeekableReadStream *openForReading();
virtual Common::WriteStream *openForWriting();
Modified: scummvm/branches/gsoc2008-gui/backends/fs/fs-factory.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/fs-factory.h 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/fs-factory.h 2008-10-05 11:21:07 UTC (rev 34749)
@@ -29,7 +29,7 @@
#include "backends/fs/abstract-fs.h"
/**
- * Creates concrete FilesystemNode objects depending on the current architecture.
+ * Creates concrete FSNode objects depending on the current architecture.
*/
class FilesystemFactory {
public:
@@ -44,7 +44,7 @@
* emulate it or simply return some "sensible" default directory node,
* e.g. the same value as getRoot() returns.
*/
- virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const = 0;
+ virtual AbstractFSNode *makeCurrentDirectoryFileNode() const = 0;
/**
* Construct a node based on a path; the path is in the same format as it
@@ -54,9 +54,9 @@
* identical to oldNode. Hence, we can use the "path" value for persistent
* storage e.g. in the config file.
*
- * @param path The path string to create a FilesystemNode for.
+ * @param path The path string to create a FSNode for.
*/
- virtual AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const = 0;
+ virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const = 0;
/**
* Returns a special node representing the filesystem root.
@@ -65,7 +65,7 @@
* On Unix, this will be simply the node for / (the root directory).
* On Windows, it will be a special node which "contains" all drives (C:, D:, E:).
*/
- virtual AbstractFilesystemNode *makeRootFileNode() const = 0;
+ virtual AbstractFSNode *makeRootFileNode() const = 0;
};
#endif /*FILESYSTEM_FACTORY_H*/
Modified: scummvm/branches/gsoc2008-gui/backends/fs/palmos/palmos-fs-factory.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/palmos/palmos-fs-factory.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/palmos/palmos-fs-factory.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -28,15 +28,15 @@
DECLARE_SINGLETON(PalmOSFilesystemFactory);
-AbstractFilesystemNode *PalmOSFilesystemFactory::makeRootFileNode() const {
+AbstractFSNode *PalmOSFilesystemFactory::makeRootFileNode() const {
return new PalmOSFilesystemNode();
}
-AbstractFilesystemNode *PalmOSFilesystemFactory::makeCurrentDirectoryFileNode() const {
+AbstractFSNode *PalmOSFilesystemFactory::makeCurrentDirectoryFileNode() const {
return new PalmOSFilesystemNode();
}
-AbstractFilesystemNode *PalmOSFilesystemFactory::makeFileNodePath(const Common::String &path) const {
+AbstractFSNode *PalmOSFilesystemFactory::makeFileNodePath(const Common::String &path) const {
return new PalmOSFilesystemNode(path);
}
#endif
Modified: scummvm/branches/gsoc2008-gui/backends/fs/palmos/palmos-fs-factory.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/palmos/palmos-fs-factory.h 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/palmos/palmos-fs-factory.h 2008-10-05 11:21:07 UTC (rev 34749)
@@ -35,9 +35,9 @@
*/
class PalmOSFilesystemFactory : public FilesystemFactory, public Common::Singleton<PalmOSFilesystemFactory> {
public:
- virtual AbstractFilesystemNode *makeRootFileNode() const;
- virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
- virtual AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const;
+ virtual AbstractFSNode *makeRootFileNode() const;
+ virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
+ virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
protected:
PalmOSFilesystemFactory() {};
Modified: scummvm/branches/gsoc2008-gui/backends/fs/palmos/palmos-fs.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/palmos/palmos-fs.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/palmos/palmos-fs.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -33,9 +33,9 @@
/**
* Implementation of the ScummVM file system API based on PalmOS VFS API.
*
- * Parts of this class are documented in the base interface class, AbstractFilesystemNode.
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
*/
-class PalmOSFilesystemNode : public AbstractFilesystemNode {
+class PalmOSFilesystemNode : public AbstractFSNode {
protected:
Common::String _displayName;
Common::String _path;
@@ -64,9 +64,9 @@
virtual bool isReadable() const { return true; } //FIXME: this is just a stub
virtual bool isWritable() const { return true; } //FIXME: this is just a stub
- virtual AbstractFilesystemNode *getChild(const Common::String &n) const;
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFilesystemNode *getParent() const;
+ virtual AbstractFSNode *getParent() const;
virtual Common::SeekableReadStream *openForReading();
virtual Common::WriteStream *openForWriting();
@@ -90,8 +90,8 @@
isDir = (find_data->attributes & vfsFileAttrDirectory);
- if ((!isDir && mode == Common::FilesystemNode::kListDirectoriesOnly) ||
- (isDir && mode == Common::FilesystemNode::kListFilesOnly))
+ if ((!isDir && mode == Common::FSNode::kListDirectoriesOnly) ||
+ (isDir && mode == Common::FSNode::kListFilesOnly))
return;
entry._isDirectory = isDir;
@@ -139,7 +139,7 @@
_isPseudoRoot = false;
}
-AbstractFilesystemNode *PalmOSFilesystemNode::getChild(const Common::String &n) const {
+AbstractFSNode *PalmOSFilesystemNode::getChild(const Common::String &n) const {
assert(_isDirectory);
Common::String newPath(_path);
@@ -190,7 +190,7 @@
return true;
}
-AbstractFilesystemNode *PalmOSFilesystemNode::getParent() const {
+AbstractFSNode *PalmOSFilesystemNode::getParent() const {
PalmOSFilesystemNode *p = 0;
if (!_isPseudoRoot) {
Modified: scummvm/branches/gsoc2008-gui/backends/fs/posix/posix-fs-factory.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/posix/posix-fs-factory.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/posix/posix-fs-factory.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -26,17 +26,17 @@
#include "backends/fs/posix/posix-fs-factory.h"
#include "backends/fs/posix/posix-fs.cpp"
-AbstractFilesystemNode *POSIXFilesystemFactory::makeRootFileNode() const {
+AbstractFSNode *POSIXFilesystemFactory::makeRootFileNode() const {
return new POSIXFilesystemNode("/");
}
-AbstractFilesystemNode *POSIXFilesystemFactory::makeCurrentDirectoryFileNode() const {
+AbstractFSNode *POSIXFilesystemFactory::makeCurrentDirectoryFileNode() const {
char buf[MAXPATHLEN];
getcwd(buf, MAXPATHLEN);
return new POSIXFilesystemNode(buf);
}
-AbstractFilesystemNode *POSIXFilesystemFactory::makeFileNodePath(const Common::String &path) const {
+AbstractFSNode *POSIXFilesystemFactory::makeFileNodePath(const Common::String &path) const {
assert(!path.empty());
return new POSIXFilesystemNode(path);
}
Modified: scummvm/branches/gsoc2008-gui/backends/fs/posix/posix-fs-factory.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/posix/posix-fs-factory.h 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/posix/posix-fs-factory.h 2008-10-05 11:21:07 UTC (rev 34749)
@@ -33,9 +33,9 @@
* Parts of this class are documented in the base interface class, FilesystemFactory.
*/
class POSIXFilesystemFactory : public FilesystemFactory {
- virtual AbstractFilesystemNode *makeRootFileNode() const;
- virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
- virtual AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const;
+ virtual AbstractFSNode *makeRootFileNode() const;
+ virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
+ virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
};
#endif /*POSIX_FILESYSTEM_FACTORY_H*/
Modified: scummvm/branches/gsoc2008-gui/backends/fs/posix/posix-fs.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/posix/posix-fs.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/posix/posix-fs.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -92,7 +92,7 @@
setFlags();
}
-AbstractFilesystemNode *POSIXFilesystemNode::getChild(const Common::String &n) const {
+AbstractFSNode *POSIXFilesystemNode::getChild(const Common::String &n) const {
assert(!_path.empty());
assert(_isDirectory);
@@ -197,8 +197,8 @@
continue;
// Honor the chosen mode
- if ((mode == Common::FilesystemNode::kListFilesOnly && entry._isDirectory) ||
- (mode == Common::FilesystemNode::kListDirectoriesOnly && !entry._isDirectory))
+ if ((mode == Common::FSNode::kListFilesOnly && entry._isDirectory) ||
+ (mode == Common::FSNode::kListDirectoriesOnly && !entry._isDirectory))
continue;
myList.push_back(new POSIXFilesystemNode(entry));
@@ -208,7 +208,7 @@
return true;
}
-AbstractFilesystemNode *POSIXFilesystemNode::getParent() const {
+AbstractFSNode *POSIXFilesystemNode::getParent() const {
if (_path == "/")
return 0; // The filesystem root has no parent
Modified: scummvm/branches/gsoc2008-gui/backends/fs/posix/posix-fs.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/posix/posix-fs.h 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/posix/posix-fs.h 2008-10-05 11:21:07 UTC (rev 34749)
@@ -35,16 +35,16 @@
/**
* Implementation of the ScummVM file system API based on POSIX.
*
- * Parts of this class are documented in the base interface class, AbstractFilesystemNode.
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
*/
-class POSIXFilesystemNode : public AbstractFilesystemNode {
+class POSIXFilesystemNode : public AbstractFSNode {
protected:
Common::String _displayName;
Common::String _path;
bool _isDirectory;
bool _isValid;
- virtual AbstractFilesystemNode *makeNode(const Common::String &path) const {
+ virtual AbstractFSNode *makeNode(const Common::String &path) const {
return new POSIXFilesystemNode(path);
}
@@ -69,9 +69,9 @@
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 Common::String &n) const;
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFilesystemNode *getParent() const;
+ virtual AbstractFSNode *getParent() const;
virtual Common::SeekableReadStream *openForReading();
virtual Common::WriteStream *openForWriting();
Modified: scummvm/branches/gsoc2008-gui/backends/fs/ps2/ps2-fs-factory.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/ps2/ps2-fs-factory.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/ps2/ps2-fs-factory.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -28,15 +28,15 @@
DECLARE_SINGLETON(Ps2FilesystemFactory);
-AbstractFilesystemNode *Ps2FilesystemFactory::makeRootFileNode() const {
+AbstractFSNode *Ps2FilesystemFactory::makeRootFileNode() const {
return new Ps2FilesystemNode();
}
-AbstractFilesystemNode *Ps2FilesystemFactory::makeCurrentDirectoryFileNode() const {
+AbstractFSNode *Ps2FilesystemFactory::makeCurrentDirectoryFileNode() const {
return new Ps2FilesystemNode();
}
-AbstractFilesystemNode *Ps2FilesystemFactory::makeFileNodePath(const Common::String &path) const {
+AbstractFSNode *Ps2FilesystemFactory::makeFileNodePath(const Common::String &path) const {
// return new Ps2FilesystemNode(path);
Ps2FilesystemNode *nf = new Ps2FilesystemNode(path, true);
Modified: scummvm/branches/gsoc2008-gui/backends/fs/ps2/ps2-fs-factory.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/ps2/ps2-fs-factory.h 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/ps2/ps2-fs-factory.h 2008-10-05 11:21:07 UTC (rev 34749)
@@ -35,9 +35,9 @@
*/
class Ps2FilesystemFactory : public FilesystemFactory, public Common::Singleton<Ps2FilesystemFactory> {
public:
- virtual AbstractFilesystemNode *makeRootFileNode() const;
- virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
- virtual AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const;
+ virtual AbstractFSNode *makeRootFileNode() const;
+ virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
+ virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
protected:
Ps2FilesystemFactory() {};
Modified: scummvm/branches/gsoc2008-gui/backends/fs/ps2/ps2-fs.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/ps2/ps2-fs.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/ps2/ps2-fs.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -41,9 +41,9 @@
/**
* Implementation of the ScummVM file system API based on the Ps2SDK.
*
- * Parts of this class are documented in the base interface class, AbstractFilesystemNode.
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
*/
-class Ps2FilesystemNode : public AbstractFilesystemNode {
+class Ps2FilesystemNode : public AbstractFSNode {
friend class Ps2FilesystemFactory;
@@ -95,10 +95,10 @@
return false;
}
- virtual AbstractFilesystemNode *clone() const { return new Ps2FilesystemNode(this); }
- virtual AbstractFilesystemNode *getChild(const Common::String &n) const;
+ virtual AbstractFSNode *clone() const { return new Ps2FilesystemNode(this); }
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFilesystemNode *getParent() const;
+ virtual AbstractFSNode *getParent() const;
virtual Common::SeekableReadStream *openForReading();
virtual Common::WriteStream *openForWriting();
@@ -210,7 +210,7 @@
return false;
}
-AbstractFilesystemNode *Ps2FilesystemNode::getChild(const Common::String &n) const {
+AbstractFSNode *Ps2FilesystemNode::getChild(const Common::String &n) const {
if (!_isDirectory)
return NULL;
@@ -288,9 +288,9 @@
while ((dreadRes = fio.dread(fd, &dirent)) > 0) {
if (dirent.name[0] == '.')
continue; // ignore '.' and '..'
- if (((mode == Common::FilesystemNode::kListDirectoriesOnly) && (dirent.stat.mode & FIO_S_IFDIR)) ||
- ((mode == Common::FilesystemNode::kListFilesOnly) && !(dirent.stat.mode & FIO_S_IFDIR)) ||
- (mode == Common::FilesystemNode::kListAll)) {
+ if (((mode == Common::FSNode::kListDirectoriesOnly) && (dirent.stat.mode & FIO_S_IFDIR)) ||
+ ((mode == Common::FSNode::kListFilesOnly) && !(dirent.stat.mode & FIO_S_IFDIR)) ||
+ (mode == Common::FSNode::kListAll)) {
dirEntry._isDirectory = (bool)(dirent.stat.mode & FIO_S_IFDIR);
dirEntry._isRoot = false;
@@ -312,7 +312,7 @@
}
}
-AbstractFilesystemNode *Ps2FilesystemNode::getParent() const {
+AbstractFSNode *Ps2FilesystemNode::getParent() const {
if (_isRoot)
return new Ps2FilesystemNode(this);
Modified: scummvm/branches/gsoc2008-gui/backends/fs/psp/psp-fs-factory.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/psp/psp-fs-factory.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/psp/psp-fs-factory.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -28,15 +28,15 @@
DECLARE_SINGLETON(PSPFilesystemFactory);
-AbstractFilesystemNode *PSPFilesystemFactory::makeRootFileNode() const {
+AbstractFSNode *PSPFilesystemFactory::makeRootFileNode() const {
return new PSPFilesystemNode();
}
-AbstractFilesystemNode *PSPFilesystemFactory::makeCurrentDirectoryFileNode() const {
+AbstractFSNode *PSPFilesystemFactory::makeCurrentDirectoryFileNode() const {
return new PSPFilesystemNode();
}
-AbstractFilesystemNode *PSPFilesystemFactory::makeFileNodePath(const Common::String &path) const {
+AbstractFSNode *PSPFilesystemFactory::makeFileNodePath(const Common::String &path) const {
return new PSPFilesystemNode(path, true);
}
#endif
Modified: scummvm/branches/gsoc2008-gui/backends/fs/psp/psp-fs-factory.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/psp/psp-fs-factory.h 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/psp/psp-fs-factory.h 2008-10-05 11:21:07 UTC (rev 34749)
@@ -35,9 +35,9 @@
*/
class PSPFilesystemFactory : public FilesystemFactory, public Common::Singleton<PSPFilesystemFactory> {
public:
- virtual AbstractFilesystemNode *makeRootFileNode() const;
- virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
- virtual AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const;
+ virtual AbstractFSNode *makeRootFileNode() const;
+ virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
+ virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
protected:
PSPFilesystemFactory() {};
Modified: scummvm/branches/gsoc2008-gui/backends/fs/psp/psp-fs.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/psp/psp-fs.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/psp/psp-fs.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -36,9 +36,9 @@
/**
* Implementation of the ScummVM file system API based on PSPSDK API.
*
- * Parts of this class are documented in the base interface class, AbstractFilesystemNode.
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
*/
-class PSPFilesystemNode : public AbstractFilesystemNode {
+class PSPFilesystemNode : public AbstractFSNode {
protected:
Common::String _displayName;
Common::String _path;
@@ -67,9 +67,9 @@
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 Common::String &n) const;
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFilesystemNode *getParent() const;
+ virtual AbstractFSNode *getParent() const;
virtual Common::SeekableReadStream *openForReading();
virtual Common::WriteStream *openForWriting();
@@ -97,7 +97,7 @@
}
}
-AbstractFilesystemNode *PSPFilesystemNode::getChild(const Common::String &n) const {
+AbstractFSNode *PSPFilesystemNode::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);
@@ -137,8 +137,8 @@
entry._path += "/";
// Honor the chosen mode
- if ((mode == Common::FilesystemNode::kListFilesOnly && entry._isDirectory) ||
- (mode == Common::FilesystemNode::kListDirectoriesOnly && !entry._isDirectory))
+ if ((mode == Common::FSNode::kListFilesOnly && entry._isDirectory) ||
+ (mode == Common::FSNode::kListDirectoriesOnly && !entry._isDirectory))
continue;
myList.push_back(new PSPFilesystemNode(entry));
@@ -151,7 +151,7 @@
}
}
-AbstractFilesystemNode *PSPFilesystemNode::getParent() const {
+AbstractFSNode *PSPFilesystemNode::getParent() const {
if (_path == ROOT_PATH)
return 0;
Modified: scummvm/branches/gsoc2008-gui/backends/fs/symbian/symbian-fs-factory.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/symbian/symbian-fs-factory.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/symbian/symbian-fs-factory.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -26,17 +26,17 @@
#include "backends/fs/symbian/symbian-fs-factory.h"
#include "backends/fs/symbian/symbian-fs.cpp"
-AbstractFilesystemNode *SymbianFilesystemFactory::makeRootFileNode() const {
+AbstractFSNode *SymbianFilesystemFactory::makeRootFileNode() const {
return new SymbianFilesystemNode(true);
}
-AbstractFilesystemNode *SymbianFilesystemFactory::makeCurrentDirectoryFileNode() const {
+AbstractFSNode *SymbianFilesystemFactory::makeCurrentDirectoryFileNode() const {
char path[MAXPATHLEN];
getcwd(path, MAXPATHLEN);
return new SymbianFilesystemNode(path);
}
-AbstractFilesystemNode *SymbianFilesystemFactory::makeFileNodePath(const Common::String &path) const {
+AbstractFSNode *SymbianFilesystemFactory::makeFileNodePath(const Common::String &path) const {
return new SymbianFilesystemNode(path);
}
#endif
Modified: scummvm/branches/gsoc2008-gui/backends/fs/symbian/symbian-fs-factory.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/symbian/symbian-fs-factory.h 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/symbian/symbian-fs-factory.h 2008-10-05 11:21:07 UTC (rev 34749)
@@ -34,9 +34,9 @@
*/
class SymbianFilesystemFactory : public FilesystemFactory {
public:
- virtual AbstractFilesystemNode *makeRootFileNode() const;
- virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
- virtual AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const;
+ virtual AbstractFSNode *makeRootFileNode() const;
+ virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
+ virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
};
#endif /*SYMBIAN_FILESYSTEM_FACTORY_H*/
Modified: scummvm/branches/gsoc2008-gui/backends/fs/symbian/symbian-fs.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/symbian/symbian-fs.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/symbian/symbian-fs.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -37,9 +37,9 @@
/**
* Implementation of the ScummVM file system API based on POSIX.
*
- * Parts of this class are documented in the base interface class, AbstractFilesystemNode.
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
*/
-class SymbianFilesystemNode : public AbstractFilesystemNode {
+class SymbianFilesystemNode : public AbstractFSNode {
protected:
Common::String _displayName;
Common::String _path;
@@ -75,9 +75,9 @@
virtual bool isReadable() const { return access(_path.c_str(), R_OK) == 0; } //FIXME: this is just a stub
virtual bool isWritable() const { return access(_path.c_str(), W_OK) == 0; } //FIXME: this is just a stub
- virtual AbstractFilesystemNode *getChild(const Common::String &n) const;
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFilesystemNode *getParent() const;
+ virtual AbstractFSNode *getParent() const;
virtual Common::SeekableReadStream *openForReading();
virtual Common::WriteStream *openForWriting();
@@ -133,7 +133,7 @@
}
}
-AbstractFilesystemNode *SymbianFilesystemNode::getChild(const Common::String &n) const {
+AbstractFSNode *SymbianFilesystemNode::getChild(const Common::String &n) const {
assert(_isDirectory);
Common::String newPath(_path);
@@ -216,8 +216,8 @@
entry._isDirectory = fileentry.IsDir();
// Honor the chosen mode
- if ((mode == Common::FilesystemNode::kListFilesOnly && entry._isDirectory) ||
- (mode == Common::FilesystemNode::kListDirectoriesOnly && !entry._isDirectory))
+ if ((mode == Common::FSNode::kListFilesOnly && entry._isDirectory) ||
+ (mode == Common::FSNode::kListDirectoriesOnly && !entry._isDirectory))
continue;
myList.push_back(new SymbianFilesystemNode(entry));
@@ -229,7 +229,7 @@
return true;
}
-AbstractFilesystemNode *SymbianFilesystemNode::getParent() const {
+AbstractFSNode *SymbianFilesystemNode::getParent() const {
SymbianFilesystemNode *p =NULL;
// Root node is its own parent. Still we can't just return this
Modified: scummvm/branches/gsoc2008-gui/backends/fs/wii/wii-fs-factory.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/wii/wii-fs-factory.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/wii/wii-fs-factory.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -29,11 +29,11 @@
DECLARE_SINGLETON(WiiFilesystemFactory);
-AbstractFilesystemNode *WiiFilesystemFactory::makeRootFileNode() const {
+AbstractFSNode *WiiFilesystemFactory::makeRootFileNode() const {
return new WiiFilesystemNode();
}
-AbstractFilesystemNode *WiiFilesystemFactory::makeCurrentDirectoryFileNode() const {
+AbstractFSNode *WiiFilesystemFactory::makeCurrentDirectoryFileNode() const {
char buf[MAXPATHLEN];
if (getcwd(buf, MAXPATHLEN))
@@ -42,7 +42,7 @@
return new WiiFilesystemNode();
}
-AbstractFilesystemNode *WiiFilesystemFactory::makeFileNodePath(const Common::String &path) const {
+AbstractFSNode *WiiFilesystemFactory::makeFileNodePath(const Common::String &path) const {
return new WiiFilesystemNode(path, true);
}
#endif
Modified: scummvm/branches/gsoc2008-gui/backends/fs/wii/wii-fs-factory.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/wii/wii-fs-factory.h 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/wii/wii-fs-factory.h 2008-10-05 11:21:07 UTC (rev 34749)
@@ -33,9 +33,9 @@
*/
class WiiFilesystemFactory : public FilesystemFactory, public Common::Singleton<WiiFilesystemFactory> {
public:
- virtual AbstractFilesystemNode *makeRootFileNode() const;
- virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
- virtual AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const;
+ virtual AbstractFSNode *makeRootFileNode() const;
+ virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
+ virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
protected:
WiiFilesystemFactory() {};
Modified: scummvm/branches/gsoc2008-gui/backends/fs/wii/wii-fs.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/wii/wii-fs.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/wii/wii-fs.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -34,9 +34,9 @@
/**
* Implementation of the ScummVM file system API based on Wii.
*
- * Parts of this class are documented in the base interface class, AbstractFilesystemNode.
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
*/
-class WiiFilesystemNode : public AbstractFilesystemNode {
+class WiiFilesystemNode : public AbstractFSNode {
protected:
Common::String _displayName;
Common::String _path;
@@ -64,9 +64,9 @@
virtual bool isReadable() const { return _isReadable; }
virtual bool isWritable() const { return _isWritable; }
- virtual AbstractFilesystemNode *getChild(const Common::String &n) const;
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFilesystemNode *getParent() const;
+ virtual AbstractFSNode *getParent() const;
virtual Common::SeekableReadStream *openForReading();
virtual Common::WriteStream *openForWriting();
@@ -114,7 +114,7 @@
return stat(_path.c_str (), &st) == 0;
}
-AbstractFilesystemNode *WiiFilesystemNode::getChild(const Common::String &n) const {
+AbstractFSNode *WiiFilesystemNode::getChild(const Common::String &n) const {
assert(_isDirectory);
Common::String newPath(_path);
@@ -147,8 +147,8 @@
bool isDir = S_ISDIR(st.st_mode);
- if ((mode == Common::FilesystemNode::kListFilesOnly && isDir) ||
- (mode == Common::FilesystemNode::kListDirectoriesOnly && !isDir))
+ if ((mode == Common::FSNode::kListFilesOnly && isDir) ||
+ (mode == Common::FSNode::kListDirectoriesOnly && !isDir))
continue;
if (isDir)
@@ -162,7 +162,7 @@
return true;
}
-AbstractFilesystemNode *WiiFilesystemNode::getParent() const {
+AbstractFSNode *WiiFilesystemNode::getParent() const {
if (_path == "/")
return 0;
Modified: scummvm/branches/gsoc2008-gui/backends/fs/windows/windows-fs-factory.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/windows/windows-fs-factory.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/windows/windows-fs-factory.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -26,15 +26,15 @@
#include "backends/fs/windows/windows-fs-factory.h"
#include "backends/fs/windows/windows-fs.cpp"
-AbstractFilesystemNode *WindowsFilesystemFactory::makeRootFileNode() const {
+AbstractFSNode *WindowsFilesystemFactory::makeRootFileNode() const {
return new WindowsFilesystemNode();
}
-AbstractFilesystemNode *WindowsFilesystemFactory::makeCurrentDirectoryFileNode() const {
+AbstractFSNode *WindowsFilesystemFactory::makeCurrentDirectoryFileNode() const {
return new WindowsFilesystemNode("", true);
}
-AbstractFilesystemNode *WindowsFilesystemFactory::makeFileNodePath(const Common::String &path) const {
+AbstractFSNode *WindowsFilesystemFactory::makeFileNodePath(const Common::String &path) const {
return new WindowsFilesystemNode(path, false);
}
#endif
Modified: scummvm/branches/gsoc2008-gui/backends/fs/windows/windows-fs-factory.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/windows/windows-fs-factory.h 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/windows/windows-fs-factory.h 2008-10-05 11:21:07 UTC (rev 34749)
@@ -34,9 +34,9 @@
*/
class WindowsFilesystemFactory : public FilesystemFactory {
public:
- virtual AbstractFilesystemNode *makeRootFileNode() const;
- virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
- virtual AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const;
+ virtual AbstractFSNode *makeRootFileNode() const;
+ virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
+ virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
};
#endif /*WINDOWS_FILESYSTEM_FACTORY_H*/
Modified: scummvm/branches/gsoc2008-gui/backends/fs/windows/windows-fs.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/fs/windows/windows-fs.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/fs/windows/windows-fs.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -55,9 +55,9 @@
/**
* Implementation of the ScummVM file system API based on Windows API.
*
- * Parts of this class are documented in the base interface class, AbstractFilesystemNode.
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
*/
-class WindowsFilesystemNode : public AbstractFilesystemNode {
+class WindowsFilesystemNode : public AbstractFSNode {
protected:
Common::String _displayName;
Common::String _path;
@@ -95,9 +95,9 @@
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 Common::String &n) const;
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFilesystemNode *getParent() const;
+ virtual AbstractFSNode *getParent() const;
virtual Common::SeekableReadStream *openForReading();
virtual Common::WriteStream *openForWriting();
@@ -142,8 +142,8 @@
isDirectory = (find_data->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ? true : false);
- if ((!isDirectory && mode == Common::FilesystemNode::kListDirectoriesOnly) ||
- (isDirectory && mode == Common::FilesystemNode::kListFilesOnly))
+ if ((!isDirectory && mode == Common::FSNode::kListDirectoriesOnly) ||
+ (isDirectory && mode == Common::FSNode::kListFilesOnly))
return;
entry._isDirectory = isDirectory;
@@ -223,7 +223,7 @@
_isPseudoRoot = false;
}
-AbstractFilesystemNode *WindowsFilesystemNode::getChild(const Common::String &n) const {
+AbstractFSNode *WindowsFilesystemNode::getChild(const Common::String &n) const {
assert(_isDirectory);
Common::String newPath(_path);
@@ -285,7 +285,7 @@
return true;
}
-AbstractFilesystemNode *WindowsFilesystemNode::getParent() const {
+AbstractFSNode *WindowsFilesystemNode::getParent() const {
assert(_isValid || _isPseudoRoot);
if (_isPseudoRoot)
Modified: scummvm/branches/gsoc2008-gui/backends/platform/dc/dc-fs.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/dc/dc-fs.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/platform/dc/dc-fs.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -33,9 +33,9 @@
/**
* Implementation of the ScummVM file system API based on Ronin.
*
- * Parts of this class are documented in the base interface class, AbstractFilesystemNode.
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
*/
-class RoninCDFileNode : public AbstractFilesystemNode {
+class RoninCDFileNode : public AbstractFSNode {
protected:
Common::String _path;
@@ -49,14 +49,14 @@
virtual bool isReadable() const { return true; }
virtual bool isWritable() const { return false; }
- virtual AbstractFilesystemNode *getChild(const Common::String &n) const { return NULL; }
+ virtual AbstractFSNode *getChild(const Common::String &n) const { return NULL; }
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const { return false; }
- virtual AbstractFilesystemNode *getParent() const;
+ virtual AbstractFSNode *getParent() const;
virtual Common::SeekableReadStream *openForReading();
virtual Common::WriteStream *openForWriting() { return 0; }
- static AbstractFilesystemNode *makeFileNodePath(const Common::String &path);
+ static AbstractFSNode *makeFileNodePath(const Common::String &path);
};
/* A directory */
@@ -65,7 +65,7 @@
RoninCDDirectoryNode(const Common::String &path) : RoninCDFileNode(path) {};
virtual bool isDirectory() const { return true; }
- virtual AbstractFilesystemNode *getChild(const Common::String &n) const;
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual Common::SeekableReadStream *openForReading() { return 0; }
};
@@ -80,7 +80,7 @@
virtual Common::SeekableReadStream *openForReading() { return 0; }
};
-AbstractFilesystemNode *RoninCDFileNode::makeFileNodePath(const Common::String &path) {
+AbstractFSNode *RoninCDFileNode::makeFileNodePath(const Common::String &path) {
assert(path.size() > 0);
int fd;
@@ -96,7 +96,7 @@
}
}
-AbstractFilesystemNode *RoninCDDirectoryNode::getChild(const Common::String &n) const {
+AbstractFSNode *RoninCDDirectoryNode::getChild(const Common::String &n) const {
Common::String newPath(_path);
if (_path.lastChar() != '/')
newPath += '/';
@@ -122,13 +122,13 @@
if (dp->d_size < 0) {
// Honor the chosen mode
- if (mode == Common::FilesystemNode::kListFilesOnly)
+ if (mode == Common::FSNode::kListFilesOnly)
continue;
myList.push_back(new RoninCDDirectoryNode(newPath+"/"));
} else {
// Honor the chosen mode
- if (mode == Common::FilesystemNode::kListDirectoriesOnly)
+ if (mode == Common::FSNode::kListDirectoriesOnly)
continue;
myList.push_back(new RoninCDFileNode(newPath));
@@ -139,7 +139,7 @@
return true;
}
-AbstractFilesystemNode *RoninCDFileNode::getParent() const {
+AbstractFSNode *RoninCDFileNode::getParent() const {
if (_path == "/")
return 0;
@@ -154,16 +154,16 @@
return StdioStream::makeFromPath(getPath().c_str(), false);
}
-AbstractFilesystemNode *OSystem_Dreamcast::makeRootFileNode() const {
+AbstractFSNode *OSystem_Dreamcast::makeRootFileNode() const {
return new RoninCDDirectoryNode("/");
}
-AbstractFilesystemNode *OSystem_Dreamcast::makeCurrentDirectoryFileNode() const {
+AbstractFSNode *OSystem_Dreamcast::makeCurrentDirectoryFileNode() const {
return makeRootFileNode();
}
-AbstractFilesystemNode *OSystem_Dreamcast::makeFileNodePath(const Common::String &path) const {
- AbstractFilesystemNode *node = RoninCDFileNode::makeFileNodePath(path);
+AbstractFSNode *OSystem_Dreamcast::makeFileNodePath(const Common::String &path) const {
+ AbstractFSNode *node = RoninCDFileNode::makeFileNodePath(path);
return (node? node : new RoninCDNonexistingNode(path));
}
Modified: scummvm/branches/gsoc2008-gui/backends/platform/dc/dc.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/dc/dc.h 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/platform/dc/dc.h 2008-10-05 11:21:07 UTC (rev 34749)
@@ -189,9 +189,9 @@
// Filesystem
FilesystemFactory *getFilesystemFactory() { return this; }
- AbstractFilesystemNode *makeRootFileNode() const;
- AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
- AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const;
+ AbstractFSNode *makeRootFileNode() const;
+ AbstractFSNode *makeCurrentDirectoryFileNode() const;
+ AbstractFSNode *makeFileNodePath(const Common::String &path) const;
private:
Modified: scummvm/branches/gsoc2008-gui/backends/platform/dc/selector.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/dc/selector.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/platform/dc/selector.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -146,12 +146,12 @@
{
char name[252];
char deficon[256];
- Common::FilesystemNode node;
+ Common::FSNode node;
};
static Game the_game;
-static bool isIcon(const Common::FilesystemNode &entry)
+static bool isIcon(const Common::FSNode &entry)
{
int l = entry.getDisplayName().size();
if (l>4 && !strcasecmp(entry.getDisplayName().c_str()+l-4, ".ICO"))
@@ -198,13 +198,13 @@
{
Dir *dirs = new Dir[MAX_DIR];
int curr_game = 0, curr_dir = 0, num_dirs = 1;
- dirs[0].node = Common::FilesystemNode("");
+ dirs[0].node = Common::FSNode("");
while (curr_game < max && curr_dir < num_dirs) {
strncpy(dirs[curr_dir].name, dirs[curr_dir].node.getPath().c_str(), 252);
dirs[curr_dir].name[251] = '\0';
dirs[curr_dir].deficon[0] = '\0';
Common::FSList files, fslist;
- dirs[curr_dir++].node.getChildren(fslist, Common::FilesystemNode::kListAll);
+ dirs[curr_dir++].node.getChildren(fslist, Common::FSNode::kListAll);
for (Common::FSList::const_iterator entry = fslist.begin(); entry != fslist.end();
++entry) {
if (entry->isDirectory()) {
Modified: scummvm/branches/gsoc2008-gui/backends/platform/sdl/sdl.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/sdl/sdl.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/platform/sdl/sdl.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -280,7 +280,7 @@
#ifdef DATA_PATH
// Add the global DATA_PATH to the directory search list
// FIXME: We use depth = 4 for now, to match the old code. May want to change that
- Common::FilesystemNode dataNode(DATA_PATH);
+ Common::FSNode dataNode(DATA_PATH);
if (dataNode.exists() && dataNode.isDirectory()) {
Common::ArchivePtr dataArchive(new Common::FSDirectory(dataNode, 4));
s.add(DATA_PATH, dataArchive, priority);
@@ -373,12 +373,12 @@
}
Common::SeekableReadStream *OSystem_SDL::openConfigFileForReading() {
- Common::FilesystemNode file(getDefaultConfigFileName());
+ Common::FSNode file(getDefaultConfigFileName());
return file.openForReading();
}
Common::WriteStream *OSystem_SDL::openConfigFileForWriting() {
- Common::FilesystemNode file(getDefaultConfigFileName());
+ Common::FSNode file(getDefaultConfigFileName());
return file.openForWriting();
}
Modified: scummvm/branches/gsoc2008-gui/backends/platform/symbian/src/SymbianOS.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/symbian/src/SymbianOS.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/platform/symbian/src/SymbianOS.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -124,12 +124,12 @@
}
Common::SeekableReadStream *OSystem_SDL_Symbian::openConfigFileForReading() {
- Common::FilesystemNode file(getDefaultConfigFileName());
+ Common::FSNode file(getDefaultConfigFileName());
return file.openForReading();
}
Common::WriteStream *OSystem_SDL_Symbian::openConfigFileForWriting() {
- Common::FilesystemNode file(getDefaultConfigFileName());
+ Common::FSNode file(getDefaultConfigFileName());
return file.openForWriting();
}
Modified: scummvm/branches/gsoc2008-gui/backends/platform/wince/CELauncherDialog.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/wince/CELauncherDialog.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/platform/wince/CELauncherDialog.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -72,10 +72,10 @@
}
}
-void CELauncherDialog::automaticScanDirectory(const Common::FilesystemNode &node) {
+void CELauncherDialog::automaticScanDirectory(const Common::FSNode &node) {
// First check if we have a recognized game in the current directory
Common::FSList files;
- node.getChildren(files, Common::FilesystemNode::kListFilesOnly);
+ node.getChildren(files, Common::FSNode::kListFilesOnly);
// detect
GameList candidates(EngineMan.detectGames(files));
// insert
@@ -86,7 +86,7 @@
}
// Then recurse on the subdirectories
Common::FSList dirs;
- node.getChildren(dirs, Common::FilesystemNode::kListDirectoriesOnly);
+ node.getChildren(dirs, Common::FSNode::kListDirectoriesOnly);
for (Common::FSList::const_iterator currentDir = dirs.begin(); currentDir != dirs.end(); ++currentDir)
automaticScanDirectory(*currentDir);
Modified: scummvm/branches/gsoc2008-gui/backends/platform/wince/CELauncherDialog.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/platform/wince/CELauncherDialog.h 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/platform/wince/CELauncherDialog.h 2008-10-05 11:21:07 UTC (rev 34749)
@@ -36,7 +36,7 @@
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
protected:
void addGame();
- void automaticScanDirectory(const Common::FilesystemNode &node);
+ void automaticScanDirectory(const Common::FSNode &node);
};
typedef GUI::LauncherDialog GUILauncherDialog;
Modified: scummvm/branches/gsoc2008-gui/backends/plugins/dc/dc-provider.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/plugins/dc/dc-provider.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/plugins/dc/dc-provider.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -27,6 +27,7 @@
#include "backends/plugins/dc/dc-provider.h"
#include "backends/plugins/dynamic-plugin.h"
+#include "common/fs.h"
#include "dcloader.h"
@@ -83,12 +84,13 @@
};
-Plugin* DCPluginProvider::createPlugin(const Common::String &filename) const {
- return new DCPlugin(filename);
+Plugin* DCPluginProvider::createPlugin(const Common::FSNode &node) const {
+ return new DCPlugin(node.getPath());
}
-bool DCPluginProvider::isPluginFilename(const Common::String &filename) const {
+bool DCPluginProvider::isPluginFilename(const Common::FSNode &node) const {
// Check the plugin suffix
+ Common::String filename = node.getName();
if (!filename.hasSuffix(".PLG"))
return false;
Modified: scummvm/branches/gsoc2008-gui/backends/plugins/dc/dc-provider.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/plugins/dc/dc-provider.h 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/plugins/dc/dc-provider.h 2008-10-05 11:21:07 UTC (rev 34749)
@@ -32,9 +32,9 @@
class DCPluginProvider : public FilePluginProvider {
protected:
- Plugin* createPlugin(const Common::String &filename) const;
+ Plugin* createPlugin(const Common::FSNode &node) const;
- bool isPluginFilename(const Common::String &filename) const;
+ bool isPluginFilename(const Common::FSNode &node) const;
virtual void addCustomDirectories(Common::StringList &dirs) const {
dirs.push_back("/");
Modified: scummvm/branches/gsoc2008-gui/backends/plugins/posix/posix-provider.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/plugins/posix/posix-provider.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/plugins/posix/posix-provider.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -27,6 +27,7 @@
#include "backends/plugins/posix/posix-provider.h"
#include "backends/plugins/dynamic-plugin.h"
+#include "common/fs.h"
#include <dlfcn.h>
@@ -78,8 +79,8 @@
};
-Plugin* POSIXPluginProvider::createPlugin(const Common::String &filename) const {
- return new POSIXPlugin(filename);
+Plugin* POSIXPluginProvider::createPlugin(const Common::FSNode &node) const {
+ return new POSIXPlugin(node.getPath());
}
Modified: scummvm/branches/gsoc2008-gui/backends/plugins/posix/posix-provider.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/plugins/posix/posix-provider.h 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/plugins/posix/posix-provider.h 2008-10-05 11:21:07 UTC (rev 34749)
@@ -32,7 +32,7 @@
class POSIXPluginProvider : public FilePluginProvider {
protected:
- Plugin* createPlugin(const Common::String &filename) const;
+ Plugin* createPlugin(const Common::FSNode &node) const;
};
#endif // defined(DYNAMIC_MODULES) && defined(UNIX)
Modified: scummvm/branches/gsoc2008-gui/backends/plugins/sdl/sdl-provider.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/plugins/sdl/sdl-provider.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/plugins/sdl/sdl-provider.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -27,6 +27,7 @@
#include "backends/plugins/sdl/sdl-provider.h"
#include "backends/plugins/dynamic-plugin.h"
+#include "common/fs.h"
#include "SDL.h"
#include "SDL_loadso.h"
@@ -78,8 +79,8 @@
};
-Plugin* SDLPluginProvider::createPlugin(const Common::String &filename) const {
- return new SDLPlugin(filename);
+Plugin* SDLPluginProvider::createPlugin(const Common::FSNode &node) const {
+ return new SDLPlugin(node.getPath());
}
Modified: scummvm/branches/gsoc2008-gui/backends/plugins/sdl/sdl-provider.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/plugins/sdl/sdl-provider.h 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/plugins/sdl/sdl-provider.h 2008-10-05 11:21:07 UTC (rev 34749)
@@ -32,7 +32,7 @@
class SDLPluginProvider : public FilePluginProvider {
protected:
- Plugin* createPlugin(const Common::String &filename) const;
+ Plugin* createPlugin(const Common::FSNode &node) const;
};
#endif // defined(DYNAMIC_MODULES) && defined(UNIX)
Modified: scummvm/branches/gsoc2008-gui/backends/plugins/win32/win32-provider.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/plugins/win32/win32-provider.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/plugins/win32/win32-provider.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -27,6 +27,7 @@
#include "backends/plugins/win32/win32-provider.h"
#include "backends/plugins/dynamic-plugin.h"
+#include "common/fs.h"
#include <windows.h>
@@ -96,12 +97,13 @@
};
-Plugin* Win32PluginProvider::createPlugin(const Common::String &filename) const {
- return new Win32Plugin(filename);
+Plugin* Win32PluginProvider::createPlugin(const Common::FSNode &node) const {
+ return new Win32Plugin(node.getPath());
}
-bool Win32PluginProvider::isPluginFilename(const Common::String &filename) const {
+bool Win32PluginProvider::isPluginFilename(const Common::FSNode &node) const {
// Check the plugin suffix
+ Common::String filename = node.getName();
if (!filename.hasSuffix(".dll"))
return false;
Modified: scummvm/branches/gsoc2008-gui/backends/plugins/win32/win32-provider.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/plugins/win32/win32-provider.h 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/plugins/win32/win32-provider.h 2008-10-05 11:21:07 UTC (rev 34749)
@@ -32,9 +32,9 @@
class Win32PluginProvider : public FilePluginProvider {
protected:
- Plugin* createPlugin(const Common::String &filename) const;
+ Plugin* createPlugin(const Common::FSNode &node) const;
- bool isPluginFilename(const Common::String &filename) const;
+ bool isPluginFilename(const Common::FSNode &node) const;
virtual void addCustomDirectories(Common::StringList &dirs) const {}
};
Modified: scummvm/branches/gsoc2008-gui/backends/saves/default/default-saves.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/saves/default/default-saves.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/saves/default/default-saves.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -71,7 +71,7 @@
Common::StringList DefaultSaveFileManager::listSavefiles(const char *pattern) {
- Common::FilesystemNode savePath(getSavePath());
+ Common::FSNode savePath(getSavePath());
Common::FSList savefiles;
Common::StringList results;
Common::String search(pattern);
@@ -85,7 +85,7 @@
return results;
}
-void DefaultSaveFileManager::checkPath(const Common::FilesystemNode &dir) {
+void DefaultSaveFileManager::checkPath(const Common::FSNode &dir) {
const Common::String path = dir.getPath();
clearError();
@@ -152,7 +152,7 @@
#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.
+ // add a mkdir method to FSNode 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);
@@ -162,11 +162,11 @@
Common::InSaveFile *DefaultSaveFileManager::openForLoading(const char *filename) {
// Ensure that the savepath is valid. If not, generate an appropriate error.
- Common::FilesystemNode savePath(getSavePath());
+ Common::FSNode savePath(getSavePath());
checkPath(savePath);
if (getError() == SFM_NO_ERROR) {
- Common::FilesystemNode file = savePath.getChild(filename);
+ Common::FSNode file = savePath.getChild(filename);
// Open the file for reading
Common::SeekableReadStream *sf = file.openForReading();
@@ -179,11 +179,11 @@
Common::OutSaveFile *DefaultSaveFileManager::openForSaving(const char *filename) {
// Ensure that the savepath is valid. If not, generate an appropriate error.
- Common::FilesystemNode savePath(getSavePath());
+ Common::FSNode savePath(getSavePath());
checkPath(savePath);
if (getError() == SFM_NO_ERROR) {
- Common::FilesystemNode file = savePath.getChild(filename);
+ Common::FSNode file = savePath.getChild(filename);
// Open the file for saving
Common::WriteStream *sf = file.openForWriting();
@@ -197,10 +197,10 @@
bool DefaultSaveFileManager::removeSavefile(const char *filename) {
clearError();
- Common::FilesystemNode savePath(getSavePath());
- Common::FilesystemNode file = savePath.getChild(filename);
+ Common::FSNode savePath(getSavePath());
+ Common::FSNode file = savePath.getChild(filename);
- // TODO: Add new method FilesystemNode::remove()
+ // TODO: Add new method FSNode::remove()
if (remove(file.getPath().c_str()) != 0) {
#ifndef _WIN32_WCE
if (errno == EACCES)
Modified: scummvm/branches/gsoc2008-gui/backends/saves/default/default-saves.h
===================================================================
--- scummvm/branches/gsoc2008-gui/backends/saves/default/default-saves.h 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/backends/saves/default/default-saves.h 2008-10-05 11:21:07 UTC (rev 34749)
@@ -55,7 +55,7 @@
* Checks the given path for read access, existence, etc.
* Sets the internal error and error message accordingly.
*/
- void checkPath(const Common::FilesystemNode &dir);
+ void checkPath(const Common::FSNode &dir);
};
#endif
Modified: scummvm/branches/gsoc2008-gui/base/commandLine.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/base/commandLine.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/base/commandLine.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -365,7 +365,7 @@
END_OPTION
DO_OPTION('p', "path")
- Common::FilesystemNode path(option);
+ Common::FSNode path(option);
if (!path.exists()) {
usage("Non-existent game path '%s'", option);
} else if (!path.isReadable()) {
@@ -408,7 +408,7 @@
END_OPTION
DO_LONG_OPTION("soundfont")
- Common::FilesystemNode path(option);
+ Common::FSNode path(option);
if (!path.exists()) {
usage("Non-existent soundfont path '%s'", option);
} else if (!path.isReadable()) {
@@ -438,7 +438,7 @@
END_OPTION
DO_LONG_OPTION("savepath")
- Common::FilesystemNode path(option);
+ Common::FSNode path(option);
if (!path.exists()) {
usage("Non-existent savegames path '%s'", option);
} else if (!path.isWritable()) {
@@ -447,7 +447,7 @@
END_OPTION
DO_LONG_OPTION("extrapath")
- Common::FilesystemNode path(option);
+ Common::FSNode path(option);
if (!path.exists()) {
usage("Non-existent extra path '%s'", option);
} else if (!path.isReadable()) {
@@ -465,7 +465,7 @@
END_OPTION
DO_LONG_OPTION("themepath")
- Common::FilesystemNode path(option);
+ Common::FSNode path(option);
if (!path.exists()) {
usage("Non-existent theme path '%s'", option);
} else if (!path.isReadable()) {
@@ -623,9 +623,9 @@
gameid = name;
}
- Common::FilesystemNode dir(path);
+ Common::FSNode dir(path);
Common::FSList files;
- if (!dir.getChildren(files, Common::FilesystemNode::kListAll)) {
+ if (!dir.getChildren(files, Common::FSNode::kListAll)) {
printf(" ... invalid path, skipping\n");
continue;
}
@@ -736,7 +736,7 @@
if (!settings.contains("savepath")) {
const char *dir = getenv("SCUMMVM_SAVEPATH");
if (dir && *dir && strlen(dir) < MAXPATHLEN) {
- Common::FilesystemNode saveDir(dir);
+ Common::FSNode saveDir(dir);
if (!saveDir.exists()) {
warning("Non-existent SCUMMVM_SAVEPATH save path. It will be ignored.");
} else if (!saveDir.isWritable()) {
Modified: scummvm/branches/gsoc2008-gui/base/plugins.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/base/plugins.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/base/plugins.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -207,8 +207,8 @@
Common::FSList pluginDirs;
// Add the default directories
- pluginDirs.push_back(Common::FilesystemNode("."));
- pluginDirs.push_back(Common::FilesystemNode("plugins"));
+ pluginDirs.push_back(Common::FSNode("."));
+ pluginDirs.push_back(Common::FSNode("plugins"));
// Add the provider's custom directories
addCustomDirectories(pluginDirs);
@@ -216,14 +216,14 @@
// Add the user specified directory
Common::String pluginsPath(ConfMan.get("pluginspath"));
if (!pluginsPath.empty())
- pluginDirs.push_back(Common::FilesystemNode(pluginsPath));
+ pluginDirs.push_back(Common::FSNode(pluginsPath));
Common::FSList::const_iterator dir;
for (dir = pluginDirs.begin(); dir != pluginDirs.end(); dir++) {
// Load all plugins.
// Scan for all plugins in this directory
Common::FSList files;
- if (!dir->getChildren(files, Common::FilesystemNode::kListFilesOnly)) {
+ if (!dir->getChildren(files, Common::FSNode::kListFilesOnly)) {
debug(1, "Couldn't open plugin directory '%s'", dir->getPath().c_str());
continue;
} else {
@@ -231,8 +231,8 @@
}
for (Common::FSList::const_iterator i = files.begin(); i != files.end(); ++i) {
- if (isPluginFilename(i->getName())) {
- pl.push_back(createPlugin(i->getPath()));
+ if (isPluginFilename(*i)) {
+ pl.push_back(createPlugin(*i));
}
}
}
@@ -240,7 +240,9 @@
return pl;
}
-bool FilePluginProvider::isPluginFilename(const Common::String &filename) const {
+bool FilePluginProvider::isPluginFilename(const Common::FSNode &node) const {
+ Common::String filename = node.getName();
+
#ifdef PLUGIN_PREFIX
// Check the plugin prefix
if (!filename.hasPrefix(PLUGIN_PREFIX))
@@ -258,7 +260,7 @@
void FilePluginProvider::addCustomDirectories(Common::FSList &dirs) const {
#ifdef PLUGIN_DIRECTORY
- dirs.push_back(Common::FilesystemNode(PLUGIN_DIRECTORY));
+ dirs.push_back(Common::FSNode(PLUGIN_DIRECTORY));
#endif
}
Modified: scummvm/branches/gsoc2008-gui/base/plugins.h
===================================================================
--- scummvm/branches/gsoc2008-gui/base/plugins.h 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/base/plugins.h 2008-10-05 11:21:07 UTC (rev 34749)
@@ -32,6 +32,7 @@
namespace Common {
class FSList;
+ class FSNode;
}
@@ -238,19 +239,19 @@
* Subclasses of FilePluginProvider have to at least overload this method.
* If the file is not found, or does not contain loadable code, 0 is returned instead.
*
- * @param filename the name of the loadable code module
+ * @param node the FSNode of the loadable code module
* @return a pointer to a Plugin instance, or 0 if an error occurred.
*/
- virtual Plugin *createPlugin(const Common::String &filename) const = 0;
+ virtual Plugin *createPlugin(const Common::FSNode &node) const = 0;
/**
- * Check if the supplied filename corresponds to a loadable plugin file in
- * the current platform.
+ * Check if the supplied file corresponds to a loadable plugin file in
+ * the current platform. Usually, this will just check the file name.
*
- * @param filename the name of the file to check
+ * @param node the FSNode of the file to check
* @return true if the filename corresponds to a plugin, false otherwise
*/
- virtual bool isPluginFilename(const Common::String &filename) const;
+ virtual bool isPluginFilename(const Common::FSNode &node) const;
/**
* Optionally add to the list of directories to be searched for
Modified: scummvm/branches/gsoc2008-gui/common/advancedDetector.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/common/advancedDetector.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/common/advancedDetector.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -246,9 +246,9 @@
path = ".";
warning("No path was provided. Assuming the data files are in the current directory");
}
- FilesystemNode dir(path);
+ FSNode dir(path);
FSList files;
- if (!dir.isDirectory() || !dir.getChildren(files, FilesystemNode::kListAll)) {
+ if (!dir.isDirectory() || !dir.getChildren(files, FSNode::kListAll)) {
warning("Game data path does not exist or is not a directory (%s)", path.c_str());
return kNoGameDataFoundError;
}
@@ -290,6 +290,7 @@
typedef HashMap<String, bool, IgnoreCase_Hash, IgnoreCase_EqualTo> StringSet;
typedef HashMap<String, int32, IgnoreCase_Hash, IgnoreCase_EqualTo> IntMap;
+typedef HashMap<String, FSNode, IgnoreCase_Hash, IgnoreCase_EqualTo> FileMap;
static void reportUnknown(const StringMap &filesMD5, const IntMap &filesSize) {
// TODO: This message should be cleaned up / made more specific.
@@ -307,10 +308,10 @@
printf("\n");
}
-static ADGameDescList detectGameFilebased(const StringMap &allFiles, const Common::ADParams ¶ms);
+static ADGameDescList detectGameFilebased(const FileMap &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;
+ FileMap allFiles;
StringSet detectFiles;
StringMap filesMD5;
@@ -334,7 +335,7 @@
if (tstr.lastChar() == '.')
tstr.deleteLastChar();
- allFiles[tstr] = file->getPath(); // Record the presence of this file
+ allFiles[tstr] = *file; // Record the presence of this file
}
// Compute the set of files for which we need MD5s for. I.e. files which are
@@ -356,7 +357,7 @@
debug(3, "+ %s", fname.c_str());
char md5str[32+1];
- if (!md5_file_string(allFiles[fname].c_str(), md5str, params.md5Bytes))
+ if (!md5_file_string(allFiles[fname], md5str, params.md5Bytes))
continue;
filesMD5[fname] = md5str;
@@ -464,7 +465,7 @@
* 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) {
+static ADGameDescList detectGameFilebased(const FileMap &allFiles, const Common::ADParams ¶ms) {
const ADFileBasedFallback *ptr;
const char* const* filenames;
Modified: scummvm/branches/gsoc2008-gui/common/archive.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/common/archive.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/common/archive.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -30,11 +30,23 @@
namespace Common {
+GenericArchiveMember::GenericArchiveMember(String name, Archive *parent)
+ : _parent(parent), _name(name) {
+}
-int Archive::matchPattern(StringList &list, const String &pattern) {
+String GenericArchiveMember::getName() const {
+ return _name;
+}
+
+SeekableReadStream *GenericArchiveMember::open() {
+ return _parent->openFile(_name);
+}
+
+
+int Archive::listMatchingMembers(ArchiveMemberList &list, const String &pattern) {
// Get all "names" (TODO: "files" ?)
- StringList allNames;
- getAllNames(allNames);
+ ArchiveMemberList allNames;
+ listMembers(allNames);
int matches = 0;
@@ -42,9 +54,9 @@
String lowercasePattern = pattern;
lowercasePattern.toLowercase();
- StringList::iterator it = allNames.begin();
+ ArchiveMemberList::iterator it = allNames.begin();
for ( ; it != allNames.end(); it++) {
- if (it->matchString(lowercasePattern)) {
+ if ((*it)->getName().matchString(lowercasePattern)) {
list.push_back(*it);
matches++;
}
@@ -53,8 +65,36 @@
return matches;
}
+/**
+ * FSDirectoryMemeber is the implementation of ArchiveMember used by
+ * by FSDirectory. It is right now a light wrapper or FSNode.
+ */
+class FSDirectoryMember : public ArchiveMember {
+ FSNode _node;
+
+public:
+ FSDirectoryMember(FSNode &node) : _node(node) {
+ }
-FSDirectory::FSDirectory(const FilesystemNode &node, int depth)
+ /*
+ NOTE/FIXME: since I assume that the only use case for getName()
+ is for error messages, I am returning the full path of the node
+ here. This seems better than we did before, when matchPattern
+ and getAllNames used to work with StringList, and we used to
+ put the relative path of the file to the list instead.
+ */
+ String getName() const {
+ return _node.getPath();
+ }
+
+ SeekableReadStream *open() {
+ return _node.openForReading();
+ }
+};
+
+typedef SharedPtr<FSDirectoryMember> FSDirectoryMemberPtr;
+
+FSDirectory::FSDirectory(const FSNode &node, int depth)
: _node(node), _cached(false), _depth(depth) {
}
@@ -65,11 +105,11 @@
FSDirectory::~FSDirectory() {
}
-FilesystemNode FSDirectory::getFSNode() const {
+FSNode FSDirectory::getFSNode() const {
return _node;
}
-FilesystemNode FSDirectory::lookupCache(NodeCache &cache, const String &name) {
+FSNode FSDirectory::lookupCache(NodeCache &cache, const String &name) {
// make caching as lazy as possible
if (!name.empty()) {
if (!_cached) {
@@ -81,7 +121,7 @@
return cache[name];
}
- return FilesystemNode();
+ return FSNode();
}
bool FSDirectory::hasFile(const String &name) {
@@ -89,7 +129,7 @@
return false;
}
- FilesystemNode node = lookupCache(_fileCache, name);
+ FSNode node = lookupCache(_fileCache, name);
return node.exists();
}
@@ -98,13 +138,13 @@
return 0;
}
- FilesystemNode node = lookupCache(_fileCache, name);
+ FSNode node = lookupCache(_fileCache, name);
if (!node.exists()) {
- warning("FSDirectory::openFile: FilesystemNode does not exist");
+ warning("FSDirectory::openFile: FSNode does not exist");
return 0;
} else if (node.isDirectory()) {
- warning("FSDirectory::openFile: FilesystemNode is a directory");
+ warning("FSDirectory::openFile: FSNode is a directory");
return 0;
}
@@ -121,17 +161,17 @@
return 0;
}
- FilesystemNode node = lookupCache(_subDirCache, name);
+ FSNode node = lookupCache(_subDirCache, name);
return new FSDirectory(node);
}
-void FSDirectory::cacheDirectoryRecursive(FilesystemNode node, int depth, const String& prefix) {
+void FSDirectory::cacheDirectoryRecursive(FSNode node, int depth, const String& prefix) {
if (depth <= 0) {
return;
}
FSList list;
- node.getChildren(list, FilesystemNode::kListAll, false);
+ node.getChildren(list, FSNode::kListAll, false);
FSList::iterator it = list.begin();
for ( ; it != list.end(); it++) {
@@ -160,7 +200,7 @@
}
-int FSDirectory::matchPattern(StringList &list, const String &pattern) {
+int FSDirectory::listMatchingMembers(ArchiveMemberList &list, const String &pattern) {
if (!_node.isDirectory())
return 0;
@@ -170,40 +210,25 @@
_cached = true;
}
- // Small optimization: Ensure the StringList has to grow at most once
- list.reserve(list.size() + _fileCache.size());
-
- // Add all filenames from our cache
+ String lowercasePattern(pattern);
+ lowercasePattern.toLowercase();
+
+ int matches = 0;
NodeCache::iterator it = _fileCache.begin();
for ( ; it != _fileCache.end(); it++) {
- if (it->_key.matchString(pattern))
- list.push_back(it->_key);
+ if ((*it)._key.matchString(lowercasePattern)) {
+ list.push_back(FSDirectoryMemberPtr(new FSDirectoryMember((*it)._value)));
+ matches++;
+ }
}
-
- return _fileCache.size();
+ return matches;
}
-int FSDirectory::getAllNames(StringList &list) {
- if (!_node.isDirectory())
- return 0;
+int FSDirectory::listMembers(ArchiveMemberList &list) {
+ return listMatchingMembers(list, "*");
+}
- // Cache dir data
- if (!_cached) {
- cacheDirectoryRecursive(_node, _depth, "");
- _cached = true;
- }
- // Small optimization: Ensure the StringList has to grow at most once
- list.reserve(list.size() + _fileCache.size());
-
- // Add all filenames from our cache
- NodeCache::iterator it = _fileCache.begin();
- for ( ; it != _fileCache.end(); it++) {
- list.push_back((*it)._key);
- }
-
- return _fileCache.size();
-}
@@ -234,7 +259,7 @@
void SearchSet::add(const String& name, ArchivePtr archive, int priority) {
if (find(name) == _list.end()) {
- Node node = { priority, name, archive };
+ Node node(priority, name, archive);
insert(node);
} else {
warning("SearchSet::add: archive '%s' already present", name.c_str());
@@ -289,23 +314,23 @@
return false;
}
-int SearchSet::matchPattern(StringList &list, const String &pattern) {
+int SearchSet::listMatchingMembers(ArchiveMemberList &list, const String &pattern) {
int matches = 0;
ArchiveList::iterator it = _list.begin();
for ( ; it != _list.end(); it++) {
- matches += (*it)._arc->matchPattern(list, pattern);
+ matches += (*it)._arc->listMatchingMembers(list, pattern);
}
return matches;
}
-int SearchSet::getAllNames(StringList &list) {
+int SearchSet::listMembers(ArchiveMemberList &list) {
int matches = 0;
ArchiveList::iterator it = _list.begin();
for ( ; it != _list.end(); it++) {
- matches += (*it)._arc->getAllNames(list);
+ matches += (*it)._arc->listMembers(list);
}
return matches;
@@ -352,6 +377,10 @@
// But we give them a lower priority than the default priority (which is 0),
// so that archives added by client code are searched first.
g_system->addSysArchivesToSearchSet(*this, -1);
+
+ // Add the current dir as a very last resort.
+ // See also bug #2137680.
+ add(".", ArchivePtr(new FSDirectory(".")), -2);
}
} // namespace Common
Modified: scummvm/branches/gsoc2008-gui/common/archive.h
===================================================================
--- scummvm/branches/gsoc2008-gui/common/archive.h 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/common/archive.h 2008-10-05 11:21:07 UTC (rev 34749)
@@ -36,7 +36,36 @@
namespace Common {
+class ArchiveMember {
+public:
+ virtual ~ArchiveMember() { }
+ virtual String getName() const = 0;
+ virtual SeekableReadStream *open() = 0;
+};
+
+typedef List<SharedPtr<ArchiveMember> > ArchiveMemberList;
+
+class Archive;
+
/**
+ * Simple ArchiveMemeber implementation which allows
+ * creation of ArchiveMember compatible objects via
+ * a simple Archive and name pair.
+ *
+ * Note that GenericArchiveMember objects will not
+ * be working anymore after the 'parent' object
+ * is destroyed.
+ */
+class GenericArchiveMember : public ArchiveMember {
+ Archive *_parent;
+ String _name;
+public:
+ GenericArchiveMember(String name, Archive *parent);
+ String getName() const;
+ SeekableReadStream *open();
+};
+
+/**
* FilePtr is a convenient way to keep track of a SeekableReadStream without
* having to worry about releasing its memory.
*/
@@ -63,7 +92,7 @@
*
* @return the number of names added to list
*/
- virtual int matchPattern(StringList &list, const String &pattern);
+ virtual int listMatchingMembers(ArchiveMemberList &list, const String &pattern);
/**
* Add all the names present in the Archive to list. Returned
@@ -72,7 +101,7 @@
*
* @return the number of names added to list
*/
- virtual int getAllNames(StringList &list) = 0;
+ virtual int listMembers(ArchiveMemberList &list) = 0;
/**
* Create a stream bound to a file in the archive.
@@ -93,21 +122,21 @@
* Searching is case-insensitive, as the main intended goal is supporting
* retrieval of game data. First case-insensitive match is returned when
* searching, thus making FSDirectory heavily dependant on the underlying
- * FilesystemNode implementation.
+ * FSNode implementation.
*/
class FSDirectory : public Archive {
- FilesystemNode _node;
+ FSNode _node;
// Caches are case insensitive, clashes are dealt with when creating
// Key is stored in lowercase.
- typedef HashMap<String, FilesystemNode, IgnoreCase_Hash, IgnoreCase_EqualTo> NodeCache;
+ typedef HashMap<String, FSNode, IgnoreCase_Hash, IgnoreCase_EqualTo> NodeCache;
NodeCache _fileCache, _subDirCache;
// look for a match
- FilesystemNode lookupCache(NodeCache &cache, const String &name);
+ FSNode lookupCache(NodeCache &cache, const String &name);
// cache management
- void cacheDirectoryRecursive(FilesystemNode node, int depth, const String& prefix);
+ void cacheDirectoryRecursive(FSNode node, int depth, const String& prefix);
bool _cached;
int _depth;
@@ -122,14 +151,14 @@
* Create a FSDirectory representing a tree with the specified depth. Will result in an
* unbound FSDirectory if node does not exist or is not a directory.
*/
- FSDirectory(const FilesystemNode &node, int depth = 1);
+ FSDirectory(const FSNode &node, int depth = 1);
virtual ~FSDirectory();
/**
* This return the underlying FSNode of the FSDirectory.
*/
- FilesystemNode getFSNode() const;
+ FSNode getFSNode() const;
/**
* Create a new FSDirectory pointing to a sub directory of the instance.
@@ -138,8 +167,8 @@
FSDirectory *getSubDirectory(const String &name);
virtual bool hasFile(const String &name);
- virtual int matchPattern(StringList &list, const String &pattern);
- virtual int getAllNames(StringList &list);
+ virtual int listMatchingMembers(ArchiveMemberList &list, const String &pattern);
+ virtual int listMembers(ArchiveMemberList &list);
virtual SeekableReadStream *openFile(const String &name);
};
@@ -156,6 +185,9 @@
int _priority;
String _name;
ArchivePtr _arc;
+ Node(int priority, const String &name, ArchivePtr arc)
+ : _priority(priority), _name(name), _arc(arc) {
+ }
};
typedef List<Node> ArchiveList;
ArchiveList _list;
@@ -192,8 +224,8 @@
void setPriority(const String& name, int priority);
virtual bool hasFile(const String &name);
- virtual int matchPattern(StringList &list, const String &pattern);
- virtual int getAllNames(StringList &list);
+ virtual int listMatchingMembers(ArchiveMemberList &list, const String &pattern);
+ virtual int listMembers(ArchiveMemberList &list);
/**
* Implements openFile from Archive base class. The current policy is
Modified: scummvm/branches/gsoc2008-gui/common/config-manager.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/common/config-manager.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/common/config-manager.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -77,8 +77,9 @@
void ConfigManager::loadConfigFile(const String &filename) {
_filename = filename;
+ FSNode node(filename);
File cfg_file;
- if (!cfg_file.open(filename)) {
+ if (!cfg_file.open(node)) {
printf("Creating configuration file: %s\n", filename.c_str());
} else {
printf("Using configuration file: %s\n", _filename.c_str());
Modified: scummvm/branches/gsoc2008-gui/common/file.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/common/file.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/common/file.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -32,20 +32,20 @@
namespace Common {
void File::addDefaultDirectory(const String &directory) {
- FilesystemNode dir(directory);
+ FSNode dir(directory);
addDefaultDirectoryRecursive(dir, 1);
}
void File::addDefaultDirectoryRecursive(const String &directory, int level) {
- FilesystemNode dir(directory);
+ FSNode dir(directory);
addDefaultDirectoryRecursive(dir, level);
}
-void File::addDefaultDirectory(const FilesystemNode &directory) {
+void File::addDefaultDirectory(const FSNode &directory) {
addDefaultDirectoryRecursive(directory, 1);
}
-void File::addDefaultDirectoryRecursive(const FilesystemNode &dir, int level) {
+void File::addDefaultDirectoryRecursive(const FSNode &dir, int level) {
if (level <= 0 || !dir.exists() || !dir.isDirectory())
return;
@@ -65,61 +65,59 @@
close();
}
-
bool File::open(const String &filename) {
+ return open(filename, SearchMan);
+}
+
+bool File::open(const String &filename, Archive &archive) {
assert(!filename.empty());
assert(!_handle);
- _name.clear();
clearIOFailed();
- if (SearchMan.hasFile(filename)) {
+ SeekableReadStream *stream = 0;
+ if (archive.hasFile(filename)) {
debug(3, "Opening hashed: %s", filename.c_str());
- _handle = SearchMan.openFile(filename);
- } else if (SearchMan.hasFile(filename + ".")) {
+ stream = archive.openFile(filename);
+ } else if (archive.hasFile(filename + ".")) {
// WORKAROUND: Bug #1458388: "SIMON1: Game Detection fails"
// sometimes instead of "GAMEPC" we get "GAMEPC." (note trailing dot)
debug(3, "Opening hashed: %s.", filename.c_str());
- _handle = SearchMan.openFile(filename + ".");
+ stream = archive.openFile(filename + ".");
}
- if (_handle == NULL)
- debug(2, "File::open: '%s' not found", filename.c_str());
- else
- _name = filename;
-
- return _handle != NULL;
+ return open(stream, filename);
}
-bool File::open(const FilesystemNode &node) {
+bool File::open(const FSNode &node) {
+ assert(!_handle);
if (!node.exists()) {
- warning("File::open: FilesystemNode does not exist");
+ warning("File::open: '%s' does not exist", node.getPath().c_str());
return false;
} else if (node.isDirectory()) {
- warning("File::open: FilesystemNode is a directory");
+ warning("File::open: '%s' is a directory", node.getPath().c_str());
return false;
}
- String filename(node.getName());
+ SeekableReadStream *stream = node.openForReading();
+ return open(stream, node.getPath());
+}
- if (_handle) {
- error("File::open: This file object already is opened (%s), won't open '%s'", _name.c_str(), filename.c_str());
- }
-
+bool File::open(SeekableReadStream *stream, const Common::String &name) {
+ assert(!_handle);
clearIOFailed();
- _name.clear();
- _handle = node.openForReading();
-
- if (_handle == NULL)
- debug(2, "File::open: '%s' not found", node.getPath().c_str());
- else
- _name = filename;
-
+ if (stream) {
+ _handle = stream;
+ _name = name;
+ } else {
+ debug(2, "File::open: opening '%s' failed", name.c_str());
+ }
return _handle != NULL;
}
+
bool File::exists(const String &filename) {
if (SearchMan.hasFile(filename)) {
return true;
@@ -198,15 +196,15 @@
assert(!filename.empty());
assert(!_handle);
- FilesystemNode node(filename);
+ FSNode node(filename);
return open(node);
}
-bool DumpFile::open(const FilesystemNode &node) {
+bool DumpFile::open(const FSNode &node) {
assert(!_handle);
if (node.isDirectory()) {
- warning("DumpFile::open: FilesystemNode is a directory");
+ warning("DumpFile::open: FSNode is a directory");
return false;
}
Modified: scummvm/branches/gsoc2008-gui/common/file.h
===================================================================
--- scummvm/branches/gsoc2008-gui/common/file.h 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/common/file.h 2008-10-05 11:21:07 UTC (rev 34749)
@@ -27,13 +27,14 @@
#define COMMON_FILE_H
#include "common/scummsys.h"
+#include "common/archive.h"
#include "common/noncopyable.h"
#include "common/str.h"
#include "common/stream.h"
namespace Common {
-class FilesystemNode;
+class FSNode;
/**
* TODO: vital to document this core class properly!!! For both users and implementors
@@ -43,7 +44,7 @@
/** File handle to the actual file; 0 if no file is open. */
SeekableReadStream *_handle;
- /** The name of this file, for debugging. */
+ /** The name of this file, kept for debugging purposes. */
String _name;
public:
@@ -51,11 +52,12 @@
static void addDefaultDirectory(const String &directory);
static void addDefaultDirectoryRecursive(const String &directory, int level = 4);
- static void addDefaultDirectory(const FilesystemNode &directory);
- static void addDefaultDirectoryRecursive(const FilesystemNode &directory, int level = 4);
+ static void addDefaultDirectory(const FSNode &directory);
+ static void addDefaultDirectoryRecursive(const FSNode &directory, int level = 4);
static void resetDefaultDirectories();
+
File();
virtual ~File();
@@ -64,14 +66,56 @@
* (those were/are added by addDefaultDirectory and/or
* addDefaultDirectoryRecursive).
*
- * @param filename: the file to check for
- * @return: true if the file exists, else false
+ * @param filename the file to check for
+ * @return true if the file exists, false otherwise
*/
static bool exists(const String &filename);
+ /**
+ * Try to open the file with the given filename, by searching SearchMan.
+ * @note Must not be called if this file already is open (i.e. if isOpen returns true).
+ *
+ * @param filename the name of the file to open
+ * @return true if file was opened successfully, false otherwise
+ */
virtual bool open(const String &filename);
- virtual bool open(const FilesystemNode &node);
+ /**
+ * Try to open the file with the given filename from within the given archive.
+ * @note Must not be called if this file already is open (i.e. if isOpen returns true).
+ *
+ * @param filename the name of the file to open
+ * @param archive the archive in which to search for the file
+ * @return true if file was opened successfully, false otherwise
+ */
+ virtual bool open(const String &filename, Archive &archive);
+
+ /**
+ * Try to open the file corresponding to the give node. Will check whether the
+ * node actually refers to an existing file (and not a directory), and handle
+ * those cases gracefully.
+ * @note Must not be called if this file already is open (i.e. if isOpen returns true).
+ *
+ * @param filename the name of the file to open
+ * @param archive the archive in which to search for the file
+ * @return true if file was opened successfully, false otherwise
+ */
+ virtual bool open(const FSNode &node);
+
+ /**
+ * Try to 'open' the given stream. That is, we just wrap around it, and if stream
+ * is a NULL pointer, we gracefully treat this as if opening failed.
+ * @note Must not be called if this file already is open (i.e. if isOpen returns true).
+ *
+ * @param stream a pointer to a SeekableReadStream, or 0
+ * @param name a string describing the 'file' corresponding to stream
+ * @return true if stream was 0, false otherwise
+ */
+ virtual bool open(SeekableReadStream *stream, const Common::String &name);
+
+ /**
+ * Close the file, if open.
+ */
virtual void close();
/**
@@ -82,11 +126,11 @@
bool isOpen() const;
/**
- * Returns the filename of the opened file.
+ * Returns the filename of the opened file for debugging purposes.
*
* @return: the filename
*/
- const char *name() const { return _name.c_str(); }
+ const char *getName() const { return _name.c_str(); }
bool ioFailed() const;
void clearIOFailed();
@@ -117,7 +161,7 @@
virtual ~DumpFile();
virtual bool open(const String &filename);
- virtual bool open(const FilesystemNode &node);
+ virtual bool open(const FSNode &node);
virtual void close();
Modified: scummvm/branches/gsoc2008-gui/common/fs.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/common/fs.cpp 2008-10-05 10:25:35 UTC (rev 34748)
+++ scummvm/branches/gsoc2008-gui/common/fs.cpp 2008-10-05 11:21:07 UTC (rev 34749)
@@ -29,48 +29,48 @@
namespace Common {
-FilesystemNode::FilesystemNode() {
+FSNode::FSNode() {
}
-FilesystemNode::FilesystemNode(AbstractFilesystemNode *realNode)
+FSNode::FSNode(AbstractFSNode *realNode)
: _realNode(realNode) {
}
@@ 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