diff options
author | ultima-soul <akshayjhanji@hotmail.com> | 2019-07-31 00:01:20 -0700 |
---|---|---|
committer | ultima-soul <akshayjhanji@hotmail.com> | 2019-07-31 00:01:20 -0700 |
commit | dee6732764d7a6b41027bb2756557a8638e73c22 (patch) | |
tree | 32475f873d44af82e17a7fb545383f8b6e30c187 /src/bard_music.c | |
parent | 9ee6622f83e4177761f93546a43e305de24c4d4c (diff) |
Finish synchronizing bard_music data organization.
Diffstat (limited to 'src/bard_music.c')
-rw-r--r-- | src/bard_music.c | 98 |
1 files changed, 7 insertions, 91 deletions
diff --git a/src/bard_music.c b/src/bard_music.c index 820c282ce..80fde68be 100644 --- a/src/bard_music.c +++ b/src/bard_music.c @@ -3,92 +3,8 @@ #include "easy_chat.h" #include "data/bard_music/word_pitch.h" - -static const u32 sBardSoundLengthDeltas[] = { - 9, - 22, - 15, - 16, - 39, - 21, - 9, - 30, - 24, - 15, - 25, - 12, - 22, - 45, - 24, - 15, - 40, - 9, - 21, - 42, - 18, - 9, - 22, - 15, - 27, - 48, - 18, - 27, - 33, - 24, - 25, - 39, - 19, - 16, - 54, - 18, - 9, - 45, - 15, - 12, - 39, - 23, - 5, - 45, - 12, - 21, - 48, - 12, - 21, - 69, - 18, - 15 -}; - -#if ENGLISH -#include "data/bard_music_en.h" -#elif GERMAN -#include "data/bard_music_de.h" -#endif // ENGLISH/GERMAN - -static const struct BardSound (*const gBardMusicTable[])[6] = { - BardMusic_POKEMON, - BardMusic_TRAINER, - BardMusic_STATUS, - BardMusic_BATTLE, - BardMusic_GREETINGS, - BardMusic_PEOPLE, - BardMusic_VOICES, - BardMusic_SPEECH, - BardMusic_ENDINGS, - BardMusic_FEELINGS, - BardMusic_CONDITIONS, - BardMusic_ACTIONS, - BardMusic_LIFESTYLE, - BardMusic_HOBBIES, - BardMusic_TIME, - BardMusic_MISC, - BardMusic_ADJECTIVES, - BardMusic_EVENTS, - BardMusic_MOVE_1, - BardMusic_MOVE_2, - BardMusic_TRENDY_SAYING, - BardMusic_POKEMON_2 -}; +#include "data/bard_music/length_table.h" +#include "data/bard_music/bard_sounds.h" s16 CalcWordPitch(int arg0, int songPos) { @@ -98,21 +14,21 @@ s16 CalcWordPitch(int arg0, int songPos) #if ENGLISH const struct BardSound *GetWordSounds(u16 group, u16 word) { - const struct BardSound (*sounds)[6] = gBardMusicTable[group]; + const struct BardSound (*sounds)[6] = gBardSoundsTable[group]; return sounds[word]; } #elif GERMAN const struct BardSound *GetWordSounds(u16 group, u16 word) { - const struct BardSound (*sounds)[6] = gBardMusicTable[group]; + const struct BardSound (*sounds)[6] = gBardSoundsTable[group]; u32 index = de_sub_80EB748(group, word); return sounds[index]; } #endif -s32 GetWordPhonemes(struct BardSong *song, const struct BardSound *src, u16 arg2) +s32 GetWordPhonemes(struct BardSong *song, const struct BardSound *src, u16 word) { s32 i; s32 j; @@ -123,7 +39,7 @@ s32 GetWordPhonemes(struct BardSong *song, const struct BardSound *src, u16 arg2 song->phonemes[i].sound = src[i].var00; if (src[i].var00 != 0xFF) { - s32 length = src[i].var01 + sBardSoundLengthDeltas[src[i].var00]; + s32 length = src[i].var01 + gBardSoundLengthTable[src[i].var00]; song->phonemes[i].length = length; song->phonemes[i].volume = src[i].volume; @@ -132,7 +48,7 @@ s32 GetWordPhonemes(struct BardSong *song, const struct BardSound *src, u16 arg2 } for (j = 0, thirty = 30; j < i; j++) - song->phonemes[j].pitch = CalcWordPitch(thirty + arg2, j); + song->phonemes[j].pitch = CalcWordPitch(thirty + word, j); song->currWord++; song->currPhoneme = 0; |