diff options
author | YamaArashi <shadow962@live.com> | 2016-09-30 19:59:11 -0700 |
---|---|---|
committer | YamaArashi <shadow962@live.com> | 2016-09-30 19:59:11 -0700 |
commit | 956a257b4ae75c0e7637cc076d0ce79396d40978 (patch) | |
tree | 9eeca089915e75089838d182c3389feac25cbbc8 | |
parent | 44b20be15696bc15f31cc24b5cf6b32cecdea55d (diff) |
small sound.c cleanup
-rw-r--r-- | asm/rom_803D1FC.s | 6 | ||||
-rw-r--r-- | src/sound.c | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/asm/rom_803D1FC.s b/asm/rom_803D1FC.s index 5ea380b1c..b5535b384 100644 --- a/asm/rom_803D1FC.s +++ b/asm/rom_803D1FC.s @@ -2990,8 +2990,8 @@ _0803F8FE: bx r1 thumb_func_end HoennToNationalOrder - thumb_func_start speciesid_conv -speciesid_conv: @ 803F904 + thumb_func_start SpeciesToCryId +SpeciesToCryId: @ 803F904 push {lr} lsls r0, 16 lsrs r0, 16 @@ -3017,7 +3017,7 @@ _0803F930: _0803F932: pop {r1} bx r1 - thumb_func_end speciesid_conv + thumb_func_end SpeciesToCryId thumb_func_start unref_sub_803F938 unref_sub_803F938: @ 803F938 diff --git a/src/sound.c b/src/sound.c index 2a861839c..49ab78cc7 100644 --- a/src/sound.c +++ b/src/sound.c @@ -10,7 +10,7 @@ struct Fanfare u16 duration; }; -extern u32 speciesid_conv(u32); +extern u32 SpeciesToCryId(u32); extern u16 gUnknown_020239F8; extern struct MusicPlayerInfo *gMPlay_PokemonCry; @@ -420,7 +420,7 @@ static void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode asm(""); asm(""); - cryId = speciesid_conv(cryId); + cryId = SpeciesToCryId(cryId); index = 0x7F; asm("" ::: "r0"); index &= cryId; @@ -485,8 +485,10 @@ static void Task_DuckBGMForPokemonCry(u8 taskId) if (gPokemonCryBGMDuckingCounter) { gPokemonCryBGMDuckingCounter--; + return; } - else if (!IsPokemonCryPlaying(gMPlay_PokemonCry)) + + if (!IsPokemonCryPlaying(gMPlay_PokemonCry)) { m4aMPlayVolumeControl(&gMPlay_BGM, 0xFFFF, 256); DestroyTask(taskId); |