From d3c4243ab5aa8438645340dca1900e678d8fd6ba Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 26 Feb 2012 12:59:19 +0100 Subject: SCUMM: Fix utilization of ARM assembly routines. This fixes bug #3494448. The bug in question is: "SCUMM: Loom PCE Japanese broken on ARM". Thanks to fuzzie and wjp for this patch. If anything is broken after this I take no blame. --- engines/scumm/gfx.cpp | 7 +++---- engines/scumm/gfxARM.s | 4 ---- 2 files changed, 3 insertions(+), 8 deletions(-) (limited to 'engines/scumm') diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp index 48ccdfd1cf..2cf4a429db 100644 --- a/engines/scumm/gfx.cpp +++ b/engines/scumm/gfx.cpp @@ -680,11 +680,10 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i srcPtr += vsPitch; textPtr += _textSurface.pitch - width * m; } - } + } else { #ifdef USE_ARM_GFX_ASM - asmDrawStripToScreen(height, width, text, src, _compositeBuf, vs->pitch, width, _textSurface.pitch); + asmDrawStripToScreen(height, width, text, src, _compositeBuf, vs->pitch, width, _textSurface.pitch); #else - else { // We blit four pixels at a time, for improved performance. const uint32 *src32 = (const uint32 *)src; uint32 *dst32 = (uint32 *)_compositeBuf; @@ -715,8 +714,8 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i src32 += vsPitch; text32 += textPitch; } - } #endif + } src = _compositeBuf; pitch = width * vs->format.bytesPerPixel; diff --git a/engines/scumm/gfxARM.s b/engines/scumm/gfxARM.s index 92f8951466..9238888831 100644 --- a/engines/scumm/gfxARM.s +++ b/engines/scumm/gfxARM.s @@ -59,10 +59,6 @@ _asmDrawStripToScreen: CMP r1,#4 @ If width<4 BLT end @ return - @ Width &= ~4 ? What''s that about then? Width &= ~3 I could have - @ understood... - BIC r1,r1,#4 - SUB r5,r5,r1 @ vsPitch -= width SUB r6,r6,r1 @ vmScreenWidth -= width SUB r7,r7,r1 @ textSurfacePitch -= width -- cgit v1.2.3