aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-01-11 15:53:00 +0000
committerMax Horn2003-01-11 15:53:00 +0000
commit2636e2806acc5b8a6c96c44b786c9c3e9136741a (patch)
tree8a2393bb0ffafbe334618c0a0b63f9503dc17888
parent8b9e8cb8123222bdc7a94e18f891e892e658eb72 (diff)
downloadscummvm-rg350-2636e2806acc5b8a6c96c44b786c9c3e9136741a.tar.gz
scummvm-rg350-2636e2806acc5b8a6c96c44b786c9c3e9136741a.tar.bz2
scummvm-rg350-2636e2806acc5b8a6c96c44b786c9c3e9136741a.zip
cleanup
svn-id: r6397
-rw-r--r--scumm/gfx.cpp10
-rw-r--r--scumm/smush/codec47.cpp6
2 files changed, 6 insertions, 10 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index e41923d70e..04deb08954 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -3375,14 +3375,12 @@ void Scumm::decompressBomp(byte *dst, byte *src, int w, int h)
len -= num;
if (code & 1) {
color = *src++;
- do
- *dst++ = color;
- while (--num);
+ memset(dst, color, num);
} else {
- do
- *dst++ = *src++;
- while (--num);
+ memcpy(dst, src, num);
+ src += num;
}
+ dst += num;
}
} while (--h);
}
diff --git a/scumm/smush/codec47.cpp b/scumm/smush/codec47.cpp
index 23223b58e0..e840b8c612 100644
--- a/scumm/smush/codec47.cpp
+++ b/scumm/smush/codec47.cpp
@@ -618,17 +618,15 @@ void Codec47Decoder::bompDecode(byte *dst, byte *src, int32 len) {
do {
code = *src++;
+ num = (code >> 1) + 1;
if (code & 1) {
- num = (code >> 1) + 1;
color = *src++;
memset(dst, color, num);
- dst += num;
} else {
- num = (code >> 1) + 1;
memcpy(dst, src, num);
- dst += num;
src += num;
}
+ dst += num;
} while (len -= num);
}