mirror of
https://github.com/n64decomp/mk64
synced 2026-08-08 10:13:11 -04:00
more audio/external stuff (#392)
* audio/external: 800C3478 * audio/external: Match func_800C98B8, func_800C9DB0 * Fix build
This commit is contained in:
+26
-75
@@ -1081,27 +1081,13 @@ void func_800C3448(s32 arg0) {
|
||||
D_800EA1E4 += 1;
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Aug-14-2023
|
||||
? func_800C2A2C(s32); /* extern */
|
||||
extern ? D_80192CD0;
|
||||
static u8 D_800EA1E4 = 0;
|
||||
static u8 D_800EA1E8 = 0;
|
||||
extern u8 D_800EA1E8;
|
||||
|
||||
void func_800C3478(void) {
|
||||
u8 temp_s0;
|
||||
|
||||
temp_s0 = D_800EA1E8;
|
||||
if (temp_s0 != D_800EA1E4) {
|
||||
do {
|
||||
D_800EA1E8 = temp_s0 + 1;
|
||||
func_800C2A2C(*(&D_80192CD0 + (temp_s0 * 4)));
|
||||
} while (D_800EA1E8 != D_800EA1E4);
|
||||
for(D_800EA1E8; D_800EA1E4 != D_800EA1E8;) {
|
||||
func_800C2A2C(D_80192CD0[D_800EA1E8++]);
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/external/func_800C3478.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Aug-14-2023
|
||||
@@ -4287,38 +4273,21 @@ void func_800C97C4(u8 arg0) {
|
||||
func_800C5578((f32* ) &D_800E9F7C[arg0], gPlayers[arg0].characterId + 0x0104FF3E);
|
||||
}
|
||||
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 0927f17aac197848d4ebdf0c6bbad74b01f0851c
|
||||
static u8 D_800EA1DC = 0; /* const */
|
||||
u8 D_800EA0F0 = 0; /* const */
|
||||
u8 D_800EA108 = 0; /* const */
|
||||
u8 D_800EA1C0 = 0; /* const */
|
||||
f32 D_800EA1C8[3] = { 0.0f, 0.0f, 0.0f }; /* const */
|
||||
|
||||
void func_800C98B8(f32 *position, f32 *velocity, u32 soundBits) {
|
||||
s32 temp_t0;
|
||||
s32 var_s0;
|
||||
struct Unk_8018EFD8 *temp_v0;
|
||||
void func_800C98B8(f32* position, f32* velocity, u32 soundBits) {
|
||||
u8 var_s0;
|
||||
struct Unk_8018EFD8* temp_v0;
|
||||
|
||||
if ((D_800EA108 == 0) && (D_800EA0F0 == 0)) {
|
||||
var_s0 = 0;
|
||||
if ((D_800EA1C0 + 1) > 0) {
|
||||
do {
|
||||
temp_v0 = func_800C1C88(0U, position, velocity, D_800EA1C8, (u8) var_s0, soundBits);
|
||||
if (temp_v0 != NULL) {
|
||||
temp_v0->unk34 = 170.0f;
|
||||
play_sound(soundBits, temp_v0->unk18, var_s0 & 0xFF, &temp_v0->unk2C, &D_800EA1D4, &D_800EA1DC);
|
||||
}
|
||||
temp_t0 = (var_s0 + 1) & 0xFF;
|
||||
var_s0 = temp_t0;
|
||||
} while (temp_t0 < (D_800EA1C0 + 1));
|
||||
for (var_s0 = 0; var_s0 < (D_800EA1C0 + 1); var_s0++) {
|
||||
temp_v0 = func_800C1C88(0U, position, velocity, D_800EA1C8, (u8) var_s0, soundBits);
|
||||
if (temp_v0 != 0) {
|
||||
temp_v0->unk34 = 170.0f;
|
||||
play_sound(soundBits, temp_v0->unk18, var_s0, &temp_v0->unk2C, D_800EA1D4, &D_800EA1DC);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/external/func_800C98B8.s")
|
||||
#endif
|
||||
|
||||
|
||||
void func_800C99E0(Vec3f arg0, s32 arg1) {
|
||||
f32* temp_v0;
|
||||
@@ -4391,43 +4360,25 @@ void func_800C9D0C(u8 playerId) {
|
||||
func_800C550C(func_800C21E8(gPlayers[playerId].pos, gPlayers[playerId].characterId + 0x31028000));
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 0927f17aac197848d4ebdf0c6bbad74b01f0851c
|
||||
static u8 D_800EA0F0 = 0; /* const */
|
||||
static u8 D_800EA1C0 = 0; /* const */
|
||||
s8 D_800EA108 = 0; /* const */
|
||||
|
||||
void func_800C9D80(Vec3f position, Vec3f velocity, u32 soundBits) {
|
||||
s32 temp_t8;
|
||||
s32 var_s0;
|
||||
struct Unk_8018EFD8 *temp_v0_2;
|
||||
u8 temp_v0;
|
||||
u8 var_s0;
|
||||
struct Unk_8018EFD8* temp_v0;
|
||||
|
||||
if (((u8) D_800EA108 == 0) && (D_800EA0F0 == 0)) {
|
||||
temp_v0 = D_800EA1C0;
|
||||
if ((s32) temp_v0 < 4) {
|
||||
var_s0 = 0;
|
||||
if ((s32) temp_v0 >= 0) {
|
||||
do {
|
||||
temp_v0_2 = func_800C1C88(0U, position, velocity, &D_800EA1C8, (u8) var_s0, soundBits);
|
||||
if (temp_v0_2 != NULL) {
|
||||
temp_v0_2->unk34 = 170.0f;
|
||||
if (soundBits == 0x5103700B) {
|
||||
play_sound(soundBits, temp_v0_2->unk18, var_s0 & 0xFF, &D_800EA178, &D_800EA17C, &D_800EA1DC);
|
||||
} else {
|
||||
play_sound(soundBits, temp_v0_2->unk18, var_s0 & 0xFF, &temp_v0_2->unk2C, &D_800EA1D4, &D_800EA1DC);
|
||||
}
|
||||
}
|
||||
temp_t8 = (var_s0 + 1) & 0xFF;
|
||||
var_s0 = temp_t8;
|
||||
} while (temp_t8 < (D_800EA1C0 + 1));
|
||||
if ((D_800EA108 == 0) && (D_800EA0F0 == 0) && ((s32) D_800EA1C0 < 4)) {
|
||||
for(var_s0 = 0; var_s0 < ((D_800EA1C0 + 1)); var_s0++) {
|
||||
temp_v0 = func_800C1C88(0U, position, velocity, D_800EA1C8, (u8) var_s0, soundBits);
|
||||
if (temp_v0 != 0) {
|
||||
temp_v0->unk34 = 170.0f;
|
||||
if (soundBits == 0x5103700B) {
|
||||
play_sound(soundBits, temp_v0->unk18, var_s0, &D_800EA178, &D_800EA17C, &D_800EA1DC);
|
||||
} else {
|
||||
play_sound(soundBits, temp_v0->unk18, var_s0, &temp_v0->unk2C, D_800EA1D4, &D_800EA1DC);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/external/func_800C9D80.s")
|
||||
#endif
|
||||
|
||||
|
||||
void func_800C9EF4(Vec3f arg0, u32 arg1) {
|
||||
f32 *temp;
|
||||
|
||||
Reference in New Issue
Block a user