diff options
author | Paul Gilbert | 2017-02-11 18:48:38 -0500 |
---|---|---|
committer | Paul Gilbert | 2017-02-11 18:50:44 -0500 |
commit | f66ead3074505bda5d03d8b726cf6410c826176b (patch) | |
tree | fee33e64364da2ec2c057c4c8067c6c49dbd0980 | |
parent | a7d681764f4a9d499cf08b253aea0c1813ec6e05 (diff) | |
download | scummvm-rg350-f66ead3074505bda5d03d8b726cf6410c826176b.tar.gz scummvm-rg350-f66ead3074505bda5d03d8b726cf6410c826176b.tar.bz2 scummvm-rg350-f66ead3074505bda5d03d8b726cf6410c826176b.zip |
TSAGE: R2R: Fix display of animations
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_logic.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp index ecaa671bd7..b41abe8cf9 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.cpp +++ b/engines/tsage/ringworld2/ringworld2_logic.cpp @@ -1972,11 +1972,11 @@ void AnimationPlayer::drawFrame(int sliceIndex) { case 0: // Draw from uncompressed source for (int sliceNum = 0; sliceNum < _subData._ySlices; ++sliceNum) { - for (int yIndex = 0; yIndex < _sliceHeight; ++yIndex) { + for (int yIndex = 0; yIndex < _sliceHeight; ++yIndex, ++y) { // TODO: Check of _subData._drawType was done for two different kinds of // line slice drawing in original const byte *pSrc = (const byte *)sliceDataStart + READ_LE_UINT16(sliceData1 + sliceNum * 2); - byte *pDest = (byte *)dest.getBasePtr(0, y++); + byte *pDest = (byte *)dest.getBasePtr(0, y); Common::copy(pSrc, pSrc + _subData._sliceSize, pDest); } @@ -1988,12 +1988,12 @@ void AnimationPlayer::drawFrame(int sliceIndex) { case 0xfe: // Draw from uncompressed source with optional skipped rows for (int sliceNum = 0; sliceNum < _subData._ySlices; ++sliceNum) { - for (int yIndex = 0; yIndex < _sliceHeight; ++yIndex, playerBounds.top++) { + for (int yIndex = 0; yIndex < _sliceHeight; ++yIndex, ++y) { int offset = READ_LE_UINT16(sliceData1 + sliceNum * 2); if (offset) { const byte *pSrc = (const byte *)sliceDataStart + offset; - byte *pDest = (byte *)dest.getBasePtr(0, 0); + byte *pDest = (byte *)dest.getBasePtr(0, y); //Common::copy(pSrc, pSrc + playerBounds.width(), pDest); rleDecode(pSrc, pDest, playerBounds.width()); @@ -2004,11 +2004,11 @@ void AnimationPlayer::drawFrame(int sliceIndex) { case 0xff: // Draw from RLE compressed source for (int sliceNum = 0; sliceNum < _subData._ySlices; ++sliceNum) { - for (int yIndex = 0; yIndex < _sliceHeight; ++yIndex, playerBounds.top++) { + for (int yIndex = 0; yIndex < _sliceHeight; ++yIndex, ++y) { // TODO: Check of _subData._drawType was done for two different kinds of // line slice drawing in original const byte *pSrc = (const byte *)sliceDataStart + READ_LE_UINT16(sliceData1 + sliceNum * 2); - byte *pDest = (byte *)dest.getBasePtr(0, 0); + byte *pDest = (byte *)dest.getBasePtr(0, y); rleDecode(pSrc, pDest, _subData._sliceSize); } @@ -2020,10 +2020,10 @@ void AnimationPlayer::drawFrame(int sliceIndex) { byte *sliceData2 = &slices._pixelData[slice2._sliceOffset - 96]; for (int sliceNum = 0; sliceNum < _subData._ySlices; ++sliceNum) { - for (int yIndex = 0; yIndex < _sliceHeight; ++yIndex) { + for (int yIndex = 0; yIndex < _sliceHeight; ++yIndex, ++y) { const byte *pSrc1 = (const byte *)sliceDataStart + READ_LE_UINT16(sliceData2 + sliceNum * 2); const byte *pSrc2 = (const byte *)sliceDataStart + READ_LE_UINT16(sliceData1 + sliceNum * 2); - byte *pDest = (byte *)dest.getBasePtr(0, y++); + byte *pDest = (byte *)dest.getBasePtr(0, y); if (slice2._drawMode == 0) { // Uncompressed background, foreground compressed |