-@ + 0 : hhhhvvvv ab--hhvv yyyyyyyy yyyyyyyy // a: offscreen h, b: offs. v, h: horiz. size\r
-@ + 4 : xxxxxxxx xxxxxxxx pccvhnnn nnnnnnnn // x: x coord + 8\r
+.global DrawAllSprites @ unsigned char *sprited, int prio, int sh\r
+\r
+DrawAllSprites:\r
+ ldr r3, =rendstatus\r
+ orr r1, r2, r1, lsl #1\r
+ ldr r12,[r3]\r
+ tst r12,#(PDRAW_DIRTY_SPRITES|PDRAW_SPRITES_MOVED)\r
+ beq das_no_prep\r
+ stmfd sp!, {r0,r1,lr}\r
+ and r0, r12,#PDRAW_DIRTY_SPRITES\r
+ bic r12,r12,#(PDRAW_DIRTY_SPRITES|PDRAW_SPRITES_MOVED)\r
+ str r12,[r3]\r
+ bl PrepareSprites\r
+ ldmfd sp!, {r0,r1,lr}\r
+\r
+das_no_prep:\r
+ ldr r3, [r0]\r
+ ands r3, r3, #0x7f\r
+ bxeq lr\r
+\r
+ @ time to do some real work\r
+ stmfd sp!, {r4-r11,lr}\r
+ mov r12,#0xff\r
+ strb r12,[r0,#2] @ set end marker\r
+ add r10,r0, #3\r
+ add r10,r10,r3 @ r10=HighLnSpr end\r
+\r
+ str r1, [sp, #-4] @ no calls after this point\r
+\r
+.if OVERRIDE_HIGHCOL\r
+ ldr r11,=HighCol\r
+ mov r12,#0xf\r
+ ldr r11,[r11]\r
+.else\r
+ ldr r11,=HighCol\r
+ mov r12,#0xf\r
+.endif\r
+ ldr lr, =(Pico+0x10000) @ lr=Pico.vram\r