aboutsummaryrefslogtreecommitdiff
path: root/scumm/smush
diff options
context:
space:
mode:
authorGregory Montoir2005-06-17 18:10:51 +0000
committerGregory Montoir2005-06-17 18:10:51 +0000
commite3b40b5c24b676ed67c39891dff2b41ee9300f98 (patch)
tree82c4c652949bc7b1a25fcf8971a8224f7f59a99b /scumm/smush
parentdb875d92e4721290a03df268228ee49fa607dc59 (diff)
downloadscummvm-rg350-e3b40b5c24b676ed67c39891dff2b41ee9300f98.tar.gz
scummvm-rg350-e3b40b5c24b676ed67c39891dff2b41ee9300f98.tar.bz2
scummvm-rg350-e3b40b5c24b676ed67c39891dff2b41ee9300f98.zip
committed patch #1221592, smush_codec 21/44 should match the original interpreter behaviour now (this allows to cleanup a bit the code and get rid of some hacks).
svn-id: r18407
Diffstat (limited to 'scumm/smush')
-rw-r--r--scumm/smush/codec1.cpp6
-rw-r--r--scumm/smush/smush_player.cpp6
2 files changed, 6 insertions, 6 deletions
diff --git a/scumm/smush/codec1.cpp b/scumm/smush/codec1.cpp
index b771c57982..fb10bb5a6b 100644
--- a/scumm/smush/codec1.cpp
+++ b/scumm/smush/codec1.cpp
@@ -24,12 +24,12 @@
namespace Scumm {
-void smush_decode_codec1(byte *dst, byte *src, int left, int top, int height, int width, int dstWidth) {
+void smush_decode_codec1(byte *dst, const byte *src, int left, int top, int width, int height, int pitch) {
byte val, code;
int32 length;
int h = height, size_line;
- dst += top * dstWidth;
+ dst += top * pitch;
for (h = 0; h < height; h++) {
size_line = READ_LE_UINT16(src);
src += 2;
@@ -54,7 +54,7 @@ void smush_decode_codec1(byte *dst, byte *src, int left, int top, int height, in
}
}
}
- dst += dstWidth - left - width;
+ dst += pitch - left - width;
}
}
diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp
index e55aa258f1..fd5bc55315 100644
--- a/scumm/smush/smush_player.cpp
+++ b/scumm/smush/smush_player.cpp
@@ -724,7 +724,7 @@ void SmushPlayer::handleNewPalette(Chunk &b) {
setDirtyColors(0, 255);
}
-void smush_decode_codec1(byte *dst, byte *src, int left, int top, int height, int width, int dstWidth);
+void smush_decode_codec1(byte *dst, const byte *src, int left, int top, int width, int height, int pitch);
#ifdef USE_ZLIB
void SmushPlayer::handleZlibFrameObject(Chunk &b) {
@@ -781,7 +781,7 @@ void SmushPlayer::handleZlibFrameObject(Chunk &b) {
switch (codec) {
case 1:
case 3:
- smush_decode_codec1(_dst, fobjBuffer + 14, left, top, height, width, _vm->_screenWidth);
+ smush_decode_codec1(_dst, fobjBuffer + 14, left, top, width, height, _vm->_screenWidth);
break;
case 37:
_codec37.decode(_dst, fobjBuffer + 14);
@@ -855,7 +855,7 @@ void SmushPlayer::handleFrameObject(Chunk &b) {
switch (codec) {
case 1:
case 3:
- smush_decode_codec1(_dst, chunk_buffer, left, top, height, width, _vm->_screenWidth);
+ smush_decode_codec1(_dst, chunk_buffer, left, top, width, height, _vm->_screenWidth);
break;
case 37:
_codec37.decode(_dst, chunk_buffer);