diff options
author | athrxx | 2019-03-03 19:13:38 +0100 |
---|---|---|
committer | athrxx | 2019-03-06 20:48:28 +0100 |
commit | ec640a069a76326ac4cd909bf69423f12d37c1e6 (patch) | |
tree | 5ee784f54499f1587f2d283563003f5ba7b5b936 /engines/kyra/graphics/screen.cpp | |
parent | 379df2b9e3cc85e825c74bf12239adf1ed004b11 (diff) | |
download | scummvm-rg350-ec640a069a76326ac4cd909bf69423f12d37c1e6.tar.gz scummvm-rg350-ec640a069a76326ac4cd909bf69423f12d37c1e6.tar.bz2 scummvm-rg350-ec640a069a76326ac4cd909bf69423f12d37c1e6.zip |
KYRA: (EOB1/Amiga) - fix Amiga cps decompression
Diffstat (limited to 'engines/kyra/graphics/screen.cpp')
-rw-r--r-- | engines/kyra/graphics/screen.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/kyra/graphics/screen.cpp b/engines/kyra/graphics/screen.cpp index 2a5e51162e..44b6fadb00 100644 --- a/engines/kyra/graphics/screen.cpp +++ b/engines/kyra/graphics/screen.cpp @@ -2364,12 +2364,12 @@ uint16 Screen::decodeEGAGetCode(const uint8 *&pos, uint8 &nib) { return res; } -void Screen::decodeFrame3(const uint8 *src, uint8 *dst, uint32 size) { +void Screen::decodeFrame3(const uint8 *src, uint8 *dst, uint32 size, bool isAmiga) { const uint8 *dstEnd = dst + size; while (dst < dstEnd) { int8 code = *src++; if (code == 0) { - uint16 sz = READ_BE_UINT16(src); + uint16 sz = isAmiga ? READ_LE_UINT16(src) : READ_BE_UINT16(src); src += 2; memset(dst, *src++, sz); dst += sz; @@ -3258,7 +3258,7 @@ void Screen::loadBitmap(const char *filename, int tempPage, int dstPage, Palette Screen::decodeFrame1(srcPtr, dstData, imgSize); break; case 3: - Screen::decodeFrame3(srcPtr, dstData, imgSize); + Screen::decodeFrame3(srcPtr, dstData, imgSize, _isAmiga); break; case 4: Screen::decodeFrame4(srcPtr, dstData, imgSize); |