[Scummvm-cvs-logs] SF.net SVN: scummvm:[50483] scummvm/trunk
spalek at users.sourceforge.net
spalek at users.sourceforge.net
Tue Jun 29 08:38:00 CEST 2010
Revision: 50483
http://scummvm.svn.sourceforge.net/scummvm/?rev=50483&view=rev
Author: spalek
Date: 2010-06-29 06:38:00 +0000 (Tue, 29 Jun 2010)
Log Message:
-----------
enable reading ZIP archives even without USE_ZLIB
our module unzip.cpp can read uncompressed ZIP archives even without zlib. if some of the files
inside are compressed and zlib is not linked in, an error is returned.
Modified Paths:
--------------
scummvm/trunk/backends/vkeybd/virtual-keyboard.cpp
scummvm/trunk/gui/ThemeEngine.cpp
Modified: scummvm/trunk/backends/vkeybd/virtual-keyboard.cpp
===================================================================
--- scummvm/trunk/backends/vkeybd/virtual-keyboard.cpp 2010-06-29 06:33:31 UTC (rev 50482)
+++ scummvm/trunk/backends/vkeybd/virtual-keyboard.cpp 2010-06-29 06:38:00 UTC (rev 50483)
@@ -90,7 +90,6 @@
return true;
}
-#ifdef USE_ZLIB
if (node.getChild(packName + ".zip").exists()) {
// compressed keyboard pack
_fileArchive = makeZipArchive(node.getChild(packName + ".zip"));
@@ -109,7 +108,6 @@
return true;
}
-#endif
return false;
}
Modified: scummvm/trunk/gui/ThemeEngine.cpp
===================================================================
--- scummvm/trunk/gui/ThemeEngine.cpp 2010-06-29 06:33:31 UTC (rev 50482)
+++ scummvm/trunk/gui/ThemeEngine.cpp 2010-06-29 06:38:00 UTC (rev 50483)
@@ -397,17 +397,12 @@
if (!_themeArchive && !_themeFile.empty()) {
Common::FSNode node(_themeFile);
if (node.getName().hasSuffix(".zip") && !node.isDirectory()) {
-#ifdef USE_ZLIB
Common::Archive *zipArchive = Common::makeZipArchive(node);
if (!zipArchive) {
warning("Failed to open Zip archive '%s'.", node.getPath().c_str());
}
_themeArchive = zipArchive;
-#else
- warning("Trying to load theme '%s' in a Zip archive without zLib support", _themeFile.c_str());
- return false;
-#endif
} else if (node.isDirectory()) {
_themeArchive = new Common::FSDirectory(node);
}
@@ -1563,7 +1558,6 @@
bool foundHeader = false;
if (node.getName().hasSuffix(".zip") && !node.isDirectory()) {
-#ifdef USE_ZLIB
Common::Archive *zipArchive = Common::makeZipArchive(node);
if (zipArchive && zipArchive->hasFile("THEMERC")) {
// Open THEMERC from the ZIP file.
@@ -1576,7 +1570,6 @@
// reference to zipArchive anywhere. This could change if we
// ever modify ZipArchive::createReadStreamForMember.
delete zipArchive;
-#endif
} else if (node.isDirectory()) {
Common::FSNode headerfile = node.getChild("THEMERC");
if (!headerfile.exists() || !headerfile.isReadable() || headerfile.isDirectory())
@@ -1672,7 +1665,6 @@
}
Common::FSList fileList;
-#ifdef USE_ZLIB
// Check all files. We need this to find all themes inside ZIP archives.
if (!node.getChildren(fileList, Common::FSNode::kListFilesOnly))
return;
@@ -1699,7 +1691,6 @@
}
fileList.clear();
-#endif
// Check if we exceeded the given recursion depth
if (depth - 1 == -1)
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