mirror of
https://github.com/pret/pmd-red.git
synced 2024-11-30 16:30:24 +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.
91 lines
1.3 KiB
ArmAsm
91 lines
1.3 KiB
ArmAsm
#include "asm/constants/gba_constants.inc"
|
|
#include "asm/macros.inc"
|
|
|
|
.syntax unified
|
|
|
|
.text
|
|
|
|
thumb_func_start sub_8070BC0
|
|
sub_8070BC0:
|
|
push {r4-r6,lr}
|
|
adds r4, r0, 0
|
|
ldr r5, [r4, 0x70]
|
|
movs r1, 0
|
|
bl IsCharging
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
bne _08070C56
|
|
adds r6, r5, 0
|
|
adds r6, 0xA8
|
|
ldrb r0, [r6]
|
|
cmp r0, 0x4
|
|
beq _08070C56
|
|
cmp r0, 0x3
|
|
beq _08070C56
|
|
adds r0, r4, 0
|
|
bl ShouldAvoidEnemies
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
bne _08070C56
|
|
adds r0, r5, 0
|
|
adds r0, 0xEC
|
|
ldrb r0, [r0]
|
|
cmp r0, 0x1
|
|
beq _08070C56
|
|
adds r0, r5, 0
|
|
adds r0, 0xB0
|
|
ldrb r1, [r0]
|
|
cmp r1, 0x6
|
|
beq _08070C56
|
|
cmp r1, 0x1
|
|
beq _08070C56
|
|
adds r0, r5, 0
|
|
adds r0, 0xBC
|
|
ldrb r3, [r0]
|
|
adds r4, r0, 0
|
|
cmp r3, 0x2
|
|
beq _08070C56
|
|
ldrb r2, [r6]
|
|
cmp r2, 0x1
|
|
beq _08070C56
|
|
adds r0, r5, 0
|
|
adds r0, 0xE4
|
|
ldrb r0, [r0]
|
|
cmp r0, 0x1
|
|
beq _08070C56
|
|
cmp r2, 0x5
|
|
beq _08070C56
|
|
cmp r3, 0x1
|
|
beq _08070C56
|
|
cmp r1, 0x3
|
|
beq _08070C56
|
|
cmp r1, 0x4
|
|
beq _08070C56
|
|
adds r0, r5, 0
|
|
adds r0, 0xE8
|
|
ldrb r1, [r0]
|
|
cmp r1, 0x2
|
|
beq _08070C56
|
|
adds r0, r5, 0
|
|
adds r0, 0xC8
|
|
ldrb r0, [r0]
|
|
cmp r0, 0x2
|
|
beq _08070C56
|
|
cmp r1, 0x1
|
|
beq _08070C56
|
|
ldrb r0, [r4]
|
|
cmp r0, 0x7
|
|
beq _08070C56
|
|
cmp r0, 0x3
|
|
beq _08070C56
|
|
movs r0, 0x1
|
|
b _08070C58
|
|
_08070C56:
|
|
movs r0, 0
|
|
_08070C58:
|
|
pop {r4-r6}
|
|
pop {r1}
|
|
bx r1
|
|
thumb_func_end sub_8070BC0
|
|
|
|
.align 2, 0 |