Fix inner battle psi window being reprinted every two frames
This commit is contained in:
parent
3132e180cc
commit
4301e6a747
|
@ -2297,21 +2297,21 @@ pop {r4,pc}
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
//It sets things up to make it so the target window is only printed once
|
//It sets things up to make it so the target window is only printed once
|
||||||
e0854_psi_inner_window_battle:
|
e0854_psi_inner_window_battle:
|
||||||
push {lr}
|
push {r4,lr}
|
||||||
ldrb r1,[r0,#3]
|
mov r4,r0
|
||||||
|
ldrb r1,[r4,#3]
|
||||||
push {r1}
|
push {r1}
|
||||||
ldrh r1,[r0,#0x36] //Stores the cursor's Y of the window
|
ldrh r1,[r4,#0x36] //Stores the cursor's Y of the window
|
||||||
push {r1}
|
push {r1}
|
||||||
ldrh r1,[r0,#0x34] //Stores the cursor's X of the window
|
ldrh r1,[r4,#0x34] //Stores the cursor's X of the window
|
||||||
push {r1}
|
push {r1}
|
||||||
bl PSITargetWindowInput //Input management, target printing and header printing function. Now the function takes the cursor's Y and X as arguments too in the stack
|
bl PSITargetWindowInput //Input management, target printing and header printing function. Now the function takes the cursor's Y and X as arguments too in the stack
|
||||||
pop {r2}
|
pop {r2}
|
||||||
ldr r3,[r4,0x24] //Target window
|
ldrh r1,[r4,#0x34] //Stores the cursor's X of the window
|
||||||
ldrh r1,[r3,#0x34] //Stores the cursor's X of the window
|
|
||||||
cmp r1,r2
|
cmp r1,r2
|
||||||
bne @@store_buffer_first
|
bne @@store_buffer_first
|
||||||
pop {r2}
|
pop {r2}
|
||||||
ldrh r1,[r3,#0x36] //Stores the cursor's Y of the window
|
ldrh r1,[r4,#0x36] //Stores the cursor's Y of the window
|
||||||
cmp r1,r2
|
cmp r1,r2
|
||||||
bne @@store_buffer_second
|
bne @@store_buffer_second
|
||||||
pop {r2}
|
pop {r2}
|
||||||
|
@ -2334,12 +2334,11 @@ bl store_pixels_overworld_psi_window
|
||||||
cmp r0,#0
|
cmp r0,#0
|
||||||
beq @@ending
|
beq @@ending
|
||||||
|
|
||||||
mov r2,#0 //Sets vwf_skip to false since the window is change
|
mov r2,#0 //Sets vwf_skip to false since the window is changed
|
||||||
ldr r1,[r5,0x24] //Target window
|
strb r2,[r4,#3]
|
||||||
strb r2,[r1,#3]
|
|
||||||
|
|
||||||
@@ending:
|
@@ending:
|
||||||
pop {pc}
|
pop {r4,pc}
|
||||||
|
|
||||||
.pool
|
.pool
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue