mirror of
https://github.com/pret/pokeheartgold.git
synced 2024-11-27 23:20:40 +00:00
869 lines
16 KiB
ArmAsm
869 lines
16 KiB
ArmAsm
#include "constants/sndseq.h"
|
|
#include "constants/moves.h"
|
|
#include "constants/std_script.h"
|
|
#include "constants/species.h"
|
|
#include "constants/sprites.h"
|
|
#include "constants/maps.h"
|
|
#include "constants/mmodel.h"
|
|
#include "constants/items.h"
|
|
#include "msgdata/msg/msg_0096_D31R0201.h"
|
|
#include "msgdata/msg/msg_0066_D23R0102.h"
|
|
.include "asm/macros.inc"
|
|
.include "overlay_01_021FD41C.inc"
|
|
.include "global.inc"
|
|
|
|
.text
|
|
|
|
thumb_func_start ov01_021FD41C
|
|
ov01_021FD41C: ; 0x021FD41C
|
|
push {r3, r4, r5, lr}
|
|
mov r1, #0x72
|
|
mov r2, #0
|
|
lsl r1, r1, #2
|
|
add r3, r2, #0
|
|
add r5, r0, #0
|
|
bl ov01_021F1430
|
|
add r4, r0, #0
|
|
str r5, [r4, #0x20]
|
|
bl ov01_021FD5CC
|
|
add r0, r4, #0
|
|
bl ov01_021FD458
|
|
add r0, r4, #0
|
|
pop {r3, r4, r5, pc}
|
|
.balign 4, 0
|
|
thumb_func_end ov01_021FD41C
|
|
|
|
thumb_func_start ov01_021FD440
|
|
ov01_021FD440: ; 0x021FD440
|
|
push {r4, lr}
|
|
add r4, r0, #0
|
|
bl ov01_021FD47C
|
|
add r0, r4, #0
|
|
bl ov01_021FD60C
|
|
add r0, r4, #0
|
|
bl ov01_021F1448
|
|
pop {r4, pc}
|
|
.balign 4, 0
|
|
thumb_func_end ov01_021FD440
|
|
|
|
thumb_func_start ov01_021FD458
|
|
ov01_021FD458: ; 0x021FD458
|
|
push {r4, lr}
|
|
add r4, r0, #0
|
|
ldr r0, [r4, #0x20]
|
|
bl ov01_021F1468
|
|
ldr r0, [r0, #0x3c]
|
|
bl MapObjectManager_GetHeapID
|
|
sub r2, r0, #1
|
|
ldr r0, _021FD478 ; =ov01_021FD4F4
|
|
add r1, r4, #0
|
|
bl CreateSysTask
|
|
str r0, [r4, #0x24]
|
|
pop {r4, pc}
|
|
nop
|
|
_021FD478: .word ov01_021FD4F4
|
|
thumb_func_end ov01_021FD458
|
|
|
|
thumb_func_start ov01_021FD47C
|
|
ov01_021FD47C: ; 0x021FD47C
|
|
ldr r3, _021FD484 ; =sub_0200E390
|
|
ldr r0, [r0, #0x24]
|
|
bx r3
|
|
nop
|
|
_021FD484: .word DestroySysTask
|
|
thumb_func_end ov01_021FD47C
|
|
|
|
thumb_func_start ov01_021FD488
|
|
ov01_021FD488: ; 0x021FD488
|
|
add r2, r0, #0
|
|
add r2, #0x14
|
|
add r3, r1, #0
|
|
ldmia r2!, {r0, r1}
|
|
stmia r3!, {r0, r1}
|
|
ldr r0, [r2]
|
|
str r0, [r3]
|
|
bx lr
|
|
thumb_func_end ov01_021FD488
|
|
|
|
thumb_func_start ov01_021FD498
|
|
ov01_021FD498: ; 0x021FD498
|
|
asr r1, r0, #0xb
|
|
lsr r1, r1, #0x14
|
|
add r1, r0, r1
|
|
asr r0, r1, #0xc
|
|
bx lr
|
|
.balign 4, 0
|
|
thumb_func_end ov01_021FD498
|
|
|
|
thumb_func_start ov01_021FD4A4
|
|
ov01_021FD4A4: ; 0x021FD4A4
|
|
ldr r1, [r0, #4]
|
|
lsl r2, r1, #2
|
|
ldr r1, _021FD4C8 ; =ov01_02208EB4
|
|
ldr r1, [r1, r2]
|
|
str r1, [r0, #0x10]
|
|
ldr r2, [r0, #4]
|
|
mov r1, #0xc
|
|
add r3, r2, #0
|
|
mul r3, r1
|
|
ldr r1, _021FD4CC ; =ov01_02208F38
|
|
add r2, r0, #0
|
|
add r3, r1, r3
|
|
ldmia r3!, {r0, r1}
|
|
add r2, #0x14
|
|
stmia r2!, {r0, r1}
|
|
ldr r0, [r3]
|
|
str r0, [r2]
|
|
bx lr
|
|
.balign 4, 0
|
|
_021FD4C8: .word ov01_02208EB4
|
|
_021FD4CC: .word ov01_02208F38
|
|
thumb_func_end ov01_021FD4A4
|
|
|
|
thumb_func_start ov01_021FD4D0
|
|
ov01_021FD4D0: ; 0x021FD4D0
|
|
ldr r3, [r0]
|
|
cmp r3, r1
|
|
bge _021FD4E2
|
|
add r2, r3, r2
|
|
str r2, [r0]
|
|
cmp r2, r1
|
|
ble _021FD4F0
|
|
str r1, [r0]
|
|
bx lr
|
|
_021FD4E2:
|
|
cmp r3, r1
|
|
ble _021FD4F0
|
|
sub r2, r3, r2
|
|
str r2, [r0]
|
|
cmp r2, r1
|
|
bge _021FD4F0
|
|
str r1, [r0]
|
|
_021FD4F0:
|
|
bx lr
|
|
.balign 4, 0
|
|
thumb_func_end ov01_021FD4D0
|
|
|
|
thumb_func_start ov01_021FD4F4
|
|
ov01_021FD4F4: ; 0x021FD4F4
|
|
push {r3, r4, r5, r6, r7, lr}
|
|
sub sp, #0x10
|
|
add r5, r1, #0
|
|
bl GF_RTC_GetTimeOfDay
|
|
ldr r1, [r5]
|
|
add r4, r0, #0
|
|
cmp r1, #0
|
|
beq _021FD512
|
|
cmp r1, #1
|
|
beq _021FD534
|
|
cmp r1, #2
|
|
beq _021FD53E
|
|
add sp, #0x10
|
|
pop {r3, r4, r5, r6, r7, pc}
|
|
_021FD512:
|
|
str r4, [r5, #4]
|
|
add r0, r5, #0
|
|
add r1, r4, #0
|
|
bl ov01_021FD4A4
|
|
ldr r0, [r5, #0x10]
|
|
bl ov01_021FD498
|
|
add r1, r0, #0
|
|
add r0, r5, #0
|
|
bl ov01_021FD624
|
|
ldr r0, [r5]
|
|
add sp, #0x10
|
|
add r0, r0, #1
|
|
str r0, [r5]
|
|
pop {r3, r4, r5, r6, r7, pc}
|
|
_021FD534:
|
|
ldr r0, [r5, #4]
|
|
cmp r0, r4
|
|
beq _021FD5C0
|
|
add r0, r1, #1
|
|
str r0, [r5]
|
|
_021FD53E:
|
|
ldr r0, _021FD5C4 ; =ov01_02208EB4
|
|
lsl r1, r4, #2
|
|
ldr r6, [r0, r1]
|
|
mov r0, #0xc
|
|
add r1, r4, #0
|
|
mul r1, r0
|
|
ldr r0, _021FD5C8 ; =ov01_02208F38
|
|
add r2, sp, #4
|
|
add r3, r0, r1
|
|
ldmia r3!, {r0, r1}
|
|
stmia r2!, {r0, r1}
|
|
ldr r0, [r3]
|
|
str r0, [r2]
|
|
add r0, r5, #0
|
|
ldr r1, [sp, #4]
|
|
add r0, #0x14
|
|
mov r2, #0x10
|
|
bl ov01_021FD4D0
|
|
ldr r0, [sp, #8]
|
|
mov r2, #0x10
|
|
str r0, [sp]
|
|
add r0, r5, #0
|
|
ldr r1, [sp]
|
|
add r0, #0x18
|
|
bl ov01_021FD4D0
|
|
ldr r7, [sp, #0xc]
|
|
add r0, r5, #0
|
|
add r0, #0x1c
|
|
add r1, r7, #0
|
|
mov r2, #0x10
|
|
bl ov01_021FD4D0
|
|
add r0, r5, #0
|
|
mov r2, #2
|
|
add r0, #0x10
|
|
add r1, r6, #0
|
|
lsl r2, r2, #8
|
|
bl ov01_021FD4D0
|
|
ldr r0, [r5, #0x10]
|
|
bl ov01_021FD498
|
|
add r1, r0, #0
|
|
add r0, r5, #0
|
|
bl ov01_021FD624
|
|
ldr r1, [sp, #4]
|
|
ldr r0, [r5, #0x14]
|
|
cmp r1, r0
|
|
bne _021FD5C0
|
|
ldr r1, [r5, #0x18]
|
|
ldr r0, [sp]
|
|
cmp r0, r1
|
|
bne _021FD5C0
|
|
ldr r0, [r5, #0x1c]
|
|
cmp r7, r0
|
|
bne _021FD5C0
|
|
ldr r0, [r5, #0x10]
|
|
cmp r6, r0
|
|
bne _021FD5C0
|
|
str r4, [r5, #4]
|
|
mov r0, #1
|
|
str r0, [r5]
|
|
_021FD5C0:
|
|
add sp, #0x10
|
|
pop {r3, r4, r5, r6, r7, pc}
|
|
.balign 4, 0
|
|
_021FD5C4: .word ov01_02208EB4
|
|
_021FD5C8: .word ov01_02208F38
|
|
thumb_func_end ov01_021FD4F4
|
|
|
|
thumb_func_start ov01_021FD5CC
|
|
ov01_021FD5CC: ; 0x021FD5CC
|
|
push {r3, r4, r5, r6, r7, lr}
|
|
sub sp, #8
|
|
add r4, r0, #0
|
|
add r5, r0, #0
|
|
ldr r6, _021FD608 ; =ov01_02208E90
|
|
str r0, [sp, #4]
|
|
mov r7, #0
|
|
add r4, #0x28
|
|
add r5, #0x78
|
|
_021FD5DE:
|
|
mov r0, #0
|
|
str r0, [sp]
|
|
ldr r0, [sp, #4]
|
|
ldr r3, [r6]
|
|
ldr r0, [r0, #0x20]
|
|
add r1, r4, #0
|
|
mov r2, #0
|
|
bl ov01_021F19F4
|
|
add r0, r5, #0
|
|
add r1, r4, #0
|
|
bl sub_02069978
|
|
add r7, r7, #1
|
|
add r6, r6, #4
|
|
add r4, #0x14
|
|
add r5, #0x54
|
|
cmp r7, #4
|
|
blt _021FD5DE
|
|
add sp, #8
|
|
pop {r3, r4, r5, r6, r7, pc}
|
|
.balign 4, 0
|
|
_021FD608: .word ov01_02208E90
|
|
thumb_func_end ov01_021FD5CC
|
|
|
|
thumb_func_start ov01_021FD60C
|
|
ov01_021FD60C: ; 0x021FD60C
|
|
push {r3, r4, r5, lr}
|
|
add r5, r0, #0
|
|
mov r4, #0
|
|
add r5, #0x28
|
|
_021FD614:
|
|
add r0, r5, #0
|
|
bl sub_02069784
|
|
add r4, r4, #1
|
|
add r5, #0x14
|
|
cmp r4, #4
|
|
blt _021FD614
|
|
pop {r3, r4, r5, pc}
|
|
thumb_func_end ov01_021FD60C
|
|
|
|
thumb_func_start ov01_021FD624
|
|
ov01_021FD624: ; 0x021FD624
|
|
push {r3, r4, r5, lr}
|
|
add r5, r0, #0
|
|
mov r2, #0x1f
|
|
add r4, r1, #0
|
|
ldr r0, [r5, #0x34]
|
|
mov r1, #1
|
|
lsl r2, r2, #0x10
|
|
bl NNSi_G3dModifyPolygonAttrMask
|
|
ldr r0, [r5, #0x34]
|
|
add r1, r4, #0
|
|
bl NNS_G3dMdlSetMdlAlphaAll
|
|
pop {r3, r4, r5, pc}
|
|
thumb_func_end ov01_021FD624
|
|
|
|
thumb_func_start ov01_021FD640
|
|
ov01_021FD640: ; 0x021FD640
|
|
push {r3, r4, r5, lr}
|
|
sub sp, #0x20
|
|
add r5, r0, #0
|
|
bl ov01_021F146C
|
|
add r4, r0, #0
|
|
mov r1, #0
|
|
str r4, [sp, #0x14]
|
|
bl ov01_021F1450
|
|
str r0, [sp, #0x18]
|
|
add r0, r5, #0
|
|
add r1, sp, #8
|
|
str r5, [sp, #0x1c]
|
|
bl MapObject_GetPositionVec
|
|
add r0, r5, #0
|
|
mov r1, #2
|
|
bl sub_0205F09C
|
|
add r1, sp, #0x14
|
|
str r1, [sp]
|
|
str r0, [sp, #4]
|
|
ldr r1, _021FD680 ; =ov01_02208EA0
|
|
add r0, r4, #0
|
|
add r2, sp, #8
|
|
mov r3, #0
|
|
bl ov01_021F1620
|
|
add sp, #0x20
|
|
pop {r3, r4, r5, pc}
|
|
nop
|
|
_021FD680: .word ov01_02208EA0
|
|
thumb_func_end ov01_021FD640
|
|
|
|
thumb_func_start ov01_021FD684
|
|
ov01_021FD684: ; 0x021FD684
|
|
push {r3, r4, r5, lr}
|
|
sub sp, #0x20
|
|
add r5, r0, #0
|
|
bl ov01_021F146C
|
|
add r4, r0, #0
|
|
mov r1, #0
|
|
str r4, [sp, #0x14]
|
|
bl ov01_021F1450
|
|
str r0, [sp, #0x18]
|
|
add r0, r5, #0
|
|
add r1, sp, #8
|
|
str r5, [sp, #0x1c]
|
|
bl MapObject_GetPositionVec
|
|
add r0, r5, #0
|
|
mov r1, #2
|
|
bl sub_0205F09C
|
|
add r1, sp, #0x14
|
|
str r1, [sp]
|
|
str r0, [sp, #4]
|
|
ldr r1, _021FD6C4 ; =ov01_02208EC8
|
|
add r0, r4, #0
|
|
add r2, sp, #8
|
|
mov r3, #3
|
|
bl ov01_021F1620
|
|
add sp, #0x20
|
|
pop {r3, r4, r5, pc}
|
|
nop
|
|
_021FD6C4: .word ov01_02208EC8
|
|
thumb_func_end ov01_021FD684
|
|
|
|
thumb_func_start ov01_021FD6C8
|
|
ov01_021FD6C8: ; 0x021FD6C8
|
|
push {r3, r4, r5, lr}
|
|
add r5, r0, #0
|
|
add r4, r1, #0
|
|
bl sub_02068D98
|
|
add r3, r0, #0
|
|
add r2, r4, #0
|
|
ldmia r3!, {r0, r1}
|
|
add r2, #0x14
|
|
stmia r2!, {r0, r1}
|
|
ldr r0, [r3]
|
|
str r0, [r2]
|
|
add r0, r5, #0
|
|
bl sub_02068D90
|
|
str r0, [r4, #0x10]
|
|
ldr r0, [r4, #0x1c]
|
|
bl MapObject_GetGfxID
|
|
str r0, [r4]
|
|
ldr r0, [r4, #0x1c]
|
|
bl MapObject_GetID
|
|
str r0, [r4, #4]
|
|
ldr r0, [r4, #0x1c]
|
|
bl MapObject_CheckFlag25
|
|
cmp r0, #1
|
|
ldr r0, [r4, #0x1c]
|
|
bne _021FD70A
|
|
bl sub_0205F544
|
|
b _021FD70E
|
|
_021FD70A:
|
|
bl sub_0205F254
|
|
_021FD70E:
|
|
str r0, [r4, #8]
|
|
mov r0, #1
|
|
pop {r3, r4, r5, pc}
|
|
thumb_func_end ov01_021FD6C8
|
|
|
|
thumb_func_start ov01_021FD714
|
|
ov01_021FD714: ; 0x021FD714
|
|
bx lr
|
|
.balign 4, 0
|
|
thumb_func_end ov01_021FD714
|
|
|
|
thumb_func_start ov01_021FD718
|
|
ov01_021FD718: ; 0x021FD718
|
|
push {r3, r4, r5, r6, lr}
|
|
sub sp, #0xc
|
|
add r4, r1, #0
|
|
ldr r6, [r4, #0x1c]
|
|
ldr r1, [r4]
|
|
add r5, r0, #0
|
|
ldr r2, [r4, #4]
|
|
ldr r3, [r4, #8]
|
|
add r0, r6, #0
|
|
bl sub_0205F0F8
|
|
cmp r0, #0
|
|
bne _021FD73C
|
|
add r0, r5, #0
|
|
bl ov01_021F1640
|
|
add sp, #0xc
|
|
pop {r3, r4, r5, r6, pc}
|
|
_021FD73C:
|
|
add r0, r6, #0
|
|
mov r1, #8
|
|
bl sub_0205F5E8
|
|
cmp r0, #0
|
|
beq _021FD752
|
|
add r0, r5, #0
|
|
bl ov01_021F1640
|
|
add sp, #0xc
|
|
pop {r3, r4, r5, r6, pc}
|
|
_021FD752:
|
|
mov r0, #0
|
|
str r0, [r4, #0xc]
|
|
ldr r1, _021FD780 ; =0x00100200
|
|
add r0, r6, #0
|
|
bl MapObject_TestFlagsBits
|
|
cmp r0, #1
|
|
bne _021FD76A
|
|
mov r0, #1
|
|
add sp, #0xc
|
|
str r0, [r4, #0xc]
|
|
pop {r3, r4, r5, r6, pc}
|
|
_021FD76A:
|
|
add r0, r6, #0
|
|
add r1, sp, #0
|
|
bl MapObject_GetPositionVec
|
|
add r0, r5, #0
|
|
add r1, sp, #0
|
|
bl sub_02068DA8
|
|
add sp, #0xc
|
|
pop {r3, r4, r5, r6, pc}
|
|
nop
|
|
_021FD780: .word 0x00100200
|
|
thumb_func_end ov01_021FD718
|
|
|
|
thumb_func_start ov01_021FD784
|
|
ov01_021FD784: ; 0x021FD784
|
|
push {r3, r4, r5, lr}
|
|
add r5, r0, #0
|
|
add r4, r1, #0
|
|
bl sub_02068D98
|
|
add r3, r0, #0
|
|
add r2, r4, #0
|
|
ldmia r3!, {r0, r1}
|
|
add r2, #0x14
|
|
stmia r2!, {r0, r1}
|
|
ldr r0, [r3]
|
|
str r0, [r2]
|
|
add r0, r5, #0
|
|
bl sub_02068D90
|
|
str r0, [r4, #0x10]
|
|
ldr r0, [r4, #0x1c]
|
|
bl MapObject_GetGfxID
|
|
str r0, [r4]
|
|
ldr r0, [r4, #0x1c]
|
|
bl MapObject_GetID
|
|
str r0, [r4, #4]
|
|
ldr r0, [r4, #0x1c]
|
|
bl MapObject_CheckFlag25
|
|
cmp r0, #1
|
|
ldr r0, [r4, #0x1c]
|
|
bne _021FD7C6
|
|
bl sub_0205F544
|
|
b _021FD7CA
|
|
_021FD7C6:
|
|
bl sub_0205F254
|
|
_021FD7CA:
|
|
str r0, [r4, #8]
|
|
mov r0, #1
|
|
str r0, [r4, #0xc]
|
|
pop {r3, r4, r5, pc}
|
|
.balign 4, 0
|
|
thumb_func_end ov01_021FD784
|
|
|
|
thumb_func_start ov01_021FD7D4
|
|
ov01_021FD7D4: ; 0x021FD7D4
|
|
push {r3, r4, r5, r6, lr}
|
|
sub sp, #0x3c
|
|
add r2, r1, #0
|
|
add r4, r0, #0
|
|
ldr r0, [r2, #0xc]
|
|
cmp r0, #0
|
|
bne _021FD82E
|
|
ldr r6, _021FD834 ; =ov01_02208F14
|
|
add r5, sp, #0
|
|
mov r3, #4
|
|
_021FD7E8:
|
|
ldmia r6!, {r0, r1}
|
|
stmia r5!, {r0, r1}
|
|
sub r3, r3, #1
|
|
bne _021FD7E8
|
|
ldr r0, [r6]
|
|
add r1, sp, #0x24
|
|
str r0, [r5]
|
|
ldr r5, [r2, #0x18]
|
|
add r0, r5, #0
|
|
bl ov01_021FD488
|
|
add r0, r4, #0
|
|
add r1, sp, #0x30
|
|
bl sub_02068DB8
|
|
mov r0, #2
|
|
ldr r1, [sp, #0x30]
|
|
lsl r0, r0, #0xa
|
|
sub r1, r1, r0
|
|
str r1, [sp, #0x30]
|
|
lsl r1, r0, #3
|
|
ldr r2, [sp, #0x34]
|
|
lsl r0, r0, #1
|
|
sub r1, r2, r1
|
|
str r1, [sp, #0x34]
|
|
ldr r1, [sp, #0x38]
|
|
add r5, #0x78
|
|
add r0, r1, r0
|
|
str r0, [sp, #0x38]
|
|
add r0, r5, #0
|
|
add r1, sp, #0x30
|
|
add r2, sp, #0x24
|
|
add r3, sp, #0
|
|
bl sub_020699AC
|
|
_021FD82E:
|
|
add sp, #0x3c
|
|
pop {r3, r4, r5, r6, pc}
|
|
nop
|
|
_021FD834: .word ov01_02208F14
|
|
thumb_func_end ov01_021FD7D4
|
|
|
|
thumb_func_start ov01_021FD838
|
|
ov01_021FD838: ; 0x021FD838
|
|
push {r4, r5, r6, lr}
|
|
sub sp, #0x48
|
|
add r2, r1, #0
|
|
add r6, r0, #0
|
|
ldr r0, [r2, #0xc]
|
|
cmp r0, #0
|
|
bne _021FD8E0
|
|
ldr r5, _021FD8E4 ; =ov01_02208EF0
|
|
add r4, sp, #0xc
|
|
mov r3, #4
|
|
_021FD84C:
|
|
ldmia r5!, {r0, r1}
|
|
stmia r4!, {r0, r1}
|
|
sub r3, r3, #1
|
|
bne _021FD84C
|
|
ldr r0, [r5]
|
|
add r1, sp, #0x30
|
|
str r0, [r4]
|
|
ldr r0, [r2, #0x18]
|
|
ldr r4, [r2, #0x1c]
|
|
add r5, r0, #0
|
|
add r5, #0x78
|
|
bl ov01_021FD488
|
|
add r0, r4, #0
|
|
bl ov01_021F8F88
|
|
cmp r0, #0
|
|
add r1, sp, #0x3c
|
|
beq _021FD8A0
|
|
add r0, r6, #0
|
|
bl sub_02068DB8
|
|
mov r0, #2
|
|
ldr r1, [sp, #0x3c]
|
|
lsl r0, r0, #0xa
|
|
sub r1, r1, r0
|
|
str r1, [sp, #0x3c]
|
|
lsl r1, r0, #3
|
|
ldr r2, [sp, #0x40]
|
|
lsl r0, r0, #1
|
|
sub r1, r2, r1
|
|
str r1, [sp, #0x40]
|
|
ldr r1, [sp, #0x44]
|
|
add r0, r1, r0
|
|
str r0, [sp, #0x44]
|
|
add r0, r4, #0
|
|
bl MapObject_GetFacingDirection
|
|
add r1, sp, #0x3c
|
|
bl ov01_021FD9CC
|
|
b _021FD8D4
|
|
_021FD8A0:
|
|
add r0, r4, #0
|
|
bl MapObject_GetPositionVec
|
|
add r0, r4, #0
|
|
add r1, sp, #0
|
|
bl ov01_021F8FA0
|
|
ldr r1, [sp, #0x3c]
|
|
ldr r0, [sp]
|
|
ldr r3, [sp, #0x40]
|
|
add r2, r1, r0
|
|
ldr r1, [sp, #0x44]
|
|
ldr r0, [sp, #8]
|
|
str r2, [sp, #0x3c]
|
|
add r0, r1, r0
|
|
mov r1, #2
|
|
lsl r1, r1, #0xa
|
|
sub r2, r2, r1
|
|
str r2, [sp, #0x3c]
|
|
lsl r2, r1, #3
|
|
sub r2, r3, r2
|
|
lsl r1, r1, #1
|
|
str r0, [sp, #0x44]
|
|
add r0, r0, r1
|
|
str r2, [sp, #0x40]
|
|
str r0, [sp, #0x44]
|
|
_021FD8D4:
|
|
add r0, r5, #0
|
|
add r1, sp, #0x3c
|
|
add r2, sp, #0x30
|
|
add r3, sp, #0xc
|
|
bl sub_020699AC
|
|
_021FD8E0:
|
|
add sp, #0x48
|
|
pop {r4, r5, r6, pc}
|
|
.balign 4, 0
|
|
_021FD8E4: .word ov01_02208EF0
|
|
thumb_func_end ov01_021FD838
|
|
|
|
thumb_func_start ov01_021FD8E8
|
|
ov01_021FD8E8: ; 0x021FD8E8
|
|
push {r4, r5, r6, lr}
|
|
sub sp, #0x20
|
|
add r5, r0, #0
|
|
add r4, r1, #0
|
|
bl ov01_021F146C
|
|
add r6, r0, #0
|
|
mov r1, #0
|
|
str r6, [sp, #0x14]
|
|
bl ov01_021F1450
|
|
str r0, [sp, #0x18]
|
|
add r0, r5, #0
|
|
add r1, sp, #8
|
|
str r5, [sp, #0x1c]
|
|
bl MapObject_GetPositionVec
|
|
add r0, r5, #0
|
|
mov r1, #2
|
|
bl sub_0205F09C
|
|
add r1, sp, #0x14
|
|
str r1, [sp]
|
|
str r0, [sp, #4]
|
|
ldr r1, _021FD928 ; =ov01_02208EDC
|
|
add r0, r6, #0
|
|
add r2, sp, #8
|
|
add r3, r4, #0
|
|
bl ov01_021F1620
|
|
add sp, #0x20
|
|
pop {r4, r5, r6, pc}
|
|
.balign 4, 0
|
|
_021FD928: .word ov01_02208EDC
|
|
thumb_func_end ov01_021FD8E8
|
|
|
|
thumb_func_start ov01_021FD92C
|
|
ov01_021FD92C: ; 0x021FD92C
|
|
push {r3, r4, r5, r6, lr}
|
|
sub sp, #0xc
|
|
add r4, r1, #0
|
|
ldr r6, [r4, #0x1c]
|
|
ldr r1, [r4]
|
|
add r5, r0, #0
|
|
ldr r2, [r4, #4]
|
|
ldr r3, [r4, #8]
|
|
add r0, r6, #0
|
|
bl sub_0205F0F8
|
|
cmp r0, #0
|
|
bne _021FD950
|
|
add r0, r5, #0
|
|
bl ov01_021F1640
|
|
add sp, #0xc
|
|
pop {r3, r4, r5, r6, pc}
|
|
_021FD950:
|
|
mov r0, #0
|
|
str r0, [r4, #0xc]
|
|
ldr r1, _021FD97C ; =0x00100200
|
|
add r0, r6, #0
|
|
bl MapObject_TestFlagsBits
|
|
cmp r0, #1
|
|
bne _021FD968
|
|
mov r0, #1
|
|
add sp, #0xc
|
|
str r0, [r4, #0xc]
|
|
pop {r3, r4, r5, r6, pc}
|
|
_021FD968:
|
|
add r0, r6, #0
|
|
add r1, sp, #0
|
|
bl MapObject_GetPositionVec
|
|
add r0, r5, #0
|
|
add r1, sp, #0
|
|
bl sub_02068DA8
|
|
add sp, #0xc
|
|
pop {r3, r4, r5, r6, pc}
|
|
.balign 4, 0
|
|
_021FD97C: .word 0x00100200
|
|
thumb_func_end ov01_021FD92C
|
|
|
|
thumb_func_start ov01_021FD980
|
|
ov01_021FD980: ; 0x021FD980
|
|
push {r3, r4, r5, r6, lr}
|
|
sub sp, #0xc
|
|
add r4, r1, #0
|
|
ldr r1, [r4, #0xc]
|
|
add r6, r0, #0
|
|
cmp r1, #1
|
|
beq _021FD9C6
|
|
bl sub_02068D90
|
|
ldr r5, [r4, #0x18]
|
|
add r4, r0, #0
|
|
mov r1, #0x54
|
|
mul r4, r1
|
|
add r0, r6, #0
|
|
add r1, sp, #0
|
|
add r5, #0x78
|
|
bl sub_02068DB8
|
|
mov r0, #2
|
|
ldr r1, [sp]
|
|
lsl r0, r0, #0xa
|
|
sub r1, r1, r0
|
|
str r1, [sp]
|
|
lsl r1, r0, #3
|
|
ldr r2, [sp, #4]
|
|
lsl r0, r0, #1
|
|
sub r1, r2, r1
|
|
str r1, [sp, #4]
|
|
ldr r1, [sp, #8]
|
|
add r0, r1, r0
|
|
str r0, [sp, #8]
|
|
add r0, r5, r4
|
|
add r1, sp, #0
|
|
bl sub_020699BC
|
|
_021FD9C6:
|
|
add sp, #0xc
|
|
pop {r3, r4, r5, r6, pc}
|
|
.balign 4, 0
|
|
thumb_func_end ov01_021FD980
|
|
|
|
thumb_func_start ov01_021FD9CC
|
|
ov01_021FD9CC: ; 0x021FD9CC
|
|
cmp r0, #3
|
|
bhi _021FDA12
|
|
add r0, r0, r0
|
|
add r0, pc
|
|
ldrh r0, [r0, #6]
|
|
lsl r0, r0, #0x10
|
|
asr r0, r0, #0x10
|
|
add pc, r0
|
|
_021FD9DC: ; jump table
|
|
.short _021FD9E4 - _021FD9DC - 2 ; case 0
|
|
.short _021FD9F0 - _021FD9DC - 2 ; case 1
|
|
.short _021FD9FC - _021FD9DC - 2 ; case 2
|
|
.short _021FDA08 - _021FD9DC - 2 ; case 3
|
|
_021FD9E4:
|
|
mov r0, #2
|
|
ldr r2, [r1, #8]
|
|
lsl r0, r0, #0xc
|
|
add r0, r2, r0
|
|
str r0, [r1, #8]
|
|
bx lr
|
|
_021FD9F0:
|
|
mov r0, #2
|
|
ldr r2, [r1, #8]
|
|
lsl r0, r0, #0xc
|
|
sub r0, r2, r0
|
|
str r0, [r1, #8]
|
|
bx lr
|
|
_021FD9FC:
|
|
mov r0, #6
|
|
ldr r2, [r1]
|
|
lsl r0, r0, #0xc
|
|
add r0, r2, r0
|
|
str r0, [r1]
|
|
bx lr
|
|
_021FDA08:
|
|
mov r0, #6
|
|
ldr r2, [r1]
|
|
lsl r0, r0, #0xc
|
|
sub r0, r2, r0
|
|
str r0, [r1]
|
|
_021FDA12:
|
|
bx lr
|
|
thumb_func_end ov01_021FD9CC
|
|
|
|
.rodata
|
|
|
|
ov01_02208E90: ; 0x02208E90
|
|
.word 0x1F
|
|
.word 0x21
|
|
.word 0x22
|
|
.word 0x20
|
|
|
|
ov01_02208EA0: ; 0x02208EA0
|
|
.word 0x00000020
|
|
.word ov01_021FD6C8
|
|
.word ov01_021FD714
|
|
.word ov01_021FD718
|
|
.word ov01_021FD7D4
|
|
|
|
ov01_02208EB4: ; 0x02208EB4
|
|
.byte 0x00, 0xE0, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x20, 0x01, 0x00
|
|
.byte 0x00, 0x80, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00
|
|
|
|
ov01_02208EC8: ; 0x02208EC8
|
|
.word 0x00000020
|
|
.word ov01_021FD784
|
|
.word ov01_021FD714
|
|
.word ov01_021FD718
|
|
.word ov01_021FD838
|
|
|
|
ov01_02208EDC: ; 0x02208EDC
|
|
.word 0x00000020
|
|
.word ov01_021FD6C8
|
|
.word ov01_021FD714
|
|
.word ov01_021FD92C
|
|
.word ov01_021FD980
|
|
|
|
ov01_02208EF0: ; 0x02208EF0
|
|
.byte 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
|
.byte 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
|
.byte 0x00, 0x10, 0x00, 0x00
|
|
|
|
ov01_02208F14: ; 0x02208F14
|
|
.byte 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
|
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
|
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00
|
|
|
|
ov01_02208F38: ; 0x02208F38
|
|
.byte 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00
|
|
.byte 0x00, 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00
|
|
.byte 0x00, 0x14, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00
|
|
.byte 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00
|
|
.byte 0x00, 0x0E, 0x00, 0x00
|