[Scummvm-cvs-logs] SF.net SVN: scummvm:[42463] scummvm/trunk/engines/gob/resources.cpp

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Tue Jul 14 01:42:38 CEST 2009


Revision: 42463
          http://scummvm.svn.sourceforge.net/scummvm/?rev=42463&view=rev
Author:   drmccoy
Date:     2009-07-13 23:42:37 +0000 (Mon, 13 Jul 2009)

Log Message:
-----------
Allow resource loading from EXT even if the TOT has none again

Modified Paths:
--------------
    scummvm/trunk/engines/gob/resources.cpp

Modified: scummvm/trunk/engines/gob/resources.cpp
===================================================================
--- scummvm/trunk/engines/gob/resources.cpp	2009-07-13 23:36:22 UTC (rev 42462)
+++ scummvm/trunk/engines/gob/resources.cpp	2009-07-13 23:42:37 UTC (rev 42463)
@@ -158,29 +158,29 @@
 
 	_extFile = fileBase + ".ext";
 
-	if (!loadTOTResourceTable()) {
-		unload();
-		return false;
-	}
+	bool hasTOTRes = loadTOTResourceTable();
+	bool hasEXTRes = loadEXTResourceTable();
 
-	if (!loadEXTResourceTable()) {
-		unload();
+	if (!hasTOTRes && !hasEXTRes)
 		return false;
-	}
 
-	if (!loadTOTTextTable(fileBase)) {
-		unload();
-		return false;
-	}
+	if (hasTOTRes) {
+		if (!loadTOTTextTable(fileBase)) {
+			unload();
+			return false;
+		}
 
-	if (!loadIMFile()) {
-		unload();
-		return false;
+		if (!loadIMFile()) {
+			unload();
+			return false;
+		}
 	}
 
-	if (!loadEXFile()) {
-		unload();
-		return false;
+	if (hasEXTRes) {
+		if (!loadEXFile()) {
+			unload();
+			return false;
+		}
 	}
 
 	return true;
@@ -286,7 +286,7 @@
 
 	DataStream *stream = _vm->_dataIO->getDataStream(_extFile.c_str());
 	if (!stream)
-		return true;
+		return false;
 
 	_extResourceTable->itemsCount = stream->readSint16LE();
 	_extResourceTable->unknown    = stream->readByte();


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