diff options
-rw-r--r-- | scumm/gfx.cpp | 10 | ||||
-rw-r--r-- | scumm/smush/codec47.cpp | 6 |
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); } |