pmd-red/asm/code_801AFA4.s
Seth Barberee 3e5dd1d047
Death by 74 files (#65)
* death by 74 files

* 20% reached

* doc move stuff in pokemon

* fix undef reference

* doc more and plumb a few more constanst for num party members and num moves

* that struct is def PokemonMove.. clean up all code with it
2021-10-22 10:01:07 -07:00

52 lines
745 B
ArmAsm

.include "constants/gba_constants.inc"
.include "asm/macros.inc"
.syntax unified
.text
thumb_func_start sub_801B374
sub_801B374:
push {r4-r6,lr}
lsls r0, 24
lsrs r0, 24
ldr r1, _0801B3A8
ldr r4, [r1]
bl GetItemMove
lsls r0, 16
lsrs r6, r0, 16
movs r5, 0
_0801B388:
ldrh r0, [r4]
lsrs r0, 1
movs r1, 0x1
ands r0, r1
cmp r0, 0
beq _0801B3AC
movs r0, 0x8
ldrsh r1, [r4, r0]
adds r0, r6, 0
bl CanMonLearnMove
lsls r0, 24
cmp r0, 0
beq _0801B3AC
movs r0, 0
b _0801B3BA
.align 2, 0
_0801B3A8: .4byte gRecruitedPokemonRef
_0801B3AC:
adds r5, 0x1
adds r4, 0x58
movs r0, 0xCE
lsls r0, 1
cmp r5, r0
ble _0801B388
movs r0, 0x1
_0801B3BA:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_801B374
.align 2,0