aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlyssa Milburn2011-04-18 16:12:57 +0200
committerAlyssa Milburn2011-04-18 16:12:57 +0200
commit5563b25faf27717de31c358fe26ee98557f508bb (patch)
treede88fd8c1b6b45330b648419688d071a10017999
parent7b4a4d9fa65fb843c1fed77197e7cd21ca7f93b8 (diff)
downloadscummvm-rg350-5563b25faf27717de31c358fe26ee98557f508bb.tar.gz
scummvm-rg350-5563b25faf27717de31c358fe26ee98557f508bb.tar.bz2
scummvm-rg350-5563b25faf27717de31c358fe26ee98557f508bb.zip
MOHAWK: Speed up drawRLE8 a bit.
-rw-r--r--engines/mohawk/bitmap.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/engines/mohawk/bitmap.cpp b/engines/mohawk/bitmap.cpp
index c8111fa91b..a6ec2cf85a 100644
--- a/engines/mohawk/bitmap.cpp
+++ b/engines/mohawk/bitmap.cpp
@@ -608,13 +608,12 @@ void MohawkBitmap::drawRLE8(Graphics::Surface *surface, bool isLE) {
if (code & 0x80) {
byte val = _data->readByte();
- for (uint16 j = 0; j < runLen; j++)
- *dst++ = val;
+ memset(dst, val, runLen);
} else {
- for (uint16 j = 0; j < runLen; j++)
- *dst++ = _data->readByte();
+ _data->read(dst, runLen);
}
+ dst += runLen;
remaining -= runLen;
}