2 * (C) GraÅžvydas "notaz" Ignotas, 2011
4 * This work is licensed under the terms of GNU GPL, version 2 or later.
5 * See the COPYING file in the top-level directory.
8 #include "arm_features.h"
13 @ in: r0=dst, r2=pal, r12=0x1e
14 @ trashes r6-r8,lr,flags
15 .macro do_4_pixels rs ibase obase
17 and r6, r12, \rs, lsl #1
19 and r6, r12, \rs, lsr #\ibase-1
21 and r7, r12, \rs, lsr #\ibase+3
22 and r8, r12, \rs, lsr #\ibase+7
23 and lr, r12, \rs, lsr #\ibase+11
29 strneh r6, [r0, #\obase+0]
31 strneh r7, [r0, #\obase+2]
33 strneh r8, [r0, #\obase+4]
35 strneh lr, [r0, #\obase+6]
38 .global draw_spr16_full @ (u16 *d, void *s, u16 *pal, int lines)
41 mov r12, #0x1e @ empty pixel
48 do_4_pixels r5, 16, 24