Massive API cleanup (removed legacy code).

Improved theme loading support.

svn-id: r33832
This commit is contained in:
Vicent Marti 2008-08-13 16:50:50 +00:00
parent 0dcfb38d49
commit 1d9f98d121
9 changed files with 25 additions and 202 deletions

View file

@ -433,7 +433,7 @@ bool ThemeRenderer::loadThemeXML(Common::String themeName) {
Common::MemoryReadStream *stream = new Common::MemoryReadStream(buffer, fileInfo.uncompressed_size+1, true);
if (parser()->loadStream(stream) == false || parser()->parse() == false) {
warning("Failed to load stream for %s", fileNameBuffer);
warning("Failed to load stream for zipped file '%s'", fileNameBuffer);
unzClose(zipFile);
delete stream;
return false;
@ -444,7 +444,7 @@ bool ThemeRenderer::loadThemeXML(Common::String themeName) {
unzCloseCurrentFile(zipFile);
if (unzGoToNextFile(zipFile) == UNZ_END_OF_LIST_OF_FILE)
if (unzGoToNextFile(zipFile) != UNZ_OK)
break;
}
} else if (parser()->loadFile(themeName + ".stx") && parser()->parse()) {