Implement common data in EU and JP and clean up US data (#258)

* data fixes

* format

* alignment

* include
This commit is contained in:
petrie911
2024-05-23 20:40:42 -03:00
committed by GitHub
parent be0bfa7711
commit 03ce166cca
30 changed files with 1306 additions and 1315 deletions
+27 -34
View File
@@ -179,15 +179,18 @@ typedef struct {
/* 0x00 */ u32 start;
/* 0x04 */ u32 end;
/* 0x08 */ u32 count;
/* 0x0C */ char unk_0C[0x4];
/* 0x10 */ s16 predictorState[16]; // only exists if count != 0. 8-byte aligned
} AdpcmLoop; // size = 0x30 (or 0x10)
/* 0x10 */ u64 predictorState[4]; // only exists if count != 0. 8-byte aligned
} AdpcmLoop; // size = 0x30 or 0x10, 0x8 aligned
typedef struct {
/* 0x00 */ s32 order;
/* 0x04 */ s32 numPredictors;
/* 0x08 */ s16 book[1]; // size 8 * order * numPredictors. 8-byte aligned
} AdpcmBook; // size >= 0x8
#ifdef AVOID_UB
/* 0x08 */ u64 book[]; // size 8 * order * numPredictors.
#else
/* 0x08 */ u64 book[1]; // size 8 * order * numPredictors.
#endif
} AdpcmBook; // size >= 8, 0x8 aligned
typedef struct {
/* 0x00 */ u32 codec : 4; // The state of compression or decompression
@@ -261,10 +264,10 @@ typedef struct {
/* 0x004 */ u8 downsampleRate;
/* 0x005 */ s8 unk_05;
/* 0x006 */ u16 windowSize;
/* 0x008 */ u16 unk_08;
/* 0x008 */ u16 decayRatio; // determines how much reverb persists
/* 0x00A */ u16 unk_0A;
/* 0x00C */ u16 decayRatio; // determines how much reverb persists
/* 0x00E */ u16 unk_0E;
/* 0x00C */ u16 leakRtL;
/* 0x00E */ u16 leakLtR;
/* 0x010 */ s32 nextRingBufPos;
/* 0x014 */ s32 unk_20;
/* 0x018 */ s32 bufSizePerChan;
@@ -512,9 +515,7 @@ typedef struct {
/* 0x0C */ NoteSynthesisBuffers* synthesisBuffers;
/* 0x10 */ s16 curVolLeft;
/* 0x12 */ s16 curVolRight;
/* 0x14 */ char unk_14[0x6];
/* 0x1A */ u8 combFilterNeedsInit;
/* 0x1C */ char unk_1C[0x4];
/* 0x14 */ char unk_14[0xC];
} NoteSynthesisState; // size = 0x20
typedef struct {
@@ -563,17 +564,16 @@ typedef struct {
struct {
/* 0x01 */ u8 reverbIndex : 3;
/* 0x01 */ u8 bookOffset : 3;
// /* 0x01 */ u8 isSyntheticWave : 1;
/* 0x01 */ u8 isSyntheticWave : 1;
/* 0x01 */ u8 hasTwoParts : 1;
} bitField1;
/* 0x02 */ u8 unk_02;
/* 0x03 */ u8 unk_03;
/* 0x04 */ u8 unk_04;
/* 0x05 */ u8 unk_05;
/* 0x06 */ u16 unk_06;
/* 0x08 */ u16 unk_08;
/* 0x0A */ u16 unk_0A;
/* 0x02 */ u8 gain;
/* 0x03 */ u8 leftDelaySize;
/* 0x04 */ u8 rightDelaySize;
/* 0x05 */ u8 reverb;
/* 0x06 */ u16 panVolLeft;
/* 0x08 */ u16 panVolRight;
/* 0x0A */ u16 resampleRate;
/* 0x0C */ s16* waveSampleAddr;
} NoteSubEu; // size = 0x10
@@ -588,9 +588,9 @@ typedef struct Note {
typedef struct {
/* 0x00 */ u8 downsampleRate;
/* 0x02 */ u8 windowSize;
/* 0x02 */ u16 unk_2;
/* 0x04 */ u16 decayRatio; // determines how much reverb persists
/* 0x06 */ u16 unk_6;
/* 0x02 */ u16 decayRatio; // determines how much reverb persists
/* 0x04 */ u16 leakRtL;
/* 0x06 */ u16 leakLtR;
} ReverbSettings; // size = 0x8
/**
@@ -816,13 +816,6 @@ typedef struct SampleDma {
/* 0x0E */ u8 ttl; // duration after which the DMA can be discarded
} SampleDma; // size = 0x10
typedef struct {
/* 0x00 */ OSTask task;
/* 0x40 */ OSMesgQueue* mesgQueue;
/* 0x44 */ void* unk_44; // probably a message that gets unused.
/* 0x48 */ char unk_48[0x8];
} AudioTask; // size = 0x50
typedef struct {
/* 0x00 */ u8 reverbVol;
/* 0x01 */ u8 gain; // Increases volume by a multiplicative scaling factor. Represented as a UQ4.4 number
@@ -873,7 +866,7 @@ typedef struct {
typedef struct {
/* 0x0 */ u16 seqId;
/* 0x2 */ u16 unk_2;
/* 0x2 */ u16 audioSpec;
/* 0x4 */ u8 bgmParam;
} SoundTestTrack; // size: 0x6
@@ -897,7 +890,7 @@ typedef struct {
typedef struct {
/* 0x00 */ u32 sfxId;
/* 0x04 */ f32* pos;
/* 0x04 */ f32* source;
/* 0x08 */ u8 token;
/* 0x0C */ f32* freqMod;
/* 0x10 */ f32* volMod;
@@ -1195,8 +1188,8 @@ extern EnvelopePoint gDefaultEnvelope[];
extern NoteSubEu gZeroNoteSub;
extern NoteSubEu gDefaultNoteSub;
extern s16 D_800DD200[];
extern f32 gHeadsetPanVolume[];
extern f32 gStereoPanVolume[];
extern f32 gDefaultPanVolume[];
extern f32 gHeadsetPanVolume[128];
extern f32 gStereoPanVolume[128];
extern f32 gDefaultPanVolume[128];
#endif
+881 -96
View File
File diff suppressed because it is too large Load Diff
+32 -37
View File
@@ -2399,53 +2399,48 @@ D_800D60AC = 0x800D60AC;
D_800D60BC = 0x800D60BC;
D_800D60D0 = 0x800D60D0;
D_800DA910 = 0x800DA910;
D_800DA940 = 0x800DA940;
D_Gfx_800D94D0 = 0x800DA940;
D_800DA958 = 0x800DA958;
D_800DAAC8 = 0x800DAAC8;
D_800DAAF8 = 0x800DAAF8;
D_Gfx_800D9688 = 0x800DAAF8;
D_800DAB10 = 0x800DAB10;
D_800DABD0 = 0x800DABD0;
D_800DAD80 = 0x800DAD80;
D_800DADC0 = 0x800DADC0;
D_800DAE68 = 0x800DAE68;
D_Tex_800D99F8 = 0x800DAE68;
D_800DB668 = 0x800DB668;
D_800DBEC8 = 0x800DBEC8;
D_800DBF68 = 0x800DBF68;
D_800DBFB0 = 0x800DBFB0;
D_800DC050 = 0x800DC050;
D_800DC090 = 0x800DC090;
D_Gfx_800DAC20 = 0x800DC090;
D_800DC0F0 = 0x800DC0F0;
D_800DC128 = 0x800DC128;
D_800DC928 = 0x800DC928;
D_800DCE90 = 0x800DCE90;
D_Tex_800DACB8 = 0x800DC128;
D_Tex_800DB4B8 = 0x800DC928;
gTextCharPalettes = 0x800DCE90;
D_800DCF10 = 0x800DCF10;
D_800DDC10 = 0x800DDC10;
D_800DDC80 = 0x800DDC80;
D_800DDE80 = 0x800DDE80;
D_800DE080 = 0x800DE080;
D_800DE280 = 0x800DE280;
D_800DE480 = 0x800DE480;
D_800DE680 = 0x800DE680;
D_800DE888 = 0x800DE888;
D_800DE8A0 = 0x800DE8A0;
D_800DEAA0 = 0x800DEAA0;
D_800DECA0 = 0x800DECA0;
D_800DF0A0 = 0x800DF0A0;
D_800DF2A0 = 0x800DF2A0;
D_800DF2B0 = 0x800DF2B0;
D_800DF2C0 = 0x800DF2C0;
D_800DF2D0 = 0x800DF2D0;
D_800DF2E0 = 0x800DF2E0;
D_800DF2F0 = 0x800DF2F0;
D_800DF36E = 0x800DF36E;
D_800DF372 = 0x800DF372;
D_800DF374 = 0x800DF374;
D_800DF3F0 = 0x800DF3F0;
D_800DF5EC = 0x800DF5EC;
D_800DF5F0 = 0x800DF5F0;
D_800DF7EC = 0x800DF7EC;
D_800DF7F0 = 0x800DF7F0;
D_800DF9EC = 0x800DF9EC;
gRcpInitDL = 0x800DDC10;
gSawtoothWaveSample = 0x800DDC80;
gTriangleWaveSample = 0x800DDE80;
gSineWaveSample = 0x800DE080;
gSquareWaveSample = 0x800DE280;
gWhiteNoiseSample = 0x800DE480;
gUnkSample = 0x800DE680;
gWaveSamples = 0x800DE880; //size:0x18
gBendPitchOneOctaveFrequencies = 0x800DE8A0; //size:0x400
gBendPitchTwoSemitonesFrequencies = 0x800DECA0; //size:0x400
gPitchFrequencies = 0x800DF0A0;
gDefaultShortNoteVelocityTable = 0x800DF2A0;
gDefaultShortNoteGateTimeTable = 0x800DF2B0;
gDefaultEnvelope = 0x800DF2C0;
gZeroNoteSub = 0x800DF2D0;
gDefaultNoteSub = 0x800DF2E0;
gHaasEffectDelaySizes = 0x800DF2F0; //size:0x80
gD_800DD200 = 0x800DF370; //size:0x80
gHeadsetPanVolume = 0x800DF3F0; //size:0x200
gStereoPanVolume = 0x800DF5F0; //size:0x200
gDefaultPanVolume = 0x800DF7F0; //size:0x200
D_800DF9F0 = 0x800DF9F0;
D_800DFA02 = 0x800DFA02;
D_800DFA08 = 0x800DFA08;
@@ -7596,7 +7591,7 @@ D_fr_80187D64 = 0x80187D64; //segment:ast_radio_fr type:u16
D_fr_80187D9C = 0x80187D9C; //segment:ast_radio_fr type:u16
D_fr_80187E0C = 0x80187E0C; //segment:ast_radio_fr type:u16
D_fr_80187E74 = 0x80187E74; //segment:ast_radio_fr type:u16
D_fr_80187ED8 = 0x80187ED8; //segment:ast_radio_fr
gMsgLookupFr = 0x80187ED8; //segment:ast_radio_fr
D_en_8017B230 = 0x8017B230; //segment:ast_radio_en type:u16
D_en_8017B954 = 0x8017B954; //segment:ast_radio_en type:u16
@@ -8377,7 +8372,7 @@ D_en_801873A8 = 0x801873A8; //segment:ast_radio_en type:u16
D_en_80187400 = 0x80187400; //segment:ast_radio_en type:u16
D_en_80187460 = 0x80187460; //segment:ast_radio_en type:u16
D_en_801874C8 = 0x801874C8; //segment:ast_radio_en type:u16
D_en_8018751C = 0x8018751C; //segment:ast_radio_en
gMsgLookupEn = 0x8018751C; //segment:ast_radio_en
D_de_8017B230 = 0x8017B230; //segment:ast_radio_de type:u16
D_de_8017BA38 = 0x8017BA38; //segment:ast_radio_de type:u16
@@ -9158,4 +9153,4 @@ D_de_80189610 = 0x80189610; //segment:ast_radio_de type:u16
D_de_80189678 = 0x80189678; //segment:ast_radio_de type:u16
D_de_801896E8 = 0x801896E8; //segment:ast_radio_de type:u16
D_de_8018974C = 0x8018974C; //segment:ast_radio_de type:u16
D_de_801897B4 = 0x801897B4; //segment:ast_radio_de
gMsgLookupDe = 0x801897B4; //segment:ast_radio_de
+30 -35
View File
@@ -3037,56 +3037,51 @@ D_800D9400 = 0x800D9400;
D_800D9428 = 0x800D9428;
D_800D9458 = 0x800D9458;
D_800D9488 = 0x800D9488;
D_800D94B4 = 0x800D94B4;
gMsgLookup = 0x800D94B4;
D_800DAD00 = 0x800DAD00;
D_800DF360 = 0x800DF360;
D_800E43E0 = 0x800E43E0;
D_800E4410 = 0x800E4410;
D_Gfx_800D94D0 = 0x800E4410;
D_800E4428 = 0x800E4428;
D_800E4598 = 0x800E4598;
D_800E45C8 = 0x800E45C8;
D_Gfx_800D9688 = 0x800E45C8;
D_800E45E0 = 0x800E45E0;
D_800E46A0 = 0x800E46A0;
D_800E4850 = 0x800E4850;
D_800E4890 = 0x800E4890;
D_800E4938 = 0x800E4938;
D_Tex_800D99F8 = 0x800E4938;
D_800E5138 = 0x800E5138;
D_800E5998 = 0x800E5998;
D_800E5A38 = 0x800E5A38;
D_800E5A80 = 0x800E5A80;
D_800E5B20 = 0x800E5B20;
D_800E5B60 = 0x800E5B60;
D_Gfx_800DAC20 = 0x800E5B60;
D_800E5BC0 = 0x800E5BC0;
D_800E5BF8 = 0x800E5BF8;
D_800E63F8 = 0x800E63F8;
D_800E6960 = 0x800E6960;
D_800E69E0 = 0x800E69E0;
D_800E6A50 = 0x800E6A50;
D_800E6C50 = 0x800E6C50;
D_800E6E50 = 0x800E6E50;
D_800E7050 = 0x800E7050;
D_800E7250 = 0x800E7250;
D_800E7450 = 0x800E7450;
D_800E7658 = 0x800E7658;
D_800E7670 = 0x800E7670;
D_800E7870 = 0x800E7870;
D_800E7A70 = 0x800E7A70;
D_800E7E70 = 0x800E7E70;
D_800E8070 = 0x800E8070;
D_800E8080 = 0x800E8080;
D_800E8090 = 0x800E8090;
D_800E80A0 = 0x800E80A0;
D_800E80B0 = 0x800E80B0;
D_800E80C0 = 0x800E80C0;
D_800E813E = 0x800E813E;
D_800E8142 = 0x800E8142;
D_800E8144 = 0x800E8144;
D_800E81C0 = 0x800E81C0;
D_800E83BC = 0x800E83BC;
D_800E83C0 = 0x800E83C0;
D_800E85BC = 0x800E85BC;
D_800E85C0 = 0x800E85C0;
D_800E87BC = 0x800E87BC;
D_Tex_800DACB8 = 0x800E5BF8;
D_Tex_800DB4B8 = 0x800E63F8;
gTextCharPalettes = 0x800E6960;
gRcpInitDL = 0x800E69E0;
gSawtoothWaveSample =0x800E6A50;
gTriangleWaveSample =0x800E6C50;
gSineWaveSample =0x800E6E50;
gSquareWaveSample =0x800E7050;
gWhiteNoiseSample =0x800E7250;
gUnkSample =0x800E7450;
gWaveSamples =0x800E7650; //size:0x18
gBendPitchOneOctaveFrequencies = 0x800E7670; //size:0x400
gBendPitchTwoSemitonesFrequencies = 0x800E7A70; //size:0x400
gPitchFrequencies = 0x800E7E70;
gDefaultShortNoteVelocityTable = 0x800E8070;
gDefaultShortNoteGateTimeTable = 0x800E8080;
gDefaultEnvelope = 0x800E8090;
gZeroNoteSub = 0x800E80A0;
gDefaultNoteSub = 0x800E80B0;
gHaasEffectDelaySizes = 0x800E80C0; //size:0x80
gD_800DD200 = 0x800E8140; //size:0x80
gHeadsetPanVolume = 0x800E81C0; //size:0x200
gStereoPanVolume = 0x800E83C0; //size:0x200
gDefaultPanVolume = 0x800E85C0; //size:0x200
D_800E87C0 = 0x800E87C0;
D_800E87D2 = 0x800E87D2;
D_800E87D8 = 0x800E87D8;
@@ -50,7 +50,7 @@ gDefaultEnvelope = 0x800DD150;
gZeroNoteSub = 0x800DD160;
gDefaultNoteSub = 0x800DD170;
gHaasEffectDelaySizes = 0x800DD180; // size:0x80 type:u16
D_800DD200 = 0x800DD200; // size:0x80 type:s16
gD_800DD200 = 0x800DD200; // size:0x80 type:s16
gHeadsetPanVolume = 0x800DD280; // size:0x200 type:f32
gStereoPanVolume = 0x800DD480; // size:0x200 type:f32
gDefaultPanVolume = 0x800DD680; // size:0x200 type:f32
+53 -53
View File
@@ -126,51 +126,51 @@ u32 sEventSfx[] = {
NA_SE_OB_PLATE_ROLL,
};
SoundTestTrack sSoundTestTracks[] = {
/* 0 */ { NA_BGM_OPENING, 22, -1 },
/* 1 */ { NA_BGM_TITLE, 23, -1 },
/* 2 */ { NA_BGM_SELECT, 23, -1 },
/* 3 */ { NA_BGM_MAP, 280, -1 },
/* 4 */ { NA_BGM_START_DEMO, 0, -1 },
/* 5 */ { NA_BGM_START_DEMO_S, 1, -1 },
/* 6 */ { NA_BGM_START_DEMO_M, 1, -1 },
/* 7 */ { NA_BGM_ME_START_DEMO, 1, -1 },
/* 8 */ { NA_BGM_FO_START_DEMO, 8, -1 },
/* 9 */ { NA_BGM_STAGE_CO, 0, -1 },
/* 10 */ { NA_BGM_STAGE_ME, 1, -1 },
/* 11 */ { NA_BGM_STAGE_TI, 2, -1 },
/* 12 */ { NA_BGM_STAGE_SX, 3, -1 },
/* 13 */ { NA_BGM_STAGE_ZO, 4, -1 },
/* 14 */ { NA_BGM_STAGE_A6, 5, -1 },
/* 15 */ { NA_BGM_STAGE_VE1, 6, -1 },
/* 16 */ { NA_BGM_STAGE_SY, 7, -1 },
/* 17 */ { NA_BGM_STAGE_FO, 8, -1 },
/* 18 */ { NA_BGM_STAGE_BO, 10, -1 },
/* 19 */ { NA_BGM_STAGE_KA, 11, -1 },
/* 20 */ { NA_BGM_STAGE_AQ, 12, -1 },
/* 21 */ { NA_BGM_STAGE_WZ, 1, -1 },
/* 22 */ { NA_BGM_KATT, 13, -1 },
/* 23 */ { NA_BGM_BILL, 11, -1 },
/* 24 */ { NA_BGM_BOSS_CO, 0, -1 },
/* 25 */ { NA_BGM_BOSS_ME, 1, 0 },
/* 26 */ { NA_BGM_BOSS_ME, 1, -1 },
/* 27 */ { NA_BGM_REAL_BOSS, 7, -1 },
/* 28 */ { NA_BGM_BOSS_BO, 10, -1 },
/* 29 */ { NA_BGM_STARWOLF, 6, -1 },
/* 30 */ { NA_BGM_COURSE_CLEAR, 0, -1 },
/* 31 */ { NA_BGM_COURSE_FAILURE, 0, -1 },
/* 32 */ { NA_BGM_PLAYER_DOWN, 0, -1 },
/* 33 */ { NA_BGM_GAME_OVER, 25, -1 },
/* 34 */ { NA_BGM_TRAINING, 28, -1 },
/* 35 */ { NA_BGM_BATTLE, 784, -1 },
/* 36 */ { NA_BGM_BATTLE_LAST, 785, -1 },
/* 37 */ { NA_BGM_VS_SELECT, 23, -1 },
/* 38 */ { NA_BGM_DASH_INTO_BASE, 6, 0 },
/* 39 */ { NA_BGM_STAGE_ANDROSS, 23, -1 },
/* 40 */ { NA_BGM_BOSS_ANDROSS, 6, 0 },
/* 41 */ { NA_BGM_BOSS_ANDROSS, 6, -1 },
/* 42 */ { NA_BGM_ANDROSS_BRAIN, 6, -1 },
/* 43 */ { NA_BGM_ALL_CLEAR, 6, -1 },
/* 44 */ { NA_BGM_STAFF_ROLL, 27, -1 },
/* 0 */ { NA_BGM_OPENING, AUDIOSPEC_22 | (SFXCHAN_0 << 8), -1 },
/* 1 */ { NA_BGM_TITLE, AUDIOSPEC_23 | (SFXCHAN_0 << 8), -1 },
/* 2 */ { NA_BGM_SELECT, AUDIOSPEC_23 | (SFXCHAN_0 << 8), -1 },
/* 3 */ { NA_BGM_MAP, AUDIOSPEC_24 | (SFXCHAN_1 << 8), -1 },
/* 4 */ { NA_BGM_START_DEMO, AUDIOSPEC_0 | (SFXCHAN_0 << 8), -1 },
/* 5 */ { NA_BGM_START_DEMO_S, AUDIOSPEC_1 | (SFXCHAN_0 << 8), -1 },
/* 6 */ { NA_BGM_START_DEMO_M, AUDIOSPEC_1 | (SFXCHAN_0 << 8), -1 },
/* 7 */ { NA_BGM_ME_START_DEMO, AUDIOSPEC_1 | (SFXCHAN_0 << 8), -1 },
/* 8 */ { NA_BGM_FO_START_DEMO, AUDIOSPEC_8 | (SFXCHAN_0 << 8), -1 },
/* 9 */ { NA_BGM_STAGE_CO, AUDIOSPEC_0 | (SFXCHAN_0 << 8), -1 },
/* 10 */ { NA_BGM_STAGE_ME, AUDIOSPEC_1 | (SFXCHAN_0 << 8), -1 },
/* 11 */ { NA_BGM_STAGE_TI, AUDIOSPEC_2 | (SFXCHAN_0 << 8), -1 },
/* 12 */ { NA_BGM_STAGE_SX, AUDIOSPEC_3 | (SFXCHAN_0 << 8), -1 },
/* 13 */ { NA_BGM_STAGE_ZO, AUDIOSPEC_4 | (SFXCHAN_0 << 8), -1 },
/* 14 */ { NA_BGM_STAGE_A6, AUDIOSPEC_5 | (SFXCHAN_0 << 8), -1 },
/* 15 */ { NA_BGM_STAGE_VE1, AUDIOSPEC_6 | (SFXCHAN_0 << 8), -1 },
/* 16 */ { NA_BGM_STAGE_SY, AUDIOSPEC_7 | (SFXCHAN_0 << 8), -1 },
/* 17 */ { NA_BGM_STAGE_FO, AUDIOSPEC_8 | (SFXCHAN_0 << 8), -1 },
/* 18 */ { NA_BGM_STAGE_BO, AUDIOSPEC_10 | (SFXCHAN_0 << 8), -1 },
/* 19 */ { NA_BGM_STAGE_KA, AUDIOSPEC_11 | (SFXCHAN_0 << 8), -1 },
/* 20 */ { NA_BGM_STAGE_AQ, AUDIOSPEC_12 | (SFXCHAN_0 << 8), -1 },
/* 21 */ { NA_BGM_STAGE_WZ, AUDIOSPEC_1 | (SFXCHAN_0 << 8), -1 },
/* 22 */ { NA_BGM_KATT, AUDIOSPEC_13 | (SFXCHAN_0 << 8), -1 },
/* 23 */ { NA_BGM_BILL, AUDIOSPEC_11 | (SFXCHAN_0 << 8), -1 },
/* 24 */ { NA_BGM_BOSS_CO, AUDIOSPEC_0 | (SFXCHAN_0 << 8), -1 },
/* 25 */ { NA_BGM_BOSS_ME, AUDIOSPEC_1 | (SFXCHAN_0 << 8), 0 },
/* 26 */ { NA_BGM_BOSS_ME, AUDIOSPEC_1 | (SFXCHAN_0 << 8), -1 },
/* 27 */ { NA_BGM_REAL_BOSS, AUDIOSPEC_7 | (SFXCHAN_0 << 8), -1 },
/* 28 */ { NA_BGM_BOSS_BO, AUDIOSPEC_10 | (SFXCHAN_0 << 8), -1 },
/* 29 */ { NA_BGM_STARWOLF, AUDIOSPEC_6 | (SFXCHAN_0 << 8), -1 },
/* 30 */ { NA_BGM_COURSE_CLEAR, AUDIOSPEC_0 | (SFXCHAN_0 << 8), -1 },
/* 31 */ { NA_BGM_COURSE_FAILURE, AUDIOSPEC_0 | (SFXCHAN_0 << 8), -1 },
/* 32 */ { NA_BGM_PLAYER_DOWN, AUDIOSPEC_0 | (SFXCHAN_0 << 8), -1 },
/* 33 */ { NA_BGM_GAME_OVER, AUDIOSPEC_25 | (SFXCHAN_0 << 8), -1 },
/* 34 */ { NA_BGM_TRAINING, AUDIOSPEC_28 | (SFXCHAN_0 << 8), -1 },
/* 35 */ { NA_BGM_BATTLE, AUDIOSPEC_16 | (SFXCHAN_3 << 8), -1 },
/* 36 */ { NA_BGM_BATTLE_LAST, AUDIOSPEC_17 | (SFXCHAN_3 << 8), -1 },
/* 37 */ { NA_BGM_VS_SELECT, AUDIOSPEC_23 | (SFXCHAN_0 << 8), -1 },
/* 38 */ { NA_BGM_DASH_INTO_BASE, AUDIOSPEC_6 | (SFXCHAN_0 << 8), 0 },
/* 39 */ { NA_BGM_STAGE_ANDROSS, AUDIOSPEC_23 | (SFXCHAN_0 << 8), -1 },
/* 40 */ { NA_BGM_BOSS_ANDROSS, AUDIOSPEC_6 | (SFXCHAN_0 << 8), 0 },
/* 41 */ { NA_BGM_BOSS_ANDROSS, AUDIOSPEC_6 | (SFXCHAN_0 << 8), -1 },
/* 42 */ { NA_BGM_ANDROSS_BRAIN, AUDIOSPEC_6 | (SFXCHAN_0 << 8), -1 },
/* 43 */ { NA_BGM_ALL_CLEAR, AUDIOSPEC_6 | (SFXCHAN_0 << 8), -1 },
/* 44 */ { NA_BGM_STAFF_ROLL, AUDIOSPEC_27 | (SFXCHAN_0 << 8), -1 },
};
PlaylistCmd sPlaylists[][100] = {
@@ -1332,7 +1332,7 @@ void Audio_PlaySfx(u32 sfxId, f32* sfxSource, u8 token, f32* freqMod, f32* volMo
SfxRequest* request = &sSfxRequests[sSfxRequestWriteIndex];
request->sfxId = sfxId;
request->pos = sfxSource;
request->source = sfxSource;
request->token = token;
request->freqMod = freqMod;
request->volMod = volMod;
@@ -1356,17 +1356,17 @@ void Audio_RemoveMatchingSfxRequests(u8 aspect, SfxBankEntry* data) {
break;
case 1:
if (((request->sfxId & SFX_BANK_MASK) == (data->sfxId & SFX_BANK_MASK)) &&
(&request->pos[0] == data->xPos)) {
(&request->source[0] == data->xPos)) {
found = true;
}
break;
case 2:
if (&request->pos[0] == data->xPos) {
if (&request->source[0] == data->xPos) {
found = true;
}
break;
case 3:
if ((&request->pos[0] == data->xPos) && (request->sfxId == data->sfxId)) {
if ((&request->source[0] == data->xPos) && (request->sfxId == data->sfxId)) {
found = true;
}
break;
@@ -1403,7 +1403,7 @@ void Audio_ProcessSfxRequest(void) {
next = sSfxBanks[bankId][0].next;
count = 0;
while ((next != 0xFF) && (next != 0)) {
if (request->pos == sSfxBanks[bankId][next].xPos) {
if (&request->source[0] == sSfxBanks[bankId][next].xPos) {
if (request->sfxId == sSfxBanks[bankId][next].sfxId) {
count = sUsedChannelsPerBank[sSfxChannelLayout][bankId];
} else {
@@ -1446,9 +1446,9 @@ void Audio_ProcessSfxRequest(void) {
if ((sSfxBanks[bankId][sSfxBankFreeListStart[bankId]].next != 0xFF) && (next != 0)) {
next = sSfxBankFreeListStart[bankId];
entry = &sSfxBanks[bankId][next];
entry->xPos = &request->pos[0];
entry->yPos = &request->pos[1];
entry->zPos = &request->pos[2];
entry->xPos = &request->source[0];
entry->yPos = &request->source[1];
entry->zPos = &request->source[2];
entry->token = request->token;
entry->freqMod = request->freqMod;
entry->volMod = request->volMod;
+6 -7
View File
@@ -95,7 +95,7 @@ void AudioHeap_DiscardFont(s32 fontId) {
for (i = 0; i < gNumNotes; i++) {
note = &gNotes[i];
if (fontId == note->playbackState.fontId) {
if (note->playbackState.unk_04 == 0 && note->playbackState.priority != 0) {
if ((note->playbackState.unk_04 == 0) && (note->playbackState.priority != 0)) {
note->playbackState.parentLayer->enabled = false;
note->playbackState.parentLayer->finished = true;
}
@@ -542,7 +542,7 @@ void AudioHeap_UpdateReverbs(void) {
}
for (reverbIndex = 0; reverbIndex < gNumSynthReverbs; reverbIndex++) {
for (i = 0; i < count; i++) {
gSynthReverbs[reverbIndex].unk_08 -= gSynthReverbs[reverbIndex].unk_08 / 3;
gSynthReverbs[reverbIndex].decayRatio -= gSynthReverbs[reverbIndex].decayRatio / 3;
}
}
}
@@ -648,8 +648,7 @@ void AudioHeap_Init(void) {
gSampleDmaCount = 0;
gAudioBufferParams.samplingFrequency = spec->samplingFrequency;
gAudioBufferParams.aiSamplingFrequency = osAiSetFrequency(gAudioBufferParams.samplingFrequency);
gAudioBufferParams.samplesPerFrameTarget =
((gAudioBufferParams.samplingFrequency / gRefreshRate) + 0xF) & (u16) ~0xF;
gAudioBufferParams.samplesPerFrameTarget = ALIGN16(gAudioBufferParams.samplingFrequency / gRefreshRate);
gAudioBufferParams.minAiBufferLength = gAudioBufferParams.samplesPerFrameTarget - 0x10;
gAudioBufferParams.maxAiBufferLength = gAudioBufferParams.samplesPerFrameTarget + 0x10;
@@ -673,7 +672,7 @@ void AudioHeap_Init(void) {
if (gAudioBufferParams.count >= 2) {
gAudioBufferParams.maxAiBufferLength -= 0x10;
}
gMaxAudioCmds = (gNumNotes * 0x14 * gAudioBufferParams.ticksPerUpdate) + (spec->numReverbs * 0x20) + 0x1E0;
gMaxAudioCmds = (gNumNotes * 20 * gAudioBufferParams.ticksPerUpdate) + (spec->numReverbs * 32) + 480;
persistentSize = spec->persistentSeqCacheSize + spec->persistentFontCacheSize +
spec->persistentSampleBankCacheSize + spec->persistentSampleCacheSize + 0x10;
temporarySize = spec->temporarySeqCacheSize + spec->temporaryFontCacheSize + spec->temporarySampleBankCacheSize +
@@ -712,9 +711,9 @@ void AudioHeap_Init(void) {
reverb = &gSynthReverbs[i];
reverb->downsampleRate = settings->downsampleRate;
reverb->windowSize = settings->windowSize * 64;
reverb->unk_08 = settings->unk_2;
reverb->decayRatio = settings->decayRatio;
reverb->unk_0E = settings->unk_6;
reverb->leakRtL = settings->leakRtL;
reverb->leakLtR = settings->leakLtR;
reverb->useReverb = 8;
reverb->leftRingBuf = AudioHeap_AllocZeroed(&gMiscPool, reverb->windowSize * 2);
+217 -218
View File
File diff suppressed because it is too large Load Diff
+20 -19
View File
@@ -680,7 +680,7 @@ Acmd* func_80009D78(Acmd* aList, s32 aiBufLen, s16 reverbIndex, s16 updateIndex)
aList = func_800098DC(aList, sp64->lengthA + 0xC90, 0, sp64->lengthB, reverbIndex);
}
aAddMixer(aList++, 0x300, 0xC90, 0x990, 0x7FFF);
aMix(aList++, 0x30, gSynthReverbs[reverbIndex].unk_08 + 0x8000, 0xC90, 0xC90);
aMix(aList++, 0x30, gSynthReverbs[reverbIndex].decayRatio + 0x8000, 0xC90, 0xC90);
} else {
sp62 = (sp64->startPos & 7) * 2;
sp60 = ALIGN16(sp62 + sp64->lengthA);
@@ -695,13 +695,13 @@ Acmd* func_80009D78(Acmd* aList, s32 aiBufLen, s16 reverbIndex, s16 updateIndex)
aResample(aList++, gSynthReverbs[reverbIndex].resampleFlags, gSynthReverbs[reverbIndex].unk_0A,
OS_K0_TO_PHYSICAL(gSynthReverbs[reverbIndex].unk_34));
aAddMixer(aList++, 0x300, 0xC90, 0x990, 0x7FFF);
aMix(aList++, 0x30, gSynthReverbs[reverbIndex].unk_08 + 0x8000, 0xC90, 0xC90);
aMix(aList++, 0x30, gSynthReverbs[reverbIndex].decayRatio + 0x8000, 0xC90, 0xC90);
}
if ((gSynthReverbs[reverbIndex].decayRatio != 0) || (gSynthReverbs[reverbIndex].unk_0E != 0)) {
if ((gSynthReverbs[reverbIndex].leakRtL != 0) || (gSynthReverbs[reverbIndex].leakLtR != 0)) {
aDMEMMove(aList++, 0xC90, 0x470, 0x180);
aMix(aList++, 0x18, gSynthReverbs[reverbIndex].decayRatio, 0xE10, 0xC90);
aMix(aList++, 0x18, gSynthReverbs[reverbIndex].unk_0E, 0x470, 0xE10);
aMix(aList++, 0x18, gSynthReverbs[reverbIndex].leakRtL, 0xE10, 0xC90);
aMix(aList++, 0x18, gSynthReverbs[reverbIndex].leakLtR, 0x470, 0xE10);
}
return aList;
}
@@ -775,7 +775,7 @@ Acmd* func_8000A25C(s16* aiBuf, s32 aiBufLen, Acmd* aList, s32 updateIndex) {
&gNotes[sp84[var_s1]].synthesisState, aiBuf, aiBufLen, aList, updateIndex);
var_s1++;
}
if (gSynthReverbs[var_s3].useReverb != 0) {
if (gSynthReverbs[var_s3].useReverb) {
aList = func_8000A128(aList, var_s3, updateIndex);
}
}
@@ -800,7 +800,7 @@ Acmd* func_8000A700(s32 noteIndex, NoteSubEu* noteSub, NoteSynthesisState* synth
s32 pad114;
Sample* bookSample; // sp110
AdpcmLoop* loopInfo; // sp10C
s16* currentBook; // sp108
void* currentBook; // sp108
s32 pad104;
s32 pad100;
s32 noteFinished; // spFC
@@ -877,7 +877,7 @@ Acmd* func_8000A700(s32 noteIndex, NoteSubEu* noteSub, NoteSynthesisState* synth
synthState->numParts = 0;
note->noteSubEu.bitField0.finished = 0;
}
resampleRateFixedPoint = noteSub->unk_0A;
resampleRateFixedPoint = noteSub->resampleRate;
nParts = noteSub->bitField1.hasTwoParts + 1;
sampleslenFixedPoint = (resampleRateFixedPoint * aiBufLen * 2) + synthState->samplePosFrac;
nSamplesToLoad = (sampleslenFixedPoint) >> 0x10;
@@ -1116,16 +1116,16 @@ Acmd* func_8000A700(s32 noteIndex, NoteSubEu* noteSub, NoteSynthesisState* synth
aUnkCmd19(aList++, 0, aiBufLen * 2, 0x450, 0x450);
}
temp2 = noteSub->unk_02;
temp2 = noteSub->gain;
if (temp2 != 0) {
if (temp2 < 0x10) {
temp2 = 0x10;
}
aHiLoGain(aList++, temp2, (aiBufLen + 0x10) * 2, 0x450, 0);
}
if ((noteSub->unk_03 != 0) || (synthState->prevHaasEffectLeftDelaySize != 0)) {
if ((noteSub->leftDelaySize != 0) || (synthState->prevHaasEffectLeftDelaySize != 0)) {
delaySide = 1;
} else if ((noteSub->unk_04 != 0) || (synthState->prevHaasEffectRightDelaySize != 0)) {
} else if ((noteSub->rightDelaySize != 0) || (synthState->prevHaasEffectRightDelaySize != 0)) {
delaySide = 2;
} else {
delaySide = 0;
@@ -1184,9 +1184,10 @@ Acmd* func_8000B51C(Acmd* aList, NoteSubEu* noteSub, NoteSynthesisState* synthSt
temp_t1 = synthState->curVolLeft;
temp_t2 = synthState->curVolRight;
temp_t7 = noteSub->unk_06;
temp_t9 = noteSub->unk_08;
temp_t7 = noteSub->panVolLeft;
temp_t9 = noteSub->panVolRight;
temp_t7 <<= 4;
temp_t9 <<= 4;
@@ -1203,10 +1204,10 @@ Acmd* func_8000B51C(Acmd* aList, NoteSubEu* noteSub, NoteSynthesisState* synthSt
temp_a1 = synthState->reverbVol;
if (noteSub->unk_05 != temp_a1) {
temp = (((noteSub->unk_05 & 0x7F) - (temp_a1 & 0x7F)) << 8);
if (noteSub->reverb != temp_a1) {
temp = (((noteSub->reverb & 0x7F) - (temp_a1 & 0x7F)) << 8);
var_a2 = temp / (aiBufLen >> 3);
synthState->reverbVol = noteSub->unk_05;
synthState->reverbVol = noteSub->reverb;
} else {
var_a2 = 0;
}
@@ -1248,17 +1249,17 @@ Acmd* func_8000B98C(Acmd* aList, NoteSubEu* noteSub, NoteSynthesisState* synthSt
u8 var_v1;
u16 temp;
switch (delaySide) { /* irregular */
switch (delaySide) {
case 1:
var_t0 = 0x990;
var_a1 = noteSub->unk_03;
var_a1 = noteSub->leftDelaySize;
synthState->prevHaasEffectRightDelaySize = 0;
var_v1 = synthState->prevHaasEffectLeftDelaySize;
synthState->prevHaasEffectLeftDelaySize = var_a1;
break;
case 2:
var_t0 = 0xB10;
var_a1 = noteSub->unk_04;
var_a1 = noteSub->rightDelaySize;
synthState->prevHaasEffectLeftDelaySize = 0;
var_v1 = synthState->prevHaasEffectRightDelaySize;
synthState->prevHaasEffectRightDelaySize = var_a1;
+1 -1
View File
@@ -280,7 +280,7 @@ u16 gHaasEffectDelaySizes[64] = {
};
// clang-format off
ALIGNED(16) s16 D_800DD200[] = {
ALIGNED(8) s16 gD_800DD200[] = {
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
+7
View File
@@ -86,6 +86,13 @@ UnkStruct_D_i4_801A03E0 D_i4_801A03E0[6];
UnkStruct_D_i4_801A03E0 D_i4_801A0488[6];
s32 D_i4_801A0530;
Matrix D_BO_8019EE80 = { {
{ 0.0f, 0.0f, 0.0f, 0.0f },
{ 0.0f, 0.0f, 0.0f, 0.0f },
{ 0.0f, 0.0f, 0.0f, 0.0f },
{ 0.0f, 0.0f, 0.0f, 0.0f },
} };
f32 D_i4_8019EEC0 = 0.0f;
void Bolse_8018BD60(Actor* this) {
-7
View File
@@ -598,13 +598,6 @@ void Fortuna_8018906C(void) {
f32 D_i4_8019EE4C[] = { -200.0f, 200.0f, -50.0f, -2000.0f };
f32 D_i4_8019EE5C[] = { 0.0f, 30.0f, -90.0f, 0.0f };
f32 D_i4_8019EE6C[] = { -100.0f, -200.0f, -300.0f, 0.0f };
s32 D_i4_8019EE7C = 0; // padding for dword aligned matrix?
Matrix D_BO_8019EE80 = { {
{ 0.0f, 0.0f, 0.0f, 0.0f },
{ 0.0f, 0.0f, 0.0f, 0.0f },
{ 0.0f, 0.0f, 0.0f, 0.0f },
{ 0.0f, 0.0f, 0.0f, 0.0f },
} };
void Fortuna_801890EC(Actor* actor, s32 arg1) {
Actor_Initialize(actor);
+1
View File
@@ -0,0 +1 @@
#include "src/audio/note_data.c"
+1
View File
@@ -0,0 +1 @@
#include "src/audio/wave_samples.c"
+1
View File
@@ -0,0 +1 @@
#include "src/engine/fox_msg_palette.c"
+1
View File
@@ -0,0 +1 @@
#include "src/engine/fox_rcp_init.c"
+1
View File
@@ -0,0 +1 @@
#include "src/engine/fox_shapes.c"
+1
View File
@@ -0,0 +1 @@
#include "src/engine/fox_wheels.c"
+1
View File
@@ -0,0 +1 @@
#include "src/audio/note_data.c"
+1
View File
@@ -0,0 +1 @@
#include "src/audio/wave_samples.c"

Some files were not shown because too many files have changed in this diff Show More