diff options
author | Cheng Hann Gan <chenghanngan.us@gmail.com> | 2021-12-12 15:52:06 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-12 12:52:06 -0800 |
commit | c53bdc35f8bdd401e90dfae263a3f5fc9182f86b (patch) | |
tree | 6111353227b153e4aa56422d91e4e79288ce7376 /asm/code_808411C.s | |
parent | a34c9ab91b553fcb1f72b94eb912b94bea58885b (diff) |
Dungeon random/AI decomp + converted positions to structs (#83)
* Decomped RollPercentChance()
* Decomped DungeonRandomCapped()
* Decomped DungeonRandom()
* Decomped FindRockItemTargets()
-Added position struct.
Diffstat (limited to 'asm/code_808411C.s')
-rw-r--r-- | asm/code_808411C.s | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/asm/code_808411C.s b/asm/code_808411C.s new file mode 100644 index 0000000..385dd10 --- /dev/null +++ b/asm/code_808411C.s @@ -0,0 +1,31 @@ + .include "constants/gba_constants.inc" + .include "asm/macros.inc" + + .syntax unified + + .text + + thumb_func_start sub_808411C +sub_808411C: + push {r4,r5,lr} + adds r5, r0, 0 + adds r4, r1, 0 + cmp r5, r4 + beq _0808413C + cmp r5, r4 + blt _08084134 + subs r0, r5, r4 + bl DungeonRandomCapped + adds r0, r4 + b _0808413C +_08084134: + subs r0, r4, r5 + bl DungeonRandomCapped + adds r0, r5 +_0808413C: + pop {r4,r5} + pop {r1} + bx r1 + thumb_func_end sub_808411C + + .align 2, 0
\ No newline at end of file |