[Scummvm-cvs-logs] SF.net SVN: scummvm:[33880] scummvm/branches/branch-0-12-0/engines/kyra/ resource.cpp
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Fri Aug 15 00:13:52 CEST 2008
Revision: 33880
http://scummvm.svn.sourceforge.net/scummvm/?rev=33880&view=rev
Author: lordhoto
Date: 2008-08-14 22:13:52 +0000 (Thu, 14 Aug 2008)
Log Message:
-----------
Backport of r33878: "Improved version of my resource loading patch from -devel".
Modified Paths:
--------------
scummvm/branches/branch-0-12-0/engines/kyra/resource.cpp
Modified: scummvm/branches/branch-0-12-0/engines/kyra/resource.cpp
===================================================================
--- scummvm/branches/branch-0-12-0/engines/kyra/resource.cpp 2008-08-14 22:11:56 UTC (rev 33879)
+++ scummvm/branches/branch-0-12-0/engines/kyra/resource.cpp 2008-08-14 22:13:52 UTC (rev 33880)
@@ -179,8 +179,14 @@
for (ResArchiveLoader::FileList::iterator i = files.begin(); i != files.end(); ++i) {
iter = _map.find(i->filename);
if (iter == _map.end()) {
+ // We do an internal check for a file in gamepath with same filename to
+ // allow overwriting files inside archives with plain files inside the
+ // game directory
+ checkFile(i->filename);
+
// A new file entry, so we just insert it into the file map.
- _map[i->filename] = i->entry;
+ if (_map.find(i->filename) == _map.end())
+ _map[i->filename] = i->entry;
} else if (!iter->_value.parent.empty()) {
if (!iter->_value.parent.equalsIgnoreCase(filename)) {
ResFileMap::iterator oldParent = _map.find(iter->_value.parent);
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