aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorLars Persson2008-02-03 12:32:19 +0000
committerLars Persson2008-02-03 12:32:19 +0000
commitc8529408189694a0594c17a69bc560a96b6b4759 (patch)
treea872eb7b958876b0323459c750005ff1f9e21518 /engines/scumm
parentc6595e3bd20bb603b71e394eff5a41e7a945b8b7 (diff)
downloadscummvm-rg350-c8529408189694a0594c17a69bc560a96b6b4759.tar.gz
scummvm-rg350-c8529408189694a0594c17a69bc560a96b6b4759.tar.bz2
scummvm-rg350-c8529408189694a0594c17a69bc560a96b6b4759.zip
Added asmCopy8Col from DS implementation. Changed names to match GFX.cpp (and DS names)
svn-id: r30759
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/gfxARM.s41
1 files changed, 40 insertions, 1 deletions
diff --git a/engines/scumm/gfxARM.s b/engines/scumm/gfxARM.s
index 78f36f324a..cd3e5c7dad 100644
--- a/engines/scumm/gfxARM.s
+++ b/engines/scumm/gfxARM.s
@@ -23,7 +23,8 @@
.text
.global asmDrawStripToScreen
-
+ .global asmCopy8Col
+
@ ARM implementation of asmDrawStripToScreen.
@
@ C prototype would be:
@@ -118,3 +119,41 @@ singleByteCompare:
BGT yLoop
end:
LDMFD r13!,{r4-r7,r9-r11,PC}
+
+ @ ARM implementation of asmCopy8Col
+ @
+ @ C prototype would be:
+ @
+ @ extern "C" void asmCopy8Col(byte *dst,
+ @ int dstPitch,
+ @ const byte *src,
+ @ int height);
+ @
+ @ In addition, we assume that src and dst are both word (4 byte)
+ @ aligned. This is the same assumption that the old 'inline' version
+ @ made.
+asmCopy8Col:
+ @ r0 = dst
+ @ r1 = dstPitch
+ @ r2 = src
+ @ r3 = height
+ STMFD r13!,{r14}
+ SUB r1,r1,#4
+
+ TST r3,#1
+ ADDNE r3,r3,#1
+ BNE roll2
+yLoop2:
+ LDR r12,[r2],#4
+ LDR r14,[r2],r1
+ STR r12,[r0],#4
+ STR r14,[r0],r1
+roll2:
+ LDR r12,[r2],#4
+ LDR r14,[r2],r1
+ SUBS r3,r3,#2
+ STR r12,[r0],#4
+ STR r14,[r0],r1
+ BNE yLoop2
+
+ LDMFD r13!,{PC}