diff options
author | Lars Skovlund | 2011-01-22 14:32:39 +0000 |
---|---|---|
committer | Lars Skovlund | 2011-01-22 14:32:39 +0000 |
commit | 8a44af63af743f5fc3c5e263df3fb14efdc3e1d6 (patch) | |
tree | da8f56867a4b957a61f1ddc5513cd3361ecc9951 | |
parent | 40a4b092461976fbb8b57199379e7f869499f19c (diff) | |
download | scummvm-rg350-8a44af63af743f5fc3c5e263df3fb14efdc3e1d6.tar.gz scummvm-rg350-8a44af63af743f5fc3c5e263df3fb14efdc3e1d6.tar.bz2 scummvm-rg350-8a44af63af743f5fc3c5e263df3fb14efdc3e1d6.zip |
SCI/robot: Correct detection of null preload
svn-id: r55427
-rw-r--r-- | engines/sci/graphics/robot.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/engines/sci/graphics/robot.cpp b/engines/sci/graphics/robot.cpp index c2e0796a27..ce153e4417 100644 --- a/engines/sci/graphics/robot.cpp +++ b/engines/sci/graphics/robot.cpp @@ -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 @@ void GfxRobot::init(GuiResourceId resourceId, uint16 x, uint16 y) { // 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 @@ byte *GfxRobot::assembleVideoFrame(int frame) { assert(assemblePtr == decompressedSize); + // FILE *f = fopen("/tmp/flap", "w"); + // fwrite(output, 1, decompressedSize, f); + // fclose(f); + // exit(1); + return output; } |