mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-26 21:33:53 +01:00
through sub_8026044
This commit is contained in:
parent
e3a11bc3ca
commit
5de624783c
@ -5,703 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_8025C0C
|
||||
sub_8025C0C: @ 8025C0C
|
||||
push {r4-r7,lr}
|
||||
sub sp, 0x18
|
||||
ldr r5, =gUnknown_02022C98
|
||||
ldr r0, [r5]
|
||||
adds r1, r0, 0
|
||||
adds r1, 0x24
|
||||
ldrb r6, [r1]
|
||||
ldr r2, =0x000031a0
|
||||
adds r1, r0, r2
|
||||
ldr r3, =0x000031cc
|
||||
adds r2, r0, r3
|
||||
ldr r4, =0x00003208
|
||||
adds r3, r0, r4
|
||||
ldr r7, =0x00003244
|
||||
adds r4, r0, r7
|
||||
str r4, [sp]
|
||||
adds r7, 0x3C
|
||||
adds r4, r0, r7
|
||||
str r4, [sp, 0x4]
|
||||
adds r7, 0x3C
|
||||
adds r4, r0, r7
|
||||
str r4, [sp, 0x8]
|
||||
adds r4, r0, 0
|
||||
adds r4, 0x40
|
||||
str r4, [sp, 0xC]
|
||||
movs r7, 0x90
|
||||
lsls r7, 1
|
||||
adds r4, r0, r7
|
||||
str r4, [sp, 0x10]
|
||||
movs r4, 0x96
|
||||
lsls r4, 1
|
||||
adds r0, r4
|
||||
str r0, [sp, 0x14]
|
||||
movs r0, 0
|
||||
bl sub_8028164
|
||||
ldr r1, [r5]
|
||||
ldr r7, =0x000031b0
|
||||
adds r2, r1, r7
|
||||
str r0, [r2]
|
||||
movs r0, 0x94
|
||||
lsls r0, 1
|
||||
adds r1, r0
|
||||
movs r0, 0x1
|
||||
strb r0, [r1]
|
||||
movs r4, 0x1
|
||||
cmp r4, r6
|
||||
bcs _08025C9C
|
||||
_08025C6C:
|
||||
adds r0, r4, 0
|
||||
bl sub_8028374
|
||||
cmp r0, 0
|
||||
beq _08025C92
|
||||
ldr r0, =gUnknown_02022C98
|
||||
ldr r2, [r0]
|
||||
lsls r1, r4, 2
|
||||
movs r3, 0x98
|
||||
lsls r3, 1
|
||||
adds r0, r2, r3
|
||||
adds r0, r1
|
||||
movs r1, 0x1
|
||||
str r1, [r0]
|
||||
movs r7, 0x94
|
||||
lsls r7, 1
|
||||
adds r1, r2, r7
|
||||
movs r0, 0
|
||||
strb r0, [r1]
|
||||
_08025C92:
|
||||
adds r0, r4, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
cmp r4, r6
|
||||
bcc _08025C6C
|
||||
_08025C9C:
|
||||
ldr r5, =gUnknown_02022C98
|
||||
ldr r1, [r5]
|
||||
movs r6, 0x92
|
||||
lsls r6, 1
|
||||
adds r1, r6
|
||||
ldrb r0, [r1]
|
||||
adds r0, 0x1
|
||||
strb r0, [r1]
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x3B
|
||||
bls _08025CFA
|
||||
ldr r1, [r5]
|
||||
movs r2, 0x94
|
||||
lsls r2, 1
|
||||
adds r0, r1, r2
|
||||
ldrb r4, [r0]
|
||||
cmp r4, 0
|
||||
beq _08025CE8
|
||||
bl sub_8011AC8
|
||||
ldr r0, [r5]
|
||||
adds r0, r6
|
||||
movs r1, 0
|
||||
strb r1, [r0]
|
||||
b _08025CFA
|
||||
.pool
|
||||
_08025CE8:
|
||||
adds r0, r1, r6
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x46
|
||||
bls _08025CFA
|
||||
bl sub_8011AC8
|
||||
ldr r0, [r5]
|
||||
adds r0, r6
|
||||
strb r4, [r0]
|
||||
_08025CFA:
|
||||
add sp, 0x18
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8025C0C
|
||||
|
||||
thumb_func_start sub_8025D04
|
||||
sub_8025D04: @ 8025D04
|
||||
push {r4,r5,lr}
|
||||
ldr r5, =gUnknown_02022C98
|
||||
ldr r0, [r5]
|
||||
ldrb r0, [r0, 0x18]
|
||||
cmp r0, 0x4
|
||||
beq _08025D40
|
||||
cmp r0, 0x4
|
||||
bgt _08025D20
|
||||
cmp r0, 0x3
|
||||
beq _08025D26
|
||||
b _08025D4A
|
||||
.pool
|
||||
_08025D20:
|
||||
cmp r0, 0xB
|
||||
beq _08025D46
|
||||
b _08025D4A
|
||||
_08025D26:
|
||||
bl sub_8026BB8
|
||||
adds r4, r0, 0
|
||||
cmp r4, 0x1
|
||||
bne _08025D4A
|
||||
bl sub_8026C28
|
||||
ldr r0, [r5]
|
||||
movs r1, 0x8E
|
||||
lsls r1, 1
|
||||
adds r0, r1
|
||||
str r4, [r0]
|
||||
b _08025D4A
|
||||
_08025D40:
|
||||
bl sub_80259FC
|
||||
b _08025D4A
|
||||
_08025D46:
|
||||
bl sub_8025C0C
|
||||
_08025D4A:
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8025D04
|
||||
|
||||
thumb_func_start sub_8025D50
|
||||
sub_8025D50: @ 8025D50
|
||||
push {r4-r6,lr}
|
||||
sub sp, 0x14
|
||||
ldr r0, =gUnknown_02022C98
|
||||
ldr r5, [r0]
|
||||
ldrb r0, [r5, 0x18]
|
||||
cmp r0, 0x4
|
||||
beq _08025D68
|
||||
cmp r0, 0xB
|
||||
beq _08025DB8
|
||||
b _08025DF4
|
||||
.pool
|
||||
_08025D68:
|
||||
ldr r1, =0x000032cc
|
||||
adds r0, r5, r1
|
||||
ldr r2, =0x000031cc
|
||||
adds r1, r5, r2
|
||||
ldr r3, =0x00003208
|
||||
adds r2, r5, r3
|
||||
ldr r4, =0x00003244
|
||||
adds r3, r5, r4
|
||||
movs r6, 0xCA
|
||||
lsls r6, 6
|
||||
adds r4, r5, r6
|
||||
str r4, [sp]
|
||||
adds r6, 0x3C
|
||||
adds r4, r5, r6
|
||||
str r4, [sp, 0x4]
|
||||
adds r4, r5, 0
|
||||
adds r4, 0x40
|
||||
ldrb r4, [r4]
|
||||
str r4, [sp, 0x8]
|
||||
movs r6, 0x90
|
||||
lsls r6, 1
|
||||
adds r4, r5, r6
|
||||
ldr r4, [r4]
|
||||
str r4, [sp, 0xC]
|
||||
adds r6, 0xC
|
||||
adds r4, r5, r6
|
||||
ldr r4, [r4]
|
||||
str r4, [sp, 0x10]
|
||||
bl sub_8027E30
|
||||
b _08025DF4
|
||||
.pool
|
||||
_08025DB8:
|
||||
ldr r1, =0x000032cc
|
||||
adds r0, r5, r1
|
||||
ldr r2, =0x000031cc
|
||||
adds r1, r5, r2
|
||||
ldr r3, =0x00003208
|
||||
adds r2, r5, r3
|
||||
ldr r4, =0x00003244
|
||||
adds r3, r5, r4
|
||||
movs r6, 0xCA
|
||||
lsls r6, 6
|
||||
adds r4, r5, r6
|
||||
str r4, [sp]
|
||||
adds r6, 0x3C
|
||||
adds r4, r5, r6
|
||||
str r4, [sp, 0x4]
|
||||
adds r4, r5, 0
|
||||
adds r4, 0x40
|
||||
ldrb r4, [r4]
|
||||
str r4, [sp, 0x8]
|
||||
movs r6, 0x90
|
||||
lsls r6, 1
|
||||
adds r4, r5, r6
|
||||
ldr r4, [r4]
|
||||
str r4, [sp, 0xC]
|
||||
adds r6, 0xC
|
||||
adds r4, r5, r6
|
||||
ldr r4, [r4]
|
||||
str r4, [sp, 0x10]
|
||||
bl sub_8027E30
|
||||
_08025DF4:
|
||||
add sp, 0x14
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_8025D50
|
||||
|
||||
thumb_func_start sub_8025E0C
|
||||
sub_8025E0C: @ 8025E0C
|
||||
push {r4-r6,lr}
|
||||
sub sp, 0x18
|
||||
ldr r0, =gUnknown_02022C98
|
||||
ldr r5, [r0]
|
||||
ldrb r0, [r5, 0x18]
|
||||
cmp r0, 0x4
|
||||
beq _08025E24
|
||||
cmp r0, 0xB
|
||||
beq _08025E7C
|
||||
b _08025EC0
|
||||
.pool
|
||||
_08025E24:
|
||||
adds r0, r5, 0
|
||||
adds r0, 0x28
|
||||
ldrb r0, [r0]
|
||||
lsls r1, r0, 4
|
||||
subs r1, r0
|
||||
lsls r1, 2
|
||||
ldr r2, =0x000031a0
|
||||
adds r1, r2
|
||||
adds r1, r5, r1
|
||||
ldr r3, =0x000031cc
|
||||
adds r2, r5, r3
|
||||
ldr r4, =0x00003208
|
||||
adds r3, r5, r4
|
||||
ldr r6, =0x00003244
|
||||
adds r4, r5, r6
|
||||
str r4, [sp]
|
||||
adds r6, 0x3C
|
||||
adds r4, r5, r6
|
||||
str r4, [sp, 0x4]
|
||||
adds r6, 0x3C
|
||||
adds r4, r5, r6
|
||||
str r4, [sp, 0x8]
|
||||
adds r4, r5, 0
|
||||
adds r4, 0x40
|
||||
str r4, [sp, 0xC]
|
||||
movs r6, 0x90
|
||||
lsls r6, 1
|
||||
adds r4, r5, r6
|
||||
str r4, [sp, 0x10]
|
||||
adds r6, 0xC
|
||||
adds r4, r5, r6
|
||||
str r4, [sp, 0x14]
|
||||
bl sub_8028164
|
||||
b _08025EC0
|
||||
.pool
|
||||
_08025E7C:
|
||||
adds r0, r5, 0
|
||||
adds r0, 0x28
|
||||
ldrb r0, [r0]
|
||||
lsls r1, r0, 4
|
||||
subs r1, r0
|
||||
lsls r1, 2
|
||||
ldr r2, =0x000031a0
|
||||
adds r1, r2
|
||||
adds r1, r5, r1
|
||||
ldr r3, =0x000031cc
|
||||
adds r2, r5, r3
|
||||
ldr r4, =0x00003208
|
||||
adds r3, r5, r4
|
||||
ldr r6, =0x00003244
|
||||
adds r4, r5, r6
|
||||
str r4, [sp]
|
||||
adds r6, 0x3C
|
||||
adds r4, r5, r6
|
||||
str r4, [sp, 0x4]
|
||||
adds r6, 0x3C
|
||||
adds r4, r5, r6
|
||||
str r4, [sp, 0x8]
|
||||
adds r4, r5, 0
|
||||
adds r4, 0x40
|
||||
str r4, [sp, 0xC]
|
||||
movs r6, 0x90
|
||||
lsls r6, 1
|
||||
adds r4, r5, r6
|
||||
str r4, [sp, 0x10]
|
||||
adds r6, 0xC
|
||||
adds r4, r5, r6
|
||||
str r4, [sp, 0x14]
|
||||
bl sub_8028164
|
||||
_08025EC0:
|
||||
add sp, 0x18
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_8025E0C
|
||||
|
||||
thumb_func_start sub_8025ED8
|
||||
sub_8025ED8: @ 8025ED8
|
||||
push {r4,lr}
|
||||
ldr r4, =gUnknown_02022C98
|
||||
ldr r1, [r4]
|
||||
ldrb r0, [r1, 0x18]
|
||||
cmp r0, 0x4
|
||||
beq _08025F0E
|
||||
cmp r0, 0x4
|
||||
bgt _08025EF4
|
||||
cmp r0, 0x3
|
||||
beq _08025EFA
|
||||
b _08025F40
|
||||
.pool
|
||||
_08025EF4:
|
||||
cmp r0, 0xB
|
||||
beq _08025F24
|
||||
b _08025F40
|
||||
_08025EFA:
|
||||
movs r0, 0x1
|
||||
bl sub_8027DD0
|
||||
ldr r0, [r4]
|
||||
movs r1, 0x8E
|
||||
lsls r1, 1
|
||||
adds r0, r1
|
||||
movs r1, 0x1
|
||||
str r1, [r0]
|
||||
b _08025F40
|
||||
_08025F0E:
|
||||
ldr r2, =0x000032f8
|
||||
adds r1, r2
|
||||
ldrb r0, [r1]
|
||||
cmp r0, 0
|
||||
beq _08025F40
|
||||
bl sub_80282EC
|
||||
b _08025F40
|
||||
.pool
|
||||
_08025F24:
|
||||
movs r2, 0x90
|
||||
lsls r2, 1
|
||||
adds r0, r1, r2
|
||||
ldr r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _08025F40
|
||||
adds r2, 0xC
|
||||
adds r0, r1, r2
|
||||
ldr r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _08025F40
|
||||
movs r0, 0x1
|
||||
bl sub_8028350
|
||||
_08025F40:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8025ED8
|
||||
|
||||
thumb_func_start sub_8025F48
|
||||
sub_8025F48: @ 8025F48
|
||||
push {r4-r6,lr}
|
||||
ldr r6, =gUnknown_02022C98
|
||||
ldr r2, [r6]
|
||||
adds r0, r2, 0
|
||||
adds r0, 0x28
|
||||
ldrb r1, [r0]
|
||||
lsls r0, r1, 4
|
||||
subs r0, r1
|
||||
lsls r0, 2
|
||||
adds r1, r2, r0
|
||||
ldr r3, =0x000031cc
|
||||
adds r0, r1, r3
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _08025F88
|
||||
bl IsSEPlaying
|
||||
lsls r0, 24
|
||||
lsrs r1, r0, 24
|
||||
cmp r1, 0
|
||||
bne _08025FEA
|
||||
ldr r0, [r6]
|
||||
movs r2, 0xA2
|
||||
lsls r2, 1
|
||||
adds r0, r2
|
||||
strb r1, [r0]
|
||||
b _08025FEA
|
||||
.pool
|
||||
_08025F88:
|
||||
ldr r3, =0x000031d0
|
||||
adds r0, r1, r3
|
||||
ldrb r4, [r0]
|
||||
cmp r4, 0x1
|
||||
bne _08025FB8
|
||||
movs r1, 0xA2
|
||||
lsls r1, 1
|
||||
adds r0, r2, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _08025FEA
|
||||
movs r0, 0x1F
|
||||
bl m4aSongNumStop
|
||||
movs r0, 0x1F
|
||||
bl PlaySE
|
||||
ldr r0, [r6]
|
||||
movs r2, 0xA2
|
||||
lsls r2, 1
|
||||
adds r0, r2
|
||||
b _08025FE8
|
||||
.pool
|
||||
_08025FB8:
|
||||
ldr r3, =0x000031d4
|
||||
adds r0, r1, r3
|
||||
ldrb r4, [r0]
|
||||
cmp r4, 0x1
|
||||
bne _08025FEA
|
||||
movs r5, 0xA2
|
||||
lsls r5, 1
|
||||
adds r0, r2, r5
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _08025FEA
|
||||
bl IsSEPlaying
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08025FEA
|
||||
movs r0, 0x16
|
||||
bl PlaySE
|
||||
movs r0, 0x1
|
||||
bl sub_80284CC
|
||||
ldr r0, [r6]
|
||||
adds r0, r5
|
||||
_08025FE8:
|
||||
strb r4, [r0]
|
||||
_08025FEA:
|
||||
ldr r0, =gUnknown_02022C98
|
||||
ldr r2, [r0]
|
||||
movs r5, 0xAA
|
||||
lsls r5, 1
|
||||
adds r1, r2, r5
|
||||
ldrb r1, [r1]
|
||||
adds r4, r0, 0
|
||||
cmp r1, 0
|
||||
bne _0802601C
|
||||
adds r0, r2, 0
|
||||
adds r0, 0x40
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x9
|
||||
bls _0802601C
|
||||
bl StopMapMusic
|
||||
ldr r0, [r4]
|
||||
adds r0, r5
|
||||
movs r1, 0x1
|
||||
b _0802603A
|
||||
.pool
|
||||
_0802601C:
|
||||
ldr r0, [r4]
|
||||
movs r1, 0xAA
|
||||
lsls r1, 1
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x1
|
||||
bne _0802603C
|
||||
movs r0, 0xB
|
||||
bl PlayFanfareByFanfareNum
|
||||
ldr r0, [r4]
|
||||
movs r2, 0xAA
|
||||
lsls r2, 1
|
||||
adds r0, r2
|
||||
movs r1, 0x2
|
||||
_0802603A:
|
||||
strb r1, [r0]
|
||||
_0802603C:
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8025F48
|
||||
|
||||
thumb_func_start sub_8026044
|
||||
sub_8026044: @ 8026044
|
||||
push {r4-r7,lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
ldr r6, =gUnknown_02022C98
|
||||
ldr r2, [r6]
|
||||
adds r0, r2, 0
|
||||
adds r0, 0x44
|
||||
ldrb r0, [r0]
|
||||
mov r8, r0
|
||||
adds r0, r2, 0
|
||||
adds r0, 0x48
|
||||
ldrb r7, [r0]
|
||||
subs r0, 0x20
|
||||
ldrb r1, [r0]
|
||||
lsls r0, r1, 4
|
||||
subs r0, r1
|
||||
lsls r0, 2
|
||||
adds r1, r2, r0
|
||||
ldr r3, =0x000031cc
|
||||
adds r0, r1, r3
|
||||
ldrb r3, [r0]
|
||||
cmp r3, 0
|
||||
bne _0802609C
|
||||
ldr r4, =0x000031d0
|
||||
adds r0, r1, r4
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x1
|
||||
beq _080260FE
|
||||
adds r4, 0x4
|
||||
adds r0, r1, r4
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x1
|
||||
beq _080260FE
|
||||
movs r1, 0xA2
|
||||
lsls r1, 1
|
||||
adds r0, r2, r1
|
||||
strb r3, [r0]
|
||||
b _080260FE
|
||||
.pool
|
||||
_0802609C:
|
||||
ldr r3, =0x000031d0
|
||||
adds r0, r1, r3
|
||||
ldrb r4, [r0]
|
||||
cmp r4, 0x1
|
||||
bne _080260CC
|
||||
movs r1, 0xA2
|
||||
lsls r1, 1
|
||||
adds r0, r2, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _080260FE
|
||||
movs r0, 0x1F
|
||||
bl m4aSongNumStop
|
||||
movs r0, 0x1F
|
||||
bl PlaySE
|
||||
ldr r0, [r6]
|
||||
movs r3, 0xA2
|
||||
lsls r3, 1
|
||||
adds r0, r3
|
||||
b _080260FC
|
||||
.pool
|
||||
_080260CC:
|
||||
ldr r4, =0x000031d4
|
||||
adds r0, r1, r4
|
||||
ldrb r4, [r0]
|
||||
cmp r4, 0x1
|
||||
bne _080260FE
|
||||
movs r5, 0xA2
|
||||
lsls r5, 1
|
||||
adds r0, r2, r5
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _080260FE
|
||||
bl IsSEPlaying
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _080260FE
|
||||
movs r0, 0x16
|
||||
bl PlaySE
|
||||
movs r0, 0x1
|
||||
bl sub_80284CC
|
||||
ldr r0, [r6]
|
||||
adds r0, r5
|
||||
_080260FC:
|
||||
strb r4, [r0]
|
||||
_080260FE:
|
||||
mov r4, r8
|
||||
cmp r4, r7
|
||||
bcs _08026172
|
||||
ldr r5, =gUnknown_02022C98
|
||||
_08026106:
|
||||
ldr r2, [r5]
|
||||
adds r0, r2, 0
|
||||
adds r0, 0x28
|
||||
ldrb r1, [r0]
|
||||
lsls r0, r1, 4
|
||||
subs r0, r1
|
||||
lsls r0, 2
|
||||
ldr r1, =0x000031a0
|
||||
adds r0, r1
|
||||
adds r0, r2, r0
|
||||
adds r1, r0, 0
|
||||
adds r1, 0x14
|
||||
adds r0, 0x1F
|
||||
adds r0, r4
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x9
|
||||
bls _0802615C
|
||||
movs r3, 0xA4
|
||||
lsls r3, 1
|
||||
adds r0, r2, r3
|
||||
adds r0, r4
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _08026168
|
||||
adds r0, r1, r4
|
||||
ldrb r0, [r0]
|
||||
adds r0, 0x4A
|
||||
bl PlaySE
|
||||
ldr r0, [r5]
|
||||
movs r1, 0xA4
|
||||
lsls r1, 1
|
||||
adds r0, r1
|
||||
adds r0, r4
|
||||
movs r1, 0x1
|
||||
b _08026166
|
||||
.pool
|
||||
_0802615C:
|
||||
movs r3, 0xA4
|
||||
lsls r3, 1
|
||||
adds r0, r2, r3
|
||||
adds r0, r4
|
||||
movs r1, 0
|
||||
_08026166:
|
||||
strb r1, [r0]
|
||||
_08026168:
|
||||
adds r0, r4, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
cmp r4, r7
|
||||
bcc _08026106
|
||||
_08026172:
|
||||
ldr r0, =gUnknown_02022C98
|
||||
ldr r2, [r0]
|
||||
movs r5, 0xAA
|
||||
lsls r5, 1
|
||||
adds r1, r2, r5
|
||||
ldrb r1, [r1]
|
||||
adds r4, r0, 0
|
||||
cmp r1, 0
|
||||
bne _080261A0
|
||||
adds r0, r2, 0
|
||||
adds r0, 0x40
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x9
|
||||
bls _080261A0
|
||||
bl StopMapMusic
|
||||
ldr r0, [r4]
|
||||
adds r0, r5
|
||||
movs r1, 0x1
|
||||
b _080261BE
|
||||
.pool
|
||||
_080261A0:
|
||||
ldr r0, [r4]
|
||||
movs r1, 0xAA
|
||||
lsls r1, 1
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x1
|
||||
bne _080261C0
|
||||
movs r0, 0xB
|
||||
bl PlayFanfareByFanfareNum
|
||||
ldr r0, [r4]
|
||||
movs r3, 0xAA
|
||||
lsls r3, 1
|
||||
adds r0, r3
|
||||
movs r1, 0x2
|
||||
_080261BE:
|
||||
strb r1, [r0]
|
||||
_080261C0:
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8026044
|
||||
|
||||
thumb_func_start sub_80261CC
|
||||
sub_80261CC: @ 80261CC
|
||||
push {lr}
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "main.h"
|
||||
#include "constants/songs.h"
|
||||
#include "sound.h"
|
||||
#include "m4a.h"
|
||||
#include "pokemon_jump.h"
|
||||
|
||||
struct DodrioBerryPickingSubstruct_0160
|
||||
@ -31,7 +32,9 @@ struct DodrioBerryPickingSubstruct_31A0
|
||||
{
|
||||
u8 unk_00[0x10];
|
||||
u32 unk_10;
|
||||
u8 filler_14[0x18];
|
||||
u8 unk_14[11];
|
||||
u8 unk_1F[11];
|
||||
u8 filler_2A[2];
|
||||
u8 unk_2C;
|
||||
u8 filler_2D[3];
|
||||
u8 unk_30;
|
||||
@ -109,7 +112,12 @@ struct DodrioBerryPickingStruct
|
||||
// align 2
|
||||
/*0x012C*/ u32 unk_012C;
|
||||
/*0x0130*/ u32 unk_0130[5];
|
||||
/*0x0144*/ u8 filler_0144[0x1C];
|
||||
/*0x0144*/ u8 unk_0144;
|
||||
/*0x0145*/ u8 filler_0145[3];
|
||||
/*0x0148*/ u8 unk_0148[11];
|
||||
/*0x0153*/ u8 filler_0153[1];
|
||||
/*0x0154*/ u8 unk_0154;
|
||||
/*0x0155*/ u8 filler_0155[11];
|
||||
/*0x0160*/ struct DodrioBerryPickingSubstruct_0160 unk_0160;
|
||||
/*0x318C*/ struct DodrioBerryPickingSubstruct_318C unk_318C[5];
|
||||
/*0x31A0*/ struct DodrioBerryPickingSubstruct_31A0 unk_31A0[5];
|
||||
@ -165,6 +173,8 @@ void sub_802671C(void);
|
||||
void sub_8026AF4(void);
|
||||
void sub_8026B28(void);
|
||||
void sub_8026B5C(u8, u8*, u8*);
|
||||
u32 sub_8026BB8(void);
|
||||
void sub_8026C28(void);
|
||||
bool32 sub_8026C50(void);
|
||||
bool32 sub_8026C90(void);
|
||||
void sub_80272E8(void);
|
||||
@ -175,10 +185,16 @@ u8 sub_8027518(u8);
|
||||
void sub_8027554(void);
|
||||
void sub_8027608(void);
|
||||
u32 sub_8027748(void);
|
||||
void sub_8027DD0(u8);
|
||||
u32 sub_8027E30(struct DodrioBerryPickingSubstruct_31A0 *, u8 *, u8 *, u8 *, u8 *, u8 *, u8, u32, u32);
|
||||
u32 sub_8028164(u32 unused, struct DodrioBerryPickingSubstruct_31A0 *, u8 *, u8 *, u8 *, u8 *, u8 *, u8 *, u32 *, u32 *);
|
||||
void sub_80282EC(u8);
|
||||
u32 sub_8028318(u8, u8 *);
|
||||
void sub_8028350(u8);
|
||||
bool32 sub_8028374(u8);
|
||||
void sub_80283A8(void);
|
||||
void sub_8028408(struct DodrioBerryPickingSubstruct_318C *, u8, u8, u8);
|
||||
void sub_80284CC(u8);
|
||||
void sub_8028504(u8);
|
||||
void sub_8028614(u8);
|
||||
void sub_802868C(u8, u8);
|
||||
@ -1099,3 +1115,202 @@ void sub_80259FC(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8025C0C(void)
|
||||
{
|
||||
u8 i;
|
||||
u8 r6 = gUnknown_02022C98->unk_0024;
|
||||
|
||||
gUnknown_02022C98->unk_31A0[0].unk_10 = sub_8028164(0, &gUnknown_02022C98->unk_31A0[0], &gUnknown_02022C98->unk_31A0[0].unk_2C, &gUnknown_02022C98->unk_31A0[1].unk_2C, &gUnknown_02022C98->unk_31A0[2].unk_2C, &gUnknown_02022C98->unk_31A0[3].unk_2C, &gUnknown_02022C98->unk_31A0[4].unk_2C, &gUnknown_02022C98->unk_0040, &gUnknown_02022C98->unk_0120, &gUnknown_02022C98->unk_012C);
|
||||
gUnknown_02022C98->unk_0128 = 1;
|
||||
|
||||
for (i = 1; i < r6; i++)
|
||||
{
|
||||
if (sub_8028374(i) != 0)
|
||||
{
|
||||
gUnknown_02022C98->unk_0130[i] = 1;
|
||||
gUnknown_02022C98->unk_0128 = 0;
|
||||
}
|
||||
}
|
||||
if (++gUnknown_02022C98->unk_0124 >= 60)
|
||||
{
|
||||
if (gUnknown_02022C98->unk_0128 != 0)
|
||||
{
|
||||
sub_8011AC8();
|
||||
gUnknown_02022C98->unk_0124 = 0;
|
||||
}
|
||||
else if (gUnknown_02022C98->unk_0124 > 70)
|
||||
{
|
||||
sub_8011AC8();
|
||||
gUnknown_02022C98->unk_0124 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8025D04(void)
|
||||
{
|
||||
switch (gUnknown_02022C98->unk_0018)
|
||||
{
|
||||
case 3:
|
||||
if (sub_8026BB8() == 1)
|
||||
{
|
||||
sub_8026C28();
|
||||
gUnknown_02022C98->unk_011C = 1;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
sub_80259FC();
|
||||
break;
|
||||
case 11:
|
||||
sub_8025C0C();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8025D50(void)
|
||||
{
|
||||
switch (gUnknown_02022C98->unk_0018)
|
||||
{
|
||||
case 4:
|
||||
sub_8027E30(&gUnknown_02022C98->unk_32CC, &gUnknown_02022C98->unk_31A0[0].unk_2C, &gUnknown_02022C98->unk_31A0[1].unk_2C, &gUnknown_02022C98->unk_31A0[2].unk_2C, &gUnknown_02022C98->unk_31A0[3].unk_2C, &gUnknown_02022C98->unk_31A0[4].unk_2C, gUnknown_02022C98->unk_0040, gUnknown_02022C98->unk_0120, gUnknown_02022C98->unk_012C);
|
||||
break;
|
||||
case 11:
|
||||
sub_8027E30(&gUnknown_02022C98->unk_32CC, &gUnknown_02022C98->unk_31A0[0].unk_2C, &gUnknown_02022C98->unk_31A0[1].unk_2C, &gUnknown_02022C98->unk_31A0[2].unk_2C, &gUnknown_02022C98->unk_31A0[3].unk_2C, &gUnknown_02022C98->unk_31A0[4].unk_2C, gUnknown_02022C98->unk_0040, gUnknown_02022C98->unk_0120, gUnknown_02022C98->unk_012C);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8025E0C(void)
|
||||
{
|
||||
switch (gUnknown_02022C98->unk_0018)
|
||||
{
|
||||
case 4:
|
||||
sub_8028164(gUnknown_02022C98->multiplayerId, &gUnknown_02022C98->unk_31A0[gUnknown_02022C98->multiplayerId], &gUnknown_02022C98->unk_31A0[0].unk_2C, &gUnknown_02022C98->unk_31A0[1].unk_2C, &gUnknown_02022C98->unk_31A0[2].unk_2C, &gUnknown_02022C98->unk_31A0[3].unk_2C, &gUnknown_02022C98->unk_31A0[4].unk_2C, &gUnknown_02022C98->unk_0040, &gUnknown_02022C98->unk_0120, &gUnknown_02022C98->unk_012C);
|
||||
break;
|
||||
case 11:
|
||||
sub_8028164(gUnknown_02022C98->multiplayerId, &gUnknown_02022C98->unk_31A0[gUnknown_02022C98->multiplayerId], &gUnknown_02022C98->unk_31A0[0].unk_2C, &gUnknown_02022C98->unk_31A0[1].unk_2C, &gUnknown_02022C98->unk_31A0[2].unk_2C, &gUnknown_02022C98->unk_31A0[3].unk_2C, &gUnknown_02022C98->unk_31A0[4].unk_2C, &gUnknown_02022C98->unk_0040, &gUnknown_02022C98->unk_0120, &gUnknown_02022C98->unk_012C);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8025ED8(void)
|
||||
{
|
||||
switch (gUnknown_02022C98->unk_0018)
|
||||
{
|
||||
case 3:
|
||||
sub_8027DD0(1);
|
||||
gUnknown_02022C98->unk_011C = 1;
|
||||
break;
|
||||
case 4:
|
||||
if (gUnknown_02022C98->unk_32CC.unk_2C != 0)
|
||||
{
|
||||
sub_80282EC(gUnknown_02022C98->unk_32CC.unk_2C);
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
if (gUnknown_02022C98->unk_0120 == 0 && gUnknown_02022C98->unk_012C == 0)
|
||||
{
|
||||
sub_8028350(1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8025F48(void)
|
||||
{
|
||||
if (gUnknown_02022C98->unk_31A0[gUnknown_02022C98->multiplayerId].unk_2C == 0)
|
||||
{
|
||||
if (!IsSEPlaying())
|
||||
{
|
||||
gUnknown_02022C98->unk_0144 = 0;
|
||||
}
|
||||
}
|
||||
else if (gUnknown_02022C98->unk_31A0[gUnknown_02022C98->multiplayerId].unk_30 == 1)
|
||||
{
|
||||
if (gUnknown_02022C98->unk_0144 == 0)
|
||||
{
|
||||
m4aSongNumStop(SE_SEIKAI);
|
||||
PlaySE(SE_SEIKAI);
|
||||
gUnknown_02022C98->unk_0144 = 1;
|
||||
}
|
||||
}
|
||||
else if (gUnknown_02022C98->unk_31A0[gUnknown_02022C98->multiplayerId].unk_34 == 1)
|
||||
{
|
||||
if (gUnknown_02022C98->unk_0144 == 0 && !IsSEPlaying())
|
||||
{
|
||||
PlaySE(SE_BOO);
|
||||
sub_80284CC(1);
|
||||
gUnknown_02022C98->unk_0144 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (gUnknown_02022C98->unk_0154 == 0 && gUnknown_02022C98->unk_0040 >= 10)
|
||||
{
|
||||
StopMapMusic();
|
||||
gUnknown_02022C98->unk_0154 = 1;
|
||||
}
|
||||
else if (gUnknown_02022C98->unk_0154 == 1)
|
||||
{
|
||||
PlayFanfareByFanfareNum(11); // MUS_ME_ZANNEN
|
||||
gUnknown_02022C98->unk_0154 = 2;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8026044(void)
|
||||
{
|
||||
u8 r8 = gUnknown_02022C98->unk_0044;
|
||||
u8 r7 = gUnknown_02022C98->unk_0048;
|
||||
u8 r4;
|
||||
if (gUnknown_02022C98->unk_31A0[gUnknown_02022C98->multiplayerId].unk_2C == 0)
|
||||
{
|
||||
if (gUnknown_02022C98->unk_31A0[gUnknown_02022C98->multiplayerId].unk_30 != 1 && gUnknown_02022C98->unk_31A0[gUnknown_02022C98->multiplayerId].unk_34 != 1)
|
||||
{
|
||||
gUnknown_02022C98->unk_0144 = 0;
|
||||
}
|
||||
}
|
||||
else if (gUnknown_02022C98->unk_31A0[gUnknown_02022C98->multiplayerId].unk_30 == 1)
|
||||
{
|
||||
if (gUnknown_02022C98->unk_0144 == 0)
|
||||
{
|
||||
m4aSongNumStop(SE_SEIKAI);
|
||||
PlaySE(SE_SEIKAI);
|
||||
gUnknown_02022C98->unk_0144 = 1;
|
||||
}
|
||||
}
|
||||
else if (gUnknown_02022C98->unk_31A0[gUnknown_02022C98->multiplayerId].unk_34 == 1)
|
||||
{
|
||||
if (gUnknown_02022C98->unk_0144 == 0 && !IsSEPlaying())
|
||||
{
|
||||
PlaySE(SE_BOO);
|
||||
sub_80284CC(1);
|
||||
gUnknown_02022C98->unk_0144 = 1;
|
||||
}
|
||||
}
|
||||
for (r4 = r8; r4 < r7; r4++)
|
||||
{
|
||||
struct DodrioBerryPickingSubstruct_31A0 * ptr = &gUnknown_02022C98->unk_31A0[gUnknown_02022C98->multiplayerId];
|
||||
u8 * r1 = ptr->unk_14;
|
||||
if (ptr->unk_1F[r4] >= 10)
|
||||
{
|
||||
if (gUnknown_02022C98->unk_0148[r4] == 0)
|
||||
{
|
||||
PlaySE(SE_FUUSEN1 + r1[r4]);
|
||||
gUnknown_02022C98->unk_0148[r4] = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gUnknown_02022C98->unk_0148[r4] = 0;
|
||||
}
|
||||
}
|
||||
if (gUnknown_02022C98->unk_0154 == 0 && gUnknown_02022C98->unk_0040 >= 10)
|
||||
{
|
||||
StopMapMusic();
|
||||
gUnknown_02022C98->unk_0154 = 1;
|
||||
}
|
||||
else if (gUnknown_02022C98->unk_0154 == 1)
|
||||
{
|
||||
PlayFanfareByFanfareNum(11); // MUS_ME_ZANNEN
|
||||
gUnknown_02022C98->unk_0154 = 2;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user