mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
start labelling, decompiling sound.s
This commit is contained in:
parent
84240b1a5a
commit
2089dd0f86
@ -7953,7 +7953,7 @@ _0804A5E8:
|
||||
bne _0804A616
|
||||
bl sub_805EA60
|
||||
ldr r0, =0x00000161
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
ldr r1, [r5]
|
||||
ldrb r0, [r1, 0x12]
|
||||
adds r0, 0x1
|
||||
|
@ -4885,7 +4885,7 @@ sub_814D9D8: @ 814D9D8
|
||||
ldrb r1, [r1]
|
||||
lsls r1, 8
|
||||
orrs r0, r1
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
b _0814DA28
|
||||
.pool
|
||||
_0814DA14:
|
||||
@ -4897,7 +4897,7 @@ _0814DA14:
|
||||
ldrb r1, [r1]
|
||||
lsls r1, 8
|
||||
orrs r0, r1
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
_0814DA28:
|
||||
bl dp01_tbl4_exec_completed
|
||||
pop {r4,r5}
|
||||
@ -4925,7 +4925,7 @@ sub_814DA34: @ 814DA34
|
||||
movs r1, 0x19
|
||||
negs r1, r1
|
||||
movs r2, 0x5
|
||||
bl sub_80A32E4
|
||||
bl PlayCry3
|
||||
bl dp01_tbl4_exec_completed
|
||||
pop {r0}
|
||||
bx r0
|
||||
@ -5623,7 +5623,7 @@ sub_814E040: @ 814E040
|
||||
orrs r0, r1
|
||||
strb r0, [r3]
|
||||
movs r0, 0x5
|
||||
bl sub_80A2F50
|
||||
bl FadeOutMapMusic
|
||||
movs r0, 0x3
|
||||
bl BeginFastPaletteFade
|
||||
bl dp01_tbl4_exec_completed
|
||||
|
@ -5576,7 +5576,7 @@ sub_806743C: @ 806743C
|
||||
ldrb r1, [r1]
|
||||
lsls r1, 8
|
||||
orrs r0, r1
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
b _0806748C
|
||||
.pool
|
||||
_08067478:
|
||||
@ -5588,7 +5588,7 @@ _08067478:
|
||||
ldrb r1, [r1]
|
||||
lsls r1, 8
|
||||
orrs r0, r1
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
_0806748C:
|
||||
bl sub_8065068
|
||||
pop {r4,r5}
|
||||
@ -5615,7 +5615,7 @@ sub_8067498: @ 8067498
|
||||
lsrs r0, 16
|
||||
movs r1, 0x19
|
||||
movs r2, 0x5
|
||||
bl sub_80A32E4
|
||||
bl PlayCry3
|
||||
bl sub_8065068
|
||||
pop {r0}
|
||||
bx r0
|
||||
@ -6241,7 +6241,7 @@ _08067A08:
|
||||
orrs r0, r1
|
||||
strb r0, [r3]
|
||||
movs r0, 0x5
|
||||
bl sub_80A2F50
|
||||
bl FadeOutMapMusic
|
||||
movs r0, 0x3
|
||||
bl BeginFastPaletteFade
|
||||
bl sub_8065068
|
||||
|
@ -6026,7 +6026,7 @@ sub_8062630: @ 8062630
|
||||
ldrb r1, [r1]
|
||||
lsls r1, 8
|
||||
orrs r0, r1
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
b _08062680
|
||||
.pool
|
||||
_0806266C:
|
||||
@ -6038,7 +6038,7 @@ _0806266C:
|
||||
ldrb r1, [r1]
|
||||
lsls r1, 8
|
||||
orrs r0, r1
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
_08062680:
|
||||
bl dp01_tbl7_exec_completed
|
||||
pop {r4,r5}
|
||||
@ -6065,7 +6065,7 @@ sub_806268C: @ 806268C
|
||||
lsrs r0, 16
|
||||
movs r1, 0x19
|
||||
movs r2, 0x5
|
||||
bl sub_80A32E4
|
||||
bl PlayCry3
|
||||
bl dp01_tbl7_exec_completed
|
||||
pop {r0}
|
||||
bx r0
|
||||
|
@ -9357,7 +9357,7 @@ sub_805C7D0: @ 805C7D0
|
||||
ldrb r1, [r1]
|
||||
lsls r1, 8
|
||||
orrs r0, r1
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
bl PlayerBufferExecCompleted
|
||||
pop {r0}
|
||||
bx r0
|
||||
@ -9606,7 +9606,7 @@ sub_805C9B0: @ 805C9B0
|
||||
ldrb r1, [r1]
|
||||
lsls r1, 8
|
||||
orrs r0, r1
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
b _0805CA00
|
||||
.pool
|
||||
_0805C9EC:
|
||||
@ -9618,7 +9618,7 @@ _0805C9EC:
|
||||
ldrb r1, [r1]
|
||||
lsls r1, 8
|
||||
orrs r0, r1
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
_0805CA00:
|
||||
bl PlayerBufferExecCompleted
|
||||
pop {r4,r5}
|
||||
@ -9646,7 +9646,7 @@ sub_805CA0C: @ 805CA0C
|
||||
movs r1, 0x19
|
||||
negs r1, r1
|
||||
movs r2, 0x5
|
||||
bl sub_80A32E4
|
||||
bl PlayCry3
|
||||
bl PlayerBufferExecCompleted
|
||||
pop {r0}
|
||||
bx r0
|
||||
@ -10395,7 +10395,7 @@ sub_805D094: @ 805D094
|
||||
orrs r0, r1
|
||||
strb r0, [r3]
|
||||
movs r0, 0x5
|
||||
bl sub_80A2F50
|
||||
bl FadeOutMapMusic
|
||||
movs r0, 0x3
|
||||
bl BeginFastPaletteFade
|
||||
bl PlayerBufferExecCompleted
|
||||
|
@ -75,7 +75,7 @@ task_add_01_battle_start: @ 80B065C
|
||||
adds r1, r2
|
||||
strh r4, [r1, 0xA]
|
||||
adds r0, r5, 0
|
||||
bl current_map_music_set__default_for_battle
|
||||
bl PlayNewMapMusic__default_for_battle
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
@ -2577,7 +2577,7 @@ _080B1C54:
|
||||
_080B1C5C:
|
||||
ldr r0, =0x000001a7
|
||||
_080B1C5E:
|
||||
bl current_map_music_set
|
||||
bl PlayNewMapMusic
|
||||
_080B1C62:
|
||||
pop {r0}
|
||||
bx r0
|
||||
|
@ -1550,13 +1550,13 @@ _08080508:
|
||||
str r2, [r0]
|
||||
ldr r0, =sub_8081898
|
||||
bl SetMainCallback2
|
||||
bl current_map_music_get
|
||||
bl GetCurrentMapMusic
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
ldr r4, =0x00000193
|
||||
cmp r0, r4
|
||||
beq _08080540
|
||||
bl current_map_music_get
|
||||
bl GetCurrentMapMusic
|
||||
ldr r1, [r5]
|
||||
movs r2, 0xAA
|
||||
lsls r2, 1
|
||||
@ -1564,7 +1564,7 @@ _08080508:
|
||||
strh r0, [r1]
|
||||
_08080540:
|
||||
adds r0, r4, 0
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
_08080546:
|
||||
ldr r0, =gUnknown_020322A4
|
||||
ldr r1, [r0]
|
||||
@ -2523,13 +2523,13 @@ _08080D5A:
|
||||
cmp r4, r0
|
||||
blt _08080D5A
|
||||
_08080D80:
|
||||
bl current_map_music_get
|
||||
bl GetCurrentMapMusic
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
ldr r4, =0x00000193
|
||||
cmp r0, r4
|
||||
beq _08080D9E
|
||||
bl current_map_music_get
|
||||
bl GetCurrentMapMusic
|
||||
ldr r1, =gUnknown_020322A4
|
||||
ldr r1, [r1]
|
||||
movs r5, 0xAA
|
||||
@ -2538,7 +2538,7 @@ _08080D80:
|
||||
strh r0, [r1]
|
||||
_08080D9E:
|
||||
adds r0, r4, 0
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
movs r0, 0x35
|
||||
bl audio_play
|
||||
bl sub_807F738
|
||||
@ -8460,12 +8460,12 @@ sub_8083F3C: @ 8083F3C
|
||||
cmp r0, 0
|
||||
bne _08083F62
|
||||
ldr r0, =0x0000016f
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
ldrh r0, [r4, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r4, 0x8]
|
||||
_08083F62:
|
||||
bl task_is_not_running_overworld_fanfare
|
||||
bl IsFanfareTaskInactive
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08083F82
|
||||
@ -8475,7 +8475,7 @@ _08083F62:
|
||||
lsls r1, 1
|
||||
adds r0, r1
|
||||
ldrh r0, [r0]
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
adds r0, r5, 0
|
||||
bl DestroyTask
|
||||
_08083F82:
|
||||
|
@ -187,7 +187,7 @@ _0814FDFC:
|
||||
cmp r4, 0x13
|
||||
bls _0814FDFC
|
||||
bl InitMapMusic
|
||||
bl map_music_set_to_zero
|
||||
bl ResetMapMusic
|
||||
movs r0, 0
|
||||
bl ResetBgsAndClearDma3BusyFlags
|
||||
ldr r1, =gUnknown_085CD66C
|
||||
@ -558,7 +558,7 @@ _08150190:
|
||||
bl BeginNormalPaletteFade
|
||||
ldr r0, =0x000001a9
|
||||
movs r1, 0x1
|
||||
bl sub_80A3194
|
||||
bl FadeInNewBGM
|
||||
movs r0, 0x1
|
||||
bl sub_8150B6C
|
||||
ldr r1, =gMain
|
||||
@ -942,7 +942,7 @@ _081504EA:
|
||||
movs r3, 0x10
|
||||
bl BeginNormalPaletteFade
|
||||
movs r0, 0x4
|
||||
bl play_sound_effect
|
||||
bl FadeOutBGM
|
||||
b _08150542
|
||||
.pool
|
||||
_08150510:
|
||||
|
@ -1855,13 +1855,13 @@ _080B3354:
|
||||
cmp r0, 0
|
||||
beq _080B3370
|
||||
ldr r0, =0x000001dd
|
||||
bl current_map_music_set__default_for_battle
|
||||
bl PlayNewMapMusic__default_for_battle
|
||||
b _080B3378
|
||||
.pool
|
||||
_080B3370:
|
||||
movs r0, 0xEE
|
||||
lsls r0, 1
|
||||
bl current_map_music_set__default_for_battle
|
||||
bl PlayNewMapMusic__default_for_battle
|
||||
_080B3378:
|
||||
ldr r0, =gUnknown_020375E0
|
||||
ldrh r0, [r0]
|
||||
@ -2025,13 +2025,13 @@ _080B34DE:
|
||||
cmp r0, 0
|
||||
beq _080B34FC
|
||||
ldr r0, =0x000001dd
|
||||
bl current_map_music_set__default_for_battle
|
||||
bl PlayNewMapMusic__default_for_battle
|
||||
b _080B3504
|
||||
.pool
|
||||
_080B34FC:
|
||||
movs r0, 0xEE
|
||||
lsls r0, 1
|
||||
bl current_map_music_set__default_for_battle
|
||||
bl PlayNewMapMusic__default_for_battle
|
||||
_080B3504:
|
||||
ldr r1, =gUnknown_020229E8
|
||||
ldr r0, =0x00002211
|
||||
@ -2156,7 +2156,7 @@ sub_80B360C: @ 80B360C
|
||||
negs r1, r1
|
||||
ands r0, r1
|
||||
str r0, [r2]
|
||||
bl call_map_music_set_to_zero
|
||||
bl call_ResetMapMusic
|
||||
bl copy_player_party_from_sav1
|
||||
bl copy_bags_and_unk_data_to_save_blocks
|
||||
bl sub_813BF10
|
||||
|
@ -4116,7 +4116,7 @@ _080D9BD0:
|
||||
movs r1, 0x1
|
||||
bl sub_80DDED0
|
||||
ldr r0, =0x00000187
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
b _080D9C3E
|
||||
.pool
|
||||
_080D9BE8:
|
||||
|
@ -412,7 +412,7 @@ sub_80F5B00: @ 80F5B00
|
||||
_080F5BE4:
|
||||
movs r0, 0xDF
|
||||
lsls r0, 1
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
_080F5BEC:
|
||||
ldr r0, =sub_80F5C24
|
||||
bl SetVBlankCallback
|
||||
@ -623,7 +623,7 @@ _080F5E0A:
|
||||
bne _080F5EBA
|
||||
movs r0, 0xDF
|
||||
lsls r0, 1
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
ldr r2, =gPaletteFade
|
||||
ldrb r1, [r2, 0x8]
|
||||
movs r0, 0x7F
|
||||
@ -3449,7 +3449,7 @@ sub_80F75A8: @ 80F75A8
|
||||
bne _080F7610
|
||||
ldrh r0, [r4, 0x30]
|
||||
movs r1, 0
|
||||
bl cry_related
|
||||
bl PlayCry1
|
||||
movs r0, 0
|
||||
strh r0, [r4, 0x30]
|
||||
b _080F7610
|
||||
|
@ -863,7 +863,7 @@ sub_8175C34: @ 8175C34
|
||||
beq _08175C94
|
||||
_08175C62:
|
||||
movs r0, 0x4
|
||||
bl play_sound_effect
|
||||
bl FadeOutBGM
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
ldr r1, =0x0000ffff
|
||||
@ -881,7 +881,7 @@ _08175C94:
|
||||
cmp r1, r0
|
||||
bne _08175CA0
|
||||
movs r0, 0x8
|
||||
bl play_sound_effect
|
||||
bl FadeOutBGM
|
||||
_08175CA0:
|
||||
movs r0, 0x8
|
||||
ldrsh r1, [r4, r0]
|
||||
|
@ -554,7 +554,7 @@ _080717EC:
|
||||
strb r1, [r0, 0x7]
|
||||
ldr r0, =sub_807172C
|
||||
bl SetVBlankCallback
|
||||
bl current_map_music_get
|
||||
bl GetCurrentMapMusic
|
||||
ldr r1, =gUnknown_020375E2
|
||||
strh r0, [r1]
|
||||
bl reset_temp_tile_data_buffers
|
||||
@ -762,7 +762,7 @@ c3_080472E4: @ 8071A3C
|
||||
ldrsh r0, [r4, r1]
|
||||
cmp r0, 0
|
||||
bne _08071A5C
|
||||
bl sub_80A2F30
|
||||
bl StopMapMusic
|
||||
bl play_some_sound
|
||||
_08071A5C:
|
||||
movs r1, 0x8
|
||||
@ -771,14 +771,14 @@ _08071A5C:
|
||||
bne _08071A6C
|
||||
movs r0, 0xBC
|
||||
lsls r0, 1
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
_08071A6C:
|
||||
movs r1, 0x8
|
||||
ldrsh r0, [r4, r1]
|
||||
cmp r0, 0x3C
|
||||
ble _08071A80
|
||||
ldr r0, =0x00000179
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
adds r0, r5, 0
|
||||
bl DestroyTask
|
||||
_08071A80:
|
||||
@ -983,7 +983,7 @@ _08071C24:
|
||||
movs r3, 0x3
|
||||
bl sub_8072214
|
||||
ldr r0, =0x00000173
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
ldr r1, [r5]
|
||||
ldrb r0, [r1, 0x2]
|
||||
adds r0, 0x1
|
||||
@ -998,7 +998,7 @@ _08071C24:
|
||||
b _08071E06
|
||||
.pool
|
||||
_08071C88:
|
||||
bl task_is_not_running_overworld_fanfare
|
||||
bl IsFanfareTaskInactive
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08071C94
|
||||
@ -1006,7 +1006,7 @@ _08071C88:
|
||||
_08071C94:
|
||||
b _08071DC4
|
||||
_08071C96:
|
||||
bl task_is_not_running_overworld_fanfare
|
||||
bl IsFanfareTaskInactive
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08071CA2
|
||||
|
@ -1392,7 +1392,7 @@ _0813E770:
|
||||
bl _0813F1A4
|
||||
_0813E780:
|
||||
ldr r0, =0x00000179
|
||||
bl current_map_music_set
|
||||
bl PlayNewMapMusic
|
||||
ldr r0, =gTasks
|
||||
mov r3, r8
|
||||
adds r1, r3, r7
|
||||
@ -1628,7 +1628,7 @@ _0813E99E:
|
||||
movs r1, 0
|
||||
bl battle_show_message_maybe
|
||||
ldr r0, =0x00000173
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
ldr r2, =gTasks
|
||||
mov r3, r8
|
||||
adds r1, r3, r7
|
||||
@ -1693,7 +1693,7 @@ _0813EA2A:
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _0813EA5E
|
||||
bl sub_80A2F30
|
||||
bl StopMapMusic
|
||||
bl sub_8085784
|
||||
_0813EA5E:
|
||||
ldrh r0, [r4, 0xE]
|
||||
@ -1762,7 +1762,7 @@ _0813EADC:
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _0813EAF6
|
||||
bl sub_80A2F30
|
||||
bl StopMapMusic
|
||||
bl sub_8085784
|
||||
_0813EAF6:
|
||||
movs r1, 0x1A
|
||||
@ -1894,7 +1894,7 @@ _0813EC1E:
|
||||
_0813EC2A:
|
||||
bl sub_804F574
|
||||
ldr r0, =0x0000016f
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
ldr r0, =gUnknown_085CC270
|
||||
ldr r0, [r0, 0xC]
|
||||
bl get_battle_strings_
|
||||
@ -2562,7 +2562,7 @@ _0813F294:
|
||||
adds r4, r0
|
||||
ldrh r0, [r4, 0xA]
|
||||
movs r1, 0
|
||||
bl cry_related
|
||||
bl PlayCry1
|
||||
b _0813F6F2
|
||||
.pool
|
||||
_0813F2AC:
|
||||
@ -2593,7 +2593,7 @@ _0813F2DC:
|
||||
bl _0813FCC4
|
||||
_0813F2EC:
|
||||
ldr r0, =0x00000179
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
ldr r1, =gTasks
|
||||
lsls r0, r7, 2
|
||||
adds r0, r7
|
||||
@ -2812,7 +2812,7 @@ _0813F4F2:
|
||||
movs r2, 0x1
|
||||
bl sub_807F1A8
|
||||
ldr r0, =0x00000173
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
ldr r2, =gTasks
|
||||
lsls r1, r7, 2
|
||||
adds r1, r7
|
||||
@ -2856,7 +2856,7 @@ _0813F570:
|
||||
beq _0813F57E
|
||||
b _0813FCC4
|
||||
_0813F57E:
|
||||
bl task_is_not_running_overworld_fanfare
|
||||
bl IsFanfareTaskInactive
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
@ -2912,7 +2912,7 @@ _0813F5F0:
|
||||
.pool
|
||||
_0813F5FC:
|
||||
ldr r0, =0x00000179
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
ldr r1, =gUnknown_085EF6D2
|
||||
movs r0, 0
|
||||
movs r2, 0x1
|
||||
@ -3061,7 +3061,7 @@ _0813F756:
|
||||
_0813F762:
|
||||
bl sub_804F574
|
||||
ldr r0, =0x0000016f
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
ldr r0, =gUnknown_085CC270
|
||||
ldr r0, [r0, 0xC]
|
||||
bl get_battle_strings_
|
||||
@ -3090,7 +3090,7 @@ _0813F7A4:
|
||||
beq _0813F7B2
|
||||
b _0813FCC4
|
||||
_0813F7B2:
|
||||
bl task_is_not_running_overworld_fanfare
|
||||
bl IsFanfareTaskInactive
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
|
@ -1410,7 +1410,7 @@ sub_80B6574: @ 80B6574
|
||||
beq _080B65A4
|
||||
movs r0, 0xB8
|
||||
lsls r0, 1
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
_080B65A4:
|
||||
pop {r0}
|
||||
bx r0
|
||||
@ -1701,7 +1701,7 @@ sub_80B6800: @ 80B6800
|
||||
ldrsh r0, [r4, r1]
|
||||
cmp r0, 0
|
||||
beq _080B6816
|
||||
bl task_is_not_running_overworld_fanfare
|
||||
bl IsFanfareTaskInactive
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080B681C
|
||||
@ -6226,13 +6226,13 @@ sub_80B8CC0: @ 80B8CC0
|
||||
movs r1, 0
|
||||
movs r2, 0x7D
|
||||
movs r3, 0xA
|
||||
bl sub_80A32C0
|
||||
bl PlayCry2
|
||||
b _080B8D00
|
||||
.pool
|
||||
_080B8CF8:
|
||||
ldrh r0, [r1, 0x2E]
|
||||
movs r1, 0
|
||||
bl cry_related
|
||||
bl PlayCry1
|
||||
_080B8D00:
|
||||
pop {r0}
|
||||
bx r0
|
||||
|
@ -127,7 +127,7 @@ _0817365C:
|
||||
bl SetMainCallback2
|
||||
movs r0, 0xDA
|
||||
lsls r0, 1
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
movs r0, 0
|
||||
b _0817368A
|
||||
.pool
|
||||
@ -1272,7 +1272,7 @@ sub_8174028: @ 8174028
|
||||
cmp r0, 0
|
||||
beq _0817404E
|
||||
movs r0, 0x4
|
||||
bl play_sound_effect
|
||||
bl FadeOutBGM
|
||||
ldr r0, =gTasks
|
||||
lsls r1, r4, 2
|
||||
adds r1, r4
|
||||
@ -2020,7 +2020,7 @@ _0817466C:
|
||||
lsls r0, 23
|
||||
lsrs r0, 23
|
||||
movs r1, 0
|
||||
bl cry_related
|
||||
bl PlayCry1
|
||||
_081746E6:
|
||||
adds r0, r4, 0
|
||||
movs r1, 0
|
||||
|
@ -2325,7 +2325,7 @@ _0816E09A:
|
||||
movs r1, 0
|
||||
movs r2, 0x64
|
||||
movs r3, 0xA
|
||||
bl sub_80A344C
|
||||
bl PlayCryInternal
|
||||
b _0816E14E
|
||||
.pool
|
||||
_0816E0C8:
|
||||
@ -2857,7 +2857,7 @@ _0816E528:
|
||||
movs r1, 0
|
||||
movs r2, 0x78
|
||||
movs r3, 0xA
|
||||
bl sub_80A344C
|
||||
bl PlayCryInternal
|
||||
b _0816E6BC
|
||||
_0816E544:
|
||||
ldrh r0, [r5, 0xC]
|
||||
|
52
asm/link.s
52
asm/link.s
@ -3429,7 +3429,7 @@ _0800AF8C:
|
||||
ldr r0, =sub_8009404
|
||||
movs r1, 0
|
||||
bl CreateTask
|
||||
bl sub_80A2F30
|
||||
bl StopMapMusic
|
||||
ldr r1, =gMain
|
||||
movs r0, 0
|
||||
str r0, [r1]
|
||||
@ -28792,7 +28792,7 @@ _08018618:
|
||||
movs r0, 0x3
|
||||
bl ShowBg
|
||||
ldr r0, =0x0000021d
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
ldr r0, =sub_8018424
|
||||
bl SetVBlankCallback
|
||||
movs r0, 0xC5
|
||||
@ -30057,7 +30057,7 @@ _0801905A:
|
||||
_08019062:
|
||||
movs r0, 0xB9
|
||||
lsls r0, 1
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
strh r4, [r5]
|
||||
b _0801907C
|
||||
_0801906E:
|
||||
@ -30074,7 +30074,7 @@ _0801907C:
|
||||
strb r0, [r6]
|
||||
b _0801909A
|
||||
_08019084:
|
||||
bl task_is_not_running_overworld_fanfare
|
||||
bl IsFanfareTaskInactive
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0801909A
|
||||
@ -45465,7 +45465,7 @@ _08020C26:
|
||||
strb r0, [r2]
|
||||
movs r0, 0xC8
|
||||
lsls r0, 1
|
||||
bl current_map_music_set
|
||||
bl PlayNewMapMusic
|
||||
ldr r0, =c1_overworld
|
||||
bl set_callback1
|
||||
_08020C5A:
|
||||
@ -49585,7 +49585,7 @@ _08022E72:
|
||||
cmp r0, 0
|
||||
beq _08022EA2
|
||||
ldr r0, =0x000001e5
|
||||
bl current_map_music_set
|
||||
bl PlayNewMapMusic
|
||||
movs r0, 0x7
|
||||
movs r1, 0x1
|
||||
movs r2, 0
|
||||
@ -53083,9 +53083,9 @@ sub_802493C: @ 802493C
|
||||
adds r1, 0x44
|
||||
adds r2, 0x48
|
||||
bl sub_8026B5C
|
||||
bl sub_80A2F30
|
||||
bl StopMapMusic
|
||||
ldr r0, =0x0000021e
|
||||
bl current_map_music_set
|
||||
bl PlayNewMapMusic
|
||||
b _08024A16
|
||||
.pool
|
||||
_08024A10:
|
||||
@ -54072,7 +54072,7 @@ _08025202:
|
||||
b _08025226
|
||||
_0802520C:
|
||||
movs r0, 0x1
|
||||
bl ducking_tick
|
||||
bl WaitFanfare
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08025226
|
||||
@ -54080,7 +54080,7 @@ _0802520C:
|
||||
bl sub_8026240
|
||||
ldr r0, =0x0000020b
|
||||
movs r1, 0x4
|
||||
bl sub_80A2F88
|
||||
bl FadeOutAndPlayNewMapMusic
|
||||
_08025226:
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
@ -54177,7 +54177,7 @@ _080252CC:
|
||||
.pool
|
||||
_080252DC:
|
||||
movs r0, 0x1
|
||||
bl ducking_tick
|
||||
bl WaitFanfare
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08025316
|
||||
@ -54201,7 +54201,7 @@ _080252DC:
|
||||
bl sub_8026240
|
||||
ldr r0, =0x0000020b
|
||||
movs r1, 0x4
|
||||
bl sub_80A2F88
|
||||
bl FadeOutAndPlayNewMapMusic
|
||||
_08025316:
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
@ -54782,11 +54782,11 @@ _080257B0:
|
||||
bl ChangeBgY
|
||||
b _08025848
|
||||
_08025802:
|
||||
bl sub_80A2F30
|
||||
bl StopMapMusic
|
||||
b _08025848
|
||||
_08025808:
|
||||
ldr r0, =0x0000021e
|
||||
bl current_map_music_set
|
||||
bl PlayNewMapMusic
|
||||
bl sub_8028E4C
|
||||
b _08025848
|
||||
.pool
|
||||
@ -55758,7 +55758,7 @@ _08025FEA:
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x9
|
||||
bls _0802601C
|
||||
bl sub_80A2F30
|
||||
bl StopMapMusic
|
||||
ldr r0, [r4]
|
||||
adds r0, r5
|
||||
movs r1, 0x1
|
||||
@ -55773,7 +55773,7 @@ _0802601C:
|
||||
cmp r0, 0x1
|
||||
bne _0802603C
|
||||
movs r0, 0xB
|
||||
bl pause_music_for_sound_maybe
|
||||
bl PlayFanfareByFanfareNum
|
||||
ldr r0, [r4]
|
||||
movs r2, 0xAA
|
||||
lsls r2, 1
|
||||
@ -55945,7 +55945,7 @@ _08026172:
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x9
|
||||
bls _080261A0
|
||||
bl sub_80A2F30
|
||||
bl StopMapMusic
|
||||
ldr r0, [r4]
|
||||
adds r0, r5
|
||||
movs r1, 0x1
|
||||
@ -55960,7 +55960,7 @@ _080261A0:
|
||||
cmp r0, 0x1
|
||||
bne _080261C0
|
||||
movs r0, 0xB
|
||||
bl pause_music_for_sound_maybe
|
||||
bl PlayFanfareByFanfareNum
|
||||
ldr r0, [r4]
|
||||
movs r3, 0xAA
|
||||
lsls r3, 1
|
||||
@ -63434,7 +63434,7 @@ _08029D06:
|
||||
b _08029D4C
|
||||
.pool
|
||||
_08029D3C:
|
||||
bl sub_80A2F30
|
||||
bl StopMapMusic
|
||||
ldr r1, [r4]
|
||||
ldr r0, =0x00003014
|
||||
adds r1, r0
|
||||
@ -63473,7 +63473,7 @@ _08029D4C:
|
||||
.pool
|
||||
_08029DA0:
|
||||
ldr r0, =0x0000016f
|
||||
bl current_map_music_set
|
||||
bl PlayNewMapMusic
|
||||
ldr r4, =gUnknown_02022CF8
|
||||
ldr r0, [r4]
|
||||
ldr r6, =0x00003008
|
||||
@ -63627,7 +63627,7 @@ _08029F2C:
|
||||
ldr r0, =0x0000020b
|
||||
movs r1, 0x14
|
||||
movs r2, 0xA
|
||||
bl sub_80A2FBC
|
||||
bl FadeOutAndFadeInNewMapMusic
|
||||
ldr r0, =gUnknown_02022CF8
|
||||
ldr r1, [r0]
|
||||
ldr r0, =0x00003014
|
||||
@ -65208,7 +65208,7 @@ _0802ACE0:
|
||||
movs r1, 0x5
|
||||
bl sub_802BE60
|
||||
movs r0, 0x4
|
||||
bl sub_80A2F50
|
||||
bl FadeOutMapMusic
|
||||
ldr r0, =gUnknown_02022CFC
|
||||
ldr r1, [r0]
|
||||
b _0802ADC0
|
||||
@ -65234,14 +65234,14 @@ _0802AD3C:
|
||||
bl sub_802D0F0
|
||||
cmp r0, 0
|
||||
bne _0802AE08
|
||||
bl sub_80A303C
|
||||
bl IsNotWaitingForBGMStop
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
bne _0802AE08
|
||||
ldr r0, =0x0000021a
|
||||
movs r1, 0x8
|
||||
bl sub_80A2F88
|
||||
bl FadeOutAndPlayNewMapMusic
|
||||
ldr r0, =gUnknown_02022CFC
|
||||
ldr r1, [r0]
|
||||
b _0802ADC0
|
||||
@ -70936,13 +70936,13 @@ _0802D9C8:
|
||||
b _0802DA00
|
||||
_0802D9E0:
|
||||
ldrh r0, [r1, 0x14]
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
ldr r1, [r4]
|
||||
ldrb r0, [r1, 0xD]
|
||||
adds r0, 0x1
|
||||
strb r0, [r1, 0xD]
|
||||
_0802D9EE:
|
||||
bl task_is_not_running_overworld_fanfare
|
||||
bl IsFanfareTaskInactive
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0802DA0C
|
||||
|
@ -1958,7 +1958,7 @@ task_new_game_prof_birch_speech_1: @ 80307B0
|
||||
strh r1, [r0, 0x16]
|
||||
movs r0, 0xBB
|
||||
lsls r0, 1
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
movs r0, 0
|
||||
bl ShowBg
|
||||
movs r0, 0x1
|
||||
@ -3480,7 +3480,7 @@ task_new_game_prof_birch_speech_part2_9: @ 80314C4
|
||||
movs r3, 0x10
|
||||
bl BeginNormalPaletteFade
|
||||
movs r0, 0x4
|
||||
bl play_sound_effect
|
||||
bl FadeOutBGM
|
||||
ldr r0, =task_new_game_prof_birch_speech_part2_10
|
||||
str r0, [r6]
|
||||
_0803155C:
|
||||
|
@ -1114,12 +1114,12 @@ _08120994:
|
||||
strh r0, [r5, 0xE]
|
||||
strh r0, [r5, 0x10]
|
||||
movs r0, 0x4
|
||||
bl sub_80A31E8
|
||||
bl FadeOutBGMTemporarily
|
||||
movs r0, 0x1
|
||||
b _08120B4E
|
||||
.pool
|
||||
_081209B8:
|
||||
bl sub_80A3200
|
||||
bl IsBGMPausedOrStopped
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _081209C4
|
||||
@ -1227,7 +1227,7 @@ _08120A7E:
|
||||
cmp r4, 0xFF
|
||||
bne _08120AB0
|
||||
movs r0, 0x6
|
||||
bl sub_80A3228
|
||||
bl FadeInBGM
|
||||
ldr r0, =gMPlay_SE2
|
||||
movs r1, 0x2
|
||||
bl m4aMPlayFadeOutTemporarily
|
||||
|
@ -87,7 +87,7 @@ _081789AC:
|
||||
ldr r0, =sub_8009404
|
||||
movs r1, 0
|
||||
bl CreateTask
|
||||
bl sub_80A2F30
|
||||
bl StopMapMusic
|
||||
bl RunTasks
|
||||
bl AnimateSprites
|
||||
bl BuildOamBuffer
|
||||
|
@ -970,7 +970,7 @@ sub_817A468: @ 817A468
|
||||
bne _0817A48E
|
||||
ldrh r0, [r4, 0x32]
|
||||
movs r1, 0
|
||||
bl cry_related
|
||||
bl PlayCry1
|
||||
_0817A48E:
|
||||
movs r1, 0x2E
|
||||
ldrsh r0, [r4, r1]
|
||||
|
@ -6613,7 +6613,7 @@ _080BED04:
|
||||
movs r1, 0
|
||||
movs r2, 0x7D
|
||||
movs r3, 0xA
|
||||
bl sub_80A32C0
|
||||
bl PlayCry2
|
||||
b _080BEDA0
|
||||
.pool
|
||||
_080BED58:
|
||||
@ -8684,7 +8684,7 @@ _080C0044:
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
movs r1, 0
|
||||
bl cry_related
|
||||
bl PlayCry1
|
||||
ldr r1, =gTasks
|
||||
lsls r0, r5, 2
|
||||
adds r0, r5
|
||||
|
@ -282,7 +282,7 @@ sub_8145588: @ 8145588
|
||||
movs r1, 0
|
||||
movs r2, 0x7D
|
||||
movs r3, 0xA
|
||||
bl sub_80A32C0
|
||||
bl PlayCry2
|
||||
ldr r0, =gUnknown_0203AB90
|
||||
ldr r1, [r0]
|
||||
movs r0, 0x1
|
||||
|
@ -5157,38 +5157,38 @@ _0806E646:
|
||||
thumb_func_start sub_806E64C
|
||||
sub_806E64C: @ 806E64C
|
||||
push {lr}
|
||||
bl map_music_set_to_zero
|
||||
bl ResetMapMusic
|
||||
bl m4aMPlayAllStop
|
||||
bl song_id_for_battle
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_806E64C
|
||||
|
||||
thumb_func_start current_map_music_set__default_for_battle
|
||||
current_map_music_set__default_for_battle: @ 806E668
|
||||
thumb_func_start PlayNewMapMusic__default_for_battle
|
||||
PlayNewMapMusic__default_for_battle: @ 806E668
|
||||
push {r4,lr}
|
||||
lsls r0, 16
|
||||
lsrs r4, r0, 16
|
||||
bl map_music_set_to_zero
|
||||
bl ResetMapMusic
|
||||
bl m4aMPlayAllStop
|
||||
cmp r4, 0
|
||||
beq _0806E682
|
||||
adds r0, r4, 0
|
||||
bl current_map_music_set
|
||||
bl PlayNewMapMusic
|
||||
b _0806E68E
|
||||
_0806E682:
|
||||
bl song_id_for_battle
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
bl current_map_music_set
|
||||
bl PlayNewMapMusic
|
||||
_0806E68E:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end current_map_music_set__default_for_battle
|
||||
thumb_func_end PlayNewMapMusic__default_for_battle
|
||||
|
||||
thumb_func_start sub_806E694
|
||||
sub_806E694: @ 806E694
|
||||
@ -5196,7 +5196,7 @@ sub_806E694: @ 806E694
|
||||
adds r4, r0, 0
|
||||
lsls r4, 16
|
||||
lsrs r4, 16
|
||||
bl map_music_set_to_zero
|
||||
bl ResetMapMusic
|
||||
bl m4aMPlayAllStop
|
||||
ldr r0, =sub_806E6CC
|
||||
movs r1, 0
|
||||
@ -5230,14 +5230,14 @@ sub_806E6CC: @ 806E6CC
|
||||
cmp r0, 0
|
||||
beq _0806E6F0
|
||||
ldrh r0, [r1, 0x8]
|
||||
bl current_map_music_set
|
||||
bl PlayNewMapMusic
|
||||
b _0806E6FC
|
||||
.pool
|
||||
_0806E6F0:
|
||||
bl song_id_for_battle
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
bl current_map_music_set
|
||||
bl PlayNewMapMusic
|
||||
_0806E6FC:
|
||||
adds r0, r4, 0
|
||||
bl DestroyTask
|
||||
@ -6056,7 +6056,7 @@ _0806ED66:
|
||||
lsls r1, 24
|
||||
asrs r1, 24
|
||||
adds r0, r4, 0
|
||||
bl cry_related
|
||||
bl PlayCry1
|
||||
_0806ED7C:
|
||||
ldr r0, =SpriteCallbackDummy
|
||||
b _0806EDFA
|
||||
@ -6067,7 +6067,7 @@ _0806ED84:
|
||||
lsls r1, 24
|
||||
asrs r1, 24
|
||||
adds r0, r4, 0
|
||||
bl cry_related
|
||||
bl PlayCry1
|
||||
adds r0, r4, 0
|
||||
bl sub_806F0D4
|
||||
lsls r0, 24
|
||||
|
46
asm/rom4.s
46
asm/rom4.s
@ -2204,13 +2204,13 @@ _08085774:
|
||||
bx r1
|
||||
thumb_func_end warp1_target_get_music
|
||||
|
||||
thumb_func_start call_map_music_set_to_zero
|
||||
call_map_music_set_to_zero: @ 8085778
|
||||
thumb_func_start call_ResetMapMusic
|
||||
call_ResetMapMusic: @ 8085778
|
||||
push {lr}
|
||||
bl map_music_set_to_zero
|
||||
bl ResetMapMusic
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end call_map_music_set_to_zero
|
||||
thumb_func_end call_ResetMapMusic
|
||||
|
||||
thumb_func_start sub_8085784
|
||||
sub_8085784: @ 8085784
|
||||
@ -2249,13 +2249,13 @@ _080857C8:
|
||||
beq _080857D6
|
||||
ldr r4, =0x0000016d
|
||||
_080857D6:
|
||||
bl current_map_music_get
|
||||
bl GetCurrentMapMusic
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
cmp r4, r0
|
||||
beq _080857E8
|
||||
adds r0, r4, 0
|
||||
bl current_map_music_set
|
||||
bl PlayNewMapMusic
|
||||
_080857E8:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
@ -2294,7 +2294,7 @@ sub_8085810: @ 8085810
|
||||
bl warp1_target_get_music
|
||||
lsls r0, 16
|
||||
lsrs r4, r0, 16
|
||||
bl current_map_music_get
|
||||
bl GetCurrentMapMusic
|
||||
lsls r0, 16
|
||||
lsrs r5, r0, 16
|
||||
ldr r0, =0x000001bb
|
||||
@ -2326,13 +2326,13 @@ _08085856:
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x4
|
||||
movs r2, 0x4
|
||||
bl sub_80A2FBC
|
||||
bl FadeOutAndFadeInNewMapMusic
|
||||
b _08085890
|
||||
.pool
|
||||
_08085888:
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x8
|
||||
bl sub_80A2F88
|
||||
bl FadeOutAndPlayNewMapMusic
|
||||
_08085890:
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
@ -2342,7 +2342,7 @@ _08085890:
|
||||
thumb_func_start sub_8085898
|
||||
sub_8085898: @ 8085898
|
||||
push {r4,lr}
|
||||
bl current_map_music_get
|
||||
bl GetCurrentMapMusic
|
||||
adds r4, r0, 0
|
||||
lsls r4, 16
|
||||
lsrs r4, 16
|
||||
@ -2355,7 +2355,7 @@ sub_8085898: @ 8085898
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
movs r1, 0x8
|
||||
bl sub_80A2F88
|
||||
bl FadeOutAndPlayNewMapMusic
|
||||
_080858BE:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
@ -2367,7 +2367,7 @@ sub_80858C4: @ 80858C4
|
||||
push {r4,lr}
|
||||
lsls r0, 16
|
||||
lsrs r4, r0, 16
|
||||
bl current_map_music_get
|
||||
bl GetCurrentMapMusic
|
||||
lsls r0, 16
|
||||
lsrs r1, r0, 16
|
||||
cmp r1, r4
|
||||
@ -2377,7 +2377,7 @@ sub_80858C4: @ 80858C4
|
||||
beq _080858E4
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x8
|
||||
bl sub_80A2F88
|
||||
bl FadeOutAndPlayNewMapMusic
|
||||
_080858E4:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
@ -2407,7 +2407,7 @@ _0808590A:
|
||||
thumb_func_start music_something
|
||||
music_something: @ 8085910
|
||||
push {r4,r5,lr}
|
||||
bl current_map_music_get
|
||||
bl GetCurrentMapMusic
|
||||
lsls r0, 16
|
||||
lsrs r5, r0, 16
|
||||
bl warp1_target_get_music
|
||||
@ -2419,7 +2419,7 @@ music_something: @ 8085910
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
beq _0808597E
|
||||
bl current_map_music_get
|
||||
bl GetCurrentMapMusic
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
cmp r4, r0
|
||||
@ -2454,7 +2454,7 @@ _08085972:
|
||||
bl is_warp1_light_level_8_or_9
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
bl sub_80A2F50
|
||||
bl FadeOutMapMusic
|
||||
_0808597E:
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
@ -2465,7 +2465,7 @@ _0808597E:
|
||||
thumb_func_start sub_80859A0
|
||||
sub_80859A0: @ 80859A0
|
||||
push {lr}
|
||||
bl sub_80A303C
|
||||
bl IsNotWaitingForBGMStop
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r1}
|
||||
@ -2476,7 +2476,7 @@ sub_80859A0: @ 80859A0
|
||||
sub_80859B0: @ 80859B0
|
||||
push {lr}
|
||||
movs r0, 0x4
|
||||
bl sub_80A2F50
|
||||
bl FadeOutMapMusic
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_80859B0
|
||||
@ -2531,7 +2531,7 @@ _080859F0:
|
||||
asrs r2, 24
|
||||
adds r1, r4, 0
|
||||
movs r3, 0x1
|
||||
bl sub_80A32C0
|
||||
bl PlayCry2
|
||||
_08085A2C:
|
||||
add sp, 0x4
|
||||
pop {r4}
|
||||
@ -3167,7 +3167,7 @@ _08085EEC:
|
||||
CB2_NewGame: @ 8085EF8
|
||||
push {lr}
|
||||
bl sub_808631C
|
||||
bl sub_80A2F30
|
||||
bl StopMapMusic
|
||||
bl ResetSafariZoneFlag_
|
||||
bl NewGameInitData
|
||||
bl player_avatar_init_params_reset
|
||||
@ -3208,7 +3208,7 @@ c2_whiteout: @ 8085F58
|
||||
cmp r0, 0x77
|
||||
bls _08085FB0
|
||||
bl sub_808631C
|
||||
bl sub_80A2F30
|
||||
bl StopMapMusic
|
||||
bl ResetSafariZoneFlag_
|
||||
bl sub_8084620
|
||||
bl player_avatar_init_params_reset
|
||||
@ -3391,7 +3391,7 @@ _08086132:
|
||||
c2_8056854: @ 8086140
|
||||
push {lr}
|
||||
bl sub_808631C
|
||||
bl sub_80A2F30
|
||||
bl StopMapMusic
|
||||
ldr r0, =c1_link_related
|
||||
bl set_callback1
|
||||
bl sub_8086C2C
|
||||
@ -3494,7 +3494,7 @@ _08086222:
|
||||
sub_8086230: @ 8086230
|
||||
push {r4,lr}
|
||||
bl sub_808631C
|
||||
bl sub_80A2F30
|
||||
bl StopMapMusic
|
||||
bl ResetSafariZoneFlag_
|
||||
ldr r0, =gUnknown_03006210
|
||||
ldrh r0, [r0]
|
||||
|
@ -16046,23 +16046,23 @@ _0803D9A8:
|
||||
.4byte _0803DA80
|
||||
_0803DA74:
|
||||
ldr r0, =0x00000163
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
b _0803DAA4
|
||||
.pool
|
||||
_0803DA80:
|
||||
movs r0, 0xD4
|
||||
lsls r0, 1
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
b _0803DAA4
|
||||
_0803DA8A:
|
||||
movs r0, 0xB1
|
||||
lsls r0, 1
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
b _0803DAA4
|
||||
_0803DA94:
|
||||
movs r0, 0xCE
|
||||
lsls r0, 1
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
b _0803DAA4
|
||||
_0803DA9E:
|
||||
ldr r1, =gBattlescriptCurrInstr
|
||||
@ -16386,7 +16386,7 @@ _0803DDD2:
|
||||
movs r0, 0x3
|
||||
bl BeginFastPaletteFade
|
||||
movs r0, 0x5
|
||||
bl sub_80A2F50
|
||||
bl FadeOutMapMusic
|
||||
ldr r1, =gUnknown_03005D04
|
||||
ldr r0, =sub_803DE40
|
||||
str r0, [r1]
|
||||
|
@ -6875,14 +6875,14 @@ _08075BB4:
|
||||
asrs r1, 24
|
||||
adds r0, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_80A32E4
|
||||
bl PlayCry3
|
||||
b _08075C2E
|
||||
_08075BCC:
|
||||
lsls r1, r5, 24
|
||||
asrs r1, 24
|
||||
adds r0, r6, 0
|
||||
movs r2, 0xB
|
||||
bl sub_80A32E4
|
||||
bl PlayCry3
|
||||
b _08075C2E
|
||||
_08075BDA:
|
||||
bl sub_80A369C
|
||||
@ -6915,14 +6915,14 @@ _08075BF8:
|
||||
asrs r1, 24
|
||||
adds r0, r6, 0
|
||||
movs r2, 0x1
|
||||
bl sub_80A3344
|
||||
bl PlayCry4
|
||||
b _08075C2E
|
||||
_08075C22:
|
||||
lsls r1, r5, 24
|
||||
asrs r1, 24
|
||||
adds r0, r6, 0
|
||||
movs r2, 0xC
|
||||
bl sub_80A3344
|
||||
bl PlayCry4
|
||||
_08075C2E:
|
||||
ldr r0, =gUnknown_020244D0
|
||||
ldr r0, [r0]
|
||||
@ -7005,14 +7005,14 @@ _08075CC0:
|
||||
asrs r1, 24
|
||||
adds r0, r6, 0
|
||||
movs r2, 0
|
||||
bl sub_80A3344
|
||||
bl PlayCry4
|
||||
b _08075CE4
|
||||
_08075CD8:
|
||||
lsls r1, r5, 24
|
||||
asrs r1, 24
|
||||
adds r0, r6, 0
|
||||
movs r2, 0xB
|
||||
bl sub_80A3344
|
||||
bl PlayCry4
|
||||
_08075CE4:
|
||||
ldr r0, =gUnknown_020244D0
|
||||
ldr r0, [r0]
|
||||
|
@ -413,7 +413,7 @@ _08158E76:
|
||||
asrs r1, 24
|
||||
adds r0, r4, 0
|
||||
movs r2, 0x3
|
||||
bl sub_80A32E4
|
||||
bl PlayCry3
|
||||
_08158E86:
|
||||
adds r0, r5, 0
|
||||
bl move_anim_task_del
|
||||
@ -553,13 +553,13 @@ _08158F86:
|
||||
bne _08158FC8
|
||||
adds r0, r4, 0
|
||||
movs r2, 0x9
|
||||
bl sub_80A32E4
|
||||
bl PlayCry3
|
||||
b _08158FD0
|
||||
.pool
|
||||
_08158FC8:
|
||||
adds r0, r4, 0
|
||||
movs r2, 0x7
|
||||
bl sub_80A32E4
|
||||
bl PlayCry3
|
||||
_08158FD0:
|
||||
ldr r0, =gTasks
|
||||
adds r1, r5, r6
|
||||
@ -618,7 +618,7 @@ _08159028:
|
||||
asrs r1, 24
|
||||
adds r0, r6, 0
|
||||
movs r2, 0xA
|
||||
bl sub_80A32E4
|
||||
bl PlayCry3
|
||||
adds r0, r4, 0
|
||||
bl move_anim_task_del
|
||||
b _0815906A
|
||||
@ -631,7 +631,7 @@ _0815904E:
|
||||
asrs r1, 24
|
||||
mov r0, r8
|
||||
movs r2, 0x8
|
||||
bl sub_80A32E4
|
||||
bl PlayCry3
|
||||
mov r0, r9
|
||||
bl move_anim_task_del
|
||||
_0815906A:
|
||||
@ -775,7 +775,7 @@ _0815918C:
|
||||
asrs r1, 24
|
||||
mov r0, r8
|
||||
movs r2, 0x4
|
||||
bl play_cry_maybe
|
||||
bl PlayCry6
|
||||
ldr r1, =gTasks
|
||||
lsls r0, r4, 2
|
||||
adds r0, r4
|
||||
@ -819,14 +819,14 @@ _081591DC:
|
||||
asrs r1, 24
|
||||
adds r0, r6, 0
|
||||
movs r2, 0x6
|
||||
bl play_cry_maybe
|
||||
bl PlayCry6
|
||||
b _081591FE
|
||||
_081591F2:
|
||||
lsls r1, r5, 24
|
||||
asrs r1, 24
|
||||
mov r0, r8
|
||||
movs r2, 0x6
|
||||
bl sub_80A32E4
|
||||
bl PlayCry3
|
||||
_081591FE:
|
||||
adds r0, r4, 0
|
||||
bl move_anim_task_del
|
||||
@ -2169,7 +2169,7 @@ dp01t_34_6_move_anim_start_t3: @ 8159CC4
|
||||
ldrb r1, [r1]
|
||||
lsls r1, 8
|
||||
orrs r0, r1
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
b _08159D14
|
||||
.pool
|
||||
_08159D00:
|
||||
@ -2181,7 +2181,7 @@ _08159D00:
|
||||
ldrb r1, [r1]
|
||||
lsls r1, 8
|
||||
orrs r0, r1
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
_08159D14:
|
||||
bl dp01_tbl6_exec_completed
|
||||
pop {r4,r5}
|
||||
@ -2207,7 +2207,7 @@ sub_8159D20: @ 8159D20
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
movs r1, 0x19
|
||||
bl cry_related
|
||||
bl PlayCry1
|
||||
bl dp01_tbl6_exec_completed
|
||||
pop {r0}
|
||||
bx r0
|
||||
@ -2377,7 +2377,7 @@ sub_8159E90: @ 8159E90
|
||||
ldrb r0, [r0]
|
||||
strb r0, [r2]
|
||||
movs r0, 0x5
|
||||
bl sub_80A2F50
|
||||
bl FadeOutMapMusic
|
||||
movs r0, 0x3
|
||||
bl BeginFastPaletteFade
|
||||
bl dp01_tbl6_exec_completed
|
||||
@ -15932,7 +15932,7 @@ _08160E0C:
|
||||
movs r0, 0x1F
|
||||
strb r0, [r1]
|
||||
ldr r0, =0x0000016f
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
b _08160E8A
|
||||
.pool
|
||||
_08160E38:
|
||||
@ -15941,14 +15941,14 @@ _08160E38:
|
||||
cmp r0, 0
|
||||
bne _08160E8A
|
||||
ldr r0, =0x0000016f
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
ldr r0, =gUnknown_0203BC34
|
||||
ldr r1, [r0]
|
||||
movs r0, 0x20
|
||||
b _08160E88
|
||||
.pool
|
||||
_08160E58:
|
||||
bl task_is_not_running_overworld_fanfare
|
||||
bl IsFanfareTaskInactive
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08160E8A
|
||||
@ -21303,7 +21303,7 @@ _08163BA6:
|
||||
movs r1, 0x1
|
||||
bl CreateTask
|
||||
movs r0, 0
|
||||
bl current_map_music_set__default_for_battle
|
||||
bl PlayNewMapMusic__default_for_battle
|
||||
movs r0, 0
|
||||
b _08163E10
|
||||
.pool
|
||||
@ -21335,7 +21335,7 @@ _08163BC4:
|
||||
movs r1, 0x1
|
||||
bl CreateTask
|
||||
movs r0, 0
|
||||
bl current_map_music_set__default_for_battle
|
||||
bl PlayNewMapMusic__default_for_battle
|
||||
movs r0, 0xC
|
||||
b _08163E10
|
||||
.pool
|
||||
@ -21370,7 +21370,7 @@ _08163C18:
|
||||
movs r1, 0x1
|
||||
bl CreateTask
|
||||
movs r0, 0
|
||||
bl current_map_music_set__default_for_battle
|
||||
bl PlayNewMapMusic__default_for_battle
|
||||
movs r0, 0xD
|
||||
b _08163E10
|
||||
.pool
|
||||
@ -21439,7 +21439,7 @@ _08163D12:
|
||||
movs r1, 0x1
|
||||
bl CreateTask
|
||||
movs r0, 0
|
||||
bl current_map_music_set__default_for_battle
|
||||
bl PlayNewMapMusic__default_for_battle
|
||||
movs r0, 0x4
|
||||
b _08163E10
|
||||
.pool
|
||||
@ -21468,7 +21468,7 @@ _08163D5E:
|
||||
movs r1, 0x1
|
||||
bl CreateTask
|
||||
movs r0, 0
|
||||
bl current_map_music_set__default_for_battle
|
||||
bl PlayNewMapMusic__default_for_battle
|
||||
movs r0, 0x5
|
||||
b _08163E10
|
||||
.pool
|
||||
@ -21491,7 +21491,7 @@ _08163D8E:
|
||||
movs r1, 0x1
|
||||
bl CreateTask
|
||||
movs r0, 0
|
||||
bl current_map_music_set__default_for_battle
|
||||
bl PlayNewMapMusic__default_for_battle
|
||||
movs r0, 0x6
|
||||
b _08163E10
|
||||
.pool
|
||||
@ -21514,7 +21514,7 @@ _08163DC8:
|
||||
movs r1, 0x1
|
||||
bl CreateTask
|
||||
movs r0, 0
|
||||
bl current_map_music_set__default_for_battle
|
||||
bl PlayNewMapMusic__default_for_battle
|
||||
movs r0, 0xA
|
||||
b _08163E10
|
||||
.pool
|
||||
@ -21529,7 +21529,7 @@ _08163E00:
|
||||
movs r1, 0x1
|
||||
bl CreateTask
|
||||
movs r0, 0
|
||||
bl current_map_music_set__default_for_battle
|
||||
bl PlayNewMapMusic__default_for_battle
|
||||
movs r0, 0x7
|
||||
_08163E10:
|
||||
bl sub_80B100C
|
||||
@ -21560,7 +21560,7 @@ _08163E2C:
|
||||
movs r1, 0x1
|
||||
bl CreateTask
|
||||
movs r0, 0
|
||||
bl current_map_music_set__default_for_battle
|
||||
bl PlayNewMapMusic__default_for_battle
|
||||
movs r0, 0x12
|
||||
bl sub_8145EF4
|
||||
_08163E68:
|
||||
@ -33721,7 +33721,7 @@ sub_816A840: @ 816A840
|
||||
ldrb r1, [r1]
|
||||
lsls r1, 8
|
||||
orrs r0, r1
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
b _0816A890
|
||||
.pool
|
||||
_0816A87C:
|
||||
@ -33733,7 +33733,7 @@ _0816A87C:
|
||||
ldrb r1, [r1]
|
||||
lsls r1, 8
|
||||
orrs r0, r1
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
_0816A890:
|
||||
bl dp01_tbl5_exec_completed
|
||||
pop {r4,r5}
|
||||
@ -33759,7 +33759,7 @@ sub_816A89C: @ 816A89C
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
movs r1, 0x19
|
||||
bl cry_related
|
||||
bl PlayCry1
|
||||
bl dp01_tbl5_exec_completed
|
||||
pop {r0}
|
||||
bx r0
|
||||
@ -34315,7 +34315,7 @@ sub_816AD94: @ 816AD94
|
||||
ldrb r0, [r0]
|
||||
strb r0, [r2]
|
||||
movs r0, 0x5
|
||||
bl sub_80A2F50
|
||||
bl FadeOutMapMusic
|
||||
movs r0, 0x3
|
||||
bl BeginFastPaletteFade
|
||||
bl dp01_tbl5_exec_completed
|
||||
|
@ -1905,7 +1905,7 @@ sub_8185E24: @ 8185E24
|
||||
ldr r0, =gUnknown_0203C7B0
|
||||
str r5, [r0]
|
||||
movs r0, 0
|
||||
bl current_map_music_set__default_for_battle
|
||||
bl PlayNewMapMusic__default_for_battle
|
||||
ldr r0, =sub_8185E8C
|
||||
bl SetMainCallback2
|
||||
_08185E6E:
|
||||
@ -8056,7 +8056,7 @@ sub_818936C: @ 818936C
|
||||
ldrb r1, [r1]
|
||||
lsls r1, 8
|
||||
orrs r0, r1
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
b _081893BC
|
||||
.pool
|
||||
_081893A8:
|
||||
@ -8068,7 +8068,7 @@ _081893A8:
|
||||
ldrb r1, [r1]
|
||||
lsls r1, 8
|
||||
orrs r0, r1
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
_081893BC:
|
||||
bl sub_81871AC
|
||||
pop {r4,r5}
|
||||
@ -8095,7 +8095,7 @@ sub_81893C8: @ 81893C8
|
||||
lsrs r0, 16
|
||||
movs r1, 0x19
|
||||
movs r2, 0x5
|
||||
bl sub_80A32E4
|
||||
bl PlayCry3
|
||||
bl sub_81871AC
|
||||
pop {r0}
|
||||
bx r0
|
||||
@ -8686,7 +8686,7 @@ _08189908:
|
||||
strb r1, [r0]
|
||||
_08189910:
|
||||
movs r0, 0x5
|
||||
bl sub_80A2F50
|
||||
bl FadeOutMapMusic
|
||||
movs r0, 0x3
|
||||
bl BeginFastPaletteFade
|
||||
bl sub_81871AC
|
||||
@ -14167,7 +14167,7 @@ sub_818C994: @ 818C994
|
||||
ldrb r1, [r1]
|
||||
lsls r1, 8
|
||||
orrs r0, r1
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
b _0818C9E4
|
||||
.pool
|
||||
_0818C9D0:
|
||||
@ -14179,7 +14179,7 @@ _0818C9D0:
|
||||
ldrb r1, [r1]
|
||||
lsls r1, 8
|
||||
orrs r0, r1
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
_0818C9E4:
|
||||
bl sub_818A514
|
||||
pop {r4,r5}
|
||||
@ -14207,7 +14207,7 @@ sub_818C9F0: @ 818C9F0
|
||||
movs r1, 0x19
|
||||
negs r1, r1
|
||||
movs r2, 0x5
|
||||
bl sub_80A32E4
|
||||
bl PlayCry3
|
||||
bl sub_818A514
|
||||
pop {r0}
|
||||
bx r0
|
||||
@ -14820,7 +14820,7 @@ sub_818CF78: @ 818CF78
|
||||
ldrb r0, [r0]
|
||||
strb r0, [r2]
|
||||
movs r0, 0x5
|
||||
bl sub_80A2F50
|
||||
bl FadeOutMapMusic
|
||||
movs r0, 0x3
|
||||
bl BeginFastPaletteFade
|
||||
bl sub_818A514
|
||||
@ -95170,7 +95170,7 @@ sub_81B6F60: @ 81B6F60
|
||||
cmp r0, 0x1
|
||||
beq _081B6F86
|
||||
ldr r0, =0x0000016f
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
ldr r1, =gTasks
|
||||
lsls r0, r4, 2
|
||||
adds r0, r4
|
||||
@ -95191,7 +95191,7 @@ sub_81B6F98: @ 81B6F98
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
adds r5, r4, 0
|
||||
bl task_is_not_running_overworld_fanfare
|
||||
bl IsFanfareTaskInactive
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081B6FEA
|
||||
@ -95753,7 +95753,7 @@ _081B74B4:
|
||||
movs r0, 0x1
|
||||
strb r0, [r1]
|
||||
movs r0, 0
|
||||
bl pause_music_for_sound_maybe
|
||||
bl PlayFanfareByFanfareNum
|
||||
ldr r0, =gUnknown_0203CEC8
|
||||
ldrb r0, [r0, 0x9]
|
||||
adds r1, r5, 0
|
||||
@ -95868,7 +95868,7 @@ sub_81B75D4: @ 81B75D4
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
movs r0, 0
|
||||
bl ducking_tick
|
||||
bl WaitFanfare
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081B7620
|
||||
@ -96012,7 +96012,7 @@ sub_81B7704: @ 81B7704
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
movs r0, 0
|
||||
bl ducking_tick
|
||||
bl WaitFanfare
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081B77A6
|
||||
|
@ -5719,7 +5719,7 @@ sub_81BE03C: @ 81BE03C
|
||||
ldrb r1, [r1]
|
||||
lsls r1, 8
|
||||
orrs r0, r1
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
b _081BE08C
|
||||
.pool
|
||||
_081BE078:
|
||||
@ -5731,7 +5731,7 @@ _081BE078:
|
||||
ldrb r1, [r1]
|
||||
lsls r1, 8
|
||||
orrs r0, r1
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
_081BE08C:
|
||||
bl dp01_tbl3_exec_completed
|
||||
pop {r4,r5}
|
||||
@ -5759,7 +5759,7 @@ sub_81BE098: @ 81BE098
|
||||
movs r1, 0x19
|
||||
negs r1, r1
|
||||
movs r2, 0x5
|
||||
bl sub_80A32E4
|
||||
bl PlayCry3
|
||||
bl dp01_tbl3_exec_completed
|
||||
pop {r0}
|
||||
bx r0
|
||||
@ -6370,7 +6370,7 @@ sub_81BE61C: @ 81BE61C
|
||||
ldrb r0, [r0]
|
||||
strb r0, [r2]
|
||||
movs r0, 0x5
|
||||
bl sub_80A2F50
|
||||
bl FadeOutMapMusic
|
||||
movs r0, 0x3
|
||||
bl BeginFastPaletteFade
|
||||
bl dp01_tbl3_exec_completed
|
||||
@ -17496,14 +17496,14 @@ sub_81C4778: @ 81C4778
|
||||
ldrh r0, [r4, 0x2]
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl sub_80A32E4
|
||||
bl PlayCry3
|
||||
b _081C47AE
|
||||
.pool
|
||||
_081C47A4:
|
||||
ldrh r0, [r4, 0x2]
|
||||
movs r1, 0
|
||||
movs r2, 0xB
|
||||
bl sub_80A32E4
|
||||
bl PlayCry3
|
||||
_081C47AE:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
@ -51180,13 +51180,13 @@ _081D53F2:
|
||||
bl sub_8018884
|
||||
movs r0, 0xB9
|
||||
lsls r0, 1
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
movs r0, 0x13
|
||||
strb r0, [r4, 0x8]
|
||||
b _081D548A
|
||||
.pool
|
||||
_081D5418:
|
||||
bl task_is_not_running_overworld_fanfare
|
||||
bl IsFanfareTaskInactive
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081D548A
|
||||
@ -54730,7 +54730,7 @@ _081D71CC:
|
||||
adds r0, r6, r0
|
||||
ldr r1, =sub_81D736C
|
||||
str r1, [r0]
|
||||
bl sub_80A2F30
|
||||
bl StopMapMusic
|
||||
_081D71EE:
|
||||
movs r4, 0x1
|
||||
negs r4, r4
|
||||
@ -56367,7 +56367,7 @@ sub_81D7F4C: @ 81D7F4C
|
||||
adds r6, r4, r5
|
||||
movs r0, 0xE8
|
||||
lsls r0, 1
|
||||
bl current_map_music_set
|
||||
bl PlayNewMapMusic
|
||||
bl sub_81D7E10
|
||||
bl sub_81D7E9C
|
||||
movs r1, 0x94
|
||||
@ -58283,7 +58283,7 @@ sub_81D9034: @ 81D9034
|
||||
lsrs r5, r0, 24
|
||||
cmp r5, 0
|
||||
bne _081D90A0
|
||||
bl sub_80A2F30
|
||||
bl StopMapMusic
|
||||
movs r1, 0x2
|
||||
ldrsh r0, [r4, r1]
|
||||
cmp r0, 0
|
||||
@ -59133,7 +59133,7 @@ _081D9700:
|
||||
movs r0, 0xCB
|
||||
lsls r0, 1
|
||||
movs r1, 0
|
||||
bl cry_related
|
||||
bl PlayCry1
|
||||
ldr r0, =sub_81D98B4
|
||||
movs r1, 0
|
||||
bl CreateTask
|
||||
|
@ -2554,7 +2554,7 @@ sub_8141800: @ 8141800
|
||||
blt _08141864
|
||||
cmp r0, 0x2
|
||||
bgt _08141864
|
||||
bl task_is_not_running_overworld_fanfare
|
||||
bl IsFanfareTaskInactive
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08141888
|
||||
@ -2627,7 +2627,7 @@ sub_814189C: @ 814189C
|
||||
cmp r0, 0xC
|
||||
bne _081418EC
|
||||
ldr r0, =0x00000185
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
ldr r4, =gUnknown_0203AB8C
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0
|
||||
@ -2639,7 +2639,7 @@ sub_814189C: @ 814189C
|
||||
_081418EC:
|
||||
movs r0, 0xC3
|
||||
lsls r0, 1
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
ldr r4, =gUnknown_0203AB8C
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0
|
||||
@ -8622,7 +8622,7 @@ _08144AEC:
|
||||
lsls r0, 1
|
||||
movs r1, 0x3F
|
||||
negs r1, r1
|
||||
bl cry_related
|
||||
bl PlayCry1
|
||||
b _08144B70
|
||||
.align 2, 0
|
||||
_08144B10:
|
||||
@ -8664,14 +8664,14 @@ _08144B58:
|
||||
movs r0, 0x98
|
||||
lsls r0, 1
|
||||
movs r1, 0x3F
|
||||
bl cry_related
|
||||
bl PlayCry1
|
||||
b _08144B70
|
||||
_08144B64:
|
||||
movs r0, 0x99
|
||||
lsls r0, 1
|
||||
movs r1, 0x3F
|
||||
negs r1, r1
|
||||
bl cry_related
|
||||
bl PlayCry1
|
||||
_08144B70:
|
||||
movs r0, 0x2
|
||||
mov r10, r0
|
||||
@ -9451,7 +9451,7 @@ _081451BC:
|
||||
movs r0, 0x98
|
||||
lsls r0, 1
|
||||
movs r1, 0x3F
|
||||
bl cry_related
|
||||
bl PlayCry1
|
||||
b _081451EC
|
||||
.pool
|
||||
_081451E0:
|
||||
@ -9459,7 +9459,7 @@ _081451E0:
|
||||
lsls r0, 1
|
||||
movs r1, 0x3F
|
||||
negs r1, r1
|
||||
bl cry_related
|
||||
bl PlayCry1
|
||||
_081451EC:
|
||||
ldr r0, =gUnknown_0203AB88
|
||||
ldr r0, [r0]
|
||||
|
24
asm/scrcmd.s
24
asm/scrcmd.s
@ -2392,22 +2392,22 @@ s30_music_check: @ 809A4E0
|
||||
.pool
|
||||
thumb_func_end s30_music_check
|
||||
|
||||
thumb_func_start s31_fanfare_play
|
||||
s31_fanfare_play: @ 809A4F4
|
||||
thumb_func_start s31_PlayFanfare
|
||||
s31_PlayFanfare: @ 809A4F4
|
||||
push {lr}
|
||||
bl script_read_halfword
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
movs r0, 0
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end s31_fanfare_play
|
||||
thumb_func_end s31_PlayFanfare
|
||||
|
||||
thumb_func_start s32_fanfare_wait_asm
|
||||
s32_fanfare_wait_asm: @ 809A508
|
||||
push {lr}
|
||||
bl task_is_not_running_overworld_fanfare
|
||||
bl IsFanfareTaskInactive
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r1}
|
||||
@ -2444,7 +2444,7 @@ s33_play_music: @ 809A52C
|
||||
bl sav1_set_battle_music_maybe
|
||||
_0809A54C:
|
||||
adds r0, r5, 0
|
||||
bl current_map_music_set
|
||||
bl PlayNewMapMusic
|
||||
movs r0, 0
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
@ -2496,13 +2496,13 @@ s37_fadeout: @ 809A590
|
||||
beq _0809A5AA
|
||||
lsls r0, r1, 26
|
||||
lsrs r0, 24
|
||||
bl sub_80A31E8
|
||||
bl FadeOutBGMTemporarily
|
||||
b _0809A5B0
|
||||
_0809A5AA:
|
||||
movs r0, 0x4
|
||||
bl sub_80A31E8
|
||||
bl FadeOutBGMTemporarily
|
||||
_0809A5B0:
|
||||
ldr r1, =sub_80A3200
|
||||
ldr r1, =IsBGMPausedOrStopped
|
||||
adds r0, r4, 0
|
||||
bl script_setup_asm_script
|
||||
movs r0, 0x1
|
||||
@ -2523,11 +2523,11 @@ s38_fadein: @ 809A5C4
|
||||
beq _0809A5DC
|
||||
lsls r0, r2, 26
|
||||
lsrs r0, 24
|
||||
bl sub_80A3228
|
||||
bl FadeInBGM
|
||||
b _0809A5E2
|
||||
_0809A5DC:
|
||||
movs r0, 0x4
|
||||
bl sub_80A3228
|
||||
bl FadeInBGM
|
||||
_0809A5E2:
|
||||
movs r0, 0
|
||||
pop {r1}
|
||||
@ -4973,7 +4973,7 @@ sA1_play_cry: @ 809B8A4
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
adds r0, r4, 0
|
||||
bl sub_80A3404
|
||||
bl PlayCry5
|
||||
movs r0, 0
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
|
@ -502,7 +502,7 @@ sub_812A8C4: @ 812A8C4
|
||||
strh r1, [r0]
|
||||
adds r0, 0x2
|
||||
strh r1, [r0]
|
||||
bl current_map_music_get
|
||||
bl GetCurrentMapMusic
|
||||
ldr r1, [r5]
|
||||
adds r1, 0x60
|
||||
strh r0, [r1]
|
||||
@ -1251,7 +1251,7 @@ _0812AF12:
|
||||
cmp r0, 0
|
||||
beq _0812AF38
|
||||
ldr r0, =0x00000185
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
movs r0, 0x6
|
||||
bl sub_812DEE4
|
||||
b _0812AF62
|
||||
@ -1262,7 +1262,7 @@ _0812AF38:
|
||||
cmp r0, 0
|
||||
beq _0812AF54
|
||||
ldr r0, =0x00000185
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
movs r0, 0x5
|
||||
bl sub_812DEE4
|
||||
b _0812AF62
|
||||
@ -1270,7 +1270,7 @@ _0812AF38:
|
||||
_0812AF54:
|
||||
movs r0, 0xC3
|
||||
lsls r0, 1
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
movs r0, 0x2
|
||||
bl sub_812DEE4
|
||||
_0812AF62:
|
||||
@ -2764,7 +2764,7 @@ sub_812BB68: @ 812BB68
|
||||
negs r1, r1
|
||||
cmp r0, r1
|
||||
bne _0812BBBC
|
||||
bl task_is_not_running_overworld_fanfare
|
||||
bl IsFanfareTaskInactive
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0812BB8E
|
||||
@ -2796,7 +2796,7 @@ _0812BBA8:
|
||||
movs r0, 0x4
|
||||
strh r0, [r4, 0xA]
|
||||
_0812BBBC:
|
||||
bl task_is_not_running_overworld_fanfare
|
||||
bl IsFanfareTaskInactive
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0812BBF6
|
||||
@ -6206,10 +6206,10 @@ sub_812D51C: @ 812D51C
|
||||
bl sub_812E70C
|
||||
bl sub_812E7CC
|
||||
bl sub_812B700
|
||||
bl sub_80A2F30
|
||||
bl StopMapMusic
|
||||
movs r0, 0xC4
|
||||
lsls r0, 1
|
||||
bl current_map_music_set
|
||||
bl PlayNewMapMusic
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
@ -6589,7 +6589,7 @@ sub_812D870: @ 812D870
|
||||
asrs r0, 16
|
||||
cmp r0, 0x3B
|
||||
ble _0812D914
|
||||
bl sub_80A2F30
|
||||
bl StopMapMusic
|
||||
bl sub_812EA7C
|
||||
bl sub_812EBCC
|
||||
ldrh r0, [r4, 0x8]
|
||||
@ -6613,7 +6613,7 @@ sub_812D870: @ 812D870
|
||||
movs r1, 0x5
|
||||
bl StartSpriteAnimIfDifferent
|
||||
ldr r0, =0x00000187
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
b _0812D914
|
||||
.pool
|
||||
_0812D8D0:
|
||||
@ -6648,7 +6648,7 @@ _0812D8D0:
|
||||
_0812D90C:
|
||||
movs r0, 0xC3
|
||||
lsls r0, 1
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
_0812D914:
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
@ -6752,7 +6752,7 @@ sub_812D9A4: @ 812D9A4
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x60
|
||||
ldrh r0, [r0]
|
||||
bl current_map_music_set
|
||||
bl PlayNewMapMusic
|
||||
ldr r0, [r4]
|
||||
ldrb r0, [r0, 0xA]
|
||||
cmp r0, 0
|
||||
@ -6878,9 +6878,9 @@ sub_812DA90: @ 812DA90
|
||||
movs r0, 0x4
|
||||
strh r0, [r4, 0x10]
|
||||
strh r1, [r4, 0x12]
|
||||
bl sub_80A2F30
|
||||
bl StopMapMusic
|
||||
ldr r0, =0x00000187
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
movs r0, 0xB2
|
||||
bl audio_play
|
||||
pop {r4,r5}
|
||||
@ -6992,7 +6992,7 @@ sub_812DBBC: @ 812DBBC
|
||||
ldr r0, [r0]
|
||||
adds r0, 0x60
|
||||
ldrh r0, [r0]
|
||||
bl current_map_music_set
|
||||
bl PlayNewMapMusic
|
||||
bl sub_812E3E8
|
||||
bl sub_812E8F8
|
||||
bl sub_812E8C4
|
||||
|
807
asm/sound.s
807
asm/sound.s
@ -5,795 +5,10 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start InitMapMusic
|
||||
InitMapMusic: @ 80A2DD4
|
||||
push {lr}
|
||||
ldr r1, =gUnknown_03005DF8
|
||||
movs r0, 0
|
||||
strb r0, [r1]
|
||||
bl map_music_set_to_zero
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end InitMapMusic
|
||||
|
||||
thumb_func_start MapMusicMain
|
||||
MapMusicMain: @ 80A2DE8
|
||||
push {r4,r5,lr}
|
||||
ldr r0, =gUnknown_03000F4C
|
||||
ldrb r1, [r0]
|
||||
adds r2, r0, 0
|
||||
cmp r1, 0x7
|
||||
bhi _080A2ECA
|
||||
lsls r0, r1, 2
|
||||
ldr r1, =_080A2E08
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.pool
|
||||
.align 2, 0
|
||||
_080A2E08:
|
||||
.4byte _080A2ECA
|
||||
.4byte _080A2E28
|
||||
.4byte _080A2ECA
|
||||
.4byte _080A2ECA
|
||||
.4byte _080A2ECA
|
||||
.4byte _080A2E3C
|
||||
.4byte _080A2E5C
|
||||
.4byte _080A2E98
|
||||
_080A2E28:
|
||||
movs r0, 0x2
|
||||
strb r0, [r2]
|
||||
ldr r0, =gUnknown_03000F48
|
||||
ldrh r0, [r0]
|
||||
bl song_play_for_text
|
||||
b _080A2ECA
|
||||
.pool
|
||||
_080A2E3C:
|
||||
bl sub_80A3258
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080A2ECA
|
||||
ldr r0, =gUnknown_03000F4A
|
||||
movs r1, 0
|
||||
strh r1, [r0]
|
||||
ldr r0, =gUnknown_03000F4C
|
||||
strb r1, [r0]
|
||||
b _080A2ECA
|
||||
.pool
|
||||
_080A2E5C:
|
||||
bl sub_80A3258
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080A2ECA
|
||||
bl task_is_not_running_overworld_fanfare
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080A2ECA
|
||||
ldr r2, =gUnknown_03000F48
|
||||
ldr r1, =gUnknown_03000F4A
|
||||
ldrh r0, [r1]
|
||||
strh r0, [r2]
|
||||
movs r0, 0
|
||||
strh r0, [r1]
|
||||
ldr r1, =gUnknown_03000F4C
|
||||
movs r0, 0x2
|
||||
strb r0, [r1]
|
||||
ldrh r0, [r2]
|
||||
bl song_play_for_text
|
||||
b _080A2ECA
|
||||
.pool
|
||||
_080A2E98:
|
||||
bl sub_80A3258
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080A2ECA
|
||||
bl task_is_not_running_overworld_fanfare
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080A2ECA
|
||||
ldr r4, =gUnknown_03000F4A
|
||||
ldrh r0, [r4]
|
||||
ldr r5, =gUnknown_03000F4D
|
||||
ldrb r1, [r5]
|
||||
bl sub_80A3194
|
||||
ldr r1, =gUnknown_03000F48
|
||||
ldrh r0, [r4]
|
||||
strh r0, [r1]
|
||||
movs r2, 0
|
||||
strh r2, [r4]
|
||||
ldr r1, =gUnknown_03000F4C
|
||||
movs r0, 0x2
|
||||
strb r0, [r1]
|
||||
strb r2, [r5]
|
||||
_080A2ECA:
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end MapMusicMain
|
||||
|
||||
thumb_func_start map_music_set_to_zero
|
||||
map_music_set_to_zero: @ 80A2EE0
|
||||
ldr r0, =gUnknown_03000F48
|
||||
movs r1, 0
|
||||
strh r1, [r0]
|
||||
ldr r0, =gUnknown_03000F4A
|
||||
strh r1, [r0]
|
||||
ldr r0, =gUnknown_03000F4C
|
||||
strb r1, [r0]
|
||||
ldr r0, =gUnknown_03000F4D
|
||||
strb r1, [r0]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end map_music_set_to_zero
|
||||
|
||||
thumb_func_start current_map_music_get
|
||||
current_map_music_get: @ 80A2F04
|
||||
ldr r0, =gUnknown_03000F48
|
||||
ldrh r0, [r0]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end current_map_music_get
|
||||
|
||||
thumb_func_start current_map_music_set
|
||||
current_map_music_set: @ 80A2F10
|
||||
ldr r1, =gUnknown_03000F48
|
||||
strh r0, [r1]
|
||||
ldr r1, =gUnknown_03000F4A
|
||||
movs r0, 0
|
||||
strh r0, [r1]
|
||||
ldr r1, =gUnknown_03000F4C
|
||||
movs r0, 0x1
|
||||
strb r0, [r1]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end current_map_music_set
|
||||
|
||||
thumb_func_start sub_80A2F30
|
||||
sub_80A2F30: @ 80A2F30
|
||||
ldr r0, =gUnknown_03000F48
|
||||
movs r1, 0
|
||||
strh r1, [r0]
|
||||
ldr r0, =gUnknown_03000F4A
|
||||
strh r1, [r0]
|
||||
ldr r1, =gUnknown_03000F4C
|
||||
movs r0, 0x1
|
||||
strb r0, [r1]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end sub_80A2F30
|
||||
|
||||
thumb_func_start sub_80A2F50
|
||||
sub_80A2F50: @ 80A2F50
|
||||
push {r4,lr}
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
bl sub_80A303C
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080A2F66
|
||||
adds r0, r4, 0
|
||||
bl play_sound_effect
|
||||
_080A2F66:
|
||||
ldr r0, =gUnknown_03000F48
|
||||
movs r1, 0
|
||||
strh r1, [r0]
|
||||
ldr r0, =gUnknown_03000F4A
|
||||
strh r1, [r0]
|
||||
ldr r1, =gUnknown_03000F4C
|
||||
movs r0, 0x5
|
||||
strb r0, [r1]
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80A2F50
|
||||
|
||||
thumb_func_start sub_80A2F88
|
||||
sub_80A2F88: @ 80A2F88
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
adds r0, r1, 0
|
||||
lsls r4, 16
|
||||
lsrs r4, 16
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
bl sub_80A2F50
|
||||
ldr r1, =gUnknown_03000F48
|
||||
movs r0, 0
|
||||
strh r0, [r1]
|
||||
ldr r0, =gUnknown_03000F4A
|
||||
strh r4, [r0]
|
||||
ldr r1, =gUnknown_03000F4C
|
||||
movs r0, 0x6
|
||||
strb r0, [r1]
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80A2F88
|
||||
|
||||
thumb_func_start sub_80A2FBC
|
||||
sub_80A2FBC: @ 80A2FBC
|
||||
push {r4,r5,lr}
|
||||
adds r4, r0, 0
|
||||
adds r0, r1, 0
|
||||
adds r5, r2, 0
|
||||
lsls r4, 16
|
||||
lsrs r4, 16
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r5, 24
|
||||
lsrs r5, 24
|
||||
bl sub_80A2F50
|
||||
ldr r1, =gUnknown_03000F48
|
||||
movs r0, 0
|
||||
strh r0, [r1]
|
||||
ldr r0, =gUnknown_03000F4A
|
||||
strh r4, [r0]
|
||||
ldr r1, =gUnknown_03000F4C
|
||||
movs r0, 0x7
|
||||
strb r0, [r1]
|
||||
ldr r0, =gUnknown_03000F4D
|
||||
strb r5, [r0]
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80A2FBC
|
||||
|
||||
thumb_func_start sub_80A3000
|
||||
sub_80A3000: @ 80A3000
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
lsls r4, 16
|
||||
lsrs r4, 16
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
adds r0, r4, 0
|
||||
bl sub_80A3194
|
||||
ldr r0, =gUnknown_03000F48
|
||||
strh r4, [r0]
|
||||
ldr r0, =gUnknown_03000F4A
|
||||
movs r2, 0
|
||||
strh r2, [r0]
|
||||
ldr r1, =gUnknown_03000F4C
|
||||
movs r0, 0x2
|
||||
strb r0, [r1]
|
||||
ldr r0, =gUnknown_03000F4D
|
||||
strb r2, [r0]
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80A3000
|
||||
|
||||
thumb_func_start sub_80A303C
|
||||
sub_80A303C: @ 80A303C
|
||||
push {lr}
|
||||
ldr r0, =gUnknown_03000F4C
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x6
|
||||
beq _080A3058
|
||||
cmp r0, 0x5
|
||||
beq _080A3058
|
||||
cmp r0, 0x7
|
||||
beq _080A3058
|
||||
movs r0, 0x1
|
||||
b _080A305A
|
||||
.pool
|
||||
_080A3058:
|
||||
movs r0, 0
|
||||
_080A305A:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80A303C
|
||||
|
||||
thumb_func_start pause_music_for_sound_maybe
|
||||
@ void pause_music_for_sound_maybe(u8 a1)
|
||||
pause_music_for_sound_maybe: @ 80A3060
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
ldr r0, =gMPlay_BGM
|
||||
bl m4aMPlayStop
|
||||
ldr r0, =gUnknown_085248BC
|
||||
lsls r4, 2
|
||||
adds r4, r0
|
||||
ldrh r0, [r4]
|
||||
ldr r2, =gUnknown_03000F4E
|
||||
ldrh r1, [r4, 0x2]
|
||||
strh r1, [r2]
|
||||
bl m4aSongNumStart
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end pause_music_for_sound_maybe
|
||||
|
||||
thumb_func_start ducking_tick
|
||||
ducking_tick: @ 80A3094
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
lsrs r1, r0, 24
|
||||
ldr r2, =gUnknown_03000F4E
|
||||
ldrh r0, [r2]
|
||||
cmp r0, 0
|
||||
beq _080A30B0
|
||||
subs r0, 0x1
|
||||
strh r0, [r2]
|
||||
movs r0, 0
|
||||
b _080A30C8
|
||||
.pool
|
||||
_080A30B0:
|
||||
cmp r1, 0
|
||||
bne _080A30C0
|
||||
ldr r0, =gMPlay_BGM
|
||||
bl m4aMPlayContinue
|
||||
b _080A30C6
|
||||
.pool
|
||||
_080A30C0:
|
||||
movs r0, 0
|
||||
bl m4aSongNumStart
|
||||
_080A30C6:
|
||||
movs r0, 0x1
|
||||
_080A30C8:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end ducking_tick
|
||||
|
||||
thumb_func_start sub_80A30CC
|
||||
sub_80A30CC: @ 80A30CC
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
ldr r1, =gUnknown_085248BC
|
||||
lsrs r0, 22
|
||||
adds r0, r1
|
||||
ldrh r0, [r0]
|
||||
bl m4aSongNumStop
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80A30CC
|
||||
|
||||
thumb_func_start fanfare_play
|
||||
@ void fanfare_play(u16 a1)
|
||||
fanfare_play: @ 80A30E4
|
||||
push {lr}
|
||||
lsls r0, 16
|
||||
lsrs r3, r0, 16
|
||||
movs r1, 0
|
||||
ldr r2, =gUnknown_085248BC
|
||||
_080A30EE:
|
||||
ldrh r0, [r2]
|
||||
cmp r0, r3
|
||||
bne _080A3108
|
||||
lsls r0, r1, 24
|
||||
lsrs r0, 24
|
||||
bl pause_music_for_sound_maybe
|
||||
bl task_add_50_overworld_fanfare_if_not_running
|
||||
b _080A311A
|
||||
.pool
|
||||
_080A3108:
|
||||
adds r2, 0x4
|
||||
adds r1, 0x1
|
||||
cmp r1, 0x11
|
||||
bls _080A30EE
|
||||
movs r0, 0
|
||||
bl pause_music_for_sound_maybe
|
||||
bl task_add_50_overworld_fanfare_if_not_running
|
||||
_080A311A:
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end fanfare_play
|
||||
|
||||
thumb_func_start task_is_not_running_overworld_fanfare
|
||||
task_is_not_running_overworld_fanfare: @ 80A3120
|
||||
push {lr}
|
||||
ldr r0, =task50_overworld_fanfare
|
||||
bl FuncIsActiveTask
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
beq _080A3138
|
||||
movs r0, 0x1
|
||||
b _080A313A
|
||||
.pool
|
||||
_080A3138:
|
||||
movs r0, 0
|
||||
_080A313A:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end task_is_not_running_overworld_fanfare
|
||||
|
||||
thumb_func_start task50_overworld_fanfare
|
||||
task50_overworld_fanfare: @ 80A3140
|
||||
push {r4,lr}
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
ldr r1, =gUnknown_03000F4E
|
||||
ldrh r0, [r1]
|
||||
cmp r0, 0
|
||||
beq _080A3158
|
||||
subs r0, 0x1
|
||||
strh r0, [r1]
|
||||
b _080A3164
|
||||
.pool
|
||||
_080A3158:
|
||||
ldr r0, =gMPlay_BGM
|
||||
bl m4aMPlayContinue
|
||||
adds r0, r4, 0
|
||||
bl DestroyTask
|
||||
_080A3164:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end task50_overworld_fanfare
|
||||
|
||||
thumb_func_start task_add_50_overworld_fanfare_if_not_running
|
||||
@ void task_add_50_overworld_fanfare_if_not_running()
|
||||
task_add_50_overworld_fanfare_if_not_running: @ 80A3170
|
||||
push {r4,lr}
|
||||
ldr r4, =task50_overworld_fanfare
|
||||
adds r0, r4, 0
|
||||
bl FuncIsActiveTask
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
beq _080A318A
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x50
|
||||
bl CreateTask
|
||||
_080A318A:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end task_add_50_overworld_fanfare_if_not_running
|
||||
|
||||
thumb_func_start sub_80A3194
|
||||
sub_80A3194: @ 80A3194
|
||||
push {r4-r7,lr}
|
||||
lsls r0, 16
|
||||
lsrs r5, r0, 16
|
||||
lsls r1, 24
|
||||
lsrs r7, r1, 24
|
||||
ldr r0, =gUnknown_03005DF8
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _080A31A8
|
||||
movs r5, 0
|
||||
_080A31A8:
|
||||
ldr r6, =0x0000ffff
|
||||
cmp r5, r6
|
||||
bne _080A31B0
|
||||
movs r5, 0
|
||||
_080A31B0:
|
||||
adds r0, r5, 0
|
||||
bl m4aSongNumStart
|
||||
ldr r4, =gMPlay_BGM
|
||||
adds r0, r4, 0
|
||||
bl m4aMPlayImmInit
|
||||
adds r0, r4, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
bl m4aMPlayVolumeControl
|
||||
adds r0, r5, 0
|
||||
bl m4aSongNumStop
|
||||
adds r0, r4, 0
|
||||
adds r1, r7, 0
|
||||
bl m4aMPlayFadeIn
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80A3194
|
||||
|
||||
thumb_func_start sub_80A31E8
|
||||
sub_80A31E8: @ 80A31E8
|
||||
push {lr}
|
||||
adds r1, r0, 0
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
ldr r0, =gMPlay_BGM
|
||||
bl m4aMPlayFadeOutTemporarily
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80A31E8
|
||||
|
||||
thumb_func_start sub_80A3200
|
||||
sub_80A3200: @ 80A3200
|
||||
push {lr}
|
||||
ldr r0, =gMPlay_BGM
|
||||
ldr r1, [r0, 0x4]
|
||||
cmp r1, 0
|
||||
blt _080A3220
|
||||
ldr r0, =0x0000ffff
|
||||
ands r1, r0
|
||||
cmp r1, 0
|
||||
beq _080A3220
|
||||
movs r0, 0
|
||||
b _080A3222
|
||||
.pool
|
||||
_080A3220:
|
||||
movs r0, 0x1
|
||||
_080A3222:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80A3200
|
||||
|
||||
thumb_func_start sub_80A3228
|
||||
sub_80A3228: @ 80A3228
|
||||
push {lr}
|
||||
adds r1, r0, 0
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
ldr r0, =gMPlay_BGM
|
||||
bl m4aMPlayFadeIn
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80A3228
|
||||
|
||||
thumb_func_start play_sound_effect
|
||||
@ void play_sound_effect(u8 a1)
|
||||
play_sound_effect: @ 80A3240
|
||||
push {lr}
|
||||
adds r1, r0, 0
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
ldr r0, =gMPlay_BGM
|
||||
bl m4aMPlayFadeOut
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end play_sound_effect
|
||||
|
||||
thumb_func_start sub_80A3258
|
||||
sub_80A3258: @ 80A3258
|
||||
push {lr}
|
||||
ldr r0, =gMPlay_BGM
|
||||
ldrh r0, [r0, 0x4]
|
||||
cmp r0, 0
|
||||
beq _080A326C
|
||||
movs r0, 0
|
||||
b _080A326E
|
||||
.pool
|
||||
_080A326C:
|
||||
movs r0, 0x1
|
||||
_080A326E:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80A3258
|
||||
|
||||
thumb_func_start cry_related
|
||||
cry_related: @ 80A3274
|
||||
push {r4,r5,lr}
|
||||
sub sp, 0x4
|
||||
adds r5, r0, 0
|
||||
adds r4, r1, 0
|
||||
lsls r5, 16
|
||||
lsrs r5, 16
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
ldr r0, =gMPlay_BGM
|
||||
ldr r1, =0x0000ffff
|
||||
movs r2, 0x55
|
||||
bl m4aMPlayVolumeControl
|
||||
lsls r4, 24
|
||||
asrs r4, 24
|
||||
movs r0, 0
|
||||
str r0, [sp]
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x78
|
||||
movs r3, 0xA
|
||||
bl sub_80A344C
|
||||
ldr r1, =gUnknown_020383EC
|
||||
movs r0, 0x2
|
||||
strb r0, [r1]
|
||||
bl sub_80A3754
|
||||
add sp, 0x4
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end cry_related
|
||||
|
||||
thumb_func_start sub_80A32C0
|
||||
sub_80A32C0: @ 80A32C0
|
||||
push {r4,lr}
|
||||
sub sp, 0x4
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
lsls r3, 24
|
||||
lsrs r3, 24
|
||||
lsls r1, 24
|
||||
asrs r1, 24
|
||||
lsls r2, 24
|
||||
asrs r2, 24
|
||||
movs r4, 0
|
||||
str r4, [sp]
|
||||
bl sub_80A344C
|
||||
add sp, 0x4
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_80A32C0
|
||||
|
||||
thumb_func_start sub_80A32E4
|
||||
sub_80A32E4: @ 80A32E4
|
||||
push {r4-r6,lr}
|
||||
sub sp, 0x4
|
||||
lsls r0, 16
|
||||
lsrs r6, r0, 16
|
||||
lsls r1, 24
|
||||
lsrs r5, r1, 24
|
||||
lsls r2, 24
|
||||
lsrs r4, r2, 24
|
||||
cmp r4, 0x1
|
||||
bne _080A330A
|
||||
lsls r1, r5, 24
|
||||
asrs r1, 24
|
||||
str r4, [sp]
|
||||
adds r0, r6, 0
|
||||
movs r2, 0x78
|
||||
movs r3, 0xA
|
||||
bl sub_80A344C
|
||||
b _080A332E
|
||||
_080A330A:
|
||||
ldr r0, =gMPlay_BGM
|
||||
ldr r1, =0x0000ffff
|
||||
movs r2, 0x55
|
||||
bl m4aMPlayVolumeControl
|
||||
lsls r1, r5, 24
|
||||
asrs r1, 24
|
||||
str r4, [sp]
|
||||
adds r0, r6, 0
|
||||
movs r2, 0x78
|
||||
movs r3, 0xA
|
||||
bl sub_80A344C
|
||||
ldr r1, =gUnknown_020383EC
|
||||
movs r0, 0x2
|
||||
strb r0, [r1]
|
||||
bl sub_80A3754
|
||||
_080A332E:
|
||||
add sp, 0x4
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80A32E4
|
||||
|
||||
thumb_func_start sub_80A3344
|
||||
sub_80A3344: @ 80A3344
|
||||
push {r4-r6,lr}
|
||||
sub sp, 0x4
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
adds r6, r0, 0
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
adds r5, r1, 0
|
||||
lsls r2, 24
|
||||
lsrs r2, 24
|
||||
adds r4, r2, 0
|
||||
cmp r2, 0x1
|
||||
bne _080A336E
|
||||
lsls r1, 24
|
||||
asrs r1, 24
|
||||
str r2, [sp]
|
||||
movs r2, 0x78
|
||||
movs r3, 0xA
|
||||
bl sub_80A344C
|
||||
b _080A3394
|
||||
_080A336E:
|
||||
ldr r0, =gBattleTypeFlags
|
||||
ldr r0, [r0]
|
||||
movs r1, 0x40
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _080A3384
|
||||
ldr r0, =gMPlay_BGM
|
||||
ldr r1, =0x0000ffff
|
||||
movs r2, 0x55
|
||||
bl m4aMPlayVolumeControl
|
||||
_080A3384:
|
||||
lsls r1, r5, 24
|
||||
asrs r1, 24
|
||||
str r4, [sp]
|
||||
adds r0, r6, 0
|
||||
movs r2, 0x78
|
||||
movs r3, 0xA
|
||||
bl sub_80A344C
|
||||
_080A3394:
|
||||
add sp, 0x4
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80A3344
|
||||
|
||||
thumb_func_start play_cry_maybe
|
||||
play_cry_maybe: @ 80A33A8
|
||||
push {r4-r6,lr}
|
||||
sub sp, 0x4
|
||||
lsls r0, 16
|
||||
lsrs r6, r0, 16
|
||||
lsls r1, 24
|
||||
lsrs r5, r1, 24
|
||||
lsls r2, 24
|
||||
lsrs r4, r2, 24
|
||||
cmp r4, 0x1
|
||||
bne _080A33CE
|
||||
lsls r1, r5, 24
|
||||
asrs r1, 24
|
||||
str r4, [sp]
|
||||
adds r0, r6, 0
|
||||
movs r2, 0x78
|
||||
movs r3, 0xA
|
||||
bl sub_80A344C
|
||||
b _080A33EE
|
||||
_080A33CE:
|
||||
ldr r0, =gMPlay_BGM
|
||||
ldr r1, =0x0000ffff
|
||||
movs r2, 0x55
|
||||
bl m4aMPlayVolumeControl
|
||||
lsls r1, r5, 24
|
||||
asrs r1, 24
|
||||
str r4, [sp]
|
||||
adds r0, r6, 0
|
||||
movs r2, 0x78
|
||||
movs r3, 0xA
|
||||
bl sub_80A344C
|
||||
ldr r1, =gUnknown_020383EC
|
||||
movs r0, 0x2
|
||||
strb r0, [r1]
|
||||
_080A33EE:
|
||||
add sp, 0x4
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end play_cry_maybe
|
||||
|
||||
thumb_func_start sub_80A3404
|
||||
sub_80A3404: @ 80A3404
|
||||
push {r4,r5,lr}
|
||||
sub sp, 0x4
|
||||
adds r5, r0, 0
|
||||
adds r4, r1, 0
|
||||
lsls r5, 16
|
||||
lsrs r5, 16
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
ldr r0, =gMPlay_BGM
|
||||
ldr r1, =0x0000ffff
|
||||
movs r2, 0x55
|
||||
bl m4aMPlayVolumeControl
|
||||
str r4, [sp]
|
||||
adds r0, r5, 0
|
||||
movs r1, 0
|
||||
movs r2, 0x78
|
||||
movs r3, 0xA
|
||||
bl sub_80A344C
|
||||
ldr r1, =gUnknown_020383EC
|
||||
movs r0, 0x2
|
||||
strb r0, [r1]
|
||||
bl sub_80A3754
|
||||
add sp, 0x4
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80A3404
|
||||
|
||||
thumb_func_start sub_80A344C
|
||||
sub_80A344C: @ 80A344C
|
||||
thumb_func_start PlayCryInternal
|
||||
PlayCryInternal: @ 80A344C
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
@ -1045,7 +260,7 @@ _080A365E:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80A344C
|
||||
thumb_func_end PlayCryInternal
|
||||
|
||||
thumb_func_start sub_80A3678
|
||||
sub_80A3678: @ 80A3678
|
||||
@ -1132,7 +347,7 @@ sub_80A370C: @ 80A370C
|
||||
push {r4,lr}
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
ldr r1, =gUnknown_020383EC
|
||||
ldr r1, =gPokemonCryBGMDuckingCounter
|
||||
ldrb r0, [r1]
|
||||
cmp r0, 0
|
||||
beq _080A3724
|
||||
@ -1160,8 +375,8 @@ _080A3742:
|
||||
.pool
|
||||
thumb_func_end sub_80A370C
|
||||
|
||||
thumb_func_start sub_80A3754
|
||||
sub_80A3754: @ 80A3754
|
||||
thumb_func_start RestoreBGMVolumeAfterPokemonCry
|
||||
RestoreBGMVolumeAfterPokemonCry: @ 80A3754
|
||||
push {r4,lr}
|
||||
ldr r4, =sub_80A370C
|
||||
adds r0, r4, 0
|
||||
@ -1178,14 +393,14 @@ _080A376E:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80A3754
|
||||
thumb_func_end RestoreBGMVolumeAfterPokemonCry
|
||||
|
||||
thumb_func_start song_play_for_text
|
||||
song_play_for_text: @ 80A3778
|
||||
thumb_func_start PlayBGM
|
||||
PlayBGM: @ 80A3778
|
||||
push {lr}
|
||||
lsls r0, 16
|
||||
lsrs r1, r0, 16
|
||||
ldr r0, =gUnknown_03005DF8
|
||||
ldr r0, =gDisableMusic
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _080A3788
|
||||
@ -1201,7 +416,7 @@ _080A3790:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end song_play_for_text
|
||||
thumb_func_end PlayBGM
|
||||
|
||||
thumb_func_start audio_play
|
||||
audio_play: @ 80A37A4
|
||||
|
@ -503,7 +503,7 @@ sub_8134390: @ 8134390
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
movs r1, 0
|
||||
bl cry_related
|
||||
bl PlayCry1
|
||||
movs r0, 0
|
||||
movs r1, 0x11
|
||||
bl FillWindowPixelBuffer
|
||||
|
@ -1070,7 +1070,7 @@ task_title_screen_3: @ 80AAD64
|
||||
beq _080AADB0
|
||||
_080AAD84:
|
||||
movs r0, 0x4
|
||||
bl play_sound_effect
|
||||
bl FadeOutBGM
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
ldr r1, =0x0000ffff
|
||||
@ -1102,7 +1102,7 @@ _080AADC8:
|
||||
cmp r0, 0x1
|
||||
bne _080AADFC
|
||||
movs r0, 0x4
|
||||
bl play_sound_effect
|
||||
bl FadeOutBGM
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
str r4, [sp]
|
||||
@ -1122,7 +1122,7 @@ _080AADFC:
|
||||
cmp r0, 0x6
|
||||
bne _080AAE30
|
||||
movs r0, 0x4
|
||||
bl play_sound_effect
|
||||
bl FadeOutBGM
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
movs r1, 0
|
||||
|
30
asm/trade.s
30
asm/trade.s
@ -997,7 +997,7 @@ _08077A40:
|
||||
adds r0, 0x1
|
||||
strb r0, [r1]
|
||||
ldr r0, =0x000001b3
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
b _08077B46
|
||||
.pool
|
||||
_08077A80:
|
||||
@ -8952,12 +8952,12 @@ _0807C04C:
|
||||
ldrh r0, [r1]
|
||||
adds r0, 0x1
|
||||
strh r0, [r1]
|
||||
bl current_map_music_get
|
||||
bl GetCurrentMapMusic
|
||||
ldr r1, [r7]
|
||||
adds r1, 0xF4
|
||||
strh r0, [r1]
|
||||
ldr r0, =0x00000179
|
||||
bl current_map_music_set
|
||||
bl PlayNewMapMusic
|
||||
bl _0807CFB4
|
||||
.pool
|
||||
_0807C0C4:
|
||||
@ -9022,7 +9022,7 @@ _0807C120:
|
||||
beq _0807C14E
|
||||
adds r0, r1, 0
|
||||
movs r1, 0
|
||||
bl cry_related
|
||||
bl PlayCry1
|
||||
_0807C14E:
|
||||
ldr r3, [r4]
|
||||
adds r1, r3, 0
|
||||
@ -10528,7 +10528,7 @@ _0807CE54:
|
||||
cmp r0, 0xA
|
||||
bne _0807CE66
|
||||
ldr r0, =0x00000173
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
_0807CE66:
|
||||
ldr r1, [r7]
|
||||
ldr r0, [r1, 0x64]
|
||||
@ -10649,7 +10649,7 @@ _0807CF5C:
|
||||
ldr r0, [r7]
|
||||
adds r0, 0xF4
|
||||
ldrh r0, [r0]
|
||||
bl current_map_music_set
|
||||
bl PlayNewMapMusic
|
||||
ldr r0, [r7]
|
||||
cmp r0, 0
|
||||
beq _0807CFAA
|
||||
@ -11014,12 +11014,12 @@ _0807D428:
|
||||
ldrh r0, [r1]
|
||||
adds r0, 0x1
|
||||
strh r0, [r1]
|
||||
bl current_map_music_get
|
||||
bl GetCurrentMapMusic
|
||||
ldr r1, [r7]
|
||||
adds r1, 0xF4
|
||||
strh r0, [r1]
|
||||
ldr r0, =0x00000179
|
||||
bl current_map_music_set
|
||||
bl PlayNewMapMusic
|
||||
bl _0807E400
|
||||
.pool
|
||||
_0807D4A0:
|
||||
@ -11084,7 +11084,7 @@ _0807D4FC:
|
||||
beq _0807D52A
|
||||
adds r0, r1, 0
|
||||
movs r1, 0
|
||||
bl cry_related
|
||||
bl PlayCry1
|
||||
_0807D52A:
|
||||
ldr r3, [r4]
|
||||
adds r1, r3, 0
|
||||
@ -12633,7 +12633,7 @@ _0807E2A0:
|
||||
cmp r0, 0xA
|
||||
bne _0807E2B2
|
||||
ldr r0, =0x00000173
|
||||
bl fanfare_play
|
||||
bl PlayFanfare
|
||||
_0807E2B2:
|
||||
ldr r1, [r7]
|
||||
ldr r0, [r1, 0x64]
|
||||
@ -12754,7 +12754,7 @@ _0807E3A8:
|
||||
ldr r0, [r7]
|
||||
adds r0, 0xF4
|
||||
ldrh r0, [r0]
|
||||
bl current_map_music_set
|
||||
bl PlayNewMapMusic
|
||||
ldr r0, [r7]
|
||||
cmp r0, 0
|
||||
beq _0807E3F6
|
||||
@ -14031,7 +14031,7 @@ _0807EF7E:
|
||||
cmp r0, 0
|
||||
bne _0807F03A
|
||||
movs r0, 0x3
|
||||
bl play_sound_effect
|
||||
bl FadeOutBGM
|
||||
ldr r1, =gMain
|
||||
movs r0, 0x87
|
||||
lsls r0, 3
|
||||
@ -14039,7 +14039,7 @@ _0807EF7E:
|
||||
b _0807EFE4
|
||||
.pool
|
||||
_0807EFA4:
|
||||
bl sub_80A3258
|
||||
bl IsBGMStopped
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
@ -14835,7 +14835,7 @@ _0807F694:
|
||||
cmp r0, 0
|
||||
beq _0807F70C
|
||||
movs r0, 0x3
|
||||
bl play_sound_effect
|
||||
bl FadeOutBGM
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
movs r1, 0
|
||||
@ -14858,7 +14858,7 @@ _0807F6C4:
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _0807F70C
|
||||
bl sub_80A3258
|
||||
bl IsBGMStopped
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
|
@ -5777,7 +5777,7 @@ _080C591C:
|
||||
movs r0, 0xE7
|
||||
lsls r0, 1
|
||||
_080C5920:
|
||||
bl song_play_for_text
|
||||
bl PlayBGM
|
||||
_080C5924:
|
||||
ldr r0, =sub_80C5868
|
||||
bl SetMainCallback2
|
||||
|
@ -1404,7 +1404,7 @@ gDummyPaletteStructTemplate:: @ 852488C
|
||||
gUnknown_0852489C:: @ 852489C
|
||||
.incbin "baserom.gba", 0x52489c, 0x20
|
||||
|
||||
gUnknown_085248BC:: @ 85248BC
|
||||
sFanfares:: @ 85248BC
|
||||
.incbin "baserom.gba", 0x5248bc, 0x288
|
||||
|
||||
gUnknown_08524B44:: @ 8524B44
|
||||
|
@ -49,7 +49,7 @@ gEventScriptCommandFunctionTable:: @ 81DB67C
|
||||
.4byte s2E_unknown
|
||||
.4byte s2F_music_play
|
||||
.4byte s30_music_check
|
||||
.4byte s31_fanfare_play
|
||||
.4byte s31_PlayFanfare
|
||||
.4byte s32_fanfare_wait
|
||||
.4byte s33_play_music
|
||||
.4byte s34_unknown
|
||||
|
@ -7,7 +7,7 @@
|
||||
#define BATTLE_TYPE_TRAINER 0x0008
|
||||
#define BATTLE_TYPE_FIRST_BATTLE 0x0010
|
||||
#define BATTLE_TYPE_20 0x0020
|
||||
#define BATTLE_TYPE_40 0x0040
|
||||
#define BATTLE_TYPE_MULTI 0x0040
|
||||
#define BATTLE_TYPE_SAFARI 0x0080
|
||||
#define BATTLE_TYPE_BATTLE_TOWER 0x0100
|
||||
#define BATTLE_TYPE_WALLY_TUTORIAL 0x0200
|
||||
|
@ -1,3 +1,6 @@
|
||||
#ifndef GUARD_GBA_M4A_INTERNAL_H
|
||||
#define GUARD_GBA_M4A_INTERNAL_H
|
||||
|
||||
#include "gba/gba.h"
|
||||
|
||||
// ASCII encoding of 'Smsh' in reverse
|
||||
@ -460,3 +463,5 @@ void ply_xleng(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
|
||||
void ply_xswee(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
|
||||
void ply_xcmd_0C(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
|
||||
void ply_xcmd_0D(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
|
||||
|
||||
#endif // GUARD_GBA_M4A_INTERNAL_H
|
||||
|
374
include/songs.h
Normal file
374
include/songs.h
Normal file
@ -0,0 +1,374 @@
|
||||
#ifndef GUARD_SONGS_H
|
||||
#define GUARD_SONGS_H
|
||||
|
||||
enum
|
||||
{
|
||||
/*0x00*/ SE_STOP,
|
||||
/*0x01*/ SE_KAIFUKU,
|
||||
/*0x02*/ SE_PC_LOGON,
|
||||
/*0x03*/ SE_PC_OFF,
|
||||
/*0x04*/ SE_PC_ON,
|
||||
/*0x05*/ SE_SELECT,
|
||||
/*0x06*/ SE_WIN_OPEN,
|
||||
/*0x07*/ SE_WALL_HIT,
|
||||
/*0x08*/ SE_DOOR,
|
||||
/*0x09*/ SE_KAIDAN,
|
||||
/*0x0A*/ SE_DANSA,
|
||||
/*0x0B*/ SE_JITENSYA,
|
||||
/*0x0C*/ SE_KOUKA_L,
|
||||
/*0x0D*/ SE_KOUKA_M,
|
||||
/*0x0E*/ SE_KOUKA_H,
|
||||
/*0x0F*/ SE_BOWA2,
|
||||
/*0x10*/ SE_POKE_DEAD,
|
||||
/*0x11*/ SE_NIGERU,
|
||||
/*0x12*/ SE_JIDO_DOA,
|
||||
/*0x13*/ SE_NAMINORI,
|
||||
/*0x14*/ SE_BAN,
|
||||
/*0x15*/ SE_PIN,
|
||||
/*0x16*/ SE_BOO,
|
||||
/*0x17*/ SE_BOWA,
|
||||
/*0x18*/ SE_JYUNI,
|
||||
/*0x19*/ SE_A,
|
||||
/*0x1A*/ SE_I,
|
||||
/*0x1B*/ SE_U,
|
||||
/*0x1C*/ SE_E,
|
||||
/*0x1D*/ SE_O,
|
||||
/*0x1E*/ SE_N,
|
||||
/*0x1F*/ SE_SEIKAI,
|
||||
/*0x20*/ SE_HAZURE,
|
||||
/*0x21*/ SE_EXP,
|
||||
/*0x22*/ SE_JITE_PYOKO,
|
||||
/*0x23*/ SE_MU_PACHI,
|
||||
/*0x24*/ SE_TK_KASYA,
|
||||
/*0x25*/ SE_FU_ZAKU,
|
||||
/*0x26*/ SE_FU_ZAKU2,
|
||||
/*0x27*/ SE_FU_ZUZUZU,
|
||||
/*0x28*/ SE_RU_GASHIN,
|
||||
/*0x29*/ SE_RU_GASYAN,
|
||||
/*0x2A*/ SE_RU_BARI,
|
||||
/*0x2B*/ SE_RU_HYUU,
|
||||
/*0x2C*/ SE_KI_GASYAN,
|
||||
/*0x2D*/ SE_TK_WARPIN,
|
||||
/*0x2E*/ SE_TK_WARPOUT,
|
||||
/*0x2F*/ SE_TU_SAA,
|
||||
/*0x30*/ SE_HI_TURUN,
|
||||
/*0x31*/ SE_TRACK_MOVE,
|
||||
/*0x32*/ SE_TRACK_STOP,
|
||||
/*0x33*/ SE_TRACK_HAIK,
|
||||
/*0x34*/ SE_TRACK_DOOR,
|
||||
/*0x35*/ SE_MOTER,
|
||||
/*0x36*/ SE_CARD,
|
||||
/*0x37*/ SE_SAVE,
|
||||
/*0x38*/ SE_KON,
|
||||
/*0x39*/ SE_KON2,
|
||||
/*0x3A*/ SE_KON3,
|
||||
/*0x3B*/ SE_KON4,
|
||||
/*0x3C*/ SE_SUIKOMU,
|
||||
/*0x3D*/ SE_NAGERU,
|
||||
SE_TOY_C,
|
||||
SE_TOY_D,
|
||||
SE_TOY_E,
|
||||
SE_TOY_F,
|
||||
SE_TOY_G,
|
||||
SE_TOY_A,
|
||||
SE_TOY_B,
|
||||
SE_TOY_C1,
|
||||
SE_MIZU,
|
||||
SE_HASHI,
|
||||
SE_DAUGI,
|
||||
SE_PINPON,
|
||||
SE_FUUSEN1,
|
||||
SE_FUUSEN2,
|
||||
SE_FUUSEN3,
|
||||
SE_TOY_KABE,
|
||||
SE_TOY_DANGO,
|
||||
SE_DOKU,
|
||||
SE_ESUKA,
|
||||
SE_T_AME,
|
||||
SE_T_AME_E,
|
||||
SE_T_OOAME,
|
||||
SE_T_OOAME_E,
|
||||
SE_T_KOAME,
|
||||
SE_T_KOAME_E,
|
||||
SE_T_KAMI,
|
||||
SE_T_KAMI2,
|
||||
SE_ELEBETA,
|
||||
/*0x5A*/ SE_HINSI,
|
||||
/*0x5B*/ SE_EXPMAX,
|
||||
/*0x5C*/ SE_TAMAKORO,
|
||||
/*0x5D*/ SE_TAMAKORO_E,
|
||||
/*0x5E*/ SE_BASABASA,
|
||||
/*0x5F*/ SE_REGI,
|
||||
SE_C_GAJI,
|
||||
SE_C_MAKU_U,
|
||||
SE_C_MAKU_D,
|
||||
SE_C_PASI,
|
||||
SE_C_SYU,
|
||||
SE_C_PIKON,
|
||||
/*0x66*/ SE_REAPOKE,
|
||||
/*0x67*/ SE_OP_BASYU,
|
||||
/*0x68*/ SE_BT_START,
|
||||
SE_DENDOU,
|
||||
SE_JIHANKI,
|
||||
SE_TAMA,
|
||||
SE_Z_SCROLL,
|
||||
/*0x6D*/ SE_Z_PAGE,
|
||||
/*0x6E*/ SE_PN_ON,
|
||||
/*0x6F*/ SE_PN_OFF,
|
||||
/*0x70*/ SE_Z_SEARCH,
|
||||
/*0x71*/ SE_TAMAGO,
|
||||
/*0x72*/ SE_TB_START,
|
||||
/*0x73*/ SE_TB_KON,
|
||||
/*0x74*/ SE_TB_KARA,
|
||||
/*0x75*/ SE_BIDORO,
|
||||
/*0x76*/ SE_W085,
|
||||
/*0x77*/ SE_W085B,
|
||||
/*0x78*/ SE_W231,
|
||||
/*0x79*/ SE_W171,
|
||||
/*0x7A*/ SE_W233,
|
||||
/*0x7B*/ SE_W233B,
|
||||
/*0x7C*/ SE_W145,
|
||||
/*0x7D*/ SE_W145B,
|
||||
/*0x7E*/ SE_W145C,
|
||||
/*0x7F*/ SE_W240,
|
||||
/*0x80*/ SE_W015,
|
||||
/*0x81*/ SE_W081,
|
||||
/*0x82*/ SE_W081B,
|
||||
/*0x83*/ SE_W088,
|
||||
/*0x84*/ SE_W016,
|
||||
/*0x85*/ SE_W016B,
|
||||
/*0x86*/ SE_W003,
|
||||
/*0x87*/ SE_W104,
|
||||
/*0x88*/ SE_W013,
|
||||
/*0x89*/ SE_W196,
|
||||
/*0x8A*/ SE_W086,
|
||||
/*0x8B*/ SE_W004,
|
||||
/*0x8C*/ SE_W025,
|
||||
/*0x8D*/ SE_W025B,
|
||||
SE_W152,
|
||||
SE_W026,
|
||||
SE_W172,
|
||||
SE_W172B,
|
||||
SE_W053,
|
||||
SE_W007,
|
||||
SE_W092,
|
||||
SE_W221,
|
||||
SE_W221B,
|
||||
SE_W052,
|
||||
SE_W036,
|
||||
SE_W059,
|
||||
SE_W059B,
|
||||
SE_W010,
|
||||
SE_W011,
|
||||
SE_W017,
|
||||
SE_W019,
|
||||
SE_W028,
|
||||
SE_W013B,
|
||||
SE_W044,
|
||||
SE_W029,
|
||||
SE_W057,
|
||||
SE_W056,
|
||||
SE_W250,
|
||||
SE_W030,
|
||||
SE_W039,
|
||||
SE_W054,
|
||||
SE_W077,
|
||||
SE_W020,
|
||||
SE_W082,
|
||||
SE_W047,
|
||||
SE_W195,
|
||||
SE_W006,
|
||||
SE_W091,
|
||||
SE_W146,
|
||||
SE_W120,
|
||||
SE_W153,
|
||||
SE_W071B,
|
||||
SE_W071,
|
||||
SE_W103,
|
||||
/*0xB6*/ SE_W062,
|
||||
/*0xB7*/ SE_W062B,
|
||||
/*0xB8*/ SE_W048,
|
||||
/*0xB9*/ SE_W187,
|
||||
/*0xBA*/ SE_W118,
|
||||
/*0xBB*/ SE_W155,
|
||||
/*0xBC*/ SE_W122,
|
||||
/*0xBD*/ SE_W060,
|
||||
/*0xBE*/ SE_W185,
|
||||
/*0xBF*/ SE_W014,
|
||||
/*0xC0*/ SE_W043,
|
||||
/*0xC1*/ SE_W207,
|
||||
/*0xC2*/ SE_W207B,
|
||||
/*0xC3*/ SE_W215,
|
||||
/*0xC4*/ SE_W109,
|
||||
/*0xC5*/ SE_W173,
|
||||
/*0xC6*/ SE_W280,
|
||||
/*0xC7*/ SE_W202,
|
||||
/*0xC8*/ SE_W060B,
|
||||
/*0xC9*/ SE_W076,
|
||||
/*0xCA*/ SE_W080,
|
||||
/*0xCB*/ SE_W100,
|
||||
/*0xCC*/ SE_W107,
|
||||
SE_W166,
|
||||
SE_W129,
|
||||
SE_W115,
|
||||
SE_W112,
|
||||
SE_W197,
|
||||
SE_W199,
|
||||
SE_W236,
|
||||
SE_W204,
|
||||
SE_W268,
|
||||
SE_W070,
|
||||
SE_W063,
|
||||
SE_W127,
|
||||
SE_W179,
|
||||
SE_W151,
|
||||
SE_W201,
|
||||
SE_W161,
|
||||
SE_W161B,
|
||||
SE_W227,
|
||||
SE_W227B,
|
||||
SE_W226,
|
||||
SE_W208,
|
||||
SE_W213,
|
||||
SE_W213B,
|
||||
SE_W234,
|
||||
SE_W260,
|
||||
SE_W328,
|
||||
SE_W320,
|
||||
SE_W255,
|
||||
SE_W291,
|
||||
SE_W089,
|
||||
SE_W239,
|
||||
SE_W230,
|
||||
SE_W281,
|
||||
SE_W327,
|
||||
SE_W287,
|
||||
SE_W257,
|
||||
SE_W253,
|
||||
SE_W258,
|
||||
SE_W322,
|
||||
SE_W298,
|
||||
SE_W287B,
|
||||
SE_W114,
|
||||
SE_W063B,
|
||||
BGM_STOP = 349,
|
||||
BGM_TETSUJI,
|
||||
BGM_FIELD13,
|
||||
BGM_KACHI22,
|
||||
BGM_KACHI2,
|
||||
BGM_KACHI3,
|
||||
BGM_KACHI5,
|
||||
BGM_PCC,
|
||||
BGM_NIBI,
|
||||
BGM_SUIKUN,
|
||||
BGM_DOORO1,
|
||||
BGM_DOORO_X1,
|
||||
BGM_DOORO_X3,
|
||||
BGM_MACHI_S2,
|
||||
BGM_MACHI_S4,
|
||||
BGM_GIM,
|
||||
BGM_NAMINORI,
|
||||
BGM_DAN01,
|
||||
/*0x16F*/ BGM_FANFA1,
|
||||
/*0x170*/ BGM_ME_ASA,
|
||||
/*0x171*/ BGM_ME_BACHI,
|
||||
/*0x172*/ BGM_FANFA4,
|
||||
/*0x173*/ BGM_FANFA5,
|
||||
/*0x174*/ BGM_ME_WAZA,
|
||||
/*0x175*/ BGM_BIJYUTU,
|
||||
/*0x176*/ BGM_DOORO_X4,
|
||||
/*0x177*/ BGM_FUNE_KAN,
|
||||
/*0x178*/ BGM_ME_SHINKA,
|
||||
/*0x179*/ BGM_SHINKA,
|
||||
/*0x17A*/ BGM_ME_WASURE,
|
||||
/*0x17B*/ BGM_SYOUJOEYE,
|
||||
/*0x17C*/ BGM_BOYEYE,
|
||||
/*0x17D*/ BGM_DAN02,
|
||||
/*0x17E*/ BGM_MACHI_S3,
|
||||
/*0x17F*/ BGM_ODAMAKI,
|
||||
/*0x180*/ BGM_B_TOWER,
|
||||
/*0x181*/ BGM_SWIMEYE,
|
||||
/*0x182*/ BGM_DAN03,
|
||||
/*0x183*/ BGM_ME_KINOMI,
|
||||
/*0x184*/ BGM_ME_TAMA,
|
||||
/*0x185*/ BGM_ME_B_BIG,
|
||||
/*0x186*/ BGM_ME_B_SMALL,
|
||||
/*0x187*/ BGM_ME_ZANNEN,
|
||||
/*0x188*/ BGM_BD_TIME,
|
||||
/*0x189*/ BGM_TEST1,
|
||||
/*0x18A*/ BGM_TEST2,
|
||||
/*0x18B*/ BGM_TEST3,
|
||||
/*0x18C*/ BGM_TEST4,
|
||||
/*0x18D*/ BGM_TEST,
|
||||
/*0x18E*/ BGM_GOMACHI0,
|
||||
/*0x18F*/ BGM_GOTOWN,
|
||||
/*0x190*/ BGM_POKECEN,
|
||||
/*0x191*/ BGM_NEXTROAD,
|
||||
/*0x192*/ BGM_GRANROAD,
|
||||
/*0x193*/ BGM_CYCLING,
|
||||
BGM_FRIENDLY,
|
||||
BGM_MISHIRO,
|
||||
BGM_TOZAN,
|
||||
BGM_GIRLEYE,
|
||||
BGM_MINAMO,
|
||||
BGM_ASHROAD,
|
||||
BGM_EVENT0,
|
||||
BGM_DEEPDEEP,
|
||||
BGM_KACHI1,
|
||||
BGM_TITLE3,
|
||||
BGM_DEMO1,
|
||||
BGM_GIRL_SUP,
|
||||
BGM_HAGESHII,
|
||||
BGM_KAKKOII,
|
||||
BGM_KAZANBAI,
|
||||
BGM_AQA_0,
|
||||
BGM_TSURETEK,
|
||||
BGM_BOY_SUP,
|
||||
BGM_RAINBOW,
|
||||
BGM_AYASII,
|
||||
BGM_KACHI4,
|
||||
BGM_ROPEWAY,
|
||||
BGM_CASINO,
|
||||
BGM_HIGHTOWN,
|
||||
BGM_SAFARI,
|
||||
BGM_C_ROAD,
|
||||
BGM_AJITO,
|
||||
BGM_M_BOAT,
|
||||
BGM_M_DUNGON,
|
||||
BGM_FINECITY,
|
||||
BGM_MACHUPI,
|
||||
BGM_P_SCHOOL,
|
||||
BGM_DENDOU,
|
||||
BGM_TONEKUSA,
|
||||
BGM_MABOROSI,
|
||||
BGM_CON_FAN,
|
||||
BGM_CONTEST0,
|
||||
BGM_MGM0,
|
||||
BGM_T_BATTLE,
|
||||
BGM_OOAME,
|
||||
BGM_HIDERI,
|
||||
BGM_RUNECITY,
|
||||
BGM_CON_K,
|
||||
BGM_EIKOU_R,
|
||||
BGM_KARAKURI,
|
||||
BGM_HUTAGO,
|
||||
BGM_SITENNOU,
|
||||
BGM_YAMA_EYE,
|
||||
BGM_CONLOBBY,
|
||||
BGM_INTER_V,
|
||||
BGM_DAIGO,
|
||||
BGM_THANKFOR,
|
||||
BGM_END,
|
||||
BGM_BATTLE27, // wild
|
||||
BGM_BATTLE31, // aqua/magma grunt
|
||||
BGM_BATTLE20, // trainer
|
||||
BGM_BATTLE32, // gym leader
|
||||
BGM_BATTLE33, // champion
|
||||
BGM_BATTLE36, // regi
|
||||
BGM_BATTLE34, // weather trio
|
||||
BGM_BATTLE35, // rival
|
||||
BGM_BATTLE38, // elite four
|
||||
BGM_BATTLE30, // aqua/magma leader
|
||||
};
|
||||
|
||||
#endif // GUARD_SONGS_H
|
46
include/sound.h
Normal file
46
include/sound.h
Normal file
@ -0,0 +1,46 @@
|
||||
#ifndef GUARD_SOUND_H
|
||||
#define GUARD_SOUND_H
|
||||
|
||||
void InitMapMusic(void);
|
||||
void MapMusicMain(void);
|
||||
void ResetMapMusic(void);
|
||||
u16 GetCurrentMapMusic(void);
|
||||
void PlayNewMapMusic(u16 songNum);
|
||||
void StopMapMusic(void);
|
||||
void FadeOutMapMusic(u8 speed);
|
||||
void FadeOutAndPlayNewMapMusic(u16 songNum, u8 speed);
|
||||
void FadeOutAndFadeInNewMapMusic(u16 songNum, u8 fadeOutSpeed, u8 fadeInSpeed);
|
||||
void FadeInNewMapMusic(u16 songNum, u8 speed);
|
||||
bool8 IsNotWaitingForBGMStop(void);
|
||||
void PlayFanfareByFanfareNum(u8 fanfareNum);
|
||||
bool8 WaitFanfare(bool8 stop);
|
||||
void StopFanfareByFanfareNum(u8 fanfareNum);
|
||||
void PlayFanfare(u16 songNum);
|
||||
bool8 IsFanfareTaskInactive(void);
|
||||
void FadeInNewBGM(u16 songNum, u8 speed);
|
||||
void FadeOutBGMTemporarily(u8 speed);
|
||||
bool8 IsBGMPausedOrStopped(void);
|
||||
void FadeInBGM(u8 speed);
|
||||
void FadeOutBGM(u8 speed);
|
||||
bool8 IsBGMStopped(void);
|
||||
void PlayCry1(u16 species, s8 pan);
|
||||
void PlayCry2(u16 species, s8 pan, s8 volume, u8 priority);
|
||||
void PlayCry3(u16 species, s8 pan, u8 mode);
|
||||
void PlayCry4(u16 species, s8 pan, u8 mode);
|
||||
void PlayCry5(u16 species, u8 mode);
|
||||
bool8 IsCryFinished(void);
|
||||
void StopCryAndClearCrySongs(void);
|
||||
void StopCry(void);
|
||||
bool8 IsCryPlayingOrClearCrySongs(void);
|
||||
bool8 IsCryPlaying(void);
|
||||
void PlayBGM(u16 songNum);
|
||||
void PlaySE(u16 songNum);
|
||||
void PlaySE12WithPanning(u16 songNum, s8 pan);
|
||||
void PlaySE1WithPanning(u16 songNum, s8 pan);
|
||||
void PlaySE2WithPanning(u16 songNum, s8 pan);
|
||||
void SE12PanpotControl(s8 pan);
|
||||
bool8 IsSEPlaying(void);
|
||||
bool8 IsBGMPlaying(void);
|
||||
bool8 IsSpecialSEPlaying(void);
|
||||
|
||||
#endif // GUARD_SOUND_H
|
@ -104,6 +104,7 @@ SECTIONS {
|
||||
asm/start_menu.o(.text);
|
||||
asm/tileset.o(.text);
|
||||
src/palette.o(.text);
|
||||
src/sound.o(.text);
|
||||
asm/sound.o(.text);
|
||||
asm/battle_anim.o(.text);
|
||||
asm/rom_80A5C6C.o(.text);
|
||||
|
358
src/sound.c
Normal file
358
src/sound.c
Normal file
@ -0,0 +1,358 @@
|
||||
#include "global.h"
|
||||
#include "gba/m4a_internal.h"
|
||||
#include "sound.h"
|
||||
#include "battle.h"
|
||||
#include "m4a.h"
|
||||
#include "main.h"
|
||||
#include "pokemon.h"
|
||||
#include "songs.h"
|
||||
#include "task.h"
|
||||
|
||||
struct Fanfare
|
||||
{
|
||||
u16 songNum;
|
||||
u16 duration;
|
||||
};
|
||||
|
||||
extern u32 gBattleTypeFlags;
|
||||
|
||||
extern struct MusicPlayerInfo *gMPlay_PokemonCry;
|
||||
extern u8 gPokemonCryBGMDuckingCounter;
|
||||
|
||||
extern u16 sCurrentMapMusic;
|
||||
extern u16 sNextMapMusic;
|
||||
extern u8 sMapMusicState;
|
||||
extern u8 sMapMusicFadeInSpeed;
|
||||
extern u16 sFanfareCounter;
|
||||
|
||||
extern bool8 gDisableMusic;
|
||||
|
||||
extern struct MusicPlayerInfo gMPlay_BGM;
|
||||
extern struct MusicPlayerInfo gMPlay_SE1;
|
||||
extern struct MusicPlayerInfo gMPlay_SE2;
|
||||
extern struct MusicPlayerInfo gMPlay_SE3;
|
||||
|
||||
extern struct ToneData voicegroup_8452590[];
|
||||
extern struct ToneData voicegroup_8452B90[];
|
||||
extern struct ToneData voicegroup_8453190[];
|
||||
extern struct ToneData voicegroup_8453790[];
|
||||
|
||||
extern struct ToneData voicegroup_84537C0[];
|
||||
extern struct ToneData voicegroup_8453DC0[];
|
||||
extern struct ToneData voicegroup_84543C0[];
|
||||
extern struct ToneData voicegroup_84549C0[];
|
||||
|
||||
extern const struct Fanfare sFanfares[];
|
||||
|
||||
static void Task_Fanfare(u8 taskId);
|
||||
static void CreateFanfareTask(void);
|
||||
void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode);
|
||||
static void Task_DuckBGMForPokemonCry(u8 taskId);
|
||||
void RestoreBGMVolumeAfterPokemonCry(void);
|
||||
|
||||
#define CRY_VOLUME 120 // was 125 in R/S
|
||||
|
||||
void InitMapMusic(void)
|
||||
{
|
||||
gDisableMusic = FALSE;
|
||||
ResetMapMusic();
|
||||
}
|
||||
|
||||
void MapMusicMain(void)
|
||||
{
|
||||
switch (sMapMusicState)
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
sMapMusicState = 2;
|
||||
PlayBGM(sCurrentMapMusic);
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
break;
|
||||
case 5:
|
||||
if (IsBGMStopped())
|
||||
{
|
||||
sNextMapMusic = 0;
|
||||
sMapMusicState = 0;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (IsBGMStopped() && IsFanfareTaskInactive())
|
||||
{
|
||||
sCurrentMapMusic = sNextMapMusic;
|
||||
sNextMapMusic = 0;
|
||||
sMapMusicState = 2;
|
||||
PlayBGM(sCurrentMapMusic);
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (IsBGMStopped() && IsFanfareTaskInactive())
|
||||
{
|
||||
FadeInNewBGM(sNextMapMusic, sMapMusicFadeInSpeed);
|
||||
sCurrentMapMusic = sNextMapMusic;
|
||||
sNextMapMusic = 0;
|
||||
sMapMusicState = 2;
|
||||
sMapMusicFadeInSpeed = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void ResetMapMusic(void)
|
||||
{
|
||||
sCurrentMapMusic = 0;
|
||||
sNextMapMusic = 0;
|
||||
sMapMusicState = 0;
|
||||
sMapMusicFadeInSpeed = 0;
|
||||
}
|
||||
|
||||
u16 GetCurrentMapMusic(void)
|
||||
{
|
||||
return sCurrentMapMusic;
|
||||
}
|
||||
|
||||
void PlayNewMapMusic(u16 songNum)
|
||||
{
|
||||
sCurrentMapMusic = songNum;
|
||||
sNextMapMusic = 0;
|
||||
sMapMusicState = 1;
|
||||
}
|
||||
|
||||
void StopMapMusic(void)
|
||||
{
|
||||
sCurrentMapMusic = 0;
|
||||
sNextMapMusic = 0;
|
||||
sMapMusicState = 1;
|
||||
}
|
||||
|
||||
void FadeOutMapMusic(u8 speed)
|
||||
{
|
||||
if (IsNotWaitingForBGMStop())
|
||||
FadeOutBGM(speed);
|
||||
sCurrentMapMusic = 0;
|
||||
sNextMapMusic = 0;
|
||||
sMapMusicState = 5;
|
||||
}
|
||||
|
||||
void FadeOutAndPlayNewMapMusic(u16 songNum, u8 speed)
|
||||
{
|
||||
FadeOutMapMusic(speed);
|
||||
sCurrentMapMusic = 0;
|
||||
sNextMapMusic = songNum;
|
||||
sMapMusicState = 6;
|
||||
}
|
||||
|
||||
void FadeOutAndFadeInNewMapMusic(u16 songNum, u8 fadeOutSpeed, u8 fadeInSpeed)
|
||||
{
|
||||
FadeOutMapMusic(fadeOutSpeed);
|
||||
sCurrentMapMusic = 0;
|
||||
sNextMapMusic = songNum;
|
||||
sMapMusicState = 7;
|
||||
sMapMusicFadeInSpeed = fadeInSpeed;
|
||||
}
|
||||
|
||||
void FadeInNewMapMusic(u16 songNum, u8 speed)
|
||||
{
|
||||
FadeInNewBGM(songNum, speed);
|
||||
sCurrentMapMusic = songNum;
|
||||
sNextMapMusic = 0;
|
||||
sMapMusicState = 2;
|
||||
sMapMusicFadeInSpeed = 0;
|
||||
}
|
||||
|
||||
bool8 IsNotWaitingForBGMStop(void)
|
||||
{
|
||||
if (sMapMusicState == 6)
|
||||
return FALSE;
|
||||
if (sMapMusicState == 5)
|
||||
return FALSE;
|
||||
if (sMapMusicState == 7)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void PlayFanfareByFanfareNum(u8 fanfareNum)
|
||||
{
|
||||
u16 songNum;
|
||||
m4aMPlayStop(&gMPlay_BGM);
|
||||
songNum = sFanfares[fanfareNum].songNum;
|
||||
sFanfareCounter = sFanfares[fanfareNum].duration;
|
||||
m4aSongNumStart(songNum);
|
||||
}
|
||||
|
||||
bool8 WaitFanfare(bool8 stop)
|
||||
{
|
||||
if (sFanfareCounter)
|
||||
{
|
||||
sFanfareCounter--;
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!stop)
|
||||
m4aMPlayContinue(&gMPlay_BGM);
|
||||
else
|
||||
m4aSongNumStart(SE_STOP);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
void StopFanfareByFanfareNum(u8 fanfareNum)
|
||||
{
|
||||
m4aSongNumStop(sFanfares[fanfareNum].songNum);
|
||||
}
|
||||
|
||||
void PlayFanfare(u16 songNum)
|
||||
{
|
||||
s32 i;
|
||||
for (i = 0; (u32)i < 18; i++)
|
||||
{
|
||||
if (sFanfares[i].songNum == songNum)
|
||||
{
|
||||
PlayFanfareByFanfareNum(i);
|
||||
CreateFanfareTask();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
PlayFanfareByFanfareNum(0);
|
||||
CreateFanfareTask();
|
||||
}
|
||||
|
||||
bool8 IsFanfareTaskInactive(void)
|
||||
{
|
||||
if (FuncIsActiveTask(Task_Fanfare) == TRUE)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void Task_Fanfare(u8 taskId)
|
||||
{
|
||||
if (sFanfareCounter)
|
||||
{
|
||||
sFanfareCounter--;
|
||||
}
|
||||
else
|
||||
{
|
||||
m4aMPlayContinue(&gMPlay_BGM);
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
}
|
||||
|
||||
static void CreateFanfareTask(void)
|
||||
{
|
||||
if (FuncIsActiveTask(Task_Fanfare) != TRUE)
|
||||
CreateTask(Task_Fanfare, 80);
|
||||
}
|
||||
|
||||
void FadeInNewBGM(u16 songNum, u8 speed)
|
||||
{
|
||||
if (gDisableMusic)
|
||||
songNum = 0;
|
||||
if (songNum == 0xFFFF)
|
||||
songNum = 0;
|
||||
m4aSongNumStart(songNum);
|
||||
m4aMPlayImmInit(&gMPlay_BGM);
|
||||
m4aMPlayVolumeControl(&gMPlay_BGM, 0xFFFF, 0);
|
||||
m4aSongNumStop(songNum);
|
||||
m4aMPlayFadeIn(&gMPlay_BGM, speed);
|
||||
}
|
||||
|
||||
void FadeOutBGMTemporarily(u8 speed)
|
||||
{
|
||||
m4aMPlayFadeOutTemporarily(&gMPlay_BGM, speed);
|
||||
}
|
||||
|
||||
bool8 IsBGMPausedOrStopped(void)
|
||||
{
|
||||
if (gMPlay_BGM.status & MUSICPLAYER_STATUS_PAUSE)
|
||||
return TRUE;
|
||||
if (!(gMPlay_BGM.status & MUSICPLAYER_STATUS_TRACK))
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void FadeInBGM(u8 speed)
|
||||
{
|
||||
m4aMPlayFadeIn(&gMPlay_BGM, speed);
|
||||
}
|
||||
|
||||
void FadeOutBGM(u8 speed)
|
||||
{
|
||||
m4aMPlayFadeOut(&gMPlay_BGM, speed);
|
||||
}
|
||||
|
||||
bool8 IsBGMStopped(void)
|
||||
{
|
||||
if (!(gMPlay_BGM.status & MUSICPLAYER_STATUS_TRACK))
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void PlayCry1(u16 species, s8 pan)
|
||||
{
|
||||
m4aMPlayVolumeControl(&gMPlay_BGM, 0xFFFF, 85);
|
||||
PlayCryInternal(species, pan, CRY_VOLUME, 10, 0);
|
||||
gPokemonCryBGMDuckingCounter = 2;
|
||||
RestoreBGMVolumeAfterPokemonCry();
|
||||
}
|
||||
|
||||
void PlayCry2(u16 species, s8 pan, s8 volume, u8 priority)
|
||||
{
|
||||
PlayCryInternal(species, pan, volume, priority, 0);
|
||||
}
|
||||
|
||||
void PlayCry3(u16 species, s8 pan, u8 mode)
|
||||
{
|
||||
if (mode == 1)
|
||||
{
|
||||
PlayCryInternal(species, pan, CRY_VOLUME, 10, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
m4aMPlayVolumeControl(&gMPlay_BGM, 0xFFFF, 85);
|
||||
PlayCryInternal(species, pan, CRY_VOLUME, 10, mode);
|
||||
gPokemonCryBGMDuckingCounter = 2;
|
||||
RestoreBGMVolumeAfterPokemonCry();
|
||||
}
|
||||
}
|
||||
|
||||
void PlayCry4(u16 species, s8 pan, u8 mode)
|
||||
{
|
||||
if (mode == 1)
|
||||
{
|
||||
PlayCryInternal(species, pan, CRY_VOLUME, 10, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI))
|
||||
m4aMPlayVolumeControl(&gMPlay_BGM, 0xFFFF, 85);
|
||||
PlayCryInternal(species, pan, CRY_VOLUME, 10, mode);
|
||||
}
|
||||
}
|
||||
|
||||
void PlayCry6(u16 species, s8 pan, u8 mode) // not present in R/S
|
||||
{
|
||||
if (mode == 1)
|
||||
{
|
||||
PlayCryInternal(species, pan, CRY_VOLUME, 10, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
m4aMPlayVolumeControl(&gMPlay_BGM, 0xFFFF, 85);
|
||||
PlayCryInternal(species, pan, CRY_VOLUME, 10, mode);
|
||||
gPokemonCryBGMDuckingCounter = 2;
|
||||
}
|
||||
}
|
||||
|
||||
void PlayCry5(u16 species, u8 mode)
|
||||
{
|
||||
m4aMPlayVolumeControl(&gMPlay_BGM, 0xFFFF, 85);
|
||||
PlayCryInternal(species, 0, CRY_VOLUME, 10, mode);
|
||||
gPokemonCryBGMDuckingCounter = 2;
|
||||
RestoreBGMVolumeAfterPokemonCry();
|
||||
}
|
@ -2381,7 +2381,7 @@ _08005A5C:\n\
|
||||
add r1, #0x1\n\
|
||||
str r1, [r6]\n\
|
||||
add r0, r3, #0\n\
|
||||
bl song_play_for_text\n\
|
||||
bl PlayBGM\n\
|
||||
b _08005A0A\n\
|
||||
_08005A76:\n\
|
||||
ldr r0, [r6]\n\
|
||||
|
10
sym_bss.txt
10
sym_bss.txt
@ -221,19 +221,19 @@ gUnknown_03000F40: @ 3000F40
|
||||
gUnknown_03000F44: @ 3000F44
|
||||
.space 0x4
|
||||
|
||||
gUnknown_03000F48: @ 3000F48
|
||||
sCurrentMapMusic: @ 3000F48
|
||||
.space 0x2
|
||||
|
||||
gUnknown_03000F4A: @ 3000F4A
|
||||
sNextMapMusic: @ 3000F4A
|
||||
.space 0x2
|
||||
|
||||
gUnknown_03000F4C: @ 3000F4C
|
||||
sMapMusicState: @ 3000F4C
|
||||
.space 0x1
|
||||
|
||||
gUnknown_03000F4D: @ 3000F4D
|
||||
sMapMusicFadeInSpeed: @ 3000F4D
|
||||
.space 0x1
|
||||
|
||||
gUnknown_03000F4E: @ 3000F4E
|
||||
sFanfareCounter: @ 3000F4E
|
||||
.space 0x2
|
||||
|
||||
gUnknown_03000F50: @ 3000F50
|
||||
|
@ -300,7 +300,7 @@ gUnknown_03005DF0: @ 3005DF0
|
||||
gUnknown_03005DF4: @ 3005DF4
|
||||
.space 0x4
|
||||
|
||||
gUnknown_03005DF8: @ 3005DF8
|
||||
gDisableMusic: @ 3005DF8
|
||||
.space 0x8
|
||||
|
||||
.include "task.o"
|
||||
|
@ -890,7 +890,7 @@ gUnknown_02037624: @ 2037624
|
||||
gUnknown_020383E8: @ 20383E8
|
||||
.space 0x4
|
||||
|
||||
gUnknown_020383EC: @ 20383EC
|
||||
gPokemonCryBGMDuckingCounter: @ 20383EC
|
||||
.space 0x4
|
||||
|
||||
gUnknown_020383F0: @ 20383F0
|
||||
|
Loading…
Reference in New Issue
Block a user