diff options
author | Johannes Schickel | 2008-02-08 18:43:13 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-02-08 18:43:13 +0000 |
commit | 02522a3a144cad030262533506baafa0460056a6 (patch) | |
tree | de164873024cce5c6806c2aee15e6252bacbab56 /engines/kyra/resource.cpp | |
parent | b7717705ae280fdb6bc70c6998d7331ea067da00 (diff) | |
download | scummvm-rg350-02522a3a144cad030262533506baafa0460056a6.tar.gz scummvm-rg350-02522a3a144cad030262533506baafa0460056a6.tar.bz2 scummvm-rg350-02522a3a144cad030262533506baafa0460056a6.zip |
Should fix regression which prevented kyra.dat to be detected corretly when in game path.
svn-id: r30830
Diffstat (limited to 'engines/kyra/resource.cpp')
-rw-r--r-- | engines/kyra/resource.cpp | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index bc0ebe4fba..cbb39596c9 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -228,18 +228,6 @@ void Resource::unloadAllPakFiles() { _map.clear(); Common::File temp; - if (temp.open("kyra.dat")) { - ResFileEntry entry; - entry.parent = ""; - entry.size = temp.size(); - entry.loadable = true; - entry.preload = false; - entry.prot = false; - entry.type = ResFileEntry::kPak; - entry.offset = 0; - _map["kyra.dat"] = entry; - temp.close(); - } for (FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) { ResFileEntry entry; @@ -256,6 +244,24 @@ void Resource::unloadAllPakFiles() { temp.close(); } + ResFileMap::iterator iter = _map.find("kyra.dat"); + if (iter == _map.end()) { + if (temp.open("kyra.dat")) { + ResFileEntry entry; + entry.parent = ""; + entry.size = temp.size(); + entry.loadable = true; + entry.preload = false; + entry.prot = false; + entry.type = ResFileEntry::kPak; + entry.offset = 0; + _map["kyra.dat"] = entry; + temp.close(); + } + } else { + iter->_value.type = ResFileEntry::kPak; + } + detectFileTypes(); } |