[Scummvm-cvs-logs] SF.net SVN: scummvm: [30830] scummvm/trunk/engines/kyra/resource.cpp
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Fri Feb 8 19:43:14 CET 2008
Revision: 30830
http://scummvm.svn.sourceforge.net/scummvm/?rev=30830&view=rev
Author: lordhoto
Date: 2008-02-08 10:43:13 -0800 (Fri, 08 Feb 2008)
Log Message:
-----------
Should fix regression which prevented kyra.dat to be detected corretly when in game path.
Modified Paths:
--------------
scummvm/trunk/engines/kyra/resource.cpp
Modified: scummvm/trunk/engines/kyra/resource.cpp
===================================================================
--- scummvm/trunk/engines/kyra/resource.cpp 2008-02-08 11:09:49 UTC (rev 30829)
+++ scummvm/trunk/engines/kyra/resource.cpp 2008-02-08 18:43:13 UTC (rev 30830)
@@ -228,18 +228,6 @@
_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 @@
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();
}
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