fixed some renderer regressions
[picodrive.git] / Pico / Draw.s
index f310253..94739b8 100644 (file)
@@ -1132,8 +1132,8 @@ DrawSprite:
     tst     r9, #0x8000\r
     tsteq   r9, #(1<<27)\r
     bne     .dspr_cache       @ if(code&0x8000) || as\r
-    tst     r6, #0x4000\r
-    tstne   r6, #0x2000\r
+    tst     r9, #0x4000\r
+    tstne   r9, #0x2000\r
     tstne   r9, #(1<<31)\r
     bne     .dspr_cache       @ (sh && pal == 0x30)\r
 \r
@@ -1294,8 +1294,9 @@ DrawWindow:
     ands    r6, r6, #2            @ we care about bit 1 only\r
     orr     r6, r6, r2\r
 \r
-    teqne   r2, r7, lsr #15       @ do prio bits differ?\r
-    ldmnefd sp!, {r4-r11,pc}      @ yes, assume that whole window uses same priority\r
+    eoreq   r8, r2, r7, lsr #15   @ do prio bits differ?\r
+    cmpeq   r8, #1\r
+    ldmeqfd sp!, {r4-r11,pc}      @ yes, assume that whole window uses same priority\r
 \r
     orr     r6, r6, r3, lsl #8    @ shadow mode\r
 \r