subs r10,r10, #0x01000000\r
bmi .dsloop_exit\r
\r
-.dsloop_enter:\r
and r7, r5, r8\r
add r7, lr, r7, lsl #1 @ Pico.vram+((tilex&ts->xmask) as halfwords)\r
ldrh r7, [r7, r12] @ r7=code (int, but from unsigned, no sign extend)\r
and r10, r10, #7\r
mov r10, r10, lsl #1 @ r10=ty\r
\r
+ ldr r6, [r11, #OFS_EST_rendstatus]\r
+ ldr lr, [r11, #OFS_EST_PicoMem_vram]\r
+\r
mov r12, r12, lsl #10\r
\r
tst r4, #1 @ 40 cell mode?\r
addeq r12, r12, r5, lsl #6 @ nametab\r
add r12, r12, r0, lsl #2 @ +starttile\r
\r
- ldr lr, [r11, #OFS_EST_PicoMem_vram]\r
- ldr r6, [r11, #OFS_EST_rendstatus]\r
-\r
- @ fetch the first code now\r
- ldrh r7, [lr, r12]\r
-\r
ands r6, r6, #PDRAW_WND_DIFF_PRIO\r
cmpeq r2, #1 @ prio && !(rendstatus & WND_DIFF_PRIO)?\r
ldmeqfd sp!, {r4-r11,pc} @ yes, assume that whole window uses same priority\r
@ cache some stuff to avoid mem access\r
ldr r11, [r11, #OFS_EST_HighCol]\r
mov r8, r8, lsl #1 @ cells\r
- add r11,r11,#8\r
mvn r9, #0 @ r9=prevcode=-1\r
- add r1, r11, r0, lsl #4 @ r1=pdest\r
+ add r1, r11, r0, lsl #4 @ r1=pdest=HighCol+starttile (+8 added in loop)\r
mov r0, #0xf\r
- b .dwloop_enter\r
\r
@ r4,r5 are scratch in this loop\r
.dwloop:\r
add r1, r1, #8\r
.dwloop_nor1:\r
- add r12, r12, #2 @ halfwords\r
ldrh r7, [lr, r12] @ r7=code (int, but from unsigned, no sign extend)\r
+ add r12, r12, #2 @ halfwords\r
subs r8, r8, #1\r
- beq .dwloop_end @ done\r
+ bmi .dwloop_end @ done\r
\r
eor r5, r6, r7, lsr #15\r
tst r5, #1\r
cmp r7, r9\r
beq .dw_samecode @ we know stuff about this tile already\r
\r
-.dwloop_enter:\r
mov r9, r7 @ remember code\r
\r
movs r2, r9, lsl #20 @ if (code&0x1000)\r