Label bard music pitch table

This commit is contained in:
GriffinR 2021-01-28 16:36:56 -05:00
parent 89b85a49ec
commit 12af03cd62
3 changed files with 112 additions and 111 deletions

View File

@ -1,9 +1,6 @@
#ifndef GUARD_BARD_MUSIC_H #ifndef GUARD_BARD_MUSIC_H
#define GUARD_BARD_MUSIC_H #define GUARD_BARD_MUSIC_H
// Exported type declarations
struct BardSound struct BardSound
{ {
/*0x00*/ u8 var00; /*0x00*/ u8 var00;

View File

@ -8,9 +8,9 @@
#include "data/bard_music/default_sound.h" #include "data/bard_music/default_sound.h"
#include "data/bard_music/length_table.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) const struct BardSound *GetWordSounds(u16 word)

View File

@ -1,182 +1,186 @@
#ifndef GUARD_WORD_PITCH_H #ifndef GUARD_WORD_PITCH_H
#define GUARD_WORD_PITCH_H #define GUARD_WORD_PITCH_H
const s16 gUnknown_0860A1C0[] = { #define PITCH_END 0x1800
-0x300, 0x1800
static const s16 sPitch1_0[] = {
-0x300, PITCH_END
}; };
const s16 gUnknown_0860A1C4[] = { static const s16 sPitch1_1[] = {
0x0900, 0x1800 0x0900, PITCH_END
}; };
const s16 gUnknown_0860A1C8[] = { static const s16 sPitch1_2[] = {
0x0100, 0x1800 0x0100, PITCH_END
}; };
const s16 gUnknown_0860A1CC[] = { static const s16 sPitch1_3[] = {
0x0400, 0x1800 0x0400, PITCH_END
}; };
const s16 gUnknown_0860A1D0[] = { static const s16 sPitch1_4[] = {
0x0b00, 0x1800 0x0b00, PITCH_END
}; };
const s16 gUnknown_0860A1D4[] = { static const s16 sPitch2_0[] = {
-0x300, -0x100, 0x1800 -0x300, -0x100, PITCH_END
}; };
const s16 gUnknown_0860A1DA[] = { static const s16 sPitch2_1[] = {
-0x300, 0x0200, 0x1800 -0x300, 0x0200, PITCH_END
}; };
const s16 gUnknown_0860A1E0[] = { static const s16 sPitch2_2[] = {
0x0200, 0x0400, 0x1800 0x0200, 0x0400, PITCH_END
}; };
const s16 gUnknown_0860A1E6[] = { static const s16 sPitch2_3[] = {
0x0600, 0x0800, 0x1800 0x0600, 0x0800, PITCH_END
}; };
const s16 gUnknown_0860A1EC[] = { static const s16 sPitch2_4[] = {
0x0900, 0x0800, 0x1800 0x0900, 0x0800, PITCH_END
}; };
const s16 gUnknown_0860A1F2[] = { static const s16 sPitch3_0[] = {
-0x300, -0x100, -0x300, 0x1800 -0x300, -0x100, -0x300, PITCH_END
}; };
const s16 gUnknown_0860A1FA[] = { static const s16 sPitch3_1[] = {
0x0400, -0x300, 0x0400, 0x1800 0x0400, -0x300, 0x0400, PITCH_END
}; };
const s16 gUnknown_0860A202[] = { static const s16 sPitch3_2[] = {
0x0900, 0x0800, 0x0600, 0x1800 0x0900, 0x0800, 0x0600, PITCH_END
}; };
const s16 gUnknown_0860A20A[] = { static const s16 sPitch3_3[] = {
0x0100, 0x0200, 0x0400, 0x1800 0x0100, 0x0200, 0x0400, PITCH_END
}; };
const s16 gUnknown_0860A212[] = { static const s16 sPitch3_4[] = {
0x0600, 0x1000, 0x0d00, 0x1800 0x0600, 0x1000, 0x0d00, PITCH_END
}; };
const s16 gUnknown_0860A21A[] = { static const s16 sPitch4_0[] = {
0x0400, 0x0900, 0x0400, 0x0900, 0x1800 0x0400, 0x0900, 0x0400, 0x0900, PITCH_END
}; };
const s16 gUnknown_0860A224[] = { static const s16 sPitch4_1[] = {
0x0900, 0x0400, 0x0d00, 0x0400, 0x1800 0x0900, 0x0400, 0x0d00, 0x0400, PITCH_END
}; };
const s16 gUnknown_0860A22E[] = { static const s16 sPitch4_2[] = {
0x0100, 0x0200, 0x0400, 0x0600, 0x1800 0x0100, 0x0200, 0x0400, 0x0600, PITCH_END
}; };
const s16 gUnknown_0860A238[] = { static const s16 sPitch4_3[] = {
0x0800, 0x0600, 0x0400, 0x0200, 0x1800 0x0800, 0x0600, 0x0400, 0x0200, PITCH_END
}; };
const s16 gUnknown_0860A242[] = { static const s16 sPitch4_4[] = {
0x0f00, 0x0d00, 0x0b00, 0x0a00, 0x1800 0x0f00, 0x0d00, 0x0b00, 0x0a00, PITCH_END
}; };
const s16 gUnknown_0860A24C[] = { static const s16 sPitch5_0[] = {
-0x300, -0x100, 0x0100, 0x0200, 0x0400, 0x1800 -0x300, -0x100, 0x0100, 0x0200, 0x0400, PITCH_END
}; };
const s16 gUnknown_0860A258[] = { static const s16 sPitch5_1[] = {
0x0900, 0x0800, 0x0600, 0x0400, 0x0200, 0x1800 0x0900, 0x0800, 0x0600, 0x0400, 0x0200, PITCH_END
}; };
const s16 gUnknown_0860A264[] = { static const s16 sPitch5_2[] = {
0x0100, 0x0400, 0x0900, 0x0400, 0x0100, 0x1800 0x0100, 0x0400, 0x0900, 0x0400, 0x0100, PITCH_END
}; };
const s16 gUnknown_0860A270[] = { static const s16 sPitch5_3[] = {
0x0900, 0x0400, 0x0900, 0x0400, -0x300, 0x1800 0x0900, 0x0400, 0x0900, 0x0400, -0x300, PITCH_END
}; };
const s16 gUnknown_0860A27C[] = { static const s16 sPitch5_4[] = {
0x0b00, 0x0800, 0x0400, 0x0400, 0x0600, 0x1800 0x0b00, 0x0800, 0x0400, 0x0400, 0x0600, PITCH_END
}; };
const s16 gUnknown_0860A288[] = { static const s16 sPitch6_0[] = {
-0x300, -0x100, 0x0100, 0x0200, 0x0400, 0x0600, 0x1800 -0x300, -0x100, 0x0100, 0x0200, 0x0400, 0x0600, PITCH_END
}; };
const s16 gUnknown_0860A296[] = { static const s16 sPitch6_1[] = {
0x0800, 0x0600, 0x0400, 0x0200, 0x0100, -0x100, 0x1800 0x0800, 0x0600, 0x0400, 0x0200, 0x0100, -0x100, PITCH_END
}; };
const s16 gUnknown_0860A2A4[] = { static const s16 sPitch6_2[] = {
0x0100, 0x0200, 0x0400, 0x0100, 0x0200, 0x1000, 0x1800 0x0100, 0x0200, 0x0400, 0x0100, 0x0200, 0x1000, PITCH_END
}; };
const s16 gUnknown_0860A2B2[] = { static const s16 sPitch6_3[] = {
0x0400, -0x300, 0x0900, 0x0400, 0x0900, 0x0400, 0x1800 0x0400, -0x300, 0x0900, 0x0400, 0x0900, 0x0400, PITCH_END
}; };
const s16 gUnknown_0860A2C0[] = { static const s16 sPitch6_4[] = {
0x0800, 0x0900, 0x0800, 0x0900, 0x0800, 0x0900, 0x1800 0x0800, 0x0900, 0x0800, 0x0900, 0x0800, 0x0900, PITCH_END
}; };
const s16 gUnknown_0860A2CE[] = { static const s16 sPitch7_0[] = {
0x0200, 0x0100, 0x0200, 0x0100, 0x0200, 0x0400, 0x0200, 0x1800 0x0200, 0x0100, 0x0200, 0x0100, 0x0200, 0x0400, 0x0200, PITCH_END
}; };
const s16 gUnknown_0860A2DE[] = { static const s16 sPitch7_1[] = {
0x0100, 0x0100, -0x100, -0x100, -0x300, 0x0400, -0x300, 0x1800 0x0100, 0x0100, -0x100, -0x100, -0x300, 0x0400, -0x300, PITCH_END
}; };
const s16 gUnknown_0860A2EE[] = { static const s16 sPitch7_2[] = {
0x0800, 0x0900, 0x0b00, 0x0d00, 0x0e00, 0x0d00, 0x0b00, 0x1800 0x0800, 0x0900, 0x0b00, 0x0d00, 0x0e00, 0x0d00, 0x0b00, PITCH_END
}; };
const s16 gUnknown_0860A2FE[] = { static const s16 sPitch7_3[] = {
0x0800, 0x0600, 0x0400, 0x0200, 0x0d00, 0x0b00, 0x0900, 0x1800 0x0800, 0x0600, 0x0400, 0x0200, 0x0d00, 0x0b00, 0x0900, PITCH_END
}; };
const s16 gUnknown_0860A30E[] = { static const s16 sPitch7_4[] = {
0x0300, 0x0400, 0x0600, 0x0800, 0x0700, 0x0800, 0x0400, 0x1800 0x0300, 0x0400, 0x0600, 0x0800, 0x0700, 0x0800, 0x0400, PITCH_END
}; };
const s16 *const gBardSoundPitchTables[] = { // Only sPitch7_# are used below
gUnknown_0860A1C0, // This table is always indexed with (x + 30), where x is some value 0 - 4
gUnknown_0860A1C4, static const s16 *const sBardSoundPitchTables[] = {
gUnknown_0860A1C8, sPitch1_0,
gUnknown_0860A1CC, sPitch1_1,
gUnknown_0860A1D0, sPitch1_2,
gUnknown_0860A1D4, sPitch1_3,
gUnknown_0860A1DA, sPitch1_4,
gUnknown_0860A1E0, sPitch2_0,
gUnknown_0860A1E6, sPitch2_1,
gUnknown_0860A1EC, sPitch2_2,
gUnknown_0860A1F2, sPitch2_3,
gUnknown_0860A1FA, sPitch2_4,
gUnknown_0860A202, sPitch3_0,
gUnknown_0860A20A, sPitch3_1,
gUnknown_0860A212, sPitch3_2,
gUnknown_0860A21A, sPitch3_3,
gUnknown_0860A224, sPitch3_4,
gUnknown_0860A22E, sPitch4_0,
gUnknown_0860A238, sPitch4_1,
gUnknown_0860A242, sPitch4_2,
gUnknown_0860A24C, sPitch4_3,
gUnknown_0860A258, sPitch4_4,
gUnknown_0860A264, sPitch5_0,
gUnknown_0860A270, sPitch5_1,
gUnknown_0860A27C, sPitch5_2,
gUnknown_0860A288, sPitch5_3,
gUnknown_0860A296, sPitch5_4,
gUnknown_0860A2A4, sPitch6_0,
gUnknown_0860A2B2, sPitch6_1,
gUnknown_0860A2C0, sPitch6_2,
gUnknown_0860A2CE, sPitch6_3,
gUnknown_0860A2DE, sPitch6_4,
gUnknown_0860A2EE, sPitch7_0,
gUnknown_0860A2FE, sPitch7_1,
gUnknown_0860A30E sPitch7_2,
sPitch7_3,
sPitch7_4
}; };