summaryrefslogtreecommitdiff
path: root/src/bard_music.c
diff options
context:
space:
mode:
authorluckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com>2021-06-01 20:40:27 -0400
committerluckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com>2021-06-01 20:40:27 -0400
commitf0b41debc35c2084aad6d369eab11a2d2df4ab44 (patch)
tree9b720ab0b617fa207051efc7ff9373669f7dc47b /src/bard_music.c
parenta839463c849679974c986bf9c9c260eff0e94cb7 (diff)
parent9f5bf65fb336cf7a3ba68d32267bf993f0f6a494 (diff)
Merge branch 'master' of https://github.com/pret/pokeemerald into remove-temps
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: