diff options
author | Johannes Schickel | 2008-10-03 18:23:57 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-10-03 18:23:57 +0000 |
commit | d89ff31450c728ebae3892ef3ea7f83cacda0e2f (patch) | |
tree | 9bd525bc9beda121c0da5513e1c4b2627fc3ea86 /engines | |
parent | f3469eae94e196d84f828edb02972f1abc7e73fc (diff) | |
download | scummvm-rg350-d89ff31450c728ebae3892ef3ea7f83cacda0e2f.tar.gz scummvm-rg350-d89ff31450c728ebae3892ef3ea7f83cacda0e2f.tar.bz2 scummvm-rg350-d89ff31450c728ebae3892ef3ea7f83cacda0e2f.zip |
Cleanup.
svn-id: r34736
Diffstat (limited to 'engines')
-rw-r--r-- | engines/kyra/resource.h | 4 | ||||
-rw-r--r-- | engines/kyra/staticres.cpp | 22 |
2 files changed, 12 insertions, 14 deletions
diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h index 81cf762d42..576f683014 100644 --- a/engines/kyra/resource.h +++ b/engines/kyra/resource.h @@ -40,10 +40,6 @@ #include "kyra/kyra_v1.h" #include "kyra/kyra_hof.h" -namespace Common { -class ArchiveMember; -} // end of namespace Common - namespace Kyra { class Resource; diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 5cfd682b9c..543a5c8162 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -145,20 +145,22 @@ bool StaticResource::loadStaticResourceFile() { bool foundWorkingKyraDat = false; for (Common::ArchiveMemberList::iterator i = kyraDatFiles.begin(); i != kyraDatFiles.end(); ++i) { Common::SeekableReadStream *file = (*i)->open(); - if (checkKyraDat(file)) { - file->seek(0, SEEK_SET); - - Common::ArchivePtr archive = res->loadArchive(staticDataFilename(), *i); - if (archive) { - res->_archiveFiles->add(staticDataFilename(), archive, 0); - foundWorkingKyraDat = tryKyraDatLoad(); - } + if (!checkKyraDat(file)) { + delete file; + continue; } - delete file; + delete file; file = 0; - if (foundWorkingKyraDat) + Common::ArchivePtr archive = res->loadArchive(staticDataFilename(), *i); + if (!archive) + continue; + + res->_archiveFiles->add(staticDataFilename(), archive, 0); + if (tryKyraDatLoad()) { + foundWorkingKyraDat = true; break; + } res->_archiveCache.erase(staticDataFilename()); res->_archiveFiles->remove(staticDataFilename()); |