From 978758190e0cf09f65d3e7737d49bd4e518b59ca Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 10 May 2009 17:26:46 +0000 Subject: Cleanup. svn-id: r40426 --- engines/kyra/wsamovie.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'engines/kyra') 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 -- cgit v1.2.3