mirror of
https://github.com/n64decomp/mk64
synced 2026-06-17 06:25:33 -04:00
audio load.c decomp (#176)
This commit is contained in:
+13
-13
@@ -292,7 +292,7 @@ f32 func_800BE5E0(void *); // extern
|
||||
? func_800BEBA4(void *, u32); // extern
|
||||
? func_800BF004(s32, void *); // extern
|
||||
extern s32 D_803B1508;
|
||||
extern s32 D_803B70B0;
|
||||
extern s32 gMaxSimultaneousNotes;
|
||||
|
||||
void func_800BCBC4(void) {
|
||||
u8 sp4B;
|
||||
@@ -327,7 +327,7 @@ void func_800BCBC4(void) {
|
||||
s32 phi_v0_2;
|
||||
s32 phi_v1;
|
||||
|
||||
temp_v1 = D_803B70B0;
|
||||
temp_v1 = gMaxSimultaneousNotes;
|
||||
phi_v1 = temp_v1;
|
||||
if (temp_v1 > 0) {
|
||||
phi_s5 = 0;
|
||||
@@ -347,7 +347,7 @@ void func_800BCBC4(void) {
|
||||
if (temp_v0 == 0) {
|
||||
func_800BEBA4(temp_a0, temp_a1);
|
||||
temp_s1_2->unk0 = 1;
|
||||
temp_v1_2 = D_803B70B0;
|
||||
temp_v1_2 = gMaxSimultaneousNotes;
|
||||
phi_v0_2 = temp_v1_2 * 3;
|
||||
phi_v1 = temp_v1_2;
|
||||
} else {
|
||||
@@ -436,7 +436,7 @@ block_27:
|
||||
phi_s3->unk1 = ((phi_s2 * 4) & 0x1C) | (phi_s3->unk1 & 0xFFE3);
|
||||
}
|
||||
}
|
||||
temp_v1_3 = D_803B70B0;
|
||||
temp_v1_3 = gMaxSimultaneousNotes;
|
||||
phi_v0_2 = temp_v1_3 * 3;
|
||||
phi_v1 = temp_v1_3;
|
||||
}
|
||||
@@ -670,7 +670,7 @@ GLOBAL_ASM("asm/non_matchings/audio/playback/func_800BD318.s")
|
||||
? func_800BF004(? *, s32); // extern
|
||||
extern s32 D_803B1508;
|
||||
extern ? D_803B5FC8;
|
||||
extern s32 D_803B70B0;
|
||||
extern s32 gMaxSimultaneousNotes;
|
||||
|
||||
void func_800BD368(void) {
|
||||
s32 temp_s1;
|
||||
@@ -681,7 +681,7 @@ void func_800BD368(void) {
|
||||
func_800BD318(&D_803B5FC8);
|
||||
phi_s0 = 0;
|
||||
phi_s1 = 0;
|
||||
if (D_803B70B0 > 0) {
|
||||
if (gMaxSimultaneousNotes > 0) {
|
||||
do {
|
||||
temp_v0 = D_803B1508;
|
||||
(temp_v0 + phi_s0)->unk8 = phi_s0 + temp_v0;
|
||||
@@ -690,7 +690,7 @@ void func_800BD368(void) {
|
||||
temp_s1 = phi_s1 + 1;
|
||||
phi_s0 += 0xC0;
|
||||
phi_s1 = temp_s1;
|
||||
} while (temp_s1 < D_803B70B0);
|
||||
} while (temp_s1 < gMaxSimultaneousNotes);
|
||||
}
|
||||
}
|
||||
#else
|
||||
@@ -1186,10 +1186,10 @@ GLOBAL_ASM("asm/non_matchings/audio/playback/func_800BDA44.s")
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
s32 func_800B8FFC(? *, ?); // extern
|
||||
extern ? D_803AFBE8;
|
||||
s32 soundAlloc(? *, ?); // extern
|
||||
extern ? gNotesAndBuffersPool;
|
||||
extern s32 D_803B1508;
|
||||
extern s32 D_803B70B0;
|
||||
extern s32 gMaxSimultaneousNotes;
|
||||
extern ? gZeroNoteSub;
|
||||
|
||||
void func_800BDD34(void) {
|
||||
@@ -1199,7 +1199,7 @@ void func_800BDD34(void) {
|
||||
s32 phi_s1;
|
||||
|
||||
phi_s1 = 0;
|
||||
if (D_803B70B0 > 0) {
|
||||
if (gMaxSimultaneousNotes > 0) {
|
||||
phi_s2 = 0;
|
||||
do {
|
||||
temp_s0 = phi_s2 + D_803B1508;
|
||||
@@ -1219,11 +1219,11 @@ void func_800BDD34(void) {
|
||||
temp_s0->unk80 = 0.0f;
|
||||
temp_s0->unk84 = 0.0f;
|
||||
temp_s0->unkBC = gZeroNoteSub.unkC;
|
||||
temp_s0->unk1C = func_800B8FFC(&D_803AFBE8, 0xA0);
|
||||
temp_s0->unk1C = soundAlloc(&gNotesAndBuffersPool, 0xA0);
|
||||
temp_s1 = phi_s1 + 1;
|
||||
phi_s2 += 0xC0;
|
||||
phi_s1 = temp_s1;
|
||||
} while (temp_s1 < D_803B70B0);
|
||||
} while (temp_s1 < gMaxSimultaneousNotes);
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user