SCUMM: fix FM-TOWNS graphics output for ARM devices

(changed behavior of USE_ARM_GFX_ASM define)
This commit is contained in:
athrxx 2011-06-17 23:37:21 +02:00
parent 158c2252ab
commit 0881f54a06
2 changed files with 5 additions and 3 deletions

View File

@ -652,15 +652,15 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i
assert(0 == (width & 3));
// Compose the text over the game graphics
#ifdef USE_ARM_GFX_ASM
asmDrawStripToScreen(height, width, text, src, _compositeBuf, vs->pitch, width, _textSurface.pitch);
#else
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
if (_game.platform == Common::kPlatformFMTowns) {
towns_drawStripToScreen(vs, x, y, x, top, width, height);
return;
} else
#endif
#ifdef USE_ARM_GFX_ASM
asmDrawStripToScreen(height, width, text, src, _compositeBuf, vs->pitch, width, _textSurface.pitch);
#else
if (_outputPixelFormat.bytesPerPixel == 2) {
const byte *srcPtr = (const byte *)src;
const byte *textPtr = (byte *)_textSurface.getBasePtr(x * m, y * m);

View File

@ -453,6 +453,8 @@ void TownsScreen::updateOutputBuffer() {
int ptch = _pitch - (r->right - r->left + 1) * _pixelFormat.bytesPerPixel;
if (_pixelFormat.bytesPerPixel == 2 && l->bpp == 1) {
if (!l->palette)
error("void TownsScreen::updateOutputBuffer(): No palette assigned to 8 bit layer %d", i);
for (int ic = 0; ic < l->numCol; ic++)
l->bltTmpPal[ic] = calc16BitColor(&l->palette[ic * 3]);
}