SCUMM: (MI1/SegaCD/JP) - fix bug 11943

(SCUMM: Invalid text rendering with Monkey Island 1 (SegaCD Japanese))

Only add vs->xstart offset if the font is actually rendered on the vs.
This commit is contained in:
athrxx 2020-11-07 19:47:23 +01:00
parent 85866382c4
commit 990a52cc58

View file

@ -848,7 +848,7 @@ void CharsetRendererClassic::printCharIntern(bool is2byte, const byte *charPtr,
} else {
Graphics::Surface dstSurface;
Graphics::Surface backSurface;
if ((ignoreCharsetMask || !vs->hasTwoBuffers)) {
if (ignoreCharsetMask || !vs->hasTwoBuffers) {
dstSurface = *vs;
dstPtr = vs->getPixels(_left, drawTop);
} else {
@ -868,7 +868,7 @@ void CharsetRendererClassic::printCharIntern(bool is2byte, const byte *charPtr,
}
if (is2byte && _vm->_game.platform != Common::kPlatformFMTowns)
drawBits1(dstSurface, _left + vs->xstart, drawTop, charPtr, drawTop, origWidth, origHeight);
drawBits1(dstSurface, (ignoreCharsetMask || !vs->hasTwoBuffers) ? _left + vs->xstart : _left, drawTop, charPtr, drawTop, origWidth, origHeight);
else
drawBitsN(dstSurface, dstPtr, charPtr, *_fontPtr, drawTop, origWidth, origHeight);