[Scummvm-cvs-logs] SF.net SVN: scummvm:[55427] scummvm/trunk/engines/sci/graphics/robot.cpp

lskovlun at users.sourceforge.net lskovlun at users.sourceforge.net
Sat Jan 22 15:32:39 CET 2011


Revision: 55427
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55427&view=rev
Author:   lskovlun
Date:     2011-01-22 14:32:39 +0000 (Sat, 22 Jan 2011)

Log Message:
-----------
SCI/robot: Correct detection of null preload

Modified Paths:
--------------
    scummvm/trunk/engines/sci/graphics/robot.cpp

Modified: scummvm/trunk/engines/sci/graphics/robot.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/robot.cpp	2011-01-22 14:23:03 UTC (rev 55426)
+++ scummvm/trunk/engines/sci/graphics/robot.cpp	2011-01-22 14:32:39 UTC (rev 55427)
@@ -23,6 +23,9 @@
  *
  */
 
+// fopen() and friends so we can dump frames and stuff to disk, for debugging
+// #define FORBIDDEN_SYMBOL_ALLOW_ALL 
+
 #include "sci/sci.h"
 #include "sci/engine/state.h"
 #include "sci/graphics/screen.h"
@@ -107,7 +110,10 @@
 
 	// Some robot files have sound, which doesn't start from frame 0
 	// (e.g. Phantasmagoria, robot 1305)
-	if (_hasSound && _audioSize > 14)
+	// Yes, strangely, the word at offset 10 is non-zero if it DOESN'T have a preload
+	// in that case, the word is equal to that value which would otherwise be stored
+	// in the audio header (i.e. _audioSize above)
+	if (_hasSound && READ_LE_UINT16(_resourceData + 10) == 0)
 		_palOffset += READ_LE_UINT32(_resourceData + 60) + 14;
 
 	getFrameOffsets();
@@ -267,6 +273,11 @@
 
 	assert(assemblePtr == decompressedSize);
 
+	//	FILE *f = fopen("/tmp/flap", "w");
+	//      fwrite(output, 1, decompressedSize, f);
+	//      fclose(f);
+	//      exit(1);
+
 	return output;
 }
 


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