aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2012-01-13 02:38:20 +0200
committerFilippos Karapetis2012-01-13 02:38:20 +0200
commit22e00a710fe98b291d7b0972fb32f2b18a37efc8 (patch)
tree1e7f14e75b83e238ab79af904779a475bb5a83ac /engines
parent21a7e3d8e61c0bac072b8bd4f491a1cf2ef115ee (diff)
downloadscummvm-rg350-22e00a710fe98b291d7b0972fb32f2b18a37efc8.tar.gz
scummvm-rg350-22e00a710fe98b291d7b0972fb32f2b18a37efc8.tar.bz2
scummvm-rg350-22e00a710fe98b291d7b0972fb32f2b18a37efc8.zip
SCI: Fixed some graphics corruption (black boxes) in the dialogs of GK1
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/graphics/frameout.cpp3
-rw-r--r--engines/sci/graphics/text32.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index 7bb4162020..9f150ae507 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -498,7 +498,8 @@ void GfxFrameout::kernelFrameout() {
// There is a race condition lurking in SQ6, which causes the game to hang in the intro, when teleporting to Polysorbate LX.
// Since I first wrote the patch, the race has stopped occurring for me though.
// I'll leave this for investigation later, when someone can reproduce.
- if (it->pictureId == 0xffff)
+ //if (it->pictureId == 0xffff) // FIXME: This is what SSCI does, and fixes the intro of LSL7, but breaks the dialogs in GK1 (adds black boxes)
+ if (it->planeBack)
_paint32->fillRect(it->planeRect, it->planeBack);
GuiResourceId planeMainPictureId = it->pictureId;
diff --git a/engines/sci/graphics/text32.cpp b/engines/sci/graphics/text32.cpp
index 000bb691dc..e7595fbdaf 100644
--- a/engines/sci/graphics/text32.cpp
+++ b/engines/sci/graphics/text32.cpp
@@ -175,6 +175,7 @@ void GfxText32::disposeTextBitmap(reg_t hunkId) {
void GfxText32::drawTextBitmap(uint16 x, uint16 y, Common::Rect planeRect, reg_t textObject) {
reg_t hunkId = readSelector(_segMan, textObject, SELECTOR(bitmap));
+ uint16 backColor = readSelectorValue(_segMan, textObject, SELECTOR(back));
// Sanity check: Check if the hunk is set. If not, either the game scripts
// didn't set it, or an old saved game has been loaded, where it wasn't set.
if (hunkId.isNull())
@@ -204,7 +205,7 @@ void GfxText32::drawTextBitmap(uint16 x, uint16 y, Common::Rect planeRect, reg_t
for (int curY = 0; curY < height; curY++) {
for (int curX = 0; curX < width; curX++) {
byte pixel = surface[curByte++];
- if (pixel != skipColor)
+ if (pixel != skipColor && pixel != backColor)
_screen->putFontPixel(textY, curX + textX, curY, pixel);
}
}