diff options
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/gfx.cpp | 8 | ||||
-rw-r--r-- | engines/scumm/gfxARM.s | 39 | ||||
-rw-r--r-- | engines/scumm/he/sound_he.cpp | 2 |
3 files changed, 41 insertions, 8 deletions
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp index 1802d0d39c..c6e2cd3312 100644 --- a/engines/scumm/gfx.cpp +++ b/engines/scumm/gfx.cpp @@ -38,7 +38,7 @@ #ifdef USE_ARM_GFX_ASM extern "C" void asmDrawStripToScreen(int height, int width, void const* text, void const* src, byte* dst, int vsPitch, int vmScreenWidth, int textSurfacePitch); -extern "C" void asmCopy8Col(byte* dst, int dstPitch, const byte* src, int height); +extern "C" void asmCopy8Col(byte* dst, int dstPitch, const byte* src, int height, uint8_t bitDepth); #endif /* USE_ARM_GFX_ASM */ namespace Scumm { @@ -784,8 +784,8 @@ void ditherHerc(byte *src, byte *hercbuf, int srcPitch, int *x, int *y, int *wid } void scale2x(byte *dst, int dstPitch, const byte *src, int srcPitch, int w, int h) { - uint16 *dstL1 = (uint16 *)dst; - uint16 *dstL2 = (uint16 *)(dst + dstPitch); + uint16 *dstL1 = (uint16 *)(void *)dst; + uint16 *dstL2 = (uint16 *)(void *)(dst + dstPitch); const int dstAdd = dstPitch - w; const int srcAdd = srcPitch - w; @@ -1114,7 +1114,7 @@ static void fill(byte *dst, int dstPitch, uint16 color, int w, int h, uint8 bitD #ifdef USE_ARM_GFX_ASM -#define copy8Col(A,B,C,D) asmCopy8Col(A,B,C,D) +#define copy8Col(A,B,C,D,E) asmCopy8Col(A,B,C,D,E) #else diff --git a/engines/scumm/gfxARM.s b/engines/scumm/gfxARM.s index f3a1f20303..adcd4bfac5 100644 --- a/engines/scumm/gfxARM.s +++ b/engines/scumm/gfxARM.s @@ -126,9 +126,13 @@ asmCopy8Col: @ r1 = dstPitch @ r2 = src @ r3 = height - STMFD r13!,{r14} - SUB r1,r1,#4 + @ <> = bitdepth + LDR r12,[r13] + STR r14,[r13,#-4]! + CMP r12,#8 + BNE copy8Col16 + SUB r1,r1,#4 TST r3,#1 ADDNE r3,r3,#1 BNE roll2 @@ -145,4 +149,33 @@ roll2: STR r14,[r0],r1 BNE yLoop2 - LDMFD r13!,{PC} + LDR PC,[r13],#4 + +copy8Col16: + STMFD r13!,{r4-r5} + SUB r1,r1,#12 + TST r3,#1 + ADDNE r3,r3,#1 + BNE roll3 +yLoop3: + LDR r4, [r2],#4 + LDR r5, [r2],#4 + LDR r12,[r2],#4 + LDR r14,[r2],r1 + STR r4, [r0],#4 + STR r5, [r0],#4 + STR r12,[r0],#4 + STR r14,[r0],r1 +roll3: + LDR r4, [r2],#4 + LDR r5, [r2],#4 + LDR r12,[r2],#4 + LDR r14,[r2],r1 + SUBS r3,r3,#2 + STR r4, [r0],#4 + STR r5, [r0],#4 + STR r12,[r0],#4 + STR r14,[r0],r1 + BNE yLoop3 + + LDMFD r13!,{r4,r5,PC} diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp index 01f29d5db9..feaf273b4e 100644 --- a/engines/scumm/he/sound_he.cpp +++ b/engines/scumm/he/sound_he.cpp @@ -645,7 +645,7 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags) Audio::AudioStream *voxStream = Audio::makeADPCMStream(&stream, false, size, Audio::kADPCMMSIma, rate, (flags & Audio::Mixer::FLAG_STEREO) ? 2 : 1, blockAlign); sound = (char *)malloc(size * 4); - size = voxStream->readBuffer((int16*)sound, size * 2); + size = voxStream->readBuffer((int16*)(void *)sound, size * 2); size *= 2; // 16bits. delete voxStream; |