diff options
Diffstat (limited to 'engines/scumm/gfxARM.s')
-rw-r--r-- | engines/scumm/gfxARM.s | 42 |
1 files changed, 38 insertions, 4 deletions
diff --git a/engines/scumm/gfxARM.s b/engines/scumm/gfxARM.s index f3a1f20303..e78487d777 100644 --- a/engines/scumm/gfxARM.s +++ b/engines/scumm/gfxARM.s @@ -116,7 +116,8 @@ end: @ extern "C" void asmCopy8Col(byte *dst, @ int dstPitch, @ const byte *src, - @ int height); + @ int height, + @ uint8 bitdepth); @ @ In addition, we assume that src and dst are both word (4 byte) @ aligned. This is the same assumption that the old 'inline' version @@ -126,9 +127,13 @@ asmCopy8Col: @ r1 = dstPitch @ r2 = src @ r3 = height - STMFD r13!,{r14} - SUB r1,r1,#4 + @ <> = bitdepth (badly named, should be bytedepth, 1 or 2) + LDR r12,[r13] + STR r14,[r13,#-4]! + CMP r12,#1 + BNE copy8Col16 + SUB r1,r1,#4 TST r3,#1 ADDNE r3,r3,#1 BNE roll2 @@ -145,4 +150,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} |