mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-12 01:51:34 +11:00
Done check makes sense to go at the end
This commit is contained in:
parent
cc99aad4c5
commit
1af53aacb4
|
@ -37,8 +37,6 @@ agb_rs__mixer_add:
|
||||||
|
|
||||||
add r12, r12, #2 @ increment the current write offset in the resulting buffer
|
add r12, r12, #2 @ increment the current write offset in the resulting buffer
|
||||||
|
|
||||||
cmp r12, #352 @ check if we're done
|
|
||||||
|
|
||||||
mla r7, r10, r3, r9 @ r7 = r10 * r3 + r9 = current sound value * left amount + previous buffer value
|
mla r7, r10, r3, r9 @ r7 = r10 * r3 + r9 = current sound value * left amount + previous buffer value
|
||||||
strh r7, [r6], r8 @ *(r6 + r8) = r7, r8 = 352 = offset for the right hand side
|
strh r7, [r6], r8 @ *(r6 + r8) = r7, r8 = 352 = offset for the right hand side
|
||||||
|
|
||||||
|
@ -46,6 +44,7 @@ agb_rs__mixer_add:
|
||||||
mla r4, r10, lr, r7
|
mla r4, r10, lr, r7
|
||||||
strh r4, [r6]
|
strh r4, [r6]
|
||||||
|
|
||||||
|
cmp r12, #352 @ check if we're done
|
||||||
bne 1b
|
bne 1b
|
||||||
|
|
||||||
pop {r4-r10, lr}
|
pop {r4-r10, lr}
|
||||||
|
|
Loading…
Reference in a new issue