diff options
author | Filippos Karapetis | 2011-10-28 21:52:17 +0300 |
---|---|---|
committer | Filippos Karapetis | 2011-10-28 22:20:31 +0300 |
commit | f61ea4c9cfae34cb1966cc2664c326d035ac79ad (patch) | |
tree | 73a9d87e400c249b63ac73ec807a617962d514a5 /engines/sci/graphics | |
parent | acaedcce700ac1292a4225ebd41d34a764ce5ef9 (diff) | |
download | scummvm-rg350-f61ea4c9cfae34cb1966cc2664c326d035ac79ad.tar.gz scummvm-rg350-f61ea4c9cfae34cb1966cc2664c326d035ac79ad.tar.bz2 scummvm-rg350-f61ea4c9cfae34cb1966cc2664c326d035ac79ad.zip |
SCI: Fixed text background color and text transparency for SCI32 games
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r-- | engines/sci/graphics/text32.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/sci/graphics/text32.cpp b/engines/sci/graphics/text32.cpp index 029030165d..50b782d3e6 100644 --- a/engines/sci/graphics/text32.cpp +++ b/engines/sci/graphics/text32.cpp @@ -61,6 +61,7 @@ reg_t GfxText32::createTextBitmap(reg_t textObject, uint16 maxWidth, uint16 maxH GfxFont *font = _cache->getFont(readSelectorValue(_segMan, textObject, SELECTOR(font))); bool dimmed = readSelectorValue(_segMan, textObject, SELECTOR(dimmed)); uint16 foreColor = readSelectorValue(_segMan, textObject, SELECTOR(fore)); + uint16 backColor = readSelectorValue(_segMan, textObject, SELECTOR(back)); Common::Rect planeRect = getPlaneRect(textObject); uint16 width = planeRect.width() + 1; @@ -82,7 +83,7 @@ reg_t GfxText32::createTextBitmap(reg_t textObject, uint16 maxWidth, uint16 maxH reg_t memoryId = _segMan->allocateHunkEntry("TextBitmap()", entrySize); writeSelector(_segMan, textObject, SELECTOR(bitmap), memoryId); byte *memoryPtr = _segMan->getHunkPointer(memoryId); - memset(memoryPtr, 0, entrySize); + memset(memoryPtr, backColor, entrySize); byte *bitmap = memoryPtr + BITMAP_HEADER_SIZE; int16 charCount = 0; @@ -133,6 +134,7 @@ void GfxText32::drawTextBitmap(reg_t textObject) { Common::Rect planeRect = getPlaneRect(textObject); uint16 x = readSelectorValue(_segMan, textObject, SELECTOR(x)); uint16 y = readSelectorValue(_segMan, textObject, SELECTOR(y)); + uint16 skipColor = readSelectorValue(_segMan, textObject, SELECTOR(skip)); uint16 textX = planeRect.left + x; uint16 textY = planeRect.top + y; uint16 width = nsRect.width() + 1; @@ -149,7 +151,7 @@ void GfxText32::drawTextBitmap(reg_t textObject) { for (int curY = 0; curY < height; curY++) { for (int curX = 0; curX < width; curX++) { byte pixel = surface[curByte++]; - if (pixel) + if (pixel != skipColor) _screen->putFontPixel(textY, curX + textX, curY, pixel); } } @@ -280,4 +282,4 @@ int16 GfxText32::Size(Common::Rect &rect, const char *text, GuiResourceId fontId return rect.right; } -} // End of namespace Sci +} // End of namespace Sci
\ No newline at end of file |