diff options
author | Max Horn | 2002-12-31 20:17:46 +0000 |
---|---|---|
committer | Max Horn | 2002-12-31 20:17:46 +0000 |
commit | 1517ce3894a0e6441d339eeff9598a2d4b961ec9 (patch) | |
tree | 301450403a4fb34822b3fc5d102d479e0b28be83 | |
parent | b88db70dfbf60517f8093b0f2ce387c393de3e3d (diff) | |
download | scummvm-rg350-1517ce3894a0e6441d339eeff9598a2d4b961ec9.tar.gz scummvm-rg350-1517ce3894a0e6441d339eeff9598a2d4b961ec9.tar.bz2 scummvm-rg350-1517ce3894a0e6441d339eeff9598a2d4b961ec9.zip |
hack to get actor text color right
svn-id: r6299
-rw-r--r-- | scumm/nut_renderer.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/scumm/nut_renderer.cpp b/scumm/nut_renderer.cpp index a4044533b9..298ca0c4c8 100644 --- a/scumm/nut_renderer.cpp +++ b/scumm/nut_renderer.cpp @@ -44,7 +44,7 @@ void NutRenderer::decodeCodec44(byte *dst, byte *src, uint32 length) { src += 2; length -= 2; - for (; size_line != 0;) { + while (size_line != 0) { num = *src++; val = *src++; memset(dst, val, num); @@ -210,6 +210,18 @@ void NutRenderer::drawChar(char c, int32 x, int32 y, byte color) { for (int32 ty = 0; ty < height; ty++) { for (int32 tx = 0; tx < width; tx++) { byte pixel = *src++; +#if 1 + // FIXME: This way, at least the actor speech colors are done right. + // However, we still don't draw any "shadows" behind the text, and indeed + // the character data doesn't seem to contain it. So how does CMI draw the + // font shadows? Either they are stored seperatly and we have to render them + // in addition to the normal font. Or maybe the created the shadows dynamically + // on the fly: if we draw the character several times in black, moved a bit + // each time, that would mostly create the shadow effect. But why would they + // do this, as it would increase the char drawing time by factor 5-6 ? + if (pixel != 0) + dst[tx] = color; +#else if (pixel != 0) { if (pixel == 0x01) pixel = (color == 0) ? 0xf : color; @@ -217,6 +229,7 @@ void NutRenderer::drawChar(char c, int32 x, int32 y, byte color) { pixel = 0x0; dst[tx] = pixel; } +#endif } dst += _vm->_realWidth; } |