summaryrefslogtreecommitdiff
path: root/src/bard_music.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bard_music.c')
-rw-r--r--src/bard_music.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/bard_music.c b/src/bard_music.c
index 6c2578071..114f1cf42 100644
--- a/src/bard_music.c
+++ b/src/bard_music.c
@@ -1,5 +1,3 @@
-
-// Includes
#include "global.h"
#include "bard_music.h"
#include "constants/easy_chat.h"
@@ -10,9 +8,9 @@
#include "data/bard_music/default_sound.h"
#include "data/bard_music/length_table.h"
-s16 CalcWordPitch(int arg0, int songPos)
+static s16 CalcWordPitch(int arg0, int songPos)
{
- return gBardSoundPitchTables[arg0][songPos];
+ return sBardSoundPitchTables[arg0][songPos];
}
const struct BardSound *GetWordSounds(u16 word)
@@ -21,16 +19,16 @@ const struct BardSound *GetWordSounds(u16 word)
u32 subword;
const struct BardSound (*ptr)[6];
- if (ECWord_CheckIfOutsideOfValidRange(word))
+ if (IsBardWordInvalid(word))
{
return gBardSound_InvalidWord;
}
- category = word >> 9;
- subword = word & 0x1ff;
+ category = EC_GROUP(word);
+ subword = EC_INDEX(word);
switch (category)
{
case EC_GROUP_POKEMON:
- case EC_GROUP_POKEMON_2:
+ case EC_GROUP_POKEMON_NATIONAL:
ptr = gBardSounds_Pokemon;
break;
case EC_GROUP_MOVE_1: