Decompile data: bard_music

This commit is contained in:
scnorton
2017-12-17 15:19:32 -05:00
parent 77f725951f
commit e212655df1
5 changed files with 12805 additions and 14662 deletions
-14412
View File
File diff suppressed because it is too large Load Diff
-240
View File
@@ -1,240 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 1
Unknown_8416F08:
.2byte -768, 6144
.align 1
Unknown_8416F0C:
.2byte 2304, 6144
.align 1
Unknown_8416F10:
.2byte 256, 6144
.align 1
Unknown_8416F14:
.2byte 1024, 6144
.align 1
Unknown_8416F18:
.2byte 2816, 6144
.align 1
Unknown_8416F1C:
.2byte -768, -256, 6144
.align 1
Unknown_8416F22:
.2byte -768, 512, 6144
.align 1
Unknown_8416F28:
.2byte 512, 1024, 6144
.align 1
Unknown_8416F2E:
.2byte 1536, 2048, 6144
.align 1
Unknown_8416F34:
.2byte 2304, 2048, 6144
.align 1
Unknown_8416F3A:
.2byte -768, -256, -768, 6144
.align 1
Unknown_8416F42:
.2byte 1024, -768, 1024, 6144
.align 1
Unknown_8416F4A:
.2byte 2304, 2048, 1536, 6144
.align 1
Unknown_8416F52:
.2byte 256, 512, 1024, 6144
.align 1
Unknown_8416F5A:
.2byte 1536, 4096, 3328, 6144
.align 1
Unknown_8416F62:
.2byte 1024, 2304, 1024, 2304, 6144
.align 1
Unknown_8416F6C:
.2byte 2304, 1024, 3328, 1024, 6144
.align 1
Unknown_8416F76:
.2byte 256, 512, 1024, 1536, 6144
.align 1
Unknown_8416F80:
.2byte 2048, 1536, 1024, 512, 6144
.align 1
Unknown_8416F8A:
.2byte 3840, 3328, 2816, 2560, 6144
.align 1
Unknown_8416F94:
.2byte -768, -256, 256, 512, 1024, 6144
.align 1
Unknown_8416FA0:
.2byte 2304, 2048, 1536, 1024, 512, 6144
.align 1
Unknown_8416FAC:
.2byte 256, 1024, 2304, 1024, 256, 6144
.align 1
Unknown_8416FB8:
.2byte 2304, 1024, 2304, 1024, -768, 6144
.align 1
Unknown_8416FC4:
.2byte 2816, 2048, 1024, 1024, 1536, 6144
.align 1
Unknown_8416FD0:
.2byte -768, -256, 256, 512, 1024, 1536, 6144
.align 1
Unknown_8416FDE:
.2byte 2048, 1536, 1024, 512, 256, -256, 6144
.align 1
Unknown_8416FEC:
.2byte 256, 512, 1024, 256, 512, 4096, 6144
.align 1
Unknown_8416FFA:
.2byte 1024, -768, 2304, 1024, 2304, 1024, 6144
.align 1
Unknown_8417008:
.2byte 2048, 2304, 2048, 2304, 2048, 2304, 6144
.align 1
Unknown_8417016:
.2byte 512, 256, 512, 256, 512, 1024, 512, 6144
.align 1
Unknown_8417026:
.2byte 256, 256, -256, -256, -768, 1024, -768, 6144
.align 1
Unknown_8417036:
.2byte 2048, 2304, 2816, 3328, 3584, 3328, 2816, 6144
.align 1
Unknown_8417046:
.2byte 2048, 1536, 1024, 512, 3328, 2816, 2304, 6144
.align 1
Unknown_8417056:
.2byte 768, 1024, 1536, 2048, 1792, 2048, 1024, 6144
.align 2
gUnknown_08417068:: @ 8417068
.4byte Unknown_8416F08
.4byte Unknown_8416F0C
.4byte Unknown_8416F10
.4byte Unknown_8416F14
.4byte Unknown_8416F18
.4byte Unknown_8416F1C
.4byte Unknown_8416F22
.4byte Unknown_8416F28
.4byte Unknown_8416F2E
.4byte Unknown_8416F34
.4byte Unknown_8416F3A
.4byte Unknown_8416F42
.4byte Unknown_8416F4A
.4byte Unknown_8416F52
.4byte Unknown_8416F5A
.4byte Unknown_8416F62
.4byte Unknown_8416F6C
.4byte Unknown_8416F76
.4byte Unknown_8416F80
.4byte Unknown_8416F8A
.4byte Unknown_8416F94
.4byte Unknown_8416FA0
.4byte Unknown_8416FAC
.4byte Unknown_8416FB8
.4byte Unknown_8416FC4
.4byte Unknown_8416FD0
.4byte Unknown_8416FDE
.4byte Unknown_8416FEC
.4byte Unknown_8416FFA
.4byte Unknown_8417008
.4byte Unknown_8417016
.4byte Unknown_8417026
.4byte Unknown_8417036
.4byte Unknown_8417046
.4byte Unknown_8417056
.align 2
gUnknown_084170F4:: @ 84170F4
.4byte 9
.4byte 22
.4byte 15
.4byte 16
.4byte 39
.4byte 21
.4byte 9
.4byte 30
.4byte 24
.4byte 15
.4byte 25
.4byte 12
.4byte 22
.4byte 45
.4byte 24
.4byte 15
.4byte 40
.4byte 9
.4byte 21
.4byte 42
.4byte 18
.4byte 9
.4byte 22
.4byte 15
.4byte 27
.4byte 48
.4byte 18
.4byte 27
.4byte 33
.4byte 24
.4byte 25
.4byte 39
.4byte 19
.4byte 16
.4byte 54
.4byte 18
.4byte 9
.4byte 45
.4byte 15
.4byte 12
.4byte 39
.4byte 23
.4byte 5
.4byte 45
.4byte 12
.4byte 21
.4byte 48
.4byte 12
.4byte 21
.4byte 69
.4byte 18
.4byte 15
@ 84171C4
.include "data/bard_music.inc"
+1 -1
View File
@@ -597,7 +597,7 @@ SECTIONS {
src/pokemon/pokeblock_feed.o(.rodata);
data/intro_credits_graphics.o(.rodata);
src/scene/evolution_graphics.o(.rodata);
data/bard_music.o(.rodata);
src/field/bard_music.o(.rodata);
data/unknown_debug_menu.o(.rodata);
data/strings2.o(.rodata);
data/menu_cursor.o(.rodata);
+12668
View File
File diff suppressed because it is too large Load Diff
+136 -9
View File
@@ -11,29 +11,156 @@ struct BardSound
/*0x06*/ u16 var06;
};
extern const struct BardSound (*const gBardMusicTable[])[][6];
extern s16 *gUnknown_08417068[];
extern u32 gUnknown_084170F4[];
static const s16 Unknown_8416F08[] = {-768, 6144};
static const s16 Unknown_8416F0C[] = {2304, 6144};
static const s16 Unknown_8416F10[] = {256, 6144};
static const s16 Unknown_8416F14[] = {1024, 6144};
static const s16 Unknown_8416F18[] = {2816, 6144};
static const s16 Unknown_8416F1C[] = {-768, -256, 6144};
static const s16 Unknown_8416F22[] = {-768, 512, 6144};
static const s16 Unknown_8416F28[] = {512, 1024, 6144};
static const s16 Unknown_8416F2E[] = {1536, 2048, 6144};
static const s16 Unknown_8416F34[] = {2304, 2048, 6144};
static const s16 Unknown_8416F3A[] = {-768, -256, -768, 6144};
static const s16 Unknown_8416F42[] = {1024, -768, 1024, 6144};
static const s16 Unknown_8416F4A[] = {2304, 2048, 1536, 6144};
static const s16 Unknown_8416F52[] = {256, 512, 1024, 6144};
static const s16 Unknown_8416F5A[] = {1536, 4096, 3328, 6144};
static const s16 Unknown_8416F62[] = {1024, 2304, 1024, 2304, 6144};
static const s16 Unknown_8416F6C[] = {2304, 1024, 3328, 1024, 6144};
static const s16 Unknown_8416F76[] = {256, 512, 1024, 1536, 6144};
static const s16 Unknown_8416F80[] = {2048, 1536, 1024, 512, 6144};
static const s16 Unknown_8416F8A[] = {3840, 3328, 2816, 2560, 6144};
static const s16 Unknown_8416F94[] = {-768, -256, 256, 512, 1024, 6144};
static const s16 Unknown_8416FA0[] = {2304, 2048, 1536, 1024, 512, 6144};
static const s16 Unknown_8416FAC[] = {256, 1024, 2304, 1024, 256, 6144};
static const s16 Unknown_8416FB8[] = {2304, 1024, 2304, 1024, -768, 6144};
static const s16 Unknown_8416FC4[] = {2816, 2048, 1024, 1024, 1536, 6144};
static const s16 Unknown_8416FD0[] = {-768, -256, 256, 512, 1024, 1536, 6144};
static const s16 Unknown_8416FDE[] = {2048, 1536, 1024, 512, 256, -256, 6144};
static const s16 Unknown_8416FEC[] = {256, 512, 1024, 256, 512, 4096, 6144};
static const s16 Unknown_8416FFA[] = {1024, -768, 2304, 1024, 2304, 1024, 6144};
static const s16 Unknown_8417008[] = {2048, 2304, 2048, 2304, 2048, 2304, 6144};
static const s16 Unknown_8417016[] = {512, 256, 512, 256, 512, 1024, 512, 6144};
static const s16 Unknown_8417026[] = {256, 256, -256, -256, -768, 1024, -768, 6144};
static const s16 Unknown_8417036[] = {2048, 2304, 2816, 3328, 3584, 3328, 2816, 6144};
static const s16 Unknown_8417046[] = {2048, 1536, 1024, 512, 3328, 2816, 2304, 6144};
static const s16 Unknown_8417056[] = {768, 1024, 1536, 2048, 1792, 2048, 1024, 6144};
static const s16 *const sWordPitches[] = {
Unknown_8416F08,
Unknown_8416F0C,
Unknown_8416F10,
Unknown_8416F14,
Unknown_8416F18,
Unknown_8416F1C,
Unknown_8416F22,
Unknown_8416F28,
Unknown_8416F2E,
Unknown_8416F34,
Unknown_8416F3A,
Unknown_8416F42,
Unknown_8416F4A,
Unknown_8416F52,
Unknown_8416F5A,
Unknown_8416F62,
Unknown_8416F6C,
Unknown_8416F76,
Unknown_8416F80,
Unknown_8416F8A,
Unknown_8416F94,
Unknown_8416FA0,
Unknown_8416FAC,
Unknown_8416FB8,
Unknown_8416FC4,
Unknown_8416FD0,
Unknown_8416FDE,
Unknown_8416FEC,
Unknown_8416FFA,
Unknown_8417008,
Unknown_8417016,
Unknown_8417026,
Unknown_8417036,
Unknown_8417046,
Unknown_8417056
};
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
};
#include "../src/data/bard_music.h"
static s16 CalcWordPitch(u32 arg0, u32 songPos)
{
return gUnknown_08417068[arg0][songPos];
return sWordPitches[arg0][songPos];
}
#if ENGLISH
const struct BardSound *GetWordSounds(u16 group, u16 word)
{
const struct BardSound (*sounds)[][6] = gBardMusicTable[group];
const struct BardSound (*sounds)[6] = gBardMusicTable[group];
return (*sounds)[word];
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] = gBardMusicTable[group];
u32 index = de_sub_80EB748(group, word);
return (*sounds)[index];
return sounds[index];
}
#endif
@@ -48,7 +175,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 + gUnknown_084170F4[src[i].var00];
s32 length = src[i].var01 + sBardSoundLengthDeltas[src[i].var00];
song->phonemes[i].length = length;
song->phonemes[i].volume = src[i].volume;