From 2ec8f27811888cfb9968112c2dc130da2734400a Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 16 Aug 2022 13:00:28 -0400 Subject: [PATCH] Add missing usage of SOUND_PAN_* --- src/battle_anim_effects_1.c | 10 +++++----- src/battle_anim_effects_2.c | 6 +++--- src/battle_anim_effects_3.c | 20 ++++++++++---------- src/battle_anim_electric.c | 2 +- src/battle_anim_psychic.c | 2 +- src/battle_anim_rock.c | 4 ++-- src/battle_anim_utility_funcs.c | 4 ++-- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/battle_anim_effects_1.c b/src/battle_anim_effects_1.c index 0387d3929..0ae945c0c 100644 --- a/src/battle_anim_effects_1.c +++ b/src/battle_anim_effects_1.c @@ -3184,14 +3184,14 @@ static void AnimItemSteal_Step3(struct Sprite *sprite) sprite->y2 = Sin(sprite->data[0] + 0x80, 30 - sprite->data[1] * 8); if (sprite->y2 == 0) - PlaySE12WithPanning(SE_M_BUBBLE2, BattleAnimAdjustPanning(63)); + PlaySE12WithPanning(SE_M_BUBBLE2, BattleAnimAdjustPanning(SOUND_PAN_TARGET)); if (moveAlongLinearPath(sprite)) { sprite->y2 = 0; sprite->data[0] = 0; sprite->callback = AnimItemSteal_Step2; - PlaySE12WithPanning(SE_M_BUBBLE2, BattleAnimAdjustPanning(-64)); + PlaySE12WithPanning(SE_M_BUBBLE2, BattleAnimAdjustPanning(SOUND_PAN_ATTACKER)); } } @@ -4264,7 +4264,7 @@ static void AnimLockOnTarget_Step1(struct Sprite *sprite) sprite->callback = StartAnimLinearTranslation; StoreSpriteCallbackInData6(sprite, AnimLockOnTarget_Step2); sprite->data[5] += 0x100; - PlaySE12WithPanning(SE_M_LOCK_ON, BattleAnimAdjustPanning(63)); + PlaySE12WithPanning(SE_M_LOCK_ON, BattleAnimAdjustPanning(SOUND_PAN_TARGET)); break; } @@ -4350,7 +4350,7 @@ static void AnimLockOnTarget_Step4(struct Sprite *sprite) sprite->data[2]++; pal = sprite->oam.paletteNum; LoadPalette(&gPlttBufferUnfaded[0x108 + pal * 16], pal * 16 | 0x101, 4); - PlaySE12WithPanning(SE_M_LEER, BattleAnimAdjustPanning(63)); + PlaySE12WithPanning(SE_M_LEER, BattleAnimAdjustPanning(SOUND_PAN_TARGET)); } else if (sprite->data[1] == 0) { @@ -4812,7 +4812,7 @@ static void AnimSharpenSphere(struct Sprite *sprite) sprite->data[2] = 0; sprite->data[3] = 0; sprite->data[4] = 0; - sprite->data[5] = BattleAnimAdjustPanning(-64); + sprite->data[5] = BattleAnimAdjustPanning(SOUND_PAN_ATTACKER); sprite->callback = AnimSharpenSphere_Step; } diff --git a/src/battle_anim_effects_2.c b/src/battle_anim_effects_2.c index 33065c0dd..82f3b77d5 100755 --- a/src/battle_anim_effects_2.c +++ b/src/battle_anim_effects_2.c @@ -1642,7 +1642,7 @@ static void AirCutterProjectileStep1(u8 taskId) gTasks[taskId].data[gTasks[taskId].data[1] + 13] = spriteId; gTasks[taskId].data[0] = gTasks[taskId].data[3]; gTasks[taskId].data[1]++; - PlaySE12WithPanning(SE_M_BLIZZARD2, BattleAnimAdjustPanning(-63)); + PlaySE12WithPanning(SE_M_BLIZZARD2, BattleAnimAdjustPanning(SOUND_PAN_ATTACKER + 1)); if (gTasks[taskId].data[1] > 2) gTasks[taskId].func = AirCutterProjectileStep2; } @@ -1839,7 +1839,7 @@ static void AnimBulletSeed_Step1(struct Sprite *sprite) int i; u16 rand; s16 *ptr; - PlaySE12WithPanning(SE_M_HORN_ATTACK, BattleAnimAdjustPanning(63)); + PlaySE12WithPanning(SE_M_HORN_ATTACK, BattleAnimAdjustPanning(SOUND_PAN_TARGET)); sprite->x += sprite->x2; sprite->y += sprite->y2; sprite->y2 = 0; @@ -2485,7 +2485,7 @@ static void AnimPencil(struct Sprite *sprite) sprite->data[3] = 16; sprite->data[4] = 0; sprite->data[5] = GetBattlerSpriteCoordAttr(gBattleAnimTarget, BATTLER_COORD_ATTR_HEIGHT) + 2; - sprite->data[6] = BattleAnimAdjustPanning(63); + sprite->data[6] = BattleAnimAdjustPanning(SOUND_PAN_TARGET); sprite->callback = AnimPencil_Step; } diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index 6fca60369..f613ff597 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -1646,7 +1646,7 @@ static void AnimClappingHand_Step(struct Sprite *sprite) sprite->data[2]++; if (sprite->data[3] == 0) { - PlaySE1WithPanning(SE_M_ENCORE, BattleAnimAdjustPanning(-64)); + PlaySE1WithPanning(SE_M_ENCORE, BattleAnimAdjustPanning(SOUND_PAN_ATTACKER)); } } } @@ -1930,7 +1930,7 @@ static void TormentAttacker_Step(u8 taskId) y = task->data[3] + task->data[5]; spriteId = CreateSprite(&gThoughtBubbleSpriteTemplate, x, y, 6 - task->data[1]); - PlaySE12WithPanning(SE_M_METRONOME, BattleAnimAdjustPanning(-64)); + PlaySE12WithPanning(SE_M_METRONOME, BattleAnimAdjustPanning(SOUND_PAN_ATTACKER)); if (spriteId != MAX_SPRITES) { @@ -2411,7 +2411,7 @@ void AnimTask_MorningSunLightBeam(u8 taskId) gTasks[taskId].data[11] = gBattle_BG1_Y; gTasks[taskId].data[0]++; - PlaySE12WithPanning(SE_M_MORNING_SUN, BattleAnimAdjustPanning(-64)); + PlaySE12WithPanning(SE_M_MORNING_SUN, BattleAnimAdjustPanning(SOUND_PAN_ATTACKER)); break; case 1: if (gTasks[taskId].data[4]++ > 0) @@ -2446,7 +2446,7 @@ void AnimTask_MorningSunLightBeam(u8 taskId) { gTasks[taskId].data[3] = 0; gTasks[taskId].data[0] = 1; - PlaySE12WithPanning(SE_M_MORNING_SUN, BattleAnimAdjustPanning(-64)); + PlaySE12WithPanning(SE_M_MORNING_SUN, BattleAnimAdjustPanning(SOUND_PAN_ATTACKER)); } break; case 4: @@ -4845,7 +4845,7 @@ static void AnimTask_MonToSubstituteDoll(u8 taskId) if (gSprites[spriteId].y2 == 0) { - PlaySE12WithPanning(SE_M_BUBBLE2, BattleAnimAdjustPanning(-64)); + PlaySE12WithPanning(SE_M_BUBBLE2, BattleAnimAdjustPanning(SOUND_PAN_ATTACKER)); gTasks[taskId].data[10] -= 0x800; gTasks[taskId].data[0]++; } @@ -4867,7 +4867,7 @@ static void AnimTask_MonToSubstituteDoll(u8 taskId) if (gSprites[spriteId].y2 == 0) { - PlaySE12WithPanning(SE_M_BUBBLE2, BattleAnimAdjustPanning(-64)); + PlaySE12WithPanning(SE_M_BUBBLE2, BattleAnimAdjustPanning(SOUND_PAN_ATTACKER)); DestroyAnimVisualTask(taskId); } break; @@ -4904,7 +4904,7 @@ static void AnimBlockX_Step(struct Sprite *sprite) sprite->y2 += 10; if (sprite->y2 >= 0) { - PlaySE12WithPanning(SE_M_SKETCH, BattleAnimAdjustPanning(63)); + PlaySE12WithPanning(SE_M_SKETCH, BattleAnimAdjustPanning(SOUND_PAN_TARGET)); sprite->y2 = 0; sprite->data[0]++; } @@ -4914,7 +4914,7 @@ static void AnimBlockX_Step(struct Sprite *sprite) sprite->y2 = -(gSineTable[sprite->data[1]] >> 3); if (sprite->data[1] > 0x7F) { - PlaySE12WithPanning(SE_M_SKETCH, BattleAnimAdjustPanning(63)); + PlaySE12WithPanning(SE_M_SKETCH, BattleAnimAdjustPanning(SOUND_PAN_TARGET)); sprite->data[1] = 0; sprite->y2 = 0; sprite->data[0]++; @@ -4933,7 +4933,7 @@ static void AnimBlockX_Step(struct Sprite *sprite) case 3: if (++sprite->data[1] > 8) { - PlaySE12WithPanning(SE_M_LEER, BattleAnimAdjustPanning(63)); + PlaySE12WithPanning(SE_M_LEER, BattleAnimAdjustPanning(SOUND_PAN_TARGET)); sprite->data[1] = 0; sprite->data[0]++; } @@ -5227,7 +5227,7 @@ static void AnimUnusedItemBagSteal(struct Sprite *sprite) case 0: if (gBattleAnimArgs[7] == -1) { - PlaySE12WithPanning(SE_M_VITAL_THROW, BattleAnimAdjustPanning(63)); + PlaySE12WithPanning(SE_M_VITAL_THROW, BattleAnimAdjustPanning(SOUND_PAN_TARGET)); sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y) + 16; sprite->data[0] = -32; sprite->data[7]++; diff --git a/src/battle_anim_electric.c b/src/battle_anim_electric.c index ce1c5b199..6a92fd607 100644 --- a/src/battle_anim_electric.c +++ b/src/battle_anim_electric.c @@ -1159,7 +1159,7 @@ void AnimTask_ShockWaveProgressingBolt(u8 taskId) task->data[4] = 7; task->data[5] = -1; task->data[11] = 12; - task->data[12] = BattleAnimAdjustPanning(task->data[11] - 76); + task->data[12] = BattleAnimAdjustPanning(SOUND_PAN_ATTACKER); task->data[13] = BattleAnimAdjustPanning(SOUND_PAN_TARGET); task->data[14] = task->data[12]; task->data[15] = (task->data[13] - task->data[12]) / 3; diff --git a/src/battle_anim_psychic.c b/src/battle_anim_psychic.c index aebf76cc0..c68ec5d8a 100644 --- a/src/battle_anim_psychic.c +++ b/src/battle_anim_psychic.c @@ -1137,7 +1137,7 @@ static void AnimPsychoBoost(struct Sprite *sprite) case 1: if (sprite->affineAnimEnded) { - PlaySE12WithPanning(SE_M_TELEPORT, BattleAnimAdjustPanning(-64)); + PlaySE12WithPanning(SE_M_TELEPORT, BattleAnimAdjustPanning(SOUND_PAN_ATTACKER)); ChangeSpriteAffineAnim(sprite, 1); sprite->data[0]++; } diff --git a/src/battle_anim_rock.c b/src/battle_anim_rock.c index e2ea43fb6..287a332b5 100644 --- a/src/battle_anim_rock.c +++ b/src/battle_anim_rock.c @@ -596,8 +596,8 @@ void AnimTask_Rollout(u8 taskId) task->data[6] = 0; task->data[7] = 0; - pan1 = BattleAnimAdjustPanning(-64); - pan2 = BattleAnimAdjustPanning(63); + pan1 = BattleAnimAdjustPanning(SOUND_PAN_ATTACKER); + pan2 = BattleAnimAdjustPanning(SOUND_PAN_TARGET); task->data[13] = pan1; task->data[14] = (pan2 - pan1) / task->data[8]; diff --git a/src/battle_anim_utility_funcs.c b/src/battle_anim_utility_funcs.c index 688a6e5ae..4071ce9b9 100644 --- a/src/battle_anim_utility_funcs.c +++ b/src/battle_anim_utility_funcs.c @@ -535,9 +535,9 @@ static void StatsChangeAnimation_Step2(u8 taskId) gTasks[taskId].func = StatsChangeAnimation_Step3; if (sAnimStatsChangeData->data[0] == 0) - PlaySE12WithPanning(SE_M_STAT_INCREASE, BattleAnimAdjustPanning2(-64)); + PlaySE12WithPanning(SE_M_STAT_INCREASE, BattleAnimAdjustPanning2(SOUND_PAN_ATTACKER)); else - PlaySE12WithPanning(SE_M_STAT_DECREASE, BattleAnimAdjustPanning2(-64)); + PlaySE12WithPanning(SE_M_STAT_DECREASE, BattleAnimAdjustPanning2(SOUND_PAN_ATTACKER)); } static void StatsChangeAnimation_Step3(u8 taskId)