Skip to content

Commit

Permalink
SCI: Fixed some graphics corruption (black boxes) in the dialogs of GK1
Browse files Browse the repository at this point in the history
  • Loading branch information
bluegr committed Jan 13, 2012
1 parent 21a7e3d commit 22e00a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion engines/sci/graphics/frameout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion engines/sci/graphics/text32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 22e00a7

Please sign in to comment.