diff options
author | Johannes Schickel | 2010-10-13 03:57:44 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-10-13 03:57:44 +0000 |
commit | 75e8452b6e6a2bf4fb2f588aa00b428a60d873b5 (patch) | |
tree | f29541d55309487a94bd1d38e8b53bb3dde9aec6 /engines/kyra/resource.cpp | |
parent | 48ee83b88957dab86bc763e9ef21a70179fa8679 (diff) | |
parent | e9f50882ea5b6beeefa994040be9d3bab6a1f107 (diff) | |
download | scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.tar.gz scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.tar.bz2 scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.zip |
OPENGL: Merged from trunk, from rev 52105 to 53396.
This includes an rather hacky attempt to merge all the recent gp2x backend
changes into the branch. I suppose the gp2x backend and probably all new
backends, i.e. gph, dingux etc., might not compile anymore.
Since I have no way of testing those it would be nice if porters could look
into getting those up to speed in this branch.
svn-id: r53399
Diffstat (limited to 'engines/kyra/resource.cpp')
-rw-r--r-- | engines/kyra/resource.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index efc1b16c9b..63b8072654 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -38,6 +38,11 @@ namespace Kyra { Resource::Resource(KyraEngine_v1 *vm) : _archiveCache(), _files(), _archiveFiles(), _protectedFiles(), _loaders(), _vm(vm) { initializeLoaders(); + // Initialize directories for playing from CD or with original + // directory structure + if (_vm->game() == GI_KYRA3) + SearchMan.addSubDirectoryMatching(Common::FSNode(ConfMan.get("path")), "malcolm"); + _files.add("global_search", &Common::SearchManager::instance(), 3, false); // compressed installer archives are added at level '2', // but that's done in Resource::reset not here @@ -70,7 +75,7 @@ bool Resource::reset() { // List of files in the talkie version, which can never be unload. static const char * const list[] = { "ADL.PAK", "CHAPTER1.VRM", "COL.PAK", "FINALE.PAK", "INTRO1.PAK", "INTRO2.PAK", - "INTRO3.PAK", "INTRO4.PAK", "MISC.PAK", "SND.PAK", "STARTUP.PAK", "XMI.PAK", + "INTRO3.PAK", "INTRO4.PAK", "MISC.PAK", "SND.PAK", "STARTUP.PAK", "XMI.PAK", "CAVE.APK", "DRAGON1.APK", "DRAGON2.APK", "LAGOON.APK", 0 }; @@ -148,7 +153,7 @@ bool Resource::loadPakFile(Common::String filename) { return loadPakFile(filename, file); } -bool Resource::loadPakFile(Common::String name, Common::SharedPtr<Common::ArchiveMember> file) { +bool Resource::loadPakFile(Common::String name, Common::ArchiveMemberPtr file) { name.toUppercase(); if (_archiveFiles.hasArchive(name) || _protectedFiles.hasArchive(name)) @@ -314,7 +319,7 @@ Common::SeekableReadStream *Resource::createReadStream(const Common::String &fil return _files.createReadStreamForMember(file); } -Common::Archive *Resource::loadArchive(const Common::String &name, Common::SharedPtr<Common::ArchiveMember> member) { +Common::Archive *Resource::loadArchive(const Common::String &name, Common::ArchiveMemberPtr member) { ArchiveMap::iterator cachedArchive = _archiveCache.find(name); if (cachedArchive != _archiveCache.end()) return cachedArchive->_value; |