mirror of
https://github.com/pret/pmd-red.git
synced 2024-11-27 23:10:50 +00:00
99a038284b
This decision was made to reduce the complexity of using .include whilst juggling with tools/scaninc and tools/preproc: - tools/scaninc doesn't apply the proper search rules for .include (it assumes #include behavior). In particular, it doesn't consider paths starting from $PWD, and doesn't scan the included files as a result. - .include had to be processed before #include by preproc in many cases, as code was being included that had to be preprocessed by CPP (think of #define). This contradicts standard GCC behavior. To make include paths consistent across the asm/ data/ and src/ directories, the following files were moved: - constants/ → include/asm/constants/ - asm/macros/ → include/asm/macros/ - asm/macros.inc → include/asm/macros.inc - include/macros/m4a.inc → include/asm/macros/m4a.inc As part of the necessary changes for this to work, the scaninc method in the makefile was improved to generate .d files that don't choke when files are missing.
58 lines
873 B
ArmAsm
58 lines
873 B
ArmAsm
#include "asm/constants/gba_constants.inc"
|
|
#include "asm/macros.inc"
|
|
|
|
.syntax unified
|
|
|
|
.text
|
|
|
|
thumb_func_start sub_803ABC8
|
|
sub_803ABC8:
|
|
push {r4-r6,lr}
|
|
movs r5, 0
|
|
movs r6, 0x1
|
|
_0803ABCE:
|
|
ldr r2, _0803AC08
|
|
movs r0, 0x58
|
|
adds r1, r5, 0
|
|
muls r1, r0
|
|
ldr r0, [r2]
|
|
adds r2, r0, r1
|
|
ldrh r1, [r2]
|
|
adds r0, r6, 0
|
|
ands r0, r1
|
|
cmp r0, 0
|
|
beq _0803AC10
|
|
lsrs r0, r1, 1
|
|
ands r0, r6
|
|
cmp r0, 0
|
|
beq _0803AC10
|
|
ldr r0, _0803AC0C
|
|
ldr r4, [r0]
|
|
movs r1, 0x8
|
|
ldrsh r0, [r2, r1]
|
|
bl GetFriendArea
|
|
ldrb r1, [r4, 0x4]
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
cmp r1, r0
|
|
bne _0803AC10
|
|
movs r0, 0
|
|
b _0803AC1C
|
|
.align 2, 0
|
|
_0803AC08: .4byte gRecruitedPokemonRef
|
|
_0803AC0C: .4byte gUnknown_203B3F4
|
|
_0803AC10:
|
|
adds r5, 0x1
|
|
movs r0, 0xCE
|
|
lsls r0, 1
|
|
cmp r5, r0
|
|
ble _0803ABCE
|
|
movs r0, 0x1
|
|
_0803AC1C:
|
|
pop {r4-r6}
|
|
pop {r1}
|
|
bx r1
|
|
thumb_func_end sub_803ABC8
|
|
|
|
.align 2,0
|