aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-07-08 18:09:57 +0000
committerMax Horn2003-07-08 18:09:57 +0000
commitd5b1b68634bc949b08adedc34e3e420fa8e7d612 (patch)
tree7d7aa2a59298c6a04c3d01139f08f8aab0a42e8f
parent48b16bd81925893cad793ab28b7758a4a339bd23 (diff)
downloadscummvm-rg350-d5b1b68634bc949b08adedc34e3e420fa8e7d612.tar.gz
scummvm-rg350-d5b1b68634bc949b08adedc34e3e420fa8e7d612.tar.bz2
scummvm-rg350-d5b1b68634bc949b08adedc34e3e420fa8e7d612.zip
each row has to be drawn 8 times (8x8 chars, after all), see also Gdi::drawStripC64Object etc.)
svn-id: r8866
-rw-r--r--scumm/costume.cpp36
1 files changed, 20 insertions, 16 deletions
diff --git a/scumm/costume.cpp b/scumm/costume.cpp
index e8d6c74397..3df8537185 100644
--- a/scumm/costume.cpp
+++ b/scumm/costume.cpp
@@ -318,29 +318,33 @@ void CostumeRenderer::procC64() {
if (color & 0x80) {
len = color & 0x7f;
color = *src++;
- for (int z = 0; z < len; z++) {
- dst[0] = dst[1] = _vm->gdi._C64Colors[(color >> 6) & 3];
- dst[2] = dst[3] = _vm->gdi._C64Colors[(color >> 4) & 3];
- dst[4] = dst[5] = _vm->gdi._C64Colors[(color >> 2) & 3];
- dst[6] = dst[7] = _vm->gdi._C64Colors[(color >> 0) & 3];
- dst += _outwidth;
- y++;
- if (y >= (_height >> 3)) {
+ while (len--) {
+ for (int i = 0; i < 8; i++) {
+ dst[0] = dst[1] = _vm->gdi._C64Colors[(color >> 6) & 3];
+ dst[2] = dst[3] = _vm->gdi._C64Colors[(color >> 4) & 3];
+ dst[4] = dst[5] = _vm->gdi._C64Colors[(color >> 2) & 3];
+ dst[6] = dst[7] = _vm->gdi._C64Colors[(color >> 0) & 3];
+ dst += _outwidth;
+ }
+ y+=8;
+ if (y >= _height) {
y = 0;
dst = v1.destptr + (x << 3);
}
}
} else {
len = color;
- for (int z = 0; z < len; z++) {
+ while (len--) {
color = *src++;
- dst[0] = dst[1] = _vm->gdi._C64Colors[(color >> 6) & 3];
- dst[2] = dst[3] = _vm->gdi._C64Colors[(color >> 4) & 3];
- dst[4] = dst[5] = _vm->gdi._C64Colors[(color >> 2) & 3];
- dst[6] = dst[7] = _vm->gdi._C64Colors[(color >> 0) & 3];
- dst += _outwidth;
- y++;
- if (y >= (_height >> 3)) {
+ for (int i = 0; i < 8; i++) {
+ dst[0] = dst[1] = _vm->gdi._C64Colors[(color >> 6) & 3];
+ dst[2] = dst[3] = _vm->gdi._C64Colors[(color >> 4) & 3];
+ dst[4] = dst[5] = _vm->gdi._C64Colors[(color >> 2) & 3];
+ dst[6] = dst[7] = _vm->gdi._C64Colors[(color >> 0) & 3];
+ dst += _outwidth;
+ }
+ y+=8;
+ if (y >= _height) {
y = 0;
dst = v1.destptr + (x << 3);
}