diff options
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/charset.cpp | 1 | ||||
-rw-r--r-- | scumm/nut_renderer.cpp | 22 | ||||
-rw-r--r-- | scumm/script_v8.cpp | 2 |
3 files changed, 21 insertions, 4 deletions
diff --git a/scumm/charset.cpp b/scumm/charset.cpp index 143d313805..f1c87c8d48 100644 --- a/scumm/charset.cpp +++ b/scumm/charset.cpp @@ -450,6 +450,7 @@ void CharsetRendererNut::printChar(int chr) int width = _current->getCharWidth(chr); int height = _current->getCharHeight(chr); + _hasMask = true; _current->drawChar((char)chr, _left, _top, _color); _vm->updateDirtyRect(0, _left, _left + width, _top, _top + height, 0); diff --git a/scumm/nut_renderer.cpp b/scumm/nut_renderer.cpp index 298ca0c4c8..17c0385db7 100644 --- a/scumm/nut_renderer.cpp +++ b/scumm/nut_renderer.cpp @@ -199,6 +199,11 @@ void NutRenderer::drawChar(char c, int32 x, int32 y, byte color) { byte * src = (byte*)(_dataSrc + _offsets[c] + 14); byte * dst = _vm->virtscr[0].screenPtr + y * _vm->_realWidth + x + _vm->virtscr[0].xstart; + byte *mask = _vm->getResourceAddress(rtBuffer, 9) + + (y * _vm->_realWidth + x) / 8 + _vm->_screenStartStrip; + byte maskmask; + int maskpos; + uint32 length = READ_BE_UINT32(_dataSrc + _offsets[c] - 4) - 14; decodeCodec44(_tmpCodecBuffer, src, length); @@ -206,8 +211,10 @@ void NutRenderer::drawChar(char c, int32 x, int32 y, byte color) { int32 width = READ_LE_UINT16(_dataSrc + _offsets[c] + 6); int32 height = READ_LE_UINT16(_dataSrc + _offsets[c] + 8); - + for (int32 ty = 0; ty < height; ty++) { + maskmask = revBitMask[x & 7]; + maskpos = 0; for (int32 tx = 0; tx < width; tx++) { byte pixel = *src++; #if 1 @@ -218,9 +225,12 @@ void NutRenderer::drawChar(char c, int32 x, int32 y, byte color) { // 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) + // do this, as it would increase the char drawing time by factor 5-6 ? And in + // fact, even then the shadow would not be 100% right. + if (pixel != 0) { + mask[maskpos] |= maskmask; dst[tx] = color; + } #else if (pixel != 0) { if (pixel == 0x01) @@ -230,7 +240,13 @@ void NutRenderer::drawChar(char c, int32 x, int32 y, byte color) { dst[tx] = pixel; } #endif + maskmask >>= 1; + if (maskmask == 0) { + maskmask = 0x80; + maskpos++; + } } dst += _vm->_realWidth; + mask += _vm->gdi._numStrips; } } diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp index 353773e6bb..dd9b17df66 100644 --- a/scumm/script_v8.cpp +++ b/scumm/script_v8.cpp @@ -962,12 +962,12 @@ void Scumm_v8::o8_roomOps() c = pop(); b = pop(); a = pop(); - warning("o8_roomOps: SO_ROOM_SATURATION(%d, %d, %d, %d, %d)", a, b, c, d, e); // FIXME - this probably has the same format as for darkenPalette: // thre values for R, G, B and a start/end palette range to modify. // Now, how on earth does on modify the saturation of a single color channel? // Change the hue/saturation of a color, no problem, I know how to do that, // but for only a channel alone, I don't even know what that should mean... :-/ +// warning("o8_roomOps: SO_ROOM_SATURATION(%d, %d, %d, %d, %d)", a, b, c, d, e); break; default: error("o8_roomOps: default case %d", subOp); |