mirror of
https://github.com/pret/pmd-red.git
synced 2026-04-24 23:17:03 -05:00
document most of the dungeon music
This commit is contained in:
parent
3c34810ca1
commit
6ada01da4f
|
|
@ -2691,7 +2691,7 @@ _0803E5A2:
|
|||
adds r0, r1
|
||||
movs r1, 0
|
||||
strb r1, [r0]
|
||||
bl sub_8083F58
|
||||
bl UpdateDungeonMusic
|
||||
bl sub_8011860
|
||||
bl sub_8040B60
|
||||
movs r0, 0
|
||||
|
|
|
|||
|
|
@ -573,7 +573,7 @@ sub_80426C8:
|
|||
cmp r4, 0x3
|
||||
bne _080426D8
|
||||
movs r0, 0
|
||||
bl sub_8083E88
|
||||
bl DungeonStartNewBGM
|
||||
_080426D8:
|
||||
cmp r5, 0x4
|
||||
beq _080426F0
|
||||
|
|
|
|||
|
|
@ -695,7 +695,7 @@ _0804300C:
|
|||
ldr r3, _08043134
|
||||
adds r0, r3
|
||||
strb r1, [r0]
|
||||
bl sub_8083F34
|
||||
bl StopDungeonBGM
|
||||
bl sub_803D4AC
|
||||
bl sub_804513C
|
||||
bl sub_8043CD8
|
||||
|
|
@ -1231,7 +1231,7 @@ _0804351C:
|
|||
lsls r0, 1
|
||||
adds r0, r1
|
||||
ldrh r0, [r0]
|
||||
bl sub_8083E88
|
||||
bl DungeonStartNewBGM
|
||||
bl sub_80847D4
|
||||
_08043544:
|
||||
bl sub_8049840
|
||||
|
|
@ -1597,7 +1597,7 @@ _0804384A:
|
|||
cmp r0, 0x1B
|
||||
bne _08043896
|
||||
movs r0, 0x3C
|
||||
bl sub_8083ED8
|
||||
bl DungeonFadeOutBGM
|
||||
_08043896:
|
||||
movs r0, 0x4
|
||||
movs r1, 0x4F
|
||||
|
|
|
|||
|
|
@ -19743,7 +19743,7 @@ _0806780C:
|
|||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08067834
|
||||
bl sub_8044210
|
||||
bl IsDungeonMaze
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0806782C
|
||||
|
|
@ -23059,7 +23059,7 @@ _08069228:
|
|||
adds r1, r4, 0
|
||||
bl xxx_pokemon2_to_pokemonstruct_index_808DF2C
|
||||
_0806926E:
|
||||
bl sub_8044210
|
||||
bl IsDungeonMaze
|
||||
lsls r0, 24
|
||||
lsrs r2, r0, 24
|
||||
cmp r2, 0
|
||||
|
|
@ -23258,7 +23258,7 @@ _080693CC:
|
|||
adds r1, r4, 0
|
||||
bl xxx_pokemon2_to_pokemonstruct_index_808DF2C
|
||||
_0806940E:
|
||||
bl sub_8044210
|
||||
bl IsDungeonMaze
|
||||
lsls r0, 24
|
||||
lsrs r2, r0, 24
|
||||
cmp r2, 0
|
||||
|
|
|
|||
|
|
@ -582,847 +582,4 @@ _08083A9E:
|
|||
bx r0
|
||||
thumb_func_end sub_8083904
|
||||
|
||||
thumb_func_start sub_8083AB0
|
||||
sub_8083AB0:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
sub sp, 0x14
|
||||
adds r5, r1, 0
|
||||
adds r7, r2, 0
|
||||
lsls r0, 16
|
||||
asrs r0, 16
|
||||
mov r8, r0
|
||||
ldr r0, _08083AFC
|
||||
ldr r0, [r0]
|
||||
ldr r1, _08083B00
|
||||
adds r4, r0, r1
|
||||
movs r6, 0
|
||||
adds r0, r5, 0
|
||||
bl EntityExists
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08083AE4
|
||||
adds r0, r5, 0
|
||||
bl GetEntityType
|
||||
cmp r0, 0x1
|
||||
bne _08083AE4
|
||||
ldr r6, [r5, 0x70]
|
||||
_08083AE4:
|
||||
ldr r5, [r7, 0x70]
|
||||
cmp r6, 0
|
||||
beq _08083B04
|
||||
mov r0, sp
|
||||
adds r1, r6, 0
|
||||
bl sub_80709C8
|
||||
adds r0, r4, 0
|
||||
mov r1, sp
|
||||
bl CopyStringtoBuffer
|
||||
b _08083B0E
|
||||
.align 2, 0
|
||||
_08083AFC: .4byte gDungeonGlobalData
|
||||
_08083B00: .4byte 0x0001ce98
|
||||
_08083B04:
|
||||
ldr r0, _08083C04
|
||||
ldr r1, [r0]
|
||||
adds r0, r4, 0
|
||||
bl CopyStringtoBuffer
|
||||
_08083B0E:
|
||||
mov r0, sp
|
||||
adds r1, r5, 0
|
||||
bl sub_80709C8
|
||||
adds r0, r4, 0
|
||||
adds r0, 0xA
|
||||
mov r1, sp
|
||||
bl CopyStringtoBuffer
|
||||
movs r2, 0
|
||||
mov r3, r8
|
||||
strh r3, [r4, 0x14]
|
||||
ldr r0, [r5, 0x60]
|
||||
str r0, [r4, 0x1C]
|
||||
ldr r0, [r5, 0x18]
|
||||
str r0, [r4, 0x20]
|
||||
ldrb r0, [r5, 0x9]
|
||||
adds r1, r4, 0
|
||||
adds r1, 0x2A
|
||||
strb r0, [r1]
|
||||
ldrh r0, [r5, 0x10]
|
||||
strh r0, [r4, 0x24]
|
||||
ldrb r0, [r5, 0x14]
|
||||
subs r1, 0x4
|
||||
strb r0, [r1]
|
||||
ldrb r0, [r5, 0x15]
|
||||
adds r1, 0x1
|
||||
strb r0, [r1]
|
||||
ldrb r1, [r5, 0x16]
|
||||
adds r0, r4, 0
|
||||
adds r0, 0x28
|
||||
strb r1, [r0]
|
||||
ldrb r0, [r5, 0x17]
|
||||
adds r1, r4, 0
|
||||
adds r1, 0x29
|
||||
strb r0, [r1]
|
||||
ldr r0, _08083C08
|
||||
ldr r0, [r0]
|
||||
ldr r1, _08083C0C
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
str r0, [r4, 0x18]
|
||||
adds r3, r4, 0
|
||||
adds r3, 0x2B
|
||||
strb r2, [r3]
|
||||
adds r6, r4, 0
|
||||
adds r6, 0x2C
|
||||
strb r2, [r6]
|
||||
movs r0, 0x2D
|
||||
adds r0, r4
|
||||
mov r12, r0
|
||||
strb r2, [r0]
|
||||
adds r4, 0x2E
|
||||
strb r2, [r4]
|
||||
adds r0, r5, 0
|
||||
adds r0, 0x60
|
||||
ldrb r1, [r0]
|
||||
movs r0, 0x1
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _08083BF8
|
||||
movs r0, 0x8
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _08083BF8
|
||||
adds r1, r5, 0
|
||||
adds r1, 0x62
|
||||
ldrb r0, [r1]
|
||||
cmp r0, 0x13
|
||||
bne _08083BA4
|
||||
ldr r0, _08083C10
|
||||
ldrb r0, [r0]
|
||||
ldrb r2, [r3]
|
||||
adds r0, r2
|
||||
strb r0, [r3]
|
||||
_08083BA4:
|
||||
ldrb r0, [r1]
|
||||
cmp r0, 0x2B
|
||||
bne _08083BB4
|
||||
ldr r0, _08083C14
|
||||
ldrb r0, [r0]
|
||||
ldrb r2, [r3]
|
||||
adds r0, r2
|
||||
strb r0, [r3]
|
||||
_08083BB4:
|
||||
ldrb r0, [r1]
|
||||
cmp r0, 0x21
|
||||
bne _08083BC4
|
||||
ldr r0, _08083C18
|
||||
ldrb r0, [r0]
|
||||
ldrb r3, [r6]
|
||||
adds r0, r3
|
||||
strb r0, [r6]
|
||||
_08083BC4:
|
||||
ldrb r0, [r1]
|
||||
cmp r0, 0x2B
|
||||
bne _08083BD4
|
||||
ldr r0, _08083C14
|
||||
ldrb r0, [r0]
|
||||
ldrb r2, [r6]
|
||||
adds r0, r2
|
||||
strb r0, [r6]
|
||||
_08083BD4:
|
||||
ldrb r0, [r1]
|
||||
cmp r0, 0x1E
|
||||
bne _08083BE8
|
||||
ldr r0, _08083C1C
|
||||
ldrb r0, [r0]
|
||||
mov r3, r12
|
||||
ldrb r3, [r3]
|
||||
adds r0, r3
|
||||
mov r2, r12
|
||||
strb r0, [r2]
|
||||
_08083BE8:
|
||||
ldrb r0, [r1]
|
||||
cmp r0, 0x22
|
||||
bne _08083BF8
|
||||
ldr r0, _08083C20
|
||||
ldrb r0, [r0]
|
||||
ldrb r3, [r4]
|
||||
adds r0, r3
|
||||
strb r0, [r4]
|
||||
_08083BF8:
|
||||
add sp, 0x14
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08083C04: .4byte gUnknown_80FE6F4
|
||||
_08083C08: .4byte gDungeonGlobalData
|
||||
_08083C0C: .4byte 0x00000644
|
||||
_08083C10: .4byte gUnknown_810AC60
|
||||
_08083C14: .4byte gUnknown_810AC68
|
||||
_08083C18: .4byte gUnknown_810AC62
|
||||
_08083C1C: .4byte gUnknown_810AC64
|
||||
_08083C20: .4byte gUnknown_810AC66
|
||||
thumb_func_end sub_8083AB0
|
||||
|
||||
thumb_func_start sub_8083C24
|
||||
sub_8083C24:
|
||||
push {lr}
|
||||
ldr r0, _08083C3C
|
||||
ldr r0, [r0]
|
||||
ldr r1, _08083C40
|
||||
adds r0, r1
|
||||
movs r2, 0x14
|
||||
ldrsh r1, [r0, r2]
|
||||
ldr r0, _08083C44
|
||||
cmp r1, r0
|
||||
ble _08083C48
|
||||
movs r0, 0
|
||||
b _08083C4A
|
||||
.align 2, 0
|
||||
_08083C3C: .4byte gDungeonGlobalData
|
||||
_08083C40: .4byte 0x0001ce98
|
||||
_08083C44: .4byte 0x00000225
|
||||
_08083C48:
|
||||
movs r0, 0x1
|
||||
_08083C4A:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8083C24
|
||||
|
||||
thumb_func_start sub_8083C50
|
||||
sub_8083C50:
|
||||
push {lr}
|
||||
ldr r0, _08083C74
|
||||
ldr r0, [r0]
|
||||
ldr r1, _08083C78
|
||||
adds r0, r1
|
||||
movs r2, 0x14
|
||||
ldrsh r1, [r0, r2]
|
||||
ldr r0, _08083C7C
|
||||
cmp r1, r0
|
||||
beq _08083C70
|
||||
adds r0, 0x3
|
||||
cmp r1, r0
|
||||
beq _08083C70
|
||||
subs r0, 0x2
|
||||
cmp r1, r0
|
||||
bne _08083C80
|
||||
_08083C70:
|
||||
movs r0, 0x1
|
||||
b _08083C82
|
||||
.align 2, 0
|
||||
_08083C74: .4byte gDungeonGlobalData
|
||||
_08083C78: .4byte 0x0001ce98
|
||||
_08083C7C: .4byte 0x00000227
|
||||
_08083C80:
|
||||
movs r0, 0
|
||||
_08083C82:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8083C50
|
||||
|
||||
thumb_func_start sub_8083C88
|
||||
sub_8083C88:
|
||||
push {r4-r6,lr}
|
||||
lsls r0, 24
|
||||
lsrs r6, r0, 24
|
||||
ldr r4, _08083CC4
|
||||
ldr r0, [r4]
|
||||
ldr r1, _08083CC8
|
||||
adds r5, r0, r1
|
||||
ldr r1, _08083CCC
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
bl GetUnk9
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08083CB6
|
||||
ldr r0, [r4]
|
||||
ldr r1, _08083CD0
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _08083CC0
|
||||
cmp r6, 0
|
||||
bne _08083CC0
|
||||
_08083CB6:
|
||||
movs r0, 0x14
|
||||
ldrsh r1, [r5, r0]
|
||||
ldr r0, _08083CD4
|
||||
cmp r1, r0
|
||||
beq _08083CD8
|
||||
_08083CC0:
|
||||
movs r0, 0x1
|
||||
b _08083CDA
|
||||
.align 2, 0
|
||||
_08083CC4: .4byte gDungeonGlobalData
|
||||
_08083CC8: .4byte 0x0001ce98
|
||||
_08083CCC: .4byte 0x00000644
|
||||
_08083CD0: .4byte 0x0000065c
|
||||
_08083CD4: .4byte 0x00000227
|
||||
_08083CD8:
|
||||
movs r0, 0
|
||||
_08083CDA:
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8083C88
|
||||
|
||||
thumb_func_start sub_8083CE0
|
||||
sub_8083CE0:
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08083CF2
|
||||
ldr r0, _08083D00
|
||||
movs r1, 0x1A
|
||||
ldrsh r0, [r0, r1]
|
||||
cmp r0, 0x1
|
||||
ble _08083CFC
|
||||
_08083CF2:
|
||||
ldr r0, _08083D04
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
bl PlayFanfareSE
|
||||
_08083CFC:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08083D00: .4byte gUnknown_202EE10
|
||||
_08083D04: .4byte 0x0000012d
|
||||
thumb_func_end sub_8083CE0
|
||||
|
||||
thumb_func_start sub_8083D08
|
||||
sub_8083D08:
|
||||
push {lr}
|
||||
movs r0, 0x97
|
||||
lsls r0, 1
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
bl PlayFanfareSE
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8083D08
|
||||
|
||||
thumb_func_start sub_8083D1C
|
||||
sub_8083D1C:
|
||||
push {lr}
|
||||
ldr r0, _08083D2C
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
bl PlayFanfareSE
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08083D2C: .4byte 0x00000133
|
||||
thumb_func_end sub_8083D1C
|
||||
|
||||
thumb_func_start sub_8083D30
|
||||
sub_8083D30:
|
||||
push {lr}
|
||||
ldr r0, _08083D40
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
bl PlayFanfareSE
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08083D40: .4byte 0x0000012f
|
||||
thumb_func_end sub_8083D30
|
||||
|
||||
thumb_func_start sub_8083D44
|
||||
sub_8083D44:
|
||||
push {lr}
|
||||
movs r0, 0x98
|
||||
lsls r0, 1
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
bl PlayFanfareSE
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8083D44
|
||||
|
||||
thumb_func_start sub_8083D58
|
||||
sub_8083D58:
|
||||
push {lr}
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
movs r0, 0xC8
|
||||
bl PlayFanfareSE
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8083D58
|
||||
|
||||
thumb_func_start sub_8083D68
|
||||
sub_8083D68:
|
||||
push {lr}
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
movs r0, 0xCF
|
||||
bl PlayFanfareSE
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8083D68
|
||||
|
||||
thumb_func_start sub_8083D78
|
||||
sub_8083D78:
|
||||
push {lr}
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
movs r0, 0xD3
|
||||
bl PlayFanfareSE
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8083D78
|
||||
|
||||
thumb_func_start sub_8083D88
|
||||
sub_8083D88:
|
||||
push {lr}
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
movs r0, 0xCC
|
||||
bl PlayFanfareSE
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8083D88
|
||||
|
||||
thumb_func_start sub_8083D98
|
||||
sub_8083D98:
|
||||
push {lr}
|
||||
movs r0, 0x33
|
||||
bl sub_8083E88
|
||||
ldr r2, _08083DCC
|
||||
ldr r0, [r2]
|
||||
ldr r1, _08083DD0
|
||||
adds r0, r1
|
||||
movs r1, 0
|
||||
strb r1, [r0]
|
||||
ldr r0, [r2]
|
||||
ldr r3, _08083DD4
|
||||
adds r0, r3
|
||||
strb r1, [r0]
|
||||
ldr r0, [r2]
|
||||
adds r3, 0x27
|
||||
adds r0, r3
|
||||
strb r1, [r0]
|
||||
ldr r0, [r2]
|
||||
ldr r1, _08083DD8
|
||||
adds r0, r1
|
||||
ldr r1, _08083DDC
|
||||
strh r1, [r0]
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08083DCC: .4byte gDungeonGlobalData
|
||||
_08083DD0: .4byte 0x0000066f
|
||||
_08083DD4: .4byte 0x00000672
|
||||
_08083DD8: .4byte 0x0000066a
|
||||
_08083DDC: .4byte 0x000003e7
|
||||
thumb_func_end sub_8083D98
|
||||
|
||||
thumb_func_start sub_8083DE0
|
||||
sub_8083DE0:
|
||||
push {lr}
|
||||
movs r0, 0x34
|
||||
bl sub_8083E88
|
||||
ldr r2, _08083E14
|
||||
ldr r0, [r2]
|
||||
ldr r1, _08083E18
|
||||
adds r0, r1
|
||||
movs r1, 0
|
||||
strb r1, [r0]
|
||||
ldr r0, [r2]
|
||||
ldr r3, _08083E1C
|
||||
adds r0, r3
|
||||
strb r1, [r0]
|
||||
ldr r0, [r2]
|
||||
adds r3, 0x27
|
||||
adds r0, r3
|
||||
strb r1, [r0]
|
||||
ldr r0, [r2]
|
||||
ldr r1, _08083E20
|
||||
adds r0, r1
|
||||
ldr r1, _08083E24
|
||||
strh r1, [r0]
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08083E14: .4byte gDungeonGlobalData
|
||||
_08083E18: .4byte 0x0000066f
|
||||
_08083E1C: .4byte 0x00000672
|
||||
_08083E20: .4byte 0x0000066a
|
||||
_08083E24: .4byte 0x000003e7
|
||||
thumb_func_end sub_8083DE0
|
||||
|
||||
thumb_func_start sub_8083E28
|
||||
sub_8083E28:
|
||||
push {lr}
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
movs r0, 0xCF
|
||||
bl PlayFanfareSE
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8083E28
|
||||
|
||||
thumb_func_start PlaySoundEffect
|
||||
PlaySoundEffect:
|
||||
push {lr}
|
||||
lsls r0, 16
|
||||
lsrs r2, r0, 16
|
||||
ldr r0, _08083E54
|
||||
cmp r2, r0
|
||||
beq _08083E4E
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
adds r0, r2, 0
|
||||
bl PlayFanfareSE
|
||||
_08083E4E:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08083E54: .4byte 0x000003e5
|
||||
thumb_func_end PlaySoundEffect
|
||||
|
||||
thumb_func_start StopSoundEffect
|
||||
StopSoundEffect:
|
||||
push {lr}
|
||||
lsls r0, 16
|
||||
lsrs r1, r0, 16
|
||||
ldr r0, _08083E70
|
||||
cmp r1, r0
|
||||
beq _08083E6A
|
||||
adds r0, r1, 0
|
||||
bl StopFanfareSE
|
||||
_08083E6A:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08083E70: .4byte 0x000003e5
|
||||
thumb_func_end StopSoundEffect
|
||||
|
||||
thumb_func_start IsFanfareSEPlaying_2
|
||||
IsFanfareSEPlaying_2:
|
||||
push {lr}
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
bl IsFanfareSEPlaying
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end IsFanfareSEPlaying_2
|
||||
|
||||
thumb_func_start sub_8083E88
|
||||
sub_8083E88:
|
||||
ldr r1, _08083E9C
|
||||
ldr r1, [r1]
|
||||
ldr r3, _08083EA0
|
||||
adds r2, r1, r3
|
||||
movs r3, 0
|
||||
strh r0, [r2]
|
||||
ldr r0, _08083EA4
|
||||
adds r1, r0
|
||||
strh r3, [r1]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_08083E9C: .4byte gDungeonGlobalData
|
||||
_08083EA0: .4byte 0x0001ceda
|
||||
_08083EA4: .4byte 0x0001ced4
|
||||
thumb_func_end sub_8083E88
|
||||
|
||||
thumb_func_start sub_8083EA8
|
||||
sub_8083EA8:
|
||||
push {r4,r5,lr}
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
ldr r2, _08083ECC
|
||||
ldr r2, [r2]
|
||||
movs r4, 0x80
|
||||
lsls r4, 8
|
||||
adds r3, r4, 0
|
||||
ldr r5, _08083ED0
|
||||
adds r4, r2, r5
|
||||
orrs r0, r3
|
||||
strh r0, [r4]
|
||||
ldr r0, _08083ED4
|
||||
adds r2, r0
|
||||
strh r1, [r2]
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08083ECC: .4byte gDungeonGlobalData
|
||||
_08083ED0: .4byte 0x0001ceda
|
||||
_08083ED4: .4byte 0x0001ced4
|
||||
thumb_func_end sub_8083EA8
|
||||
|
||||
thumb_func_start sub_8083ED8
|
||||
sub_8083ED8:
|
||||
push {lr}
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
bl FadeOutAllMusic
|
||||
ldr r0, _08083F00
|
||||
ldr r1, [r0]
|
||||
ldr r2, _08083F04
|
||||
adds r0, r1, r2
|
||||
ldr r2, _08083F08
|
||||
strh r2, [r0]
|
||||
ldr r3, _08083F0C
|
||||
adds r0, r1, r3
|
||||
strh r2, [r0]
|
||||
ldr r0, _08083F10
|
||||
adds r1, r0
|
||||
strh r2, [r1]
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08083F00: .4byte gDungeonGlobalData
|
||||
_08083F04: .4byte 0x0001ced6
|
||||
_08083F08: .4byte 0x000003e7
|
||||
_08083F0C: .4byte 0x0001ced8
|
||||
_08083F10: .4byte 0x0001ceda
|
||||
thumb_func_end sub_8083ED8
|
||||
|
||||
thumb_func_start sub_8083F14
|
||||
sub_8083F14:
|
||||
push {lr}
|
||||
bl sub_8083F34
|
||||
bl xxx_call_stop_bgm
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8083F14
|
||||
|
||||
thumb_func_start xxx_call_GetCurrentBGSong
|
||||
xxx_call_GetCurrentBGSong:
|
||||
push {lr}
|
||||
bl GetCurrentBGSong
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end xxx_call_GetCurrentBGSong
|
||||
|
||||
thumb_func_start sub_8083F34
|
||||
sub_8083F34:
|
||||
ldr r0, _08083F4C
|
||||
ldr r0, [r0]
|
||||
ldr r1, _08083F50
|
||||
adds r0, r1
|
||||
movs r1, 0
|
||||
str r1, [r0]
|
||||
str r1, [r0, 0x4]
|
||||
ldr r1, _08083F54
|
||||
strh r1, [r0, 0xA]
|
||||
strh r1, [r0, 0xC]
|
||||
strh r1, [r0, 0xE]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_08083F4C: .4byte gDungeonGlobalData
|
||||
_08083F50: .4byte 0x0001cecc
|
||||
_08083F54: .4byte 0x000003e7
|
||||
thumb_func_end sub_8083F34
|
||||
|
||||
thumb_func_start sub_8083F58
|
||||
sub_8083F58:
|
||||
push {r4,lr}
|
||||
ldr r0, _08083F7C
|
||||
ldr r2, [r0]
|
||||
ldr r0, _08083F80
|
||||
adds r4, r2, r0
|
||||
ldr r1, _08083F84
|
||||
adds r3, r2, r1
|
||||
ldrh r1, [r3]
|
||||
ldr r0, _08083F88
|
||||
cmp r1, r0
|
||||
bne _08083FB2
|
||||
ldr r1, _08083F8C
|
||||
adds r0, r2, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _08083F90
|
||||
movs r1, 0x12
|
||||
b _08083FB2
|
||||
.align 2, 0
|
||||
_08083F7C: .4byte gDungeonGlobalData
|
||||
_08083F80: .4byte 0x0001cecc
|
||||
_08083F84: .4byte 0x0000066a
|
||||
_08083F88: .4byte 0x000003e7
|
||||
_08083F8C: .4byte 0x0000066f
|
||||
_08083F90:
|
||||
ldr r1, _08083FA0
|
||||
adds r0, r2, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _08083FA4
|
||||
movs r1, 0x80
|
||||
b _08083FB2
|
||||
.align 2, 0
|
||||
_08083FA0: .4byte 0x00000672
|
||||
_08083FA4:
|
||||
ldr r1, _08083FC4
|
||||
adds r0, r2, r1
|
||||
ldrb r0, [r0]
|
||||
movs r1, 0x11
|
||||
cmp r0, 0
|
||||
bne _08083FB2
|
||||
ldrh r1, [r4, 0xE]
|
||||
_08083FB2:
|
||||
ldr r0, [r4]
|
||||
cmp r0, 0x4
|
||||
bne _08083FC8
|
||||
ldrh r0, [r4, 0xC]
|
||||
cmp r1, r0
|
||||
beq _08083FDA
|
||||
movs r0, 0x2
|
||||
b _08083FD6
|
||||
.align 2, 0
|
||||
_08083FC4: .4byte 0x00000699
|
||||
_08083FC8:
|
||||
ldr r2, _08083FEC
|
||||
cmp r1, r2
|
||||
beq _08083FDA
|
||||
ldrh r0, [r4, 0xA]
|
||||
cmp r0, r2
|
||||
bne _08083FDA
|
||||
movs r0, 0x1
|
||||
_08083FD6:
|
||||
str r0, [r4]
|
||||
strh r1, [r4, 0xA]
|
||||
_08083FDA:
|
||||
ldr r0, [r4]
|
||||
cmp r0, 0x4
|
||||
bhi _08084084
|
||||
lsls r0, 2
|
||||
ldr r1, _08083FF0
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.align 2, 0
|
||||
_08083FEC: .4byte 0x000003e7
|
||||
_08083FF0: .4byte _08083FF4
|
||||
.align 2, 0
|
||||
_08083FF4:
|
||||
.4byte _08084084
|
||||
.4byte _08084008
|
||||
.4byte _08084050
|
||||
.4byte _0808405E
|
||||
.4byte _08084084
|
||||
_08084008:
|
||||
ldrh r1, [r4, 0xA]
|
||||
ldr r0, _08084014
|
||||
cmp r1, r0
|
||||
bne _08084018
|
||||
movs r0, 0
|
||||
b _08084040
|
||||
.align 2, 0
|
||||
_08084014: .4byte 0x000003e7
|
||||
_08084018:
|
||||
movs r0, 0x80
|
||||
lsls r0, 8
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _08084030
|
||||
ldr r0, _0808402C
|
||||
ands r0, r1
|
||||
bl StartNewBGM
|
||||
b _0808403A
|
||||
.align 2, 0
|
||||
_0808402C: .4byte 0x00007fff
|
||||
_08084030:
|
||||
ldr r0, _08084048
|
||||
ands r0, r1
|
||||
ldrh r1, [r4, 0x8]
|
||||
bl FadeInNewBGM
|
||||
_0808403A:
|
||||
ldrh r0, [r4, 0xA]
|
||||
strh r0, [r4, 0xC]
|
||||
movs r0, 0x4
|
||||
_08084040:
|
||||
str r0, [r4]
|
||||
ldr r0, _0808404C
|
||||
strh r0, [r4, 0xA]
|
||||
b _08084084
|
||||
.align 2, 0
|
||||
_08084048: .4byte 0x00007fff
|
||||
_0808404C: .4byte 0x000003e7
|
||||
_08084050:
|
||||
movs r0, 0x1E
|
||||
bl FadeOutBGM
|
||||
movs r0, 0x1E
|
||||
str r0, [r4, 0x4]
|
||||
movs r0, 0x3
|
||||
b _08084082
|
||||
_0808405E:
|
||||
ldr r0, [r4, 0x4]
|
||||
cmp r0, 0
|
||||
beq _0808406C
|
||||
subs r0, 0x1
|
||||
str r0, [r4, 0x4]
|
||||
cmp r0, 0
|
||||
bne _08084084
|
||||
_0808406C:
|
||||
ldrh r1, [r4, 0xA]
|
||||
ldr r0, _0808407C
|
||||
cmp r1, r0
|
||||
bne _08084080
|
||||
bl StopBGM
|
||||
movs r0, 0
|
||||
b _08084082
|
||||
.align 2, 0
|
||||
_0808407C: .4byte 0x000003e7
|
||||
_08084080:
|
||||
movs r0, 0x1
|
||||
_08084082:
|
||||
str r0, [r4]
|
||||
_08084084:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8083F58
|
||||
|
||||
thumb_func_start sub_808408C
|
||||
sub_808408C:
|
||||
ldr r2, _0808409C
|
||||
movs r1, 0x1
|
||||
orrs r1, r0
|
||||
ldr r0, _080840A0
|
||||
ands r0, r1
|
||||
str r0, [r2]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_0808409C: .4byte gUnknown_203B458
|
||||
_080840A0: .4byte 0x00ffffff
|
||||
thumb_func_end sub_808408C
|
||||
|
||||
thumb_func_start sub_80840A4
|
||||
sub_80840A4:
|
||||
ldr r3, _080840C8
|
||||
ldr r0, [r3]
|
||||
ldr r2, _080840CC
|
||||
adds r1, r0, 0
|
||||
muls r1, r2
|
||||
adds r1, 0x1
|
||||
lsrs r0, r1, 16
|
||||
muls r1, r2
|
||||
adds r1, 0x1
|
||||
str r1, [r3]
|
||||
ldr r2, _080840D0
|
||||
ands r1, r2
|
||||
orrs r0, r1
|
||||
ldr r1, _080840D4
|
||||
ands r0, r1
|
||||
movs r1, 0x1
|
||||
orrs r0, r1
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_080840C8: .4byte gUnknown_203B458
|
||||
_080840CC: .4byte 0x5d588b65
|
||||
_080840D0: .4byte 0xffff0000
|
||||
_080840D4: .4byte 0x00ffffff
|
||||
thumb_func_end sub_80840A4
|
||||
|
||||
.align 2, 0
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ _0808427C:
|
|||
_08084290:
|
||||
movs r0, 0x36
|
||||
bl sub_803E668
|
||||
bl sub_8083F58
|
||||
bl UpdateDungeonMusic
|
||||
ldrh r1, [r4, 0xA]
|
||||
movs r2, 0xA
|
||||
ldrsh r0, [r4, r2]
|
||||
|
|
|
|||
|
|
@ -745,7 +745,7 @@ sub_8086124:
|
|||
sub_8086130:
|
||||
push {lr}
|
||||
movs r0, 0x3C
|
||||
bl sub_8083ED8
|
||||
bl DungeonFadeOutBGM
|
||||
movs r0, 0x3C
|
||||
movs r1, 0x46
|
||||
bl sub_803E708
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ TeamMeaniesPreFightDialogue:
|
|||
bl sub_803E708
|
||||
bl sub_8087144
|
||||
movs r0, 0xA
|
||||
bl sub_8083E88
|
||||
bl DungeonStartNewBGM
|
||||
ldr r0, _08087050
|
||||
bl DisplayDungeonDialogue
|
||||
movs r0, 0xA
|
||||
|
|
@ -253,7 +253,7 @@ sub_8087144:
|
|||
mov r0, r9
|
||||
str r0, [r4, 0x8]
|
||||
movs r0, 0xA
|
||||
bl sub_8083E88
|
||||
bl DungeonStartNewBGM
|
||||
adds r0, r7, 0
|
||||
bl sub_8086A54
|
||||
mov r0, r8
|
||||
|
|
@ -327,7 +327,7 @@ sub_8087230:
|
|||
bl GetEntityFromClientType
|
||||
adds r5, r0, 0
|
||||
movs r0, 0x72
|
||||
bl sub_8083E88
|
||||
bl DungeonStartNewBGM
|
||||
bl sub_8085374
|
||||
bl sub_80854D4
|
||||
movs r0, 0x4
|
||||
|
|
@ -514,7 +514,7 @@ ZapdosPreFightDialogue:
|
|||
bl sub_803E708
|
||||
movs r0, 0x3
|
||||
bl ZapdosScreenFlash
|
||||
bl sub_8083F14
|
||||
bl DungeonStopBGM
|
||||
movs r0, 0xED
|
||||
lsls r0, 1
|
||||
bl PlaySoundEffect
|
||||
|
|
@ -523,7 +523,7 @@ ZapdosPreFightDialogue:
|
|||
ldr r0, [sp, 0x68]
|
||||
bl ZapdosDropInEffect
|
||||
movs r0, 0x9
|
||||
bl sub_8083E88
|
||||
bl DungeonStartNewBGM
|
||||
adds r0, r6, 0
|
||||
movs r1, 0x6
|
||||
movs r2, 0x4
|
||||
|
|
|
|||
35
asm/dungeon_music.s
Normal file
35
asm/dungeon_music.s
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#include "asm/constants/gba_constants.inc"
|
||||
#include "asm/macros.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_80840A4
|
||||
sub_80840A4:
|
||||
ldr r3, _080840C8
|
||||
ldr r0, [r3]
|
||||
ldr r2, _080840CC
|
||||
adds r1, r0, 0
|
||||
muls r1, r2
|
||||
adds r1, 0x1
|
||||
lsrs r0, r1, 16
|
||||
muls r1, r2
|
||||
adds r1, 0x1
|
||||
str r1, [r3]
|
||||
ldr r2, _080840D0
|
||||
ands r1, r2
|
||||
orrs r0, r1
|
||||
ldr r1, _080840D4
|
||||
ands r0, r1
|
||||
movs r1, 0x1
|
||||
orrs r0, r1
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_080840C8: .4byte gUnknown_203B458
|
||||
_080840CC: .4byte 0x5d588b65
|
||||
_080840D0: .4byte 0xffff0000
|
||||
_080840D4: .4byte 0x00ffffff
|
||||
thumb_func_end sub_80840A4
|
||||
|
||||
.align 2,0
|
||||
|
|
@ -31,5 +31,6 @@ const u8 *GetDungeonName1(u8 dungeon);
|
|||
u32 sub_80908D8(struct DungeonLocation *dungeon);
|
||||
u8 sub_8090910(struct DungeonLocation *dungeon, u32 param_2);
|
||||
bool8 sub_809095C(u8 dungeon);
|
||||
u8 GetUnk9(u8 dungeon);
|
||||
|
||||
#endif //GUARD_DUNGEON_H
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
bool8 IsBossBattle(void);
|
||||
bool8 IsFixedDungeon(void);
|
||||
bool8 sub_8044210(void);
|
||||
bool8 IsDungeonMaze(void);
|
||||
void RunDungeon(bool8 param_1);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -21,6 +21,38 @@ struct DungeonGlobalData_sub
|
|||
u8 unk2;
|
||||
};
|
||||
|
||||
struct unkDungeonGlobal_unk1CE98_sub
|
||||
{
|
||||
/* 0x0 */ u8 buffer1[0xA];
|
||||
/* 0xA */ u8 buffer2[0xA];
|
||||
/* 0x14 */ s16 unk14;
|
||||
/* 0x16 */ u8 fill16[0x2];;
|
||||
/* 0x18 */ struct DungeonLocation dungeonLocation;
|
||||
/* 0x1C */ struct ItemSlot heldItem;
|
||||
/* 0x20 */ u32 expPoints;
|
||||
/* 0x24 */ s16 maxHP;
|
||||
/* 0x26 */ u8 attack;
|
||||
/* 0x27 */ u8 specialAttack;
|
||||
/* 0x28 */ u8 defense;
|
||||
/* 0x29 */ u8 specialDefense;
|
||||
/* 0x2A */ u8 level;
|
||||
/* 0x2B */ u8 attBoost;
|
||||
/* 0x2C */ u8 spAttBoost;
|
||||
/* 0x2D */ u8 defBoost;
|
||||
/* 0x2E */ u8 spDefBoost;
|
||||
u8 unk4; // speedBoost?
|
||||
};
|
||||
|
||||
struct DungeonMusicPlayer
|
||||
{
|
||||
u32 state;
|
||||
u32 fadeOutSpeed;
|
||||
u16 fadeInSpeed;
|
||||
u16 songIndex;
|
||||
u16 pastSongIndex;
|
||||
u16 queuedSongIndex;
|
||||
};
|
||||
|
||||
struct DungeonGlobalData
|
||||
{
|
||||
u8 unk0;
|
||||
|
|
@ -49,9 +81,8 @@ struct DungeonGlobalData
|
|||
u8 fill17A[0x17C - 0x17A];
|
||||
struct DungeonGlobalData_sub unk17C[0x100];
|
||||
/* 0x57C */ u8 fill57C[0x644 - 0x57c];
|
||||
/* 0x644 */ u8 unk644;
|
||||
/* 0x645 */ u8 floorNumber;
|
||||
u8 fill646[0x654 - 0x646];
|
||||
/* 0x644 */ struct DungeonLocation dungeonLocation;
|
||||
u8 fill646[0x654 - 0x648];
|
||||
u8 unk654;
|
||||
u8 fill655[0x65C - 0x655];
|
||||
u8 unk65C;
|
||||
|
|
@ -64,7 +95,8 @@ struct DungeonGlobalData
|
|||
u8 unk66C;
|
||||
u8 unk66D;
|
||||
/* 0x66E */ u8 unk66E;
|
||||
u8 fill66F[0x671 - 0x66F];
|
||||
u8 unk66F;
|
||||
u8 unk670;
|
||||
/* 0x671 */ bool8 monsterHouseActive;
|
||||
/* 0x672 */ u8 unk672;
|
||||
u8 unk673;
|
||||
|
|
@ -75,7 +107,9 @@ struct DungeonGlobalData
|
|||
u8 unk678;
|
||||
u8 unk679[0x68A - 0x679];
|
||||
/* 0x68A */ u8 unk68A;
|
||||
u8 fill68B[0x363C - 0x68B];
|
||||
u8 fill68B[0x699 - 0x68B];
|
||||
u8 unk699;
|
||||
u8 fill69A[0x363C - 0x69A];
|
||||
/* 0x363C */ u8 expYieldRankings[NUM_SPECIES];
|
||||
u8 fill37E3[0x37F4 - 0x37D9];
|
||||
/* 0x37F4 */ s32 unk37F4;
|
||||
|
|
@ -155,6 +189,10 @@ struct DungeonGlobalData
|
|||
u8 unk18217;
|
||||
u8 fill18218[0x1C578 - 0x18218];
|
||||
u8 unk1C578;
|
||||
u8 fill1C579[0x1CE98 - 0x1C579];
|
||||
/* 0x1CE98 */ struct unkDungeonGlobal_unk1CE98_sub unk1CE98;
|
||||
u32 unk1CEC8;
|
||||
/* 0x1CECC */ struct DungeonMusicPlayer musPlayer;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
16
include/dungeon_music.h
Normal file
16
include/dungeon_music.h
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#ifndef GUARD_DUNGEON_MUSIC_H
|
||||
#define GUARD_DUNGEON_MUSIC_H
|
||||
|
||||
void PlaySoundEffect(u32 songIndex);
|
||||
void StopSoundEffect(u32 songIndex);
|
||||
bool8 IsFanfareSEPlaying_2(u16 songIndex);
|
||||
void DungeonStartNewBGM(u16 songIndex);
|
||||
void DungeonFadeInNewBGM(u16 songIndex, u32 fadeInSpeed);
|
||||
void DungeonFadeOutBGM(u16 speed);
|
||||
void DungeonStopBGM(void);
|
||||
u16 DungeonGetCurrentBGSong(void);
|
||||
void StopDungeonBGM(void);
|
||||
void UpdateDungeonMusic(void);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -269,6 +269,8 @@ SECTIONS {
|
|||
asm/code_808333C.o(.text);
|
||||
src/dungeon_leader.o(.text);
|
||||
asm/code_8083654.o(.text);
|
||||
src/dungeon_music.o(.text);
|
||||
asm/dungeon_music.o(.text);
|
||||
src/dungeon_random.o(.text);
|
||||
src/code_808417C.o(.text);
|
||||
asm/code_808417C.o(.text);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#include "dungeon_entity.h"
|
||||
#include "dungeon_global_data.h"
|
||||
#include "dungeon_map_access.h"
|
||||
#include "dungeon_music.h"
|
||||
#include "file_system.h"
|
||||
#include "play_time.h"
|
||||
|
||||
|
|
@ -18,7 +19,6 @@ extern void sub_80060EC(void);
|
|||
extern void sub_800CB20(void);
|
||||
extern void LoadBufferedInputs(void);
|
||||
extern void xxx_call_update_bg_sound_input(void);
|
||||
extern void sub_8083F58(void);
|
||||
extern void sub_8011860(void);
|
||||
|
||||
extern void sub_803F580(u32);
|
||||
|
|
@ -59,7 +59,7 @@ void sub_8040094(u8 r0)
|
|||
sub_800CB20();
|
||||
LoadBufferedInputs();
|
||||
xxx_call_update_bg_sound_input();
|
||||
sub_8083F58();
|
||||
UpdateDungeonMusic();
|
||||
sub_8011860();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
#include "global.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_global_data.h"
|
||||
#include "dungeon_entity.h"
|
||||
#include "dungeon_map_access.h"
|
||||
#include "dungeon_music.h"
|
||||
#include "dungeon_random.h"
|
||||
#include "dungeon_util.h"
|
||||
#include "dungeon_util_1.h"
|
||||
|
|
@ -310,11 +312,9 @@ extern u8 sub_800E9A8(u32);
|
|||
extern void sub_800DC14(u32);
|
||||
|
||||
extern void sub_8086A3C(struct DungeonEntity *r0);
|
||||
extern void sub_8083E88(u32);
|
||||
extern void sub_80854D4(void);
|
||||
extern void sub_80855E4(void *);
|
||||
extern void sub_8068FE0(struct DungeonEntity *, u32, u32);
|
||||
extern void sub_8083EA8(u32, u32);
|
||||
|
||||
extern void sub_803E708(u32, u32);
|
||||
extern void sub_8086448(void);
|
||||
|
|
@ -331,12 +331,9 @@ extern void DisplayDungeonDialogue(u32 *);
|
|||
extern void sub_803E708(u32, u32);
|
||||
extern u8 HasRecruitedMon(u32);
|
||||
extern u8 sub_806FD18(struct DungeonEntity *);
|
||||
extern bool8 IsFanfareSEPlaying_2(u32);
|
||||
extern void sub_8083F14();
|
||||
extern void sub_80861D4(struct DungeonEntity *, u32, s32 direction);
|
||||
extern void sub_806FDF4(struct DungeonEntity *, struct DungeonEntity *, struct DungeonEntity **);
|
||||
extern u32 sub_80861F8(u32, struct DungeonEntity *, u32);
|
||||
extern void sub_8083ED8(u32);
|
||||
extern s32 GetCameraXPos();
|
||||
extern s32 GetCameraYPos();
|
||||
extern void sub_803F878(u32, s32);
|
||||
|
|
@ -377,10 +374,8 @@ extern void sub_808BBA8(struct DungeonEntity * );
|
|||
extern void sub_80855E4(void *);
|
||||
extern void sub_8041888(u32);
|
||||
extern void sub_80861B8(struct DungeonEntity *, u32, u32);
|
||||
extern void sub_8083ED8(u32);
|
||||
extern void sub_803E708(u32, u32);
|
||||
extern void DisplayDungeonDialogue(u32 *r0);
|
||||
extern void sub_8083E88(u32);
|
||||
|
||||
extern void SpriteShockEffect(struct DungeonEntity *);
|
||||
extern u32 sub_80861F8(u32, struct DungeonEntity *, u32);
|
||||
|
|
@ -411,7 +406,6 @@ extern void sub_803E46C(u32);
|
|||
extern void sub_80866C4(u32 *);
|
||||
extern void sub_808692C();
|
||||
|
||||
extern void StopSoundEffect(u32);
|
||||
extern void sub_80868F4();
|
||||
extern void sub_8086910();
|
||||
extern u32 sub_8085EC8(u32, u32, u32, u32 *, u32);
|
||||
|
|
@ -449,7 +443,6 @@ void sub_80891F0(void);
|
|||
void sub_8089294(void);
|
||||
void GroudonScreenFlash2(void);
|
||||
|
||||
extern void sub_8083F14();
|
||||
extern u8 sub_8086AE4(u32);
|
||||
|
||||
|
||||
|
|
@ -466,8 +459,6 @@ extern void sub_8086738();
|
|||
extern void sub_8086A54(struct DungeonEntity *);
|
||||
extern void sub_8086764();
|
||||
|
||||
extern s32 GetCameraXPos();
|
||||
extern s32 GetCameraYPos();
|
||||
extern void sub_803F878(u32,s32);
|
||||
|
||||
void SceneGroudonMovement(struct DungeonEntity * param_1);
|
||||
|
|
@ -613,7 +604,7 @@ void sub_80877E8(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
MoltresEntity = GetEntityFromClientType(9);
|
||||
sub_8083E88(0x26);
|
||||
DungeonStartNewBGM(MUS_THE_MOUNTAIN_OF_FIRE);
|
||||
sub_8085374();
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_WEST);
|
||||
|
|
@ -629,12 +620,12 @@ void sub_8087848(void)
|
|||
struct DungeonEntity *LeaderEntity;
|
||||
struct DungeonEntity *MoltresEntity;
|
||||
|
||||
u32 uVar4;
|
||||
s32 iVar3;
|
||||
u32 XPos;
|
||||
s32 YPos;
|
||||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
MoltresEntity = GetEntityFromClientType(9);
|
||||
sub_8083E88(0x26);
|
||||
DungeonStartNewBGM(MUS_THE_MOUNTAIN_OF_FIRE);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_WEST);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
|
|
@ -647,9 +638,9 @@ void sub_8087848(void)
|
|||
sub_8086A3C(MoltresEntity);
|
||||
}
|
||||
sub_8085860(LeaderEntity->posWorld.x - 5, LeaderEntity->posWorld.y);
|
||||
uVar4 = GetCameraXPos();
|
||||
iVar3 = GetCameraYPos();
|
||||
sub_803F878(uVar4,iVar3 + -0x1000);
|
||||
XPos = GetCameraXPos();
|
||||
YPos = GetCameraYPos();
|
||||
sub_803F878(XPos, YPos + -0x1000);
|
||||
CopySpeciesNametoBuffer(gUnknown_202E038,SPECIES_MOLTRES);
|
||||
}
|
||||
|
||||
|
|
@ -699,7 +690,7 @@ void MoltresPreFightDialogue(void)
|
|||
sub_803E708(4,0x46);
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
PlaySoundEffect(0x2f2);
|
||||
sub_8083F14();
|
||||
DungeonStopBGM();
|
||||
MoltresScreenDarken();
|
||||
DisplayDungeonDialogue(&gMoltresPreFightDialogue_6);
|
||||
sub_803E708(10,0x46);
|
||||
|
|
@ -1024,7 +1015,7 @@ void sub_8087F54(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
ArticunoEntity = GetEntityFromClientType(0xd);
|
||||
sub_8083E88(0x72);
|
||||
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
|
||||
sub_8085374();
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
|
|
@ -1040,7 +1031,7 @@ void sub_8087FB4(void)
|
|||
struct DungeonEntity *ArticunoEntity;
|
||||
|
||||
ArticunoEntity = GetEntityFromClientType(0xd);
|
||||
sub_8083E88(0x72);
|
||||
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
|
||||
sub_8085374();
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
|
|
@ -1096,7 +1087,7 @@ void ArticunoPreFightDialogue(void)
|
|||
DisplayDungeonDialogue(&gArticunoPreFightDialogue_1);
|
||||
sub_803E708(10,0x46);
|
||||
sub_8086598();
|
||||
sub_8083F14();
|
||||
DungeonStopBGM();
|
||||
DisplayDungeonDialogue(&gArticunoPreFightDialogue_2);
|
||||
sub_803E708(10,0x46);
|
||||
sub_80869E4(PartnerEntity,4,1,2);
|
||||
|
|
@ -1273,9 +1264,9 @@ void sub_8088574(void)
|
|||
|
||||
void sub_80885A0(void)
|
||||
{
|
||||
sub_8083ED8(0x3c);
|
||||
DungeonFadeOutBGM(0x3c);
|
||||
sub_803E708(0x3c,0x46);
|
||||
sub_8083F14();
|
||||
DungeonStopBGM();
|
||||
gDungeonGlobalData->unk7 = 1;
|
||||
}
|
||||
|
||||
|
|
@ -1284,9 +1275,9 @@ void sub_80885C4(void)
|
|||
struct DungeonEntity * LeaderEntity;
|
||||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
sub_8083ED8(0x3c);
|
||||
DungeonFadeOutBGM(0x3c);
|
||||
sub_803E708(0x3c,0x46);
|
||||
sub_8083F14();
|
||||
DungeonStopBGM();
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
|
|
@ -1316,7 +1307,7 @@ void sub_808862C(void)
|
|||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
AlakazamEntity = GetEntityFromClientType(10);
|
||||
GroudonEntity = GetEntityFromClientType(0xe);
|
||||
sub_8083E88(0x72);
|
||||
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
|
||||
sub_80867F4();
|
||||
sub_8085374();
|
||||
sub_80854D4();
|
||||
|
|
@ -1337,8 +1328,8 @@ void sub_80886C4(void)
|
|||
struct DungeonEntity * AlakazamEntity;
|
||||
struct DungeonEntity * GroudonEntity;
|
||||
|
||||
u32 uVar4;
|
||||
s32 iVar2;
|
||||
u32 XPos;
|
||||
s32 YPos;
|
||||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
AlakazamEntity = GetEntityFromClientType(10);
|
||||
|
|
@ -1352,9 +1343,9 @@ void sub_80886C4(void)
|
|||
SetFacingDirection(GroudonEntity, DIRECTION_SOUTH);
|
||||
sub_8086A3C(GroudonEntity);
|
||||
sub_8085860(LeaderEntity->posWorld.x,LeaderEntity->posWorld.y);
|
||||
uVar4 = GetCameraXPos();
|
||||
iVar2 = GetCameraYPos();
|
||||
sub_803F878(uVar4,iVar2 + -0x1000);
|
||||
XPos = GetCameraXPos();
|
||||
YPos = GetCameraYPos();
|
||||
sub_803F878(XPos,YPos + -0x1000);
|
||||
CopySpeciesNametoBuffer(gUnknown_202E038, SPECIES_GROUDON);
|
||||
CopySpeciesNametoBuffer(gUnknown_202E038 + 0x50, SPECIES_ALAKAZAM);
|
||||
}
|
||||
|
|
@ -1459,7 +1450,7 @@ void GroudonPreFightDialogue(void)
|
|||
sub_803E708(0x3c,0x46);
|
||||
DisplayDungeonDialogue(&GroudonPreFightDialogue_11);
|
||||
sub_803E708(10,0x46);
|
||||
sub_8083F14();
|
||||
DungeonStopBGM();
|
||||
GroudonScreenFlash2();
|
||||
sub_803E708(0x1e,0x46);
|
||||
DisplayDungeonDialogue(&GroudonPreFightDialogue_12);
|
||||
|
|
@ -1501,7 +1492,7 @@ void GroudonReFightDialogue(void)
|
|||
sub_803E708(10,0x46);
|
||||
sub_808682C();
|
||||
sub_803E708(0x3c,0x46);
|
||||
sub_8083F14();
|
||||
DungeonStopBGM();
|
||||
PlaySoundEffect(0x1fa);
|
||||
sub_8086738();
|
||||
DisplayDungeonDialogue(&gGroudonReFightDialogue_4);
|
||||
|
|
@ -1704,7 +1695,7 @@ void MagmaCavernMidDialogue(void)
|
|||
// far already..
|
||||
DisplayDungeonDialogue(&MagmaCavernMidDialogue_2);
|
||||
sub_803E708(10,0x46);
|
||||
sub_8083F14();
|
||||
DungeonStopBGM();
|
||||
sub_80855E4(sub_80868F4);
|
||||
sub_808680C();
|
||||
PlaySoundEffect(0x1c5);
|
||||
|
|
@ -1901,7 +1892,7 @@ void sub_80892C8(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
RayquazaEntity = GetEntityFromClientType(0xf);
|
||||
sub_8083E88(0x1a);
|
||||
DungeonStartNewBGM(MUS_RAYQUAZAS_DOMAIN);
|
||||
sub_8085374();
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
|
|
@ -1919,7 +1910,7 @@ void sub_8089328(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
RayquazaEntity = GetEntityFromClientType(0xf);
|
||||
sub_8083E88(0x1a);
|
||||
DungeonStartNewBGM(MUS_RAYQUAZAS_DOMAIN);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
|
|
@ -2088,7 +2079,7 @@ void sub_808970C(void)
|
|||
struct DungeonEntity *LeaderEntity;
|
||||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
sub_8083E88(0x7D);
|
||||
DungeonStartNewBGM(MUS_TINY_WOODS);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
|
|
@ -2210,7 +2201,7 @@ void sub_8089914(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
MewtwoEntity = GetEntityFromClientType(0x11);
|
||||
sub_8083F14();
|
||||
DungeonStopBGM();
|
||||
gDungeonGlobalData->unk7 = 1;
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
|
|
@ -2228,12 +2219,12 @@ void sub_8089978(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
MewtwoEntity = GetEntityFromClientType(0x11);
|
||||
sub_8083F14();
|
||||
DungeonStopBGM();
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
if(HasRecruitedMon(SPECIES_MEWTWO)){
|
||||
sub_8083E88(0x23);
|
||||
DungeonStartNewBGM(MUS_FRIEND_AREA_CRYPTIC_CAVE);
|
||||
sub_8068FE0(MewtwoEntity,0x21c,0);
|
||||
}
|
||||
else {
|
||||
|
|
@ -2263,7 +2254,7 @@ void MewtwoPreFightDialogue(void)
|
|||
sub_8086448();
|
||||
DisplayDungeonDialogue(&gMewtwoPreFightDialogue_1);
|
||||
sub_803E708(10,0x46);
|
||||
sub_8083E88(0x23);
|
||||
DungeonStartNewBGM(MUS_FRIEND_AREA_CRYPTIC_CAVE);
|
||||
sub_8086794();
|
||||
sub_803E708(0x1e,0x46);
|
||||
MewtwoDropInEffect(MewtwoEntity);
|
||||
|
|
@ -2293,7 +2284,7 @@ void MewtwoReFightDialogue(void)
|
|||
}
|
||||
else {
|
||||
DisplayDungeonDialogue(&gMewtwoReFightDialogue_1);
|
||||
sub_8083E88(0x23);
|
||||
DungeonStartNewBGM(MUS_FRIEND_AREA_CRYPTIC_CAVE);
|
||||
sub_8086794();
|
||||
MewtwoDropInEffect(MewtwoEntity);
|
||||
sub_803E708(0x3c,0x46);
|
||||
|
|
@ -2362,7 +2353,7 @@ void sub_8089C44(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
EnteiEntity = GetEntityFromClientType(0x12);
|
||||
sub_8083E88(0x72);
|
||||
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
SetFacingDirection(EnteiEntity, DIRECTION_SOUTH);
|
||||
|
|
@ -2378,7 +2369,7 @@ void sub_8089C90(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
EnteiEntity = GetEntityFromClientType(0x12);
|
||||
sub_8083E88(0x72);
|
||||
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
if (HasRecruitedMon(SPECIES_ENTEI)) {
|
||||
|
|
@ -2493,7 +2484,7 @@ void sub_8089EFC(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
RaikouEntity = GetEntityFromClientType(0x13);
|
||||
sub_8083E88(0x72);
|
||||
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
SetFacingDirection(RaikouEntity, DIRECTION_SOUTH);
|
||||
|
|
@ -2509,7 +2500,7 @@ void sub_8089F44(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
RaikouEntity = GetEntityFromClientType(0x13);
|
||||
sub_8083E88(0x72);
|
||||
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
SetFacingDirection(RaikouEntity, DIRECTION_SOUTH);
|
||||
|
|
@ -2525,7 +2516,7 @@ void sub_8089F8C(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
RaikouEntity = GetEntityFromClientType(0x13);
|
||||
sub_8083E88(0x72);
|
||||
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
if (HasRecruitedMon(SPECIES_RAIKOU)) {
|
||||
|
|
@ -2649,7 +2640,7 @@ void sub_808A264(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
SuicuneEntity = GetEntityFromClientType(0x14);
|
||||
sub_8083E88(0x72);
|
||||
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
|
|
@ -2666,7 +2657,7 @@ void sub_808A2C0(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
SuicuneEntity = GetEntityFromClientType(0x14);
|
||||
sub_8083E88(0x72);
|
||||
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
SetFacingDirection(SuicuneEntity, DIRECTION_SOUTH);
|
||||
|
|
@ -2681,7 +2672,7 @@ void sub_808A308(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
SuicuneEntity = GetEntityFromClientType(0x14);
|
||||
sub_8083E88(0x72);
|
||||
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
if (HasRecruitedMon(SPECIES_SUICUNE)) {
|
||||
|
|
@ -2824,7 +2815,7 @@ void sub_808A608(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
HoOhEntity = GetEntityFromClientType(0x15);
|
||||
sub_8083E88(0x1c);
|
||||
DungeonStartNewBGM(MUS_FRIEND_AREA_RAINBOW_PEAK);
|
||||
sub_80867F4();
|
||||
sub_8086838(0,0,0);
|
||||
sub_80854D4();
|
||||
|
|
@ -2842,7 +2833,7 @@ void sub_808A668(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
HoOhEntity = GetEntityFromClientType(0x15);
|
||||
sub_8083E88(0x1c);
|
||||
DungeonStartNewBGM(MUS_FRIEND_AREA_RAINBOW_PEAK);
|
||||
sub_80867F4();
|
||||
sub_8086838(0,0,0);
|
||||
sub_80854D4();
|
||||
|
|
@ -3003,7 +2994,7 @@ void sub_808A9E4(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
LatiosEntity = GetEntityFromClientType(0x16);
|
||||
sub_8083E88(0x72);
|
||||
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
|
|
@ -3019,7 +3010,7 @@ void sub_808AA3C(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
LatiosEntity = GetEntityFromClientType(0x16);
|
||||
sub_8083E88(0x72);
|
||||
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
|
|
@ -3035,7 +3026,7 @@ void sub_808AA94(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
LatiosEntity = GetEntityFromClientType(0x16);
|
||||
sub_8083E88(0x72);
|
||||
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
|
|
@ -3227,7 +3218,7 @@ void sub_808AE54(char param_1,char param_2,u32 *param_3)
|
|||
if (sub_8098100(0x1d) == 0) {
|
||||
xxx_init_itemslot_8090A8C(&auStack20,ITEM_ID_ROCK_PART,0);
|
||||
sub_80464C8(GetLeaderEntity(),param_3,&auStack20);
|
||||
sub_8083E88(0x72);
|
||||
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
|
||||
// Something fell from Regirock's body
|
||||
// Regirock was apparently guarding this item
|
||||
DisplayDungeonDialogue(&gRegirockPostFightDialogue_1);
|
||||
|
|
@ -3250,7 +3241,7 @@ void sub_808AEC8(char param_1,char param_2,u32 *param_3)
|
|||
if (sub_8098100(0x1d) == 0) {
|
||||
xxx_init_itemslot_8090A8C(&auStack20,ITEM_ID_ICE_PART,0);
|
||||
sub_80464C8(GetLeaderEntity(),param_3,&auStack20);
|
||||
sub_8083E88(0x72);
|
||||
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
|
||||
// Something fell from Regice's body
|
||||
// Regice was apparently guarding this item
|
||||
DisplayDungeonDialogue(&gRegicePostFightDialogue_1);
|
||||
|
|
@ -3272,7 +3263,7 @@ void sub_808AF3C(char param_1,char param_2,u32 *param_3)
|
|||
if (sub_8098100(0x1d) == 0) {
|
||||
xxx_init_itemslot_8090A8C(&auStack20,ITEM_ID_STEEL_PART,0);
|
||||
sub_80464C8(GetLeaderEntity(),param_3, &auStack20);
|
||||
sub_8083E88(0x72);
|
||||
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
|
||||
// Something fell from Registeel's body
|
||||
// Registeel was apparently guarding this item
|
||||
DisplayDungeonDialogue(&gRegisteelPostFightDialogue_1);
|
||||
|
|
@ -3513,7 +3504,7 @@ void sub_808B2F4(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
JirachiEntity = GetEntityFromClientType(0x1a);
|
||||
sub_8083E88(0x79);
|
||||
DungeonStartNewBGM(MUS_FRIEND_AREA_FOREST);
|
||||
sub_808BCE4();
|
||||
sub_8049ED4();
|
||||
sub_80854D4();
|
||||
|
|
@ -3532,7 +3523,7 @@ void sub_808B35C(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
JirachiEntity = GetEntityFromClientType(0x1a);
|
||||
sub_8083E88(0x79);
|
||||
DungeonStartNewBGM(MUS_FRIEND_AREA_FOREST);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
|
|
@ -3678,11 +3669,11 @@ void sub_808B50C(void)
|
|||
JirachiEntity->entityData->unk15C = 1;
|
||||
JirachiEntity->entityData->unk15E = 0;
|
||||
sub_80861B8(JirachiEntity,0xe,0);
|
||||
sub_8083ED8(0x1e);
|
||||
DungeonFadeOutBGM(0x1e);
|
||||
sub_803E708(0x1e,70);
|
||||
// Fwaaaahhhh
|
||||
DisplayDungeonDialogue(&gUnknown_810554C);
|
||||
sub_8083E88(0x79);
|
||||
DungeonStartNewBGM(MUS_FRIEND_AREA_FOREST);
|
||||
// I think I had a dream, and I was fighting in it
|
||||
// Did I imagine it?
|
||||
// I'm sleepy so I'm going back to sleep.
|
||||
|
|
@ -3724,7 +3715,7 @@ void JirachiWish(void)
|
|||
sub_80861B8(JirachiEntity,0xe,0);
|
||||
sub_80855E4(sub_80861A8);
|
||||
gDungeonGlobalData->unk1356C = 1;
|
||||
sub_8083ED8(0x1e);
|
||||
DungeonFadeOutBGM(0x1e);
|
||||
sub_803E708(0x1e,0x46);
|
||||
DisplayDungeonDialogue(&gUnknown_8105668);
|
||||
sub_803E708(10,0x46);
|
||||
|
|
@ -3732,7 +3723,7 @@ void JirachiWish(void)
|
|||
sub_803E708(0x96,0x46);
|
||||
SpriteShockEffect(JirachiEntity);
|
||||
DisplayDungeonDialogue(&gUnknown_8105674);
|
||||
sub_8083E88(0x79);
|
||||
DungeonStartNewBGM(MUS_FRIEND_AREA_FOREST);
|
||||
sub_803E708(10,0x46);
|
||||
sub_80856E0(JirachiEntity, DIRECTION_SOUTH);
|
||||
PlaySoundEffect(0x16a);
|
||||
|
|
@ -3943,7 +3934,11 @@ void JirachiWishGrantFlash(void)
|
|||
|
||||
void sub_808BB3C(s16 *param_1)
|
||||
{
|
||||
#ifndef NONMATCHING
|
||||
register s32 iVar1 asm("r0");
|
||||
#else
|
||||
s32 iVar1;
|
||||
#endif
|
||||
s32 uVar2;
|
||||
u32 local_8;
|
||||
|
||||
|
|
@ -4103,12 +4098,12 @@ void sub_808BDEC(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
LugiaEntity = GetEntityFromClientType(0x1b);
|
||||
sub_8083F14();
|
||||
DungeonStopBGM();
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
if (HasRecruitedMon(SPECIES_LUGIA)) {
|
||||
sub_8083E88(0x23);
|
||||
DungeonStartNewBGM(MUS_FRIEND_AREA_CRYPTIC_CAVE);
|
||||
sub_8068FE0(LugiaEntity,0x21c,0);
|
||||
}
|
||||
else {
|
||||
|
|
@ -4139,10 +4134,10 @@ void LugiaPreFightDialogue(void)
|
|||
sub_80866C4(&gLugiaPreFightDialogue_8);
|
||||
}
|
||||
else {
|
||||
sub_8083F14();
|
||||
DungeonStopBGM();
|
||||
sub_8086448();
|
||||
DisplayDungeonDialogue(&gLugiaPreFightDialogue_1);
|
||||
sub_8083EA8(0x23,0x3c);
|
||||
DungeonFadeInNewBGM(MUS_FRIEND_AREA_CRYPTIC_CAVE,0x3c);
|
||||
sub_808C0CC();
|
||||
DisplayDungeonDialogue(&gLugiaPreFightDialogue_2);
|
||||
LugiaScreenFlash();
|
||||
|
|
@ -4158,12 +4153,12 @@ void LugiaPreFightDialogue(void)
|
|||
DisplayDungeonDialogue(&gLugiaPreFightDialogue_6);
|
||||
LugiaScreenFlash2();
|
||||
SetDungeonBGColorRGB(0xffffff06,0xffffff06,0xffffff06,1,0);
|
||||
sub_8083F14();
|
||||
DungeonStopBGM();
|
||||
sub_80861D4(LugiaEntity,7,0);
|
||||
DisplayDungeonDialogue(&gLugiaPreFightDialogue_7);
|
||||
LugiaScreenFlash();
|
||||
SetupBossFightHP(LugiaEntity,800,0x20);
|
||||
sub_8083E88(0x23);
|
||||
DungeonStartNewBGM(MUS_FRIEND_AREA_CRYPTIC_CAVE);
|
||||
ShiftCameraToPosition(&LeaderEntity->posPixel,0x10);
|
||||
}
|
||||
}
|
||||
|
|
@ -4238,12 +4233,12 @@ void sub_808C10C(void)
|
|||
struct DungeonEntity * LeaderEntity;
|
||||
struct DungeonEntity * KyogreEntity;
|
||||
|
||||
u32 uVar3;
|
||||
s32 iVar2;
|
||||
u32 XPos;
|
||||
s32 YPos;
|
||||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
KyogreEntity = GetEntityFromClientType(0x1c);
|
||||
sub_8083F14();
|
||||
DungeonStopBGM();
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
if (HasRecruitedMon(SPECIES_KYOGRE)) {
|
||||
|
|
@ -4254,9 +4249,9 @@ void sub_808C10C(void)
|
|||
SetFacingDirection(KyogreEntity, DIRECTION_SOUTH);
|
||||
}
|
||||
sub_8085860(LeaderEntity->posWorld.x,LeaderEntity->posWorld.y);
|
||||
uVar3 = GetCameraXPos();
|
||||
iVar2 = GetCameraYPos();
|
||||
sub_803F878(uVar3,iVar2 + -0x1000);
|
||||
XPos = GetCameraXPos();
|
||||
YPos = GetCameraYPos();
|
||||
sub_803F878(XPos,YPos + -0x1000);
|
||||
CopySpeciesNametoBuffer(gUnknown_202E038,SPECIES_KYOGRE);
|
||||
// TODO: gUnknown_202E088 doesn't match but gUnknown_202E038 + 0x50 does
|
||||
CopySpeciesNametoBuffer(gUnknown_202E038 + 0x50, SPECIES_GROUDON);
|
||||
|
|
@ -4266,7 +4261,7 @@ void sub_808C1A4(u8 param_1,u8 param_2)
|
|||
{
|
||||
if ((param_2 == 0x34) && (param_1 == 0x1C)) {
|
||||
gDungeonGlobalData->unk2 = 1;
|
||||
sub_8083E88(0x23);
|
||||
DungeonStartNewBGM(MUS_FRIEND_AREA_CRYPTIC_CAVE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4277,9 +4272,9 @@ void KyogrePreFightDialogue(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
KyogreEntity = GetEntityFromClientType(0x1c);
|
||||
sub_8083F14();
|
||||
DungeonStopBGM();
|
||||
if (HasRecruitedMon(SPECIES_KYOGRE)) {
|
||||
sub_8083EA8(0x23,0x3c);
|
||||
DungeonFadeInNewBGM(MUS_FRIEND_AREA_CRYPTIC_CAVE,0x3c);
|
||||
SpriteLookAroundEffect(LeaderEntity);
|
||||
sub_803E708(10,0x46);
|
||||
DisplayDungeonDialogue(&gKyogrePreFightDialogue_8);
|
||||
|
|
@ -4296,7 +4291,7 @@ void KyogrePreFightDialogue(void)
|
|||
// Gwwwwwooooooooh
|
||||
DisplayDungeonDialogue(&gKyogrePreFightDialogue_3);
|
||||
sub_803E708(10,0x46);
|
||||
sub_8083EA8(0x23,0x3c);
|
||||
DungeonFadeInNewBGM(MUS_FRIEND_AREA_CRYPTIC_CAVE,0x3c);
|
||||
sub_808C360();
|
||||
// My duels against {ARG_POKEMON_3} (Groudon) left us both exhausted
|
||||
DisplayDungeonDialogue(&gKyogrePreFightDialogue_4);
|
||||
|
|
@ -4313,7 +4308,7 @@ void KyogrePreFightDialogue(void)
|
|||
DisplayDungeonDialogue(&gKyogrePreFightDialogue_7);
|
||||
sub_803E708(10,0x46);
|
||||
SetupBossFightHP(KyogreEntity,600,0xb);
|
||||
sub_8083E88(0x23);
|
||||
DungeonStartNewBGM(MUS_FRIEND_AREA_CRYPTIC_CAVE);
|
||||
ShiftCameraToPosition(&LeaderEntity->posPixel,0x10);
|
||||
}
|
||||
}
|
||||
|
|
@ -4360,7 +4355,7 @@ void sub_808C3A0(void)
|
|||
struct DungeonEntity * LeaderEntity;
|
||||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
sub_8083F14();
|
||||
DungeonStopBGM();
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
|
|
@ -4379,7 +4374,7 @@ void sub_808C414(u8 param_1,u8 param_2)
|
|||
{
|
||||
if ((param_2 == 0x35) && (param_1 == 0x1D)) {
|
||||
gDungeonGlobalData->unk2 = 1;
|
||||
sub_8083E88(0x1a);
|
||||
DungeonStartNewBGM(MUS_RAYQUAZAS_DOMAIN);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4396,7 +4391,7 @@ void DeoxysPreFightDialogue(void)
|
|||
}
|
||||
else {
|
||||
DisplayDungeonDialogue(&gDeoxysPreFightDialogue_1);
|
||||
sub_8083EA8(0x1a,0x3c);
|
||||
DungeonFadeInNewBGM(MUS_RAYQUAZAS_DOMAIN, 0x3c);
|
||||
sub_808C550();
|
||||
DisplayDungeonDialogue(&gDeoxysPreFightDialogue_2);
|
||||
DeoxysScreenFlash();
|
||||
|
|
@ -4462,19 +4457,19 @@ void sub_808C5C0(void)
|
|||
struct DungeonEntity * LeaderEntity;
|
||||
struct DungeonEntity * CelebiEntity;
|
||||
|
||||
u32 uVar3;
|
||||
s32 iVar2;
|
||||
u32 XPos;
|
||||
s32 YPos;
|
||||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
CelebiEntity = GetEntityFromClientType(0x1e);
|
||||
sub_8083E88(0x7f);
|
||||
DungeonStartNewBGM(MUS_FRIEND_AREA_HEALING_FOREST);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
SetFacingDirection(CelebiEntity, DIRECTION_SOUTH);
|
||||
sub_8085860(LeaderEntity->posWorld.x,LeaderEntity->posWorld.y);
|
||||
uVar3 = GetCameraXPos();
|
||||
iVar2 = GetCameraYPos();
|
||||
sub_803F878(uVar3,iVar2 + 0xfffff000);
|
||||
XPos = GetCameraXPos();
|
||||
YPos = GetCameraYPos();
|
||||
sub_803F878(XPos,YPos + 0xfffff000);
|
||||
CopySpeciesNametoBuffer(gUnknown_202E038, SPECIES_CELEBI);
|
||||
}
|
||||
|
||||
|
|
@ -4538,12 +4533,12 @@ void CelebiJoinDialogue(void)
|
|||
sub_803E708(10,0x46);
|
||||
if (menuChoice == 1)
|
||||
{
|
||||
sub_8083F14();
|
||||
DungeonStopBGM();
|
||||
PlaySoundEffect(0xcc);
|
||||
while (IsFanfareSEPlaying_2(0xcc) != 0) {
|
||||
sub_803E46C(0x46);
|
||||
}
|
||||
sub_8083E88(0x7f);
|
||||
DungeonStartNewBGM(MUS_FRIEND_AREA_HEALING_FOREST);
|
||||
PlaySoundEffect(0x1c7);
|
||||
sub_80861D4(CelebiEntity,0xd,0);
|
||||
sub_803E708(0x37,0x46);
|
||||
|
|
@ -4554,7 +4549,7 @@ void CelebiJoinDialogue(void)
|
|||
DisplayDungeonDialogue(&gCelebiJoinDialogue_4);
|
||||
sub_803E708(10,0x46);
|
||||
sub_806FDF4(LeaderEntity,CelebiEntity,&CelebiEntity);
|
||||
sub_8083E88(0x7f);
|
||||
DungeonStartNewBGM(MUS_FRIEND_AREA_HEALING_FOREST);
|
||||
DisplayDungeonDialogue(&gCelebiJoinDialogue_5);
|
||||
sub_803E708(10,0x46);
|
||||
PlaySoundEffect(0x1c7);
|
||||
|
|
@ -4600,7 +4595,7 @@ void CelebiJoinDialogue(void)
|
|||
}
|
||||
} while (state != 2);
|
||||
}
|
||||
sub_8083ED8(0x1e);
|
||||
DungeonFadeOutBGM(0x1e);
|
||||
sub_803E708(0x1e,0x46);
|
||||
gDungeonGlobalData->unk2 = 1;
|
||||
}
|
||||
|
|
@ -4727,7 +4722,7 @@ void CelebiJoinDialogue(void)
|
|||
"\tbl sub_803E708\n"
|
||||
"\tcmp r4, 0x1\n"
|
||||
"\tbne _0808C824\n"
|
||||
"\tbl sub_8083F14\n"
|
||||
"\tbl DungeonStopBGM\n"
|
||||
"\tmovs r0, 0xCC\n"
|
||||
"\tbl PlaySoundEffect\n"
|
||||
"\tb _0808C76E\n"
|
||||
|
|
@ -4745,7 +4740,7 @@ void CelebiJoinDialogue(void)
|
|||
"\tcmp r0, 0\n"
|
||||
"\tbne _0808C768\n"
|
||||
"\tmovs r0, 0x7F\n"
|
||||
"\tbl sub_8083E88\n"
|
||||
"\tbl DungeonStartNewBGM\n"
|
||||
"\tmov r0, r8\n"
|
||||
"\tbl PlaySoundEffect\n"
|
||||
"\tldr r0, [sp]\n"
|
||||
|
|
@ -4775,7 +4770,7 @@ void CelebiJoinDialogue(void)
|
|||
"\tmov r2, sp\n"
|
||||
"\tbl sub_806FDF4\n"
|
||||
"\tmovs r0, 0x7F\n"
|
||||
"\tbl sub_8083E88\n"
|
||||
"\tbl DungeonStartNewBGM\n"
|
||||
"\tldr r0, _0808C81C\n"
|
||||
"\tbl DisplayDungeonDialogue\n"
|
||||
"\tmovs r0, 0xA\n"
|
||||
|
|
@ -4868,7 +4863,7 @@ void CelebiJoinDialogue(void)
|
|||
"\tb _0808C70E\n"
|
||||
"_0808C8AC:\n"
|
||||
"\tmovs r0, 0x1E\n"
|
||||
"\tbl sub_8083ED8\n"
|
||||
"\tbl DungeonFadeOutBGM\n"
|
||||
"\tmovs r0, 0x1E\n"
|
||||
"\tmovs r1, 0x46\n"
|
||||
"\tbl sub_803E708\n"
|
||||
|
|
@ -4954,7 +4949,7 @@ void sub_808C9C4(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
MedichamEntity = GetEntityFromClientType(7);
|
||||
sub_8083E88(0x72);
|
||||
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
|
|
@ -5023,7 +5018,7 @@ void sub_808CB5C(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
MedichamEntity = GetEntityFromClientType(7);
|
||||
sub_8083E88(0x72);
|
||||
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_8068FE0(MedichamEntity, 0x21C, 0);
|
||||
|
|
@ -5042,7 +5037,7 @@ void sub_808CBB0(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
SmeargleEntity = GetEntityFromClientType(0x1F);
|
||||
sub_8083E88(0x72);
|
||||
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
|
|
@ -5114,7 +5109,7 @@ void sub_808CD44(void)
|
|||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
SmeargleEntity = GetEntityFromClientType(0x1F);
|
||||
sub_8083E88(0x72);
|
||||
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
sub_80855E4(sub_8086A3C);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "global.h"
|
||||
#include "dungeon_global_data.h"
|
||||
#include "dungeon_music.h"
|
||||
|
||||
extern void SkarmoryPreFightDialogue();
|
||||
extern void SkarmoryReFightDialogue();
|
||||
|
|
@ -86,7 +87,6 @@ extern void sub_808C1A4(u32,u8,u8);
|
|||
extern void sub_808C414(u32,u8,u8);
|
||||
extern void nullsub_100(u32,u8,u8);
|
||||
extern void sub_808C948(struct DungeonEntity *,u8);
|
||||
extern void sub_8083E88(u32);
|
||||
|
||||
extern void sub_808AFB0(u8);
|
||||
extern void sub_808B030(u8);
|
||||
|
|
@ -654,7 +654,7 @@ void sub_8084E00(struct DungeonEntity *param_1,char param_2,char param_3)
|
|||
break;
|
||||
}
|
||||
if ((param_3 == '\0') && (gDungeonGlobalData->unk2 != '\0')) {
|
||||
sub_8083E88(999);
|
||||
DungeonStartNewBGM(999);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,17 +149,17 @@ void sub_8086434(struct DungeonEntity *entity)
|
|||
void sub_8086448(void)
|
||||
{
|
||||
s32 iVar1;
|
||||
u32 retVar;
|
||||
u32 retVar2;
|
||||
u32 XPos;
|
||||
u32 YPos;
|
||||
|
||||
sub_80855E4(sub_80862DC);
|
||||
|
||||
for(iVar1 = 0; iVar1 < 0x38; iVar1++)
|
||||
{
|
||||
retVar = GetCameraXPos();
|
||||
retVar2 = GetCameraYPos();
|
||||
retVar2 += (0x80 << 1);
|
||||
sub_803F878(retVar, retVar2);
|
||||
XPos = GetCameraXPos();
|
||||
YPos = GetCameraYPos();
|
||||
YPos += (0x80 << 1);
|
||||
sub_803F878(XPos, YPos);
|
||||
sub_80855E4(sub_8086410);
|
||||
sub_803E46C(0x46);
|
||||
}
|
||||
|
|
@ -194,17 +194,17 @@ void sub_8086494(void)
|
|||
void sub_8086500(void)
|
||||
{
|
||||
s32 iVar1;
|
||||
u32 retVar;
|
||||
u32 retVar2;
|
||||
u32 XPos;
|
||||
u32 YPos;
|
||||
|
||||
sub_80855E4(sub_8086348);
|
||||
|
||||
for(iVar1 = 0; iVar1 < 0x48; iVar1++)
|
||||
{
|
||||
retVar = GetCameraXPos();
|
||||
retVar += (0x80 << 1);
|
||||
retVar2 = GetCameraYPos();
|
||||
sub_803F878(retVar, retVar2);
|
||||
XPos = GetCameraXPos();
|
||||
XPos += (0x80 << 1);
|
||||
YPos = GetCameraYPos();
|
||||
sub_803F878(XPos, YPos);
|
||||
sub_80855E4(sub_8086434);
|
||||
sub_803E46C(0x46);
|
||||
}
|
||||
|
|
@ -214,17 +214,17 @@ void sub_8086500(void)
|
|||
void sub_808654C(void)
|
||||
{
|
||||
s32 iVar1;
|
||||
u32 retVar;
|
||||
u32 retVar2;
|
||||
u32 XPos;
|
||||
u32 YPos;
|
||||
|
||||
sub_80855E4(sub_8086384);
|
||||
|
||||
for(iVar1 = 0; iVar1 < 0x78; iVar1++)
|
||||
{
|
||||
retVar = GetCameraXPos();
|
||||
retVar += (0x80 << 1);
|
||||
retVar2 = GetCameraYPos();
|
||||
sub_803F878(retVar, retVar2);
|
||||
XPos = GetCameraXPos();
|
||||
XPos += (0x80 << 1);
|
||||
YPos = GetCameraYPos();
|
||||
sub_803F878(XPos, YPos);
|
||||
sub_80855E4(sub_8086434);
|
||||
sub_803E46C(0x46);
|
||||
}
|
||||
|
|
@ -234,16 +234,16 @@ void sub_808654C(void)
|
|||
void sub_8086598(void)
|
||||
{
|
||||
s32 iVar1;
|
||||
u32 retVar;
|
||||
u32 retVar2;
|
||||
u32 XPos;
|
||||
u32 YPos;
|
||||
|
||||
sub_80855E4(sub_80863B8);
|
||||
|
||||
for(iVar1 = 0; iVar1 < 0x18; iVar1++)
|
||||
{
|
||||
retVar = GetCameraXPos();
|
||||
retVar2 = GetCameraYPos();
|
||||
sub_803F878(retVar, retVar2 + (0xffffff00));
|
||||
XPos = GetCameraXPos();
|
||||
YPos = GetCameraYPos();
|
||||
sub_803F878(XPos, YPos + (0xffffff00));
|
||||
sub_80855E4(sub_8086410);
|
||||
sub_803E46C(0x46);
|
||||
}
|
||||
|
|
@ -253,16 +253,16 @@ void sub_8086598(void)
|
|||
void sub_80865E8(void)
|
||||
{
|
||||
s32 iVar1;
|
||||
u32 retVar;
|
||||
u32 retVar2;
|
||||
u32 XPos;
|
||||
u32 YPos;
|
||||
|
||||
sub_80855E4(sub_80863E8);
|
||||
|
||||
for(iVar1 = 0; iVar1 < 0xC; iVar1++)
|
||||
{
|
||||
retVar = GetCameraXPos();
|
||||
retVar2 = GetCameraYPos();
|
||||
sub_803F878(retVar, retVar2 + (0x80 << 2));
|
||||
XPos = GetCameraXPos();
|
||||
YPos = GetCameraYPos();
|
||||
sub_803F878(XPos, YPos + (0x80 << 2));
|
||||
sub_80855E4(sub_8086424);
|
||||
sub_80855E4(sub_8086424);
|
||||
sub_803E46C(0x46);
|
||||
|
|
@ -273,16 +273,16 @@ void sub_80865E8(void)
|
|||
void sub_808663C(void)
|
||||
{
|
||||
s32 iVar1;
|
||||
u32 retVar;
|
||||
u32 retVar2;
|
||||
u32 XPos;
|
||||
u32 YPos;
|
||||
|
||||
sub_80855E4(sub_80863E8);
|
||||
|
||||
for(iVar1 = 0; iVar1 < 0x10; iVar1++)
|
||||
{
|
||||
retVar = GetCameraXPos();
|
||||
retVar2 = GetCameraYPos();
|
||||
sub_803F878(retVar, retVar2 + (0x80 << 2));
|
||||
XPos = GetCameraXPos();
|
||||
YPos = GetCameraYPos();
|
||||
sub_803F878(XPos, YPos + (0x80 << 2));
|
||||
sub_80855E4(sub_8086424);
|
||||
sub_80855E4(sub_8086424);
|
||||
sub_803E46C(0x46);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
#include "global.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "dungeon_entity.h"
|
||||
#include "dungeon_global_data.h"
|
||||
#include "dungeon_music.h"
|
||||
#include "pokemon.h"
|
||||
#include "dungeon_util_1.h"
|
||||
|
||||
|
|
@ -13,7 +15,6 @@ extern void sub_8097FF8(void);
|
|||
extern u8 sub_8044B28(void);
|
||||
extern u8 HasRecruitedMon(u32);
|
||||
extern u8 gUnknown_202E038[];
|
||||
extern void sub_8083E88(u32);
|
||||
extern void sub_8085374();
|
||||
extern void sub_80854D4();
|
||||
extern void sub_80855E4(void *);
|
||||
|
|
@ -22,14 +23,12 @@ extern void sub_8097FA8(u32);
|
|||
extern void DisplayDungeonDialogue(u8 *);
|
||||
extern void sub_806CDD4(struct DungeonEntity *, u32, u32);
|
||||
extern void sub_80869E4(struct DungeonEntity *, u32, u32, u32);
|
||||
extern void sub_8083E88(u32);
|
||||
extern void sub_803E708(u32, u32);
|
||||
extern void sub_8086448(void);
|
||||
extern void SpriteShockEffect(struct DungeonEntity *);
|
||||
extern void SkarmoryEntry(struct DungeonEntity *);
|
||||
extern void SpriteLookAroundEffect(struct DungeonEntity *);
|
||||
extern void sub_8086A54(struct DungeonEntity *);
|
||||
extern void PlaySoundEffect(u32);
|
||||
extern void sub_808563C(void *);
|
||||
|
||||
extern u8 gSkarmoryPreFightDialogue_1;
|
||||
|
|
@ -46,43 +45,43 @@ extern u8 gSkarmoryReFightDialogue_2;
|
|||
extern u8 gSkarmoryReFightDialogue_3;
|
||||
extern u8 gUnknown_8100D3C;
|
||||
|
||||
void sub_8086A3C(struct DungeonEntity *param_1)
|
||||
void sub_8086A3C(struct DungeonEntity *pokemon)
|
||||
{
|
||||
param_1->entityData->unk15C = 1;
|
||||
param_1->entityData->unk15E = 1;
|
||||
pokemon->entityData->unk15C = 1;
|
||||
pokemon->entityData->unk15E = 1;
|
||||
}
|
||||
|
||||
void sub_8086A54(struct DungeonEntity *param_1)
|
||||
void sub_8086A54(struct DungeonEntity *pokemon)
|
||||
{
|
||||
param_1->entityData->unk15C = 1;
|
||||
param_1->entityData->unk15E = 0;
|
||||
pokemon->entityData->unk15C = 1;
|
||||
pokemon->entityData->unk15E = 0;
|
||||
}
|
||||
|
||||
void SetupBossFightHP(struct DungeonEntity *param_1, s32 newHP, u16 param_3)
|
||||
void SetupBossFightHP(struct DungeonEntity *pokemon, s32 newHP, u16 param_3)
|
||||
{
|
||||
|
||||
// NOTE: needed two of these to match.. very dumb
|
||||
struct DungeonEntityData *iVar1;
|
||||
struct DungeonEntityData *iVar2;
|
||||
struct DungeonEntityData *entityData;
|
||||
struct DungeonEntityData *enityData_1;
|
||||
|
||||
iVar1 = param_1->entityData;
|
||||
iVar2 = param_1->entityData;
|
||||
entityData = pokemon->entityData;
|
||||
enityData_1 = pokemon->entityData;
|
||||
|
||||
iVar1->isBoss = TRUE;
|
||||
entityData->isBoss = TRUE;
|
||||
|
||||
// BUG: Source of the Reviver Seed Boss Glitch
|
||||
//
|
||||
// Video to demonstration:
|
||||
// https://www.youtube.com/watch?v=rHu7EehrZ68
|
||||
iVar1->originalHP = iVar1->maxHP;
|
||||
entityData->originalHP = entityData->maxHP;
|
||||
if (newHP != 0) {
|
||||
iVar1->maxHP = newHP;
|
||||
iVar1->HP = newHP;
|
||||
entityData->maxHP = newHP;
|
||||
entityData->HP = newHP;
|
||||
}
|
||||
|
||||
gDungeonGlobalData->unk66A = param_3;
|
||||
SetDefaultIQSkills(iVar2->IQSkillsSelected,iVar2->isBoss);
|
||||
LoadIQSkills(param_1);
|
||||
SetDefaultIQSkills(enityData_1->IQSkillsSelected, enityData_1->isBoss);
|
||||
LoadIQSkills(pokemon);
|
||||
}
|
||||
|
||||
void sub_8086AC0(void)
|
||||
|
|
@ -111,7 +110,7 @@ void sub_8086B14(void)
|
|||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
DiglettEntity = GetEntityFromClientType(4);
|
||||
SkarmoryEntity = GetEntityFromClientType(3);
|
||||
sub_8083E88(0x72);
|
||||
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
|
||||
sub_8085374();
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
|
|
@ -155,19 +154,19 @@ void SkarmoryPreFightDialogue(void)
|
|||
struct DungeonEntity * DiglettEntity;
|
||||
struct DungeonEntity * SkarmoryEntity;
|
||||
|
||||
struct Position32 local_1c;
|
||||
struct Position32 local_20;
|
||||
struct Position32 pos1;
|
||||
struct Position32 pos2;
|
||||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity(); // Player
|
||||
PartnerEntity = GetPartnerEntity(); // Partner
|
||||
DiglettEntity = GetEntityFromClientType(4); // Diglett
|
||||
SkarmoryEntity = GetEntityFromClientType(3); // Skarmory
|
||||
|
||||
local_1c.x = DiglettEntity->posPixel.x;
|
||||
local_1c.y = DiglettEntity->posPixel.y + 0x3000;
|
||||
pos1.x = DiglettEntity->posPixel.x;
|
||||
pos1.y = DiglettEntity->posPixel.y + 0x3000;
|
||||
|
||||
local_20.x = SkarmoryEntity->posPixel.x;
|
||||
local_20.y = SkarmoryEntity->posPixel.y + 0x2000;
|
||||
pos2.x = SkarmoryEntity->posPixel.x;
|
||||
pos2.y = SkarmoryEntity->posPixel.y + 0x2000;
|
||||
|
||||
sub_8086448();
|
||||
sub_803E708(10,0x46);
|
||||
|
|
@ -175,16 +174,16 @@ void SkarmoryPreFightDialogue(void)
|
|||
sub_803E708(0x20,0x46);
|
||||
sub_803E708(10,0x46);
|
||||
DisplayDungeonDialogue(&gSkarmoryPreFightDialogue_1);
|
||||
ShiftCameraToPosition(&local_1c,0x40);
|
||||
ShiftCameraToPosition(&pos1,0x40);
|
||||
sub_803E708(0x40,0x46);
|
||||
ShiftCameraToPosition(&local_20,0x30);
|
||||
ShiftCameraToPosition(&pos2,0x30);
|
||||
DisplayDungeonDialogue(&gSkarmoryPreFightDialogue_2);
|
||||
sub_803E708(10,0x46);
|
||||
DiglettEntity->entityData->unk15D = 1;
|
||||
ShiftCameraToPosition(&local_1c,0x30);
|
||||
ShiftCameraToPosition(&pos1,0x30);
|
||||
DisplayDungeonDialogue(&gSkarmoryPreFightDialogue_3); // Diglett: ...I...\nI'm scared.
|
||||
sub_803E708(10,0x46);
|
||||
ShiftCameraToPosition(&local_20,0x20);
|
||||
ShiftCameraToPosition(&pos2,0x20);
|
||||
sub_803E708(0x20,0x46);
|
||||
SkarmoryEntry(SkarmoryEntity);
|
||||
DisplayDungeonDialogue(&gSkarmoryPreFightDialogue_4); // Skarmory: You!\nWhat do you think you're doing here?!
|
||||
|
|
@ -204,7 +203,7 @@ void SkarmoryPreFightDialogue(void)
|
|||
sub_80869E4(PartnerEntity,4,2,4);
|
||||
sub_80869E4(LeaderEntity,4,1,4);
|
||||
sub_803E708(10,0x46);
|
||||
sub_8083E88(0xb);
|
||||
DungeonStartNewBGM(MUS_BOSS_BATTLE);
|
||||
ShiftCameraToPosition(&LeaderEntity->posPixel,0x10);
|
||||
}
|
||||
|
||||
|
|
@ -212,16 +211,16 @@ void SkarmoryReFightDialogue(void)
|
|||
{
|
||||
struct DungeonEntity * LeaderEntity;
|
||||
struct DungeonEntity * SkarmoryEntity;
|
||||
struct Position32 local_14;
|
||||
struct Position32 pos;
|
||||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
SkarmoryEntity = GetEntityFromClientType(3);
|
||||
local_14.x = SkarmoryEntity->posPixel.x;
|
||||
local_14.y = SkarmoryEntity->posPixel.y + 0x2000;
|
||||
pos.x = SkarmoryEntity->posPixel.x;
|
||||
pos.y = SkarmoryEntity->posPixel.y + 0x2000;
|
||||
sub_8086448();
|
||||
sub_803E708(10,0x46);
|
||||
SkarmoryEntry(SkarmoryEntity);
|
||||
ShiftCameraToPosition(&local_14,0x10);
|
||||
ShiftCameraToPosition(&pos,0x10);
|
||||
DisplayDungeonDialogue(&gSkarmoryReFightDialogue_1);
|
||||
sub_803E708(10,0x46);
|
||||
DisplayDungeonDialogue(&gSkarmoryReFightDialogue_2);
|
||||
|
|
@ -230,7 +229,7 @@ void SkarmoryReFightDialogue(void)
|
|||
DisplayDungeonDialogue(&gSkarmoryReFightDialogue_3);
|
||||
sub_803E708(10,0x46);
|
||||
ShiftCameraToPosition(&LeaderEntity->posPixel,0x10);
|
||||
sub_8083E88(0xb);
|
||||
DungeonStartNewBGM(MUS_BOSS_BATTLE);
|
||||
}
|
||||
|
||||
void sub_8086E40(void)
|
||||
|
|
@ -255,7 +254,7 @@ void sub_8086E9C(void)
|
|||
struct DungeonEntity * LeaderEntity;
|
||||
|
||||
LeaderEntity = xxx_call_GetLeaderEntity();
|
||||
sub_8083E88(0x72);
|
||||
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
|
||||
sub_8085374();
|
||||
sub_80854D4();
|
||||
sub_8085930(DIRECTION_NORTH);
|
||||
|
|
|
|||
|
|
@ -49,9 +49,9 @@ bool8 IsFixedDungeon()
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 sub_8044210(void)
|
||||
bool8 IsDungeonMaze(void)
|
||||
{
|
||||
if( (u8)(gDungeonGlobalData->unk644 - 0x4B) < 0x17)
|
||||
if( (u8)(gDungeonGlobalData->dungeonLocation.dungeonIndex - DUNGEON_NORMAL_MAZE_2) < NUM_DUNGEON_MAZE)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
|
|
|
|||
359
src/dungeon_music.c
Normal file
359
src/dungeon_music.c
Normal file
|
|
@ -0,0 +1,359 @@
|
|||
#include "global.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "dungeon.h"
|
||||
#include "music.h"
|
||||
#include "dungeon_global_data.h"
|
||||
#include "dungeon_music.h"
|
||||
#include "dungeon_util.h"
|
||||
#include "text_util.h"
|
||||
|
||||
|
||||
struct unkStruct_202EE10
|
||||
{
|
||||
u8 fill0[0x1A];
|
||||
s16 unk1A;
|
||||
};
|
||||
|
||||
extern struct unkStruct_202EE10 gUnknown_202EE10;
|
||||
|
||||
extern u32 gUnknown_203B458;
|
||||
extern u8 *gUnknown_80FE6F4[];
|
||||
extern u8 gUnknown_810AC60; // 0xC
|
||||
extern u8 gUnknown_810AC62; // 0xC
|
||||
extern u8 gUnknown_810AC68; // 0x8
|
||||
extern u8 gUnknown_810AC64; // 0x8
|
||||
extern u8 gUnknown_810AC66; // 0x8
|
||||
|
||||
extern void sub_80709C8(u8 *buffer, struct DungeonEntityData *entityData);
|
||||
void FadeOutAllMusic(u16);
|
||||
void xxx_call_stop_bgm(void);
|
||||
|
||||
void sub_8083AB0(s16 param_0, struct DungeonEntity * target, struct DungeonEntity * enity)
|
||||
{
|
||||
u8 *defPtr;
|
||||
u8 *attackPtr;
|
||||
u8 *spDefPtr;
|
||||
struct DungeonEntityData * entityData;
|
||||
struct DungeonEntityData * targetEntityData;
|
||||
u8 *spAttPtr;
|
||||
u8 buffer [0x14];
|
||||
struct unkDungeonGlobal_unk1CE98_sub *temp;
|
||||
u8 *itemIndex;
|
||||
s32 param_0_s32 = param_0;
|
||||
|
||||
temp = &gDungeonGlobalData->unk1CE98;
|
||||
targetEntityData = NULL;
|
||||
if ((EntityExists(target)) && (GetEntityType(target) == ENTITY_POKEMON)) {
|
||||
targetEntityData = target->entityData;
|
||||
}
|
||||
entityData = enity->entityData;
|
||||
if (targetEntityData != NULL) {
|
||||
sub_80709C8(buffer, targetEntityData);
|
||||
CopyStringtoBuffer(temp->buffer1, buffer);
|
||||
}
|
||||
else {
|
||||
CopyStringtoBuffer(temp->buffer1, *gUnknown_80FE6F4); // Someone
|
||||
}
|
||||
sub_80709C8(buffer,entityData);
|
||||
CopyStringtoBuffer(temp->buffer2, buffer);
|
||||
temp->unk14 = param_0_s32;
|
||||
temp->heldItem = entityData->heldItem;
|
||||
temp->expPoints = entityData->expPoints;
|
||||
temp->level = entityData->level;
|
||||
temp->maxHP = entityData->maxHP;
|
||||
temp->attack = entityData->attack;
|
||||
temp->specialAttack = entityData->specialAttack;
|
||||
temp->defense = entityData->defense;
|
||||
temp->specialDefense = entityData->specialDefense;
|
||||
temp->dungeonLocation = gDungeonGlobalData->dungeonLocation;
|
||||
attackPtr = &temp->attBoost;
|
||||
*attackPtr = 0;
|
||||
spAttPtr = &temp->spAttBoost;
|
||||
*spAttPtr = 0;
|
||||
defPtr = &temp->defBoost;
|
||||
*defPtr = 0;
|
||||
spDefPtr = &temp->spDefBoost;
|
||||
*spDefPtr = 0;
|
||||
if ((entityData->heldItem.itemFlags & ITEM_FLAG_EXISTS) && !(entityData->heldItem.itemFlags & ITEM_FLAG_STICKY)) {
|
||||
itemIndex = &entityData->heldItem.itemIndex;
|
||||
if (*itemIndex == ITEM_ID_POWER_BAND) {
|
||||
*attackPtr += gUnknown_810AC60;
|
||||
}
|
||||
if (*itemIndex == ITEM_ID_MUNCH_BELT) {
|
||||
*attackPtr += gUnknown_810AC68;
|
||||
}
|
||||
if (*itemIndex == ITEM_ID_SPECIAL_BAND) {
|
||||
*spAttPtr += gUnknown_810AC62;
|
||||
}
|
||||
if (*itemIndex == ITEM_ID_MUNCH_BELT) {
|
||||
*spAttPtr += gUnknown_810AC68;
|
||||
}
|
||||
if (*itemIndex == ITEM_ID_DEF_SCARF) {
|
||||
*defPtr += gUnknown_810AC64;
|
||||
}
|
||||
if (*itemIndex == ITEM_ID_ZINC_BAND) {
|
||||
*spDefPtr += gUnknown_810AC66;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool8 sub_8083C24(void)
|
||||
{
|
||||
struct unkDungeonGlobal_unk1CE98_sub *temp;
|
||||
|
||||
temp = &gDungeonGlobalData->unk1CE98;
|
||||
|
||||
if (temp->unk14 < 0x226) {
|
||||
return TRUE;
|
||||
}
|
||||
else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
bool8 sub_8083C50(void)
|
||||
{
|
||||
struct unkDungeonGlobal_unk1CE98_sub *temp;
|
||||
|
||||
temp = &gDungeonGlobalData->unk1CE98;
|
||||
|
||||
if ((temp->unk14 == 0x227) || (temp->unk14 == 0x22A) || (temp->unk14 == 0x228)) {
|
||||
return TRUE;
|
||||
}
|
||||
else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
bool8 sub_8083C88(u8 param_1)
|
||||
{
|
||||
struct unkDungeonGlobal_unk1CE98_sub *temp;
|
||||
|
||||
temp = &gDungeonGlobalData->unk1CE98;
|
||||
|
||||
if (((GetUnk9(gDungeonGlobalData->dungeonLocation.dungeonIndex) == 0) &&
|
||||
((gDungeonGlobalData->unk65C != 0) || (param_1 != 0))) ||
|
||||
(temp->unk14 != 0x227)) {
|
||||
return TRUE;
|
||||
}
|
||||
else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8083CE0(u8 param_1)
|
||||
{
|
||||
if ((param_1 == 0) || (1 < gUnknown_202EE10.unk1A)) {
|
||||
PlayFanfareSE(0x12d,0x100);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8083D08(void)
|
||||
{
|
||||
PlayFanfareSE(0x12E, 0x100);
|
||||
}
|
||||
|
||||
void sub_8083D1C(void)
|
||||
{
|
||||
PlayFanfareSE(0x133, 0x100);
|
||||
}
|
||||
|
||||
void sub_8083D30(void)
|
||||
{
|
||||
PlayFanfareSE(0x12F, 0x100);
|
||||
}
|
||||
|
||||
void sub_8083D44(void)
|
||||
{
|
||||
PlayFanfareSE(0x130, 0x100);
|
||||
}
|
||||
|
||||
void sub_8083D58(void)
|
||||
{
|
||||
PlayFanfareSE(0xC8, 0x100);
|
||||
}
|
||||
|
||||
void sub_8083D68(void)
|
||||
{
|
||||
PlayFanfareSE(0xCF, 0x100);
|
||||
}
|
||||
|
||||
void sub_8083D78(void)
|
||||
{
|
||||
PlayFanfareSE(0xD3, 0x100);
|
||||
}
|
||||
|
||||
void sub_8083D88(void)
|
||||
{
|
||||
PlayFanfareSE(0xCC, 0x100);
|
||||
}
|
||||
|
||||
void sub_8083D98(void)
|
||||
{
|
||||
DungeonStartNewBGM(MUS_DUNGEON_FAIL);
|
||||
gDungeonGlobalData->unk66F = 0;
|
||||
gDungeonGlobalData->unk672 = 0;
|
||||
gDungeonGlobalData->unk699 = 0;
|
||||
gDungeonGlobalData->unk66A = 999;
|
||||
}
|
||||
|
||||
void sub_8083DE0(void)
|
||||
{
|
||||
DungeonStartNewBGM(MUS_DUNGEON_COMPLETE);
|
||||
gDungeonGlobalData->unk66F = 0;
|
||||
gDungeonGlobalData->unk672 = 0;
|
||||
gDungeonGlobalData->unk699 = 0;
|
||||
gDungeonGlobalData->unk66A = 999;
|
||||
}
|
||||
|
||||
void sub_8083E28(void)
|
||||
{
|
||||
PlayFanfareSE(0xCF, 0x100);
|
||||
}
|
||||
|
||||
void PlaySoundEffect(u32 songIndex)
|
||||
{
|
||||
u16 songIndex_u32 = songIndex;
|
||||
if(songIndex_u32 != 0x3E5)
|
||||
PlayFanfareSE(songIndex_u32, 0x100);
|
||||
}
|
||||
|
||||
void StopSoundEffect(u32 songIndex)
|
||||
{
|
||||
u16 songIndex_u32 = songIndex;
|
||||
if(songIndex_u32 != 0x3E5)
|
||||
StopFanfareSE(songIndex_u32);
|
||||
}
|
||||
|
||||
bool8 IsFanfareSEPlaying_2(u16 songIndex)
|
||||
{
|
||||
return IsFanfareSEPlaying(songIndex);
|
||||
}
|
||||
|
||||
void DungeonStartNewBGM(u16 songIndex)
|
||||
{
|
||||
gDungeonGlobalData->musPlayer.queuedSongIndex = songIndex;
|
||||
gDungeonGlobalData->musPlayer.fadeInSpeed = 0;
|
||||
}
|
||||
|
||||
void DungeonFadeInNewBGM(u16 songIndex, u32 fadeInSpeed)
|
||||
{
|
||||
gDungeonGlobalData->musPlayer.queuedSongIndex = 0x80 << 8 | songIndex;
|
||||
gDungeonGlobalData->musPlayer.fadeInSpeed = fadeInSpeed;
|
||||
}
|
||||
|
||||
void DungeonFadeOutBGM(u16 speed)
|
||||
{
|
||||
FadeOutAllMusic(speed);
|
||||
gDungeonGlobalData->musPlayer.songIndex = 999;
|
||||
gDungeonGlobalData->musPlayer.pastSongIndex = 999;
|
||||
gDungeonGlobalData->musPlayer.queuedSongIndex = 999;
|
||||
}
|
||||
|
||||
void DungeonStopBGM(void)
|
||||
{
|
||||
StopDungeonBGM();
|
||||
xxx_call_stop_bgm();
|
||||
}
|
||||
|
||||
u16 DungeonGetCurrentBGSong(void)
|
||||
{
|
||||
return GetCurrentBGSong();
|
||||
}
|
||||
|
||||
void StopDungeonBGM(void)
|
||||
{
|
||||
struct DungeonMusicPlayer *temp = &gDungeonGlobalData->musPlayer;
|
||||
temp->state = 0;
|
||||
temp->fadeOutSpeed = 0;
|
||||
temp->songIndex = 999;
|
||||
temp->pastSongIndex = 999;
|
||||
temp->queuedSongIndex = 999;
|
||||
}
|
||||
|
||||
void UpdateDungeonMusic(void)
|
||||
{
|
||||
#ifndef NONMATCHING
|
||||
register s32 uVar1 asm("r1");
|
||||
register u16 *uVar3 asm("r3");
|
||||
#else
|
||||
s32 uVar1;
|
||||
u16 *uVar3;
|
||||
#endif
|
||||
s32 songIndex1;
|
||||
struct DungeonMusicPlayer *musPlayer;
|
||||
|
||||
musPlayer = &gDungeonGlobalData->musPlayer;
|
||||
|
||||
uVar3 = &gDungeonGlobalData->unk66A;
|
||||
songIndex1 = *uVar3;
|
||||
if (songIndex1 == 999) {
|
||||
if (gDungeonGlobalData->unk66F != 0) {
|
||||
songIndex1 = MUS_STOP_THIEF;
|
||||
}
|
||||
else if (gDungeonGlobalData->unk672 != 0) {
|
||||
songIndex1 = MUS_MONSTER_HOUSE;
|
||||
}
|
||||
else if (gDungeonGlobalData->unk699 != 0) {
|
||||
songIndex1 = MUS_KECLEON_SHOP;
|
||||
}
|
||||
else {
|
||||
songIndex1 = musPlayer->queuedSongIndex;
|
||||
}
|
||||
}
|
||||
if (musPlayer->state == 4) {
|
||||
if (songIndex1 != musPlayer->pastSongIndex) {
|
||||
musPlayer->state = 2;
|
||||
musPlayer->songIndex = songIndex1;
|
||||
}
|
||||
}
|
||||
else if ((songIndex1 != 999) && (musPlayer->songIndex == 999)) {
|
||||
musPlayer->state = 1;
|
||||
musPlayer->songIndex = songIndex1;
|
||||
}
|
||||
switch(musPlayer->state) {
|
||||
case 0:
|
||||
case 4:
|
||||
default:
|
||||
break;
|
||||
case 1:
|
||||
uVar1 = musPlayer->songIndex;
|
||||
if (uVar1 == 999) {
|
||||
musPlayer->state = 0;
|
||||
}
|
||||
else {
|
||||
if ((uVar1 & 0x8000) != 0) {
|
||||
StartNewBGM(uVar1 & 0x7fff);
|
||||
}
|
||||
else {
|
||||
FadeInNewBGM(uVar1 & 0x7fff, musPlayer->fadeInSpeed);
|
||||
}
|
||||
musPlayer->pastSongIndex = musPlayer->songIndex;
|
||||
musPlayer->state = 4;
|
||||
}
|
||||
musPlayer->songIndex = 999;
|
||||
break;
|
||||
case 2:
|
||||
FadeOutBGM(0x1e);
|
||||
musPlayer->fadeOutSpeed = 0x1e;
|
||||
musPlayer->state = 3;
|
||||
break;
|
||||
case 3:
|
||||
if ((musPlayer->fadeOutSpeed != 0) && (musPlayer->fadeOutSpeed--, musPlayer->fadeOutSpeed != 0)) {
|
||||
break;
|
||||
}
|
||||
if (musPlayer->songIndex == 999) {
|
||||
StopBGM();
|
||||
musPlayer->state = 0;
|
||||
}
|
||||
else {
|
||||
musPlayer->state = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void sub_808408C(u32 param_1)
|
||||
{
|
||||
gUnknown_203B458 = (1 | param_1) & 0xffffff;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user