diff options
author | Johannes Schickel | 2009-05-10 17:26:46 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-05-10 17:26:46 +0000 |
commit | 978758190e0cf09f65d3e7737d49bd4e518b59ca (patch) | |
tree | 21a493b53109bb872475382eebd34aca64843670 | |
parent | 02aa7dfdfd4166c97144835d30ef3a83633f8e32 (diff) | |
download | scummvm-rg350-978758190e0cf09f65d3e7737d49bd4e518b59ca.tar.gz scummvm-rg350-978758190e0cf09f65d3e7737d49bd4e518b59ca.tar.bz2 scummvm-rg350-978758190e0cf09f65d3e7737d49bd4e518b59ca.zip |
Cleanup.
svn-id: r40426
-rw-r--r-- | engines/kyra/wsamovie.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/kyra/wsamovie.cpp b/engines/kyra/wsamovie.cpp index 97f31e80ae..dd1c2e5c53 100644 --- a/engines/kyra/wsamovie.cpp +++ b/engines/kyra/wsamovie.cpp @@ -423,15 +423,15 @@ int WSAMovie_v2::open(const char *filename, int unk1, uint8 *palBuf) { _flags |= WF_NO_FIRST_FRAME; } - for (int i = 1; i < _numFrames; ++i) { - _frameOffsTable[i] = READ_LE_UINT32(wsaData) - frameDataOffs; + for (int i = 1; i < _numFrames + 2; ++i) { + _frameOffsTable[i] = READ_LE_UINT32(wsaData); wsaData += 4; } - _frameOffsTable[_numFrames] = READ_LE_UINT32(wsaData); - wsaData += 4; - _frameOffsTable[_numFrames + 1] = READ_LE_UINT32(wsaData); - wsaData += 4; + for (int i = 0; i < _numFrames; ++i) + _frameOffsTable[_numFrames] -= frameDataOffs; + + // WSA movies without last frame offset need special treatment if (_frameOffsTable[_numFrames + 1]) _frameOffsTable[_numFrames] -= frameDataOffs; else |