Attempt to decompile propsnd0f094ef4

This commit is contained in:
Ryan Dwyer 2022-02-24 21:14:58 +10:00
parent 36e622070d
commit 120cff84ab
3 changed files with 50 additions and 6 deletions

View File

@ -27454,7 +27454,7 @@ void bgunPlayPropHitSound(struct gset *gset, struct prop *prop, s32 texturenum)
}
if (soundnum != -1) {
func0f094ef4(&prop->pos, prop->rooms, soundnum, &spac, &spa8);
propsnd0f094ef4(&prop->pos, prop->rooms, soundnum, &spac, &spa8);
if (spac) {
sndStart(var80095200, soundnum, handle, -1, -1, -1, -1, -1);
@ -27505,7 +27505,7 @@ void bgunPlayPropHitSound(struct gset *gset, struct prop *prop, s32 texturenum)
}
if (soundnum != -1) {
func0f094ef4(&prop->pos, prop->rooms, soundnum, &sp90, &sp8c);
propsnd0f094ef4(&prop->pos, prop->rooms, soundnum, &sp90, &sp8c);
if (sp90) {
sndStart(var80095200, soundnum, handle, -1, -1, -1, -1, -1);

View File

@ -4698,7 +4698,7 @@ glabel var7f1ab778
#if VERSION >= VERSION_NTSC_1_0
GLOBAL_ASM(
glabel func0f094ef4
glabel propsnd0f094ef4
.late_rodata
glabel var7f1ab77c
.word 0x451c4000
@ -4801,6 +4801,50 @@ glabel var7f1ab784
/* f095054: 03e00008 */ jr $ra
/* f095058: 00000000 */ nop
);
//void propsnd0f094ef4(struct coord *pos, s16 *rooms, s16 soundnum, s32 *arg3, s32 *arg4)
//{
// f32 sp5c;
// f32 sp58;
// f32 sp54;
// struct audiorussmapping *russ;
// struct audioconfig *config;
// union soundnumhack sp48;
// union soundnumhack sp44;
// f32 sp40;
// bool sp3c;
// u32 stack[4];
//
// sp5c = 400;
// sp58 = 2500;
// sp54 = 3000;
// sp44.packed = soundnum;
// sp40 = 9999999;
// sp3c = false;
//
// if (sp44.hasconfig) {
// russ = &g_AudioRussMappings[sp44.confignum];
// config = &g_AudioConfigs[russ->audioconfig_index];
// sp5c = config->unk00;
// sp58 = config->unk00;
// sp54 = config->unk00;
// sp48.packed = russ->soundnum;
//
// if (config->flags & AUDIOCONFIGFLAG_01) {
// sp3c = true;
// }
//
// if (sp54 < sp40) {
// sp40 = sp54;
// }
//
// sp48.hasconfig = false;
// soundnum = sp48.packed;
// }
//
// *arg3 = func0f0946b0(pos, sp5c, sp58, sp54, rooms, soundnum, 0x7fff, &sp40);
// *arg4 = func0f094d78(pos, sp5c, sp58, sp54, sp40, sp3c, 0);
//}
#endif
GLOBAL_ASM(

View File

@ -21,11 +21,11 @@ s16 func0f0939f8(struct audiochannel *channel, struct prop *prop, s16 soundnum,
void audioMuteChannel(s32 channelnum);
bool audioIsChannelIdle(s32 channelnum);
void audioPlayFromProp2(s32 channelnum, s32 soundnum, s16 padnum, struct prop *prop, s32 arg4, s32 arg5, s32 arg6, u16 arg7);
u32 func0f0946b0(void);
s32 func0f0946b0(struct coord *pos, f32 arg2, f32 arg3, f32 arg4, s16 *rooms, s32 soundnum, s32 arg7, f32 *arg8);
u32 func0f094940(void);
u32 func0f094b1c(void);
u32 func0f094d78(void);
void func0f094ef4(struct coord *pos, s16 *rooms, s32 soundnum, s32 *arg3, s32 *arg4);
s32 func0f094d78(struct coord *pos, f32 arg2, f32 arg3, f32 arg4, f32 arg5, bool arg6, s32 arg7);
void propsnd0f094ef4(struct coord *pos, s16 *rooms, s16 soundnum, s32 *arg3, s32 *arg4);
void func0f09505c(struct sndstate *handle, struct coord *pos, f32 arg2, f32 arg3, f32 arg4, s16 *rooms, s16 soundnum, u16 arg7, u32 arg8);
s32 propsndGetRandomSparkSound(void);
s32 propsndGetDuration60(s32 channelnum);