diff options
author | Johannes Schickel | 2009-06-07 00:58:14 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-06-07 00:58:14 +0000 |
commit | b1041bba7fa643a4ef79675976adca7d0b9b3ff4 (patch) | |
tree | 92a28db7f64e459a3c408d2b12bc4f2d8ddb5405 /engines | |
parent | 6cfb706faee5020fd6196889de27ddf3e07c4c80 (diff) | |
download | scummvm-rg350-b1041bba7fa643a4ef79675976adca7d0b9b3ff4.tar.gz scummvm-rg350-b1041bba7fa643a4ef79675976adca7d0b9b3ff4.tar.bz2 scummvm-rg350-b1041bba7fa643a4ef79675976adca7d0b9b3ff4.zip |
Add support for "WF_NO_LAST_FRAME" in WSA v1 code too. Since so far every v1 WSA file played fine, it might be unneeded, but better safe than sorry.
svn-id: r41316
Diffstat (limited to 'engines')
-rw-r--r-- | engines/kyra/wsamovie.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/engines/kyra/wsamovie.cpp b/engines/kyra/wsamovie.cpp index f7b4e9df1f..26638b8172 100644 --- a/engines/kyra/wsamovie.cpp +++ b/engines/kyra/wsamovie.cpp @@ -100,10 +100,15 @@ int WSAMovie_v1::open(const char *filename, int offscreenDecode, uint8 *palBuf) } for (int i = 1; i < _numFrames + 2; ++i) { - _frameOffsTable[i] = READ_LE_UINT32(wsaData) - frameDataOffs; + _frameOffsTable[i] = READ_LE_UINT32(wsaData); + if (_frameOffsTable[i]) + _frameOffsTable[i] -= frameDataOffs; wsaData += 4; } + if (!_frameOffsTable[_numFrames + 1]) + _flags |= WF_NO_LAST_FRAME; + // skip palette wsaData += offsPal; @@ -162,13 +167,13 @@ void WSAMovie_v1::displayFrame(int frameNum, int pageNum, int x, int y, ...) { int frameCount; if (_currentFrame < frameNum) { frameCount = _numFrames - frameNum + _currentFrame; - if (diffCount > frameCount) + if (diffCount > frameCount && !(_flags & WF_NO_LAST_FRAME)) frameStep = -1; else frameCount = diffCount; } else { frameCount = _numFrames - _currentFrame + frameNum; - if (frameCount >= diffCount) { + if (frameCount >= diffCount || (_flags & WF_NO_LAST_FRAME)) { frameStep = -1; frameCount = diffCount; } @@ -273,13 +278,13 @@ void WSAMovieAmiga::displayFrame(int frameNum, int pageNum, int x, int y, ...) { int frameCount; if (_currentFrame < frameNum) { frameCount = _numFrames - frameNum + _currentFrame; - if (diffCount > frameCount) + if (diffCount > frameCount && !(_flags & WF_NO_LAST_FRAME)) frameStep = -1; else frameCount = diffCount; } else { frameCount = _numFrames - _currentFrame + frameNum; - if (frameCount >= diffCount) { + if (frameCount >= diffCount || (_flags & WF_NO_LAST_FRAME)) { frameStep = -1; frameCount = diffCount; } |