Synced sound.c

This commit is contained in:
Eduardo Quezada
2022-07-29 16:17:40 -04:00
parent 78e3780fa4
commit dfe6c6885c
64 changed files with 643 additions and 599 deletions
+5 -4
View File
@@ -22,6 +22,7 @@
#include "constants/items.h"
#include "constants/moves.h"
#include "constants/songs.h"
#include "constants/sound.h"
static void PlayerHandleGetMonData(void);
static void PlayerHandleSetMonData(void);
@@ -898,7 +899,7 @@ static void Intro_WaitForShinyAnimAndHealthbox(void)
if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
m4aMPlayContinue(&gMPlayInfo_BGM);
else
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 256);
m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 256);
HandleLowHpMusicChange(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], gActiveBattler);
if (IsDoubleBattle())
HandleLowHpMusicChange(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler ^ BIT_FLANK]], gActiveBattler ^ BIT_FLANK);
@@ -955,7 +956,7 @@ static void SwitchIn_HandleSoundAndEnd(void)
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].specialAnimActive
&& !IsCryPlayingOrClearCrySongs())
{
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100);
m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100);
HandleLowHpMusicChange(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], gActiveBattler);
PlayerBufferExecCompleted();
}
@@ -984,7 +985,7 @@ void Task_PlayerController_RestoreBgmAfterCry(u8 taskId)
{
if (!IsCryPlayingOrClearCrySongs())
{
m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100);
m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100);
DestroyTask(taskId);
}
}
@@ -2687,7 +2688,7 @@ static void PlayerHandlePlayFanfare(void)
static void PlayerHandleFaintingCry(void)
{
PlayCry3(GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES), -25, 5);
PlayCry_ByMode(GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES), -25, CRY_MODE_FAINT);
PlayerBufferExecCompleted();
}