diff --git a/src/game/bondbike.c b/src/game/bondbike.c index 734630a76..9704977d3 100644 --- a/src/game/bondbike.c +++ b/src/game/bondbike.c @@ -84,7 +84,7 @@ void bbikeExit(void) objApplyMomentum(obj, &speed, rotation, false, false); func0f0926bc(g_Vars.currentplayer->hoverbike, 1, 0xffff); func0f0926bc(g_Vars.currentplayer->prop, 1, 0xffff); - func0f0939f8(NULL, g_Vars.currentplayer->hoverbike, SFX_BIKE_PULSE, -1, + propsnd0f0939f8(NULL, g_Vars.currentplayer->hoverbike, SFX_BIKE_PULSE, -1, -1, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1); obj->flags |= OBJFLAG_HOVERBIKE_MOVINGWHILEEMPTY; @@ -1650,13 +1650,13 @@ void bbikeTick(void) func0f0926bc(g_Vars.currentplayer->hoverbike, 1, 0xffff); - func0f0939f8(NULL, g_Vars.currentplayer->prop, SFX_BIKE_TAKEOFF, -1, + propsnd0f0939f8(NULL, g_Vars.currentplayer->prop, SFX_BIKE_TAKEOFF, -1, -1, 0, 0, 0, NULL, -1, NULL, -1, -1, -1, -1); - func0f0939f8(NULL, g_Vars.currentplayer->prop, SFX_BIKE_PULSE, -1, + propsnd0f0939f8(NULL, g_Vars.currentplayer->prop, SFX_BIKE_PULSE, -1, -1, 0, 0, 0, NULL, -1, NULL, -1, -1, -1, -1); - func0f0939f8(NULL, g_Vars.currentplayer->hoverbike, SFX_BIKE_ENGINE, -1, + propsnd0f0939f8(NULL, g_Vars.currentplayer->hoverbike, SFX_BIKE_ENGINE, -1, -1, 0, 0, 0, NULL, -1, NULL, -1, -1, -1, -1); } diff --git a/src/game/bondeyespy.c b/src/game/bondeyespy.c index c6ef8e8b8..c4af6a8d0 100644 --- a/src/game/bondeyespy.c +++ b/src/game/bondeyespy.c @@ -662,10 +662,10 @@ bool eyespyTryLaunch(void) chr->chrflags &= ~CHRCFLAG_INVINCIBLE; #if VERSION >= VERSION_NTSC_1_0 - func0f0939f8(NULL, g_Vars.currentplayer->eyespy->prop, SFX_EYESPY_RUNNING, -1, + propsnd0f0939f8(NULL, g_Vars.currentplayer->eyespy->prop, SFX_EYESPY_RUNNING, -1, -1, 2, 0, 0, 0, -1, 0, -1, -1, -1, -1); #else - func0f0939f8(NULL, g_Vars.currentplayer->eyespy->prop, SFX_EYESPY_RUNNING, -1, + propsnd0f0939f8(NULL, g_Vars.currentplayer->eyespy->prop, SFX_EYESPY_RUNNING, -1, -1, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1); #endif } diff --git a/src/game/bondgun.c b/src/game/bondgun.c index 497563e4b..875fa29fe 100644 --- a/src/game/bondgun.c +++ b/src/game/bondgun.c @@ -12228,7 +12228,7 @@ struct defaultobj *bgunCreateThrownProjectile2(struct chrdata *chr, struct gset obj->projectile->unk08c = 0.1f; obj->projectile->unk0b4 = TICKS(240); - func0f0939f8(NULL, obj->prop, SFX_THROW, -1, + propsnd0f0939f8(NULL, obj->prop, SFX_THROW, -1, -1, 0, 0, 0, NULL, -1, NULL, -1, -1, -1, -1); } } @@ -12724,7 +12724,7 @@ void bgunCreateFiredProjectile(s32 handnum) weapon->base.projectile->unk098 = funcdef->unk50 * 1.6666666f; if (funcdef->soundnum > 0) { - func0f0939f8(NULL, weapon->base.prop, funcdef->soundnum, -1, -1, 0, 0, 0, 0, -1.0f, 0, -1, -1.0f, -1.0f, -1.0f); + propsnd0f0939f8(NULL, weapon->base.prop, funcdef->soundnum, -1, -1, 0, 0, 0, 0, -1.0f, 0, -1, -1.0f, -1.0f, -1.0f); } if (funcdef->base.base.flags & FUNCFLAG_FLYBYWIRE) { @@ -12800,7 +12800,7 @@ void bgunCreateFiredProjectile(s32 handnum) weapon->base.projectile->unk098 = funcdef->unk50 * 1.6666666f; if (funcdef->soundnum > 0) { - func0f0939f8(NULL, weapon->base.prop, funcdef->soundnum, -1, -1, 0, 0, 0, 0, -1.0f, 0, -1, -1.0f, -1.0f, -1.0f); + propsnd0f0939f8(NULL, weapon->base.prop, funcdef->soundnum, -1, -1, 0, 0, 0, 0, -1.0f, 0, -1, -1.0f, -1.0f, -1.0f); } if (funcdef->base.base.flags & FUNCFLAG_FLYBYWIRE) { @@ -21473,7 +21473,7 @@ void bgunPlayPropHitSound(struct gset *gset, struct prop *prop, s32 texturenum) || gset->weaponnum == WEAPON_TRACERBUG || gset->weaponnum == WEAPON_TARGETAMPLIFIER || gset->weaponnum == WEAPON_ECMMINE) { - func0f0939f8(NULL, prop, SFX_80AA, -1, -1, 0, 0, 0, NULL, -1, NULL, -1, -1, -1, -1); + propsnd0f0939f8(NULL, prop, SFX_80AA, -1, -1, 0, 0, 0, NULL, -1, NULL, -1, -1, -1, -1); return; } @@ -21618,7 +21618,7 @@ void bgunPlayPropHitSound(struct gset *gset, struct prop *prop, s32 texturenum) || gset->weaponnum == WEAPON_TRACERBUG || gset->weaponnum == WEAPON_TARGETAMPLIFIER || gset->weaponnum == WEAPON_ECMMINE) { - func0f0939f8(NULL, prop, SFX_80AA, -1, -1, 0, 0, 0, NULL, -1, NULL, -1, -1, -1, -1); + propsnd0f0939f8(NULL, prop, SFX_80AA, -1, -1, 0, 0, 0, NULL, -1, NULL, -1, -1, -1, -1); return; } diff --git a/src/game/bondwalk.c b/src/game/bondwalk.c index 38041c216..e76651fd0 100644 --- a/src/game/bondwalk.c +++ b/src/game/bondwalk.c @@ -1037,7 +1037,7 @@ void bwalkUpdateVertical(void) if (sound != -1) { if (sound != -1) { - func0f0939f8(NULL, g_Vars.currentplayer->prop, sound, + propsnd0f0939f8(NULL, g_Vars.currentplayer->prop, sound, -1, -1, 0x8400, 0, 0, 0, -1, NULL, -1, -1, -1, -1); } @@ -1045,7 +1045,7 @@ void bwalkUpdateVertical(void) sound = footstepChooseSound(chr, true); if (sound != -1) { - func0f0939f8(NULL, g_Vars.currentplayer->prop, sound, + propsnd0f0939f8(NULL, g_Vars.currentplayer->prop, sound, -1, -1, 0x8400, 0, 0, 0, -1, NULL, -1, -1, -1, -1); } } @@ -1060,7 +1060,7 @@ void bwalkUpdateVertical(void) SFX_JO_LANDING_05B7 }; - func0f0939f8(NULL, g_Vars.currentplayer->prop, sounds[random() % 3], + propsnd0f0939f8(NULL, g_Vars.currentplayer->prop, sounds[random() % 3], -1, -1, 0x8400, 0, 0, 0, -1, NULL, -1, -1, -1, -1); } } diff --git a/src/game/bot.c b/src/game/bot.c index ea4380578..61906757d 100644 --- a/src/game/bot.c +++ b/src/game/bot.c @@ -1198,7 +1198,7 @@ u32 botPickupProp(struct prop *prop, struct chrdata *chr) } // Pickup sound - func0f0939f8(NULL, prop, SFX_PICKUP_AMMO, -1, + propsnd0f0939f8(NULL, prop, SFX_PICKUP_AMMO, -1, -1, 1024, 0, 0, 0, -1, 0, -1, -1, -1, -1); objFree(obj, false, obj->hidden2 & OBJH2FLAG_CANREGEN); @@ -1249,7 +1249,7 @@ u32 botPickupProp(struct prop *prop, struct chrdata *chr) } // Pickup sound - func0f0939f8(NULL, prop, SFX_PICKUP_AMMO, -1, + propsnd0f0939f8(NULL, prop, SFX_PICKUP_AMMO, -1, -1, 1024, 0, 0, 0, -1, 0, -1, -1, -1, -1); objFree(obj, false, obj->hidden2 & OBJH2FLAG_CANREGEN); @@ -1302,7 +1302,7 @@ u32 botPickupProp(struct prop *prop, struct chrdata *chr) { struct shieldobj *shield = (struct shieldobj *)prop->obj; - func0f0939f8(NULL, prop, SFX_PICKUP_SHIELD, -1, + propsnd0f0939f8(NULL, prop, SFX_PICKUP_SHIELD, -1, -1, 1024, 0, 0, 0, -1, 0, -1, -1, -1, -1); chrSetShield(chr, shield->amount * 8); @@ -1503,7 +1503,7 @@ glabel var7f1b3480nb /* f18aa04: e7a00024 */ swc1 $f0,0x24($sp) /* f18aa08: e7a00030 */ swc1 $f0,0x30($sp) /* f18aa0c: e7a00034 */ swc1 $f0,0x34($sp) -/* f18aa10: 0fc24762 */ jal func0f0939f8 +/* f18aa10: 0fc24762 */ jal propsnd0f0939f8 /* f18aa14: e7a00038 */ swc1 $f0,0x38($sp) /* f18aa18: 8fa4007c */ lw $a0,0x7c($sp) /* f18aa1c: 00002825 */ or $a1,$zero,$zero @@ -1560,7 +1560,7 @@ glabel var7f1b3480nb /* f18aad8: e7a00024 */ swc1 $f0,0x24($sp) /* f18aadc: e7a00030 */ swc1 $f0,0x30($sp) /* f18aae0: e7a00034 */ swc1 $f0,0x34($sp) -/* f18aae4: 0fc24762 */ jal func0f0939f8 +/* f18aae4: 0fc24762 */ jal propsnd0f0939f8 /* f18aae8: e7a00038 */ swc1 $f0,0x38($sp) /* f18aaec: 8fa4007c */ lw $a0,0x7c($sp) /* f18aaf0: 00002825 */ or $a1,$zero,$zero @@ -1668,7 +1668,7 @@ glabel var7f1b3480nb /* f18ac70: e7a00038 */ swc1 $f0,0x38($sp) /* f18ac74: e7a00034 */ swc1 $f0,0x34($sp) /* f18ac78: e7a00030 */ swc1 $f0,0x30($sp) -/* f18ac7c: 0fc24762 */ jal func0f0939f8 +/* f18ac7c: 0fc24762 */ jal propsnd0f0939f8 /* f18ac80: e7a00024 */ swc1 $f0,0x24($sp) /* f18ac84: 3c014100 */ lui $at,0x4100 /* f18ac88: 44813000 */ mtc1 $at,$f6 diff --git a/src/game/botact.c b/src/game/botact.c index 258c90af4..81d22d51a 100644 --- a/src/game/botact.c +++ b/src/game/botact.c @@ -64,10 +64,10 @@ void botactReload(struct chrdata *chr, s32 handnum, bool withsound) if (withsound) { if (aibot->weaponnum == WEAPON_FARSIGHT) { - func0f0939f8(NULL, chr->prop, SFX_RELOAD_FARSIGHT, -1, + propsnd0f0939f8(NULL, chr->prop, SFX_RELOAD_FARSIGHT, -1, -1, 1024, 0, 0, 0, -1, 0, -1, -1, -1, -1); } else { - func0f0939f8(NULL, chr->prop, SFX_RELOAD_DEFAULT, -1, + propsnd0f0939f8(NULL, chr->prop, SFX_RELOAD_DEFAULT, -1, -1, 1024, 0, 0, 0, -1, 0, -1, -1, -1, -1); } } @@ -533,7 +533,7 @@ void botactCreateSlayerRocket(struct chrdata *chr) rocket->base.projectile->unk0b4 = 0x20000000; // Fire rocket sound - func0f0939f8(NULL, rocket->base.prop, SFX_LAUNCH_ROCKET_8053, -1, + propsnd0f0939f8(NULL, rocket->base.prop, SFX_LAUNCH_ROCKET_8053, -1, -1, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1); if (!botactFindRocketRoute(chr, &chr->prop->pos, &target->pos, chr->prop->rooms, target->rooms, rocket->base.projectile)) { diff --git a/src/game/chr.c b/src/game/chr.c index ff861d041..5471f70f6 100644 --- a/src/game/chr.c +++ b/src/game/chr.c @@ -2073,7 +2073,7 @@ void chrCloak(struct chrdata *chr, bool value) chr->hidden |= CHRHFLAG_CLOAKED; if (value) { - func0f0939f8(0, chr->prop, SFX_CLOAK_ON, -1, -1, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1); + propsnd0f0939f8(0, chr->prop, SFX_CLOAK_ON, -1, -1, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1); } } } @@ -2084,7 +2084,7 @@ void chrUncloak(struct chrdata *chr, bool value) chr->hidden &= ~CHRHFLAG_CLOAKED; if (value) { - func0f0939f8(0, chr->prop, SFX_CLOAK_OFF, -1, -1, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1); + propsnd0f0939f8(0, chr->prop, SFX_CLOAK_OFF, -1, -1, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1); } #if PIRACYCHECKS diff --git a/src/game/chraction.c b/src/game/chraction.c index e25ccd3c3..a04b4c874 100644 --- a/src/game/chraction.c +++ b/src/game/chraction.c @@ -4044,7 +4044,7 @@ void chrChoke(struct chrdata *chr, s32 choketype) func0f0926bc(chr->prop, 9, 0); if (!func0f092610(chr->prop, 13)) { - func0f0939f8(NULL, chr->prop, soundnum, -1, + propsnd0f0939f8(NULL, chr->prop, soundnum, -1, -1, 0, 0, 13, NULL, -1, NULL, -1, -1, -1, -1); } } @@ -4585,7 +4585,7 @@ void chrDamage(struct chrdata *chr, f32 damage, struct coord *vector, struct gse u16 sounds[] = { SFX_HIT_METAL_807B, SFX_HIT_METAL_8079, SFX_HATHIT_807C }; damage = 0; - func0f0939f8(NULL, chr->prop, sounds[random() % 3], -1, + propsnd0f0939f8(NULL, chr->prop, sounds[random() % 3], -1, -1, 0, 0, 0, NULL, -1, NULL, -1, -1, -1, -1); } } @@ -8133,7 +8133,7 @@ void chrTickAnim(struct chrdata *chr) && modelGetCurAnimFrame(chr->model) >= 42 && (g_Vars.lvframenum % 2) == 0 && chrGetDistanceToCurrentPlayer(chr) < 800) { - func0f0939f8(NULL, chr->prop, SFX_0037, -1, + propsnd0f0939f8(NULL, chr->prop, SFX_0037, -1, -1, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1); } @@ -8374,7 +8374,7 @@ void chrTickDie(struct chrdata *chr) SFX_DRCAROLL_YOU_WERE_SUPPOSED, }; - func0f0939f8(NULL, chr->prop, phrases[random() % 5], -1, + propsnd0f0939f8(NULL, chr->prop, phrases[random() % 5], -1, -1, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1); chr->voicebox = 0; } @@ -8397,7 +8397,7 @@ void chrTickDie(struct chrdata *chr) // Play shield damage sound chr->soundtimer = 0; var80068080 -= 5; - func0f0939f8(NULL, prop, SFX_SHIELD_DAMAGE, -1, + propsnd0f0939f8(NULL, prop, SFX_SHIELD_DAMAGE, -1, -1, 1024, 0, 0, 0, -1, 0, -1, -1, -1, -1); sparksCreate(prop->rooms[0], prop, &prop->pos, NULL, 0, SPARKTYPE_01); } @@ -8409,10 +8409,10 @@ void chrTickDie(struct chrdata *chr) // If due, play thud 1 sound if (chr->act_die.thudframe1 >= 0 && modelGetCurAnimFrame(model) >= chr->act_die.thudframe1) { if (chr->specialdie == 0) { - func0f0939f8(NULL, chr->prop, thuds[thudindex], -1, + propsnd0f0939f8(NULL, chr->prop, thuds[thudindex], -1, -1, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1); } else if (chr->specialdie != SPECIALDIE_OVERRAILING) { - func0f0939f8(NULL, chr->prop, specialdiesounds[chr->specialdie - 1], -1, + propsnd0f0939f8(NULL, chr->prop, specialdiesounds[chr->specialdie - 1], -1, -1, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1); } @@ -8428,10 +8428,10 @@ void chrTickDie(struct chrdata *chr) // If due, play thud 2 sound if (chr->act_die.thudframe2 >= 0 && modelGetCurAnimFrame(model) >= chr->act_die.thudframe2) { if (chr->specialdie < 5) { - func0f0939f8(NULL, chr->prop, SFX_THUD_808E, -1, + propsnd0f0939f8(NULL, chr->prop, SFX_THUD_808E, -1, -1, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1); } else { - func0f0939f8(NULL, chr->prop, thuds[thudindex], -1, + propsnd0f0939f8(NULL, chr->prop, thuds[thudindex], -1, -1, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1); } @@ -8556,7 +8556,7 @@ void chrTickDruggedDrop(struct chrdata *chr) // If due, play thud 1 sound if (chr->act_die.thudframe1 >= 0 && modelGetCurAnimFrame(model) >= chr->act_die.thudframe1) { - func0f0939f8(NULL, chr->prop, thuds[thudindex], -1, + propsnd0f0939f8(NULL, chr->prop, thuds[thudindex], -1, -1, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1); thudindex++; @@ -8570,7 +8570,7 @@ void chrTickDruggedDrop(struct chrdata *chr) // If due, play thud 2 sound if (chr->act_die.thudframe2 >= 0 && modelGetCurAnimFrame(model) >= chr->act_die.thudframe2) { - func0f0939f8(NULL, chr->prop, thuds[thudindex], -1, + propsnd0f0939f8(NULL, chr->prop, thuds[thudindex], -1, -1, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1); thudindex++; @@ -8814,11 +8814,11 @@ void chrCreateFireslot(struct chrdata *chr, s32 handnum, bool withsound, bool wi if (playsound) { #if VERSION >= VERSION_NTSC_1_0 - func0f0939f8(NULL, chr->prop, soundnum, -1, -1, 0x400, 4, 0x11, NULL, -1, NULL, -1, -1, -1, -1); + propsnd0f0939f8(NULL, chr->prop, soundnum, -1, -1, 0x400, 4, 0x11, NULL, -1, NULL, -1, -1, -1, -1); fireslot->endlvframe = (u32)g_Vars.lvframe60 + duration; chr->hidden2 |= CHRH2FLAG_0020; #else - func0f0939f8(NULL, chr->prop, soundnum, -1, -1, 0x400, 4, 0, NULL, -1, NULL, -1, -1, -1, -1); + propsnd0f0939f8(NULL, chr->prop, soundnum, -1, -1, 0x400, 4, 0, NULL, -1, NULL, -1, -1, -1, -1); fireslot->endlvframe = (u32)g_Vars.lvframe60 + duration; chr->hidden |= CHRHFLAG_00000080; @@ -10797,7 +10797,7 @@ GLOBAL_ASM( /* f0411cc: e7a00024 */ swc1 $f0,0x24($sp) /* f0411d0: e7a00030 */ swc1 $f0,0x30($sp) /* f0411d4: e7a00034 */ swc1 $f0,0x34($sp) - /* f0411d8: 0fc24e7e */ jal func0f0939f8 + /* f0411d8: 0fc24e7e */ jal propsnd0f0939f8 /* f0411dc: e7a00038 */ swc1 $f0,0x38($sp) /* f0411e0: 10000002 */ b .L0f0411ec /* f0411e4: 00000000 */ nop @@ -12395,7 +12395,7 @@ GLOBAL_ASM( /* f041370: e7a00024 */ swc1 $f0,0x24($sp) /* f041374: e7a00030 */ swc1 $f0,0x30($sp) /* f041378: e7a00034 */ swc1 $f0,0x34($sp) - /* f04137c: 0fc24e3a */ jal func0f0939f8 + /* f04137c: 0fc24e3a */ jal propsnd0f0939f8 /* f041380: e7a00038 */ swc1 $f0,0x38($sp) /* f041384: 10000002 */ b .PF0f041390 /* f041388: 00000000 */ nop @@ -13993,7 +13993,7 @@ glabel var7f1a9184 /* f0412fc: e7a00024 */ swc1 $f0,0x24($sp) /* f041300: e7a00030 */ swc1 $f0,0x30($sp) /* f041304: e7a00034 */ swc1 $f0,0x34($sp) -/* f041308: 0fc24e0e */ jal func0f0939f8 +/* f041308: 0fc24e0e */ jal propsnd0f0939f8 /* f04130c: e7a00038 */ swc1 $f0,0x38($sp) /* f041310: 10000002 */ b .PB0f04131c /* f041314: 00000000 */ nop @@ -15583,7 +15583,7 @@ glabel var7f1a9184 /* f0411cc: e7a00024 */ swc1 $f0,0x24($sp) /* f0411d0: e7a00030 */ swc1 $f0,0x30($sp) /* f0411d4: e7a00034 */ swc1 $f0,0x34($sp) -/* f0411d8: 0fc24e7e */ jal func0f0939f8 +/* f0411d8: 0fc24e7e */ jal propsnd0f0939f8 /* f0411dc: e7a00038 */ swc1 $f0,0x38($sp) /* f0411e0: 10000002 */ b .L0f0411ec /* f0411e4: 00000000 */ nop @@ -17173,7 +17173,7 @@ glabel var7f1a9184 /* f0409ac: e7a00024 */ swc1 $f0,0x24($sp) /* f0409b0: e7a00030 */ swc1 $f0,0x30($sp) /* f0409b4: e7a00034 */ swc1 $f0,0x34($sp) -/* f0409b8: 0fc24762 */ jal func0f0939f8 +/* f0409b8: 0fc24762 */ jal propsnd0f0939f8 /* f0409bc: e7a00038 */ swc1 $f0,0x38($sp) /* f0409c0: 10000002 */ beqz $zero,.NB0f0409cc /* f0409c4: 00000000 */ sll $zero,$zero,0x0 @@ -18156,7 +18156,7 @@ glabel var7f1a9184 // // // Play sound // if (func->unk60 > 0) { -// func0f0939f8(NULL, projectileobj->base.prop, func->unk60, -1, +// propsnd0f0939f8(NULL, projectileobj->base.prop, func->unk60, -1, // -1, 0, 0, 0, NULL, -1, NULL, -1, -1, -1, -1); // } // } @@ -21736,7 +21736,7 @@ void chrTickSkJump(struct chrdata *chr) SFX_SKEDAR_ROAR_0534, }; - func0f0939f8(NULL, chr->prop, sounds[random() % 3], -1, + propsnd0f0939f8(NULL, chr->prop, sounds[random() % 3], -1, -1, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1); modelSetAnimation(chr->model, ANIM_SKEDAR_JUMPAIR, 0, 0, -1, 16); modelSetAnimSpeed(chr->model, 1, 0); @@ -26415,7 +26415,7 @@ bool chrIsAvoiding(struct chrdata *chr) void chrDrCarollEmitSparks(struct chrdata *chr) { if (chr && chr->prop) { - func0f0939f8(0, chr->prop, SFX_SHIELD_DAMAGE, -1, -1, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1); + propsnd0f0939f8(0, chr->prop, SFX_SHIELD_DAMAGE, -1, -1, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1); sparksCreate(chr->prop->rooms[0], chr->prop, &chr->prop->pos, NULL, 0, SPARKTYPE_01); } } diff --git a/src/game/chraicommands.c b/src/game/chraicommands.c index aad0f3722..9151f993f 100644 --- a/src/game/chraicommands.c +++ b/src/game/chraicommands.c @@ -4818,7 +4818,7 @@ bool ai00d0(void) s16 padnum = cmd[4] | (cmd[3] << 8); s16 sound = cmd[6] | (cmd[5] << 8); - func0f0939f8(0, NULL, sound, padnum, -1, 2, 0, 0, 0, -1, 0, -1, -1, -1, -1); + propsnd0f0939f8(0, NULL, sound, padnum, -1, 2, 0, 0, 0, -1, 0, -1, -1, -1, -1); g_Vars.aioffset += 7; @@ -7626,7 +7626,7 @@ glabel var7f1a9d64 /* f05a9a0: e7a00038 */ swc1 $f0,0x38($sp) /* f05a9a4: e7a00034 */ swc1 $f0,0x34($sp) /* f05a9a8: e7a00030 */ swc1 $f0,0x30($sp) -/* f05a9ac: 0fc24e3a */ jal func0f0939f8 +/* f05a9ac: 0fc24e3a */ jal propsnd0f0939f8 /* f05a9b0: e7a00024 */ swc1 $f0,0x24($sp) /* f05a9b4: 10000026 */ b .PF0f05aa50 /* f05a9b8: 8faa009c */ lw $t2,0x9c($sp) @@ -7666,7 +7666,7 @@ glabel var7f1a9d64 /* f05aa38: e7a00038 */ swc1 $f0,0x38($sp) /* f05aa3c: e7a00034 */ swc1 $f0,0x34($sp) /* f05aa40: e7a00030 */ swc1 $f0,0x30($sp) -/* f05aa44: 0fc24e3a */ jal func0f0939f8 +/* f05aa44: 0fc24e3a */ jal propsnd0f0939f8 /* f05aa48: e7a00024 */ swc1 $f0,0x24($sp) .PF0f05aa4c: /* f05aa4c: 8faa009c */ lw $t2,0x9c($sp) @@ -7819,7 +7819,7 @@ glabel var7f1a9d64 /* f05ac78: e7a00038 */ swc1 $f0,0x38($sp) /* f05ac7c: e7a00034 */ swc1 $f0,0x34($sp) /* f05ac80: e7a00030 */ swc1 $f0,0x30($sp) -/* f05ac84: 0fc24e3a */ jal func0f0939f8 +/* f05ac84: 0fc24e3a */ jal propsnd0f0939f8 /* f05ac88: e7a00024 */ swc1 $f0,0x24($sp) /* f05ac8c: 1000002a */ b .PF0f05ad38 /* f05ac90: 93a800a3 */ lbu $t0,0xa3($sp) @@ -7865,7 +7865,7 @@ glabel var7f1a9d64 /* f05ad20: e7a00038 */ swc1 $f0,0x38($sp) /* f05ad24: e7a00034 */ swc1 $f0,0x34($sp) /* f05ad28: e7a00030 */ swc1 $f0,0x30($sp) -/* f05ad2c: 0fc24e3a */ jal func0f0939f8 +/* f05ad2c: 0fc24e3a */ jal propsnd0f0939f8 /* f05ad30: e7a00024 */ swc1 $f0,0x24($sp) /* f05ad34: 93a800a3 */ lbu $t0,0xa3($sp) .PF0f05ad38: @@ -8289,7 +8289,7 @@ glabel var7f1a9d64 /* f05a8f4: e7a00038 */ swc1 $f0,0x38($sp) /* f05a8f8: e7a00034 */ swc1 $f0,0x34($sp) /* f05a8fc: e7a00030 */ swc1 $f0,0x30($sp) -/* f05a900: 0fc24e0e */ jal func0f0939f8 +/* f05a900: 0fc24e0e */ jal propsnd0f0939f8 /* f05a904: e7a00024 */ swc1 $f0,0x24($sp) /* f05a908: 10000026 */ b .PB0f05a9a4 /* f05a90c: 8faa009c */ lw $t2,0x9c($sp) @@ -8329,7 +8329,7 @@ glabel var7f1a9d64 /* f05a98c: e7a00038 */ swc1 $f0,0x38($sp) /* f05a990: e7a00034 */ swc1 $f0,0x34($sp) /* f05a994: e7a00030 */ swc1 $f0,0x30($sp) -/* f05a998: 0fc24e0e */ jal func0f0939f8 +/* f05a998: 0fc24e0e */ jal propsnd0f0939f8 /* f05a99c: e7a00024 */ swc1 $f0,0x24($sp) .PB0f05a9a0: /* f05a9a0: 8faa009c */ lw $t2,0x9c($sp) @@ -8482,7 +8482,7 @@ glabel var7f1a9d64 /* f05abcc: e7a00038 */ swc1 $f0,0x38($sp) /* f05abd0: e7a00034 */ swc1 $f0,0x34($sp) /* f05abd4: e7a00030 */ swc1 $f0,0x30($sp) -/* f05abd8: 0fc24e0e */ jal func0f0939f8 +/* f05abd8: 0fc24e0e */ jal propsnd0f0939f8 /* f05abdc: e7a00024 */ swc1 $f0,0x24($sp) /* f05abe0: 1000002a */ b .PB0f05ac8c /* f05abe4: 93a800a3 */ lbu $t0,0xa3($sp) @@ -8528,7 +8528,7 @@ glabel var7f1a9d64 /* f05ac74: e7a00038 */ swc1 $f0,0x38($sp) /* f05ac78: e7a00034 */ swc1 $f0,0x34($sp) /* f05ac7c: e7a00030 */ swc1 $f0,0x30($sp) -/* f05ac80: 0fc24e0e */ jal func0f0939f8 +/* f05ac80: 0fc24e0e */ jal propsnd0f0939f8 /* f05ac84: e7a00024 */ swc1 $f0,0x24($sp) /* f05ac88: 93a800a3 */ lbu $t0,0xa3($sp) .PB0f05ac8c: @@ -8950,7 +8950,7 @@ glabel var7f1a9d64 /* f05a79c: e7a00038 */ swc1 $f0,0x38($sp) /* f05a7a0: e7a00034 */ swc1 $f0,0x34($sp) /* f05a7a4: e7a00030 */ swc1 $f0,0x30($sp) -/* f05a7a8: 0fc24e7e */ jal func0f0939f8 +/* f05a7a8: 0fc24e7e */ jal propsnd0f0939f8 /* f05a7ac: e7a00024 */ swc1 $f0,0x24($sp) /* f05a7b0: 10000026 */ b .L0f05a84c /* f05a7b4: 8faa009c */ lw $t2,0x9c($sp) @@ -8990,7 +8990,7 @@ glabel var7f1a9d64 /* f05a834: e7a00038 */ swc1 $f0,0x38($sp) /* f05a838: e7a00034 */ swc1 $f0,0x34($sp) /* f05a83c: e7a00030 */ swc1 $f0,0x30($sp) -/* f05a840: 0fc24e7e */ jal func0f0939f8 +/* f05a840: 0fc24e7e */ jal propsnd0f0939f8 /* f05a844: e7a00024 */ swc1 $f0,0x24($sp) .L0f05a848: /* f05a848: 8faa009c */ lw $t2,0x9c($sp) @@ -9143,7 +9143,7 @@ glabel var7f1a9d64 /* f05aa74: e7a00038 */ swc1 $f0,0x38($sp) /* f05aa78: e7a00034 */ swc1 $f0,0x34($sp) /* f05aa7c: e7a00030 */ swc1 $f0,0x30($sp) -/* f05aa80: 0fc24e7e */ jal func0f0939f8 +/* f05aa80: 0fc24e7e */ jal propsnd0f0939f8 /* f05aa84: e7a00024 */ swc1 $f0,0x24($sp) /* f05aa88: 1000002a */ b .L0f05ab34 /* f05aa8c: 93a800a3 */ lbu $t0,0xa3($sp) @@ -9189,7 +9189,7 @@ glabel var7f1a9d64 /* f05ab1c: e7a00038 */ swc1 $f0,0x38($sp) /* f05ab20: e7a00034 */ swc1 $f0,0x34($sp) /* f05ab24: e7a00030 */ swc1 $f0,0x30($sp) -/* f05ab28: 0fc24e7e */ jal func0f0939f8 +/* f05ab28: 0fc24e7e */ jal propsnd0f0939f8 /* f05ab2c: e7a00024 */ swc1 $f0,0x24($sp) /* f05ab30: 93a800a3 */ lbu $t0,0xa3($sp) .L0f05ab34: @@ -9611,7 +9611,7 @@ glabel var7f1a9d64 /* f059c04: e7a00038 */ swc1 $f0,0x38($sp) /* f059c08: e7a00034 */ swc1 $f0,0x34($sp) /* f059c0c: e7a00030 */ swc1 $f0,0x30($sp) -/* f059c10: 0fc24762 */ jal func0f0939f8 +/* f059c10: 0fc24762 */ jal propsnd0f0939f8 /* f059c14: e7a00024 */ swc1 $f0,0x24($sp) /* f059c18: 10000026 */ beqz $zero,.NB0f059cb4 /* f059c1c: 8faa009c */ lw $t2,0x9c($sp) @@ -9651,7 +9651,7 @@ glabel var7f1a9d64 /* f059c9c: e7a00038 */ swc1 $f0,0x38($sp) /* f059ca0: e7a00034 */ swc1 $f0,0x34($sp) /* f059ca4: e7a00030 */ swc1 $f0,0x30($sp) -/* f059ca8: 0fc24762 */ jal func0f0939f8 +/* f059ca8: 0fc24762 */ jal propsnd0f0939f8 /* f059cac: e7a00024 */ swc1 $f0,0x24($sp) .NB0f059cb0: /* f059cb0: 8faa009c */ lw $t2,0x9c($sp) @@ -9796,7 +9796,7 @@ glabel var7f1a9d64 /* f059ebc: e7a00038 */ swc1 $f0,0x38($sp) /* f059ec0: e7a00034 */ swc1 $f0,0x34($sp) /* f059ec4: e7a00030 */ swc1 $f0,0x30($sp) -/* f059ec8: 0fc24762 */ jal func0f0939f8 +/* f059ec8: 0fc24762 */ jal propsnd0f0939f8 /* f059ecc: e7a00024 */ swc1 $f0,0x24($sp) /* f059ed0: 1000002a */ beqz $zero,.NB0f059f7c /* f059ed4: 93a800a3 */ lbu $t0,0xa3($sp) @@ -9842,7 +9842,7 @@ glabel var7f1a9d64 /* f059f64: e7a00038 */ swc1 $f0,0x38($sp) /* f059f68: e7a00034 */ swc1 $f0,0x34($sp) /* f059f6c: e7a00030 */ swc1 $f0,0x30($sp) -/* f059f70: 0fc24762 */ jal func0f0939f8 +/* f059f70: 0fc24762 */ jal propsnd0f0939f8 /* f059f74: e7a00024 */ swc1 $f0,0x24($sp) /* f059f78: 93a800a3 */ lbu $t0,0xa3($sp) .NB0f059f7c: @@ -10043,7 +10043,7 @@ glabel var7f1a9d64 // if (audioid != 0x3f7 && audioid != 0x331 && audioid != 0x3a1) { // func0f0926bc(g_Vars.chrdata->prop, 9, 0xffff); // // 7a8 -// func0f0939f8(0, g_Vars.chrdata->prop, audioid, -1, +// propsnd0f0939f8(0, g_Vars.chrdata->prop, audioid, -1, // -1, 8, 0, 9, 0, -1, 0, -1, -1, -1, -1); // } else { // // Audio is "Stop moving", "Stop dodging" or "Stand still" @@ -10052,7 +10052,7 @@ glabel var7f1a9d64 // if (ABS(distance) > 50) { // func0f0926bc(g_Vars.chrdata->prop, 9, 0xffff); // // 840 -// func0f0939f8(0, g_Vars.chrdata->prop, audioid, -1, +// propsnd0f0939f8(0, g_Vars.chrdata->prop, audioid, -1, // -1, 8, 0, 9, 0, -1, 0, -1, -1, -1, -1); // } // } @@ -10110,7 +10110,7 @@ glabel var7f1a9d64 // if (audioid != 0x3f7 && audioid != 0x331 && audioid != 0x3a1) { // func0f0926bc(g_Vars.chrdata->prop, 9, 0xffff); // // a80 -// func0f0939f8(0, g_Vars.chrdata->prop, audioid, -1, +// propsnd0f0939f8(0, g_Vars.chrdata->prop, audioid, -1, // -1, 8, 0, 9, 0, -1, 0, -1, -1, -1, -1); // } else { // // Audio is "Stop moving", "Stop dodging" or "Stand still" @@ -10120,7 +10120,7 @@ glabel var7f1a9d64 // if (ABS(distance) > 50) { // func0f0926bc(g_Vars.chrdata->prop, 9, 0xffff); // // b28 -// func0f0939f8(0, g_Vars.chrdata->prop, audioid, -1, +// propsnd0f0939f8(0, g_Vars.chrdata->prop, audioid, -1, // -1, 8, 0, 9, 0, -1, 0, -1, -1, -1, -1); // } // } diff --git a/src/game/dlights.c b/src/game/dlights.c index 0890652e1..5bb4e2d9c 100644 --- a/src/game/dlights.c +++ b/src/game/dlights.c @@ -508,7 +508,7 @@ bool lightsHandleHit(struct coord *gunpos, struct coord *hitpos, s32 roomnum) soundpos.z = light->bbox[0].z; roomSetLightBroken(roomnum, i); - func0f0939f8(0, 0, SFX_HIT_GLASS, -1, -1, 0x400, 0, 0, &soundpos, -1.0f, 0, roomnum, -1.0f, -1.0f, -1.0f); + propsnd0f0939f8(0, 0, SFX_HIT_GLASS, -1, -1, 0x400, 0, 0, &soundpos, -1.0f, 0, roomnum, -1.0f, -1.0f, -1.0f); return true; } } @@ -1245,7 +1245,7 @@ glabel lightTickBroken /* f003354: e7a00024 */ swc1 $f0,0x24($sp) /* f003358: e7a00030 */ swc1 $f0,0x30($sp) /* f00335c: e7a00034 */ swc1 $f0,0x34($sp) -/* f003360: 0fc24e7e */ jal func0f0939f8 +/* f003360: 0fc24e7e */ jal propsnd0f0939f8 /* f003364: e7a00038 */ swc1 $f0,0x38($sp) /* f003368: 1000000d */ b .L0f0033a0 /* f00336c: 24020001 */ addiu $v0,$zero,0x1 @@ -1564,7 +1564,7 @@ glabel lightTickBroken /* f003354: e7a00024 */ swc1 $f0,0x24($sp) /* f003358: e7a00030 */ swc1 $f0,0x30($sp) /* f00335c: e7a00034 */ swc1 $f0,0x34($sp) -/* f003360: 0fc24e7e */ jal func0f0939f8 +/* f003360: 0fc24e7e */ jal propsnd0f0939f8 /* f003364: e7a00038 */ swc1 $f0,0x38($sp) /* f003368: 1000000d */ b .L0f0033a0 /* f00336c: 24020001 */ addiu $v0,$zero,0x1 @@ -1695,7 +1695,7 @@ const char var7f1a7bc0[] = "dlights.c"; // } // // roomAdjustLighting(roomnum, 0x40, 0x50); -// func0f0939f8(NULL, NULL, propsndGetRandomSparkSound(), -1, -1, 0x400, 0, 0x10, ¢re, -1.0f, 0, roomnum, -1.0f, -1.0f, -1.0f); +// propsnd0f0939f8(NULL, NULL, propsndGetRandomSparkSound(), -1, -1, 0x400, 0, 0x10, ¢re, -1.0f, 0, roomnum, -1.0f, -1.0f, -1.0f); // return true; // } // } else { diff --git a/src/game/explosions.c b/src/game/explosions.c index fe51647af..85858b8b5 100644 --- a/src/game/explosions.c +++ b/src/game/explosions.c @@ -1169,7 +1169,7 @@ u32 explosionTick(struct prop *prop) // Play boom sound if this is the first frame if (exp->age == 0) { - func0f0939f8(NULL, NULL, type->sound, -1, -1, 0, 0, 0, &exp->prop->pos, -1.0f, exp->prop->rooms, -1, -1.0f, -1.0f, -1.0f); + propsnd0f0939f8(NULL, NULL, type->sound, -1, -1, 0, 0, 0, &exp->prop->pos, -1.0f, exp->prop->rooms, -1, -1.0f, -1.0f, -1.0f); } for (k = 0; k < (s32)lvupdate; k++) { diff --git a/src/game/footstep.c b/src/game/footstep.c index a1d70ccda..e190fb01c 100644 --- a/src/game/footstep.c +++ b/src/game/footstep.c @@ -187,9 +187,9 @@ void footstepCheckDefault(struct chrdata *chr) if (soundnum != -1 && chr->footstep != 0) { #if VERSION >= VERSION_NTSC_1_0 - func0f0939f8(NULL, chr->prop, soundnum, -1, -1, 1024, 0, 16, NULL, -1, NULL, -1, -1, -1, -1); + propsnd0f0939f8(NULL, chr->prop, soundnum, -1, -1, 1024, 0, 16, NULL, -1, NULL, -1, -1, -1, -1); #else - func0f0939f8(NULL, chr->prop, soundnum, -1, -1, 0, 0, 0, NULL, -1, NULL, -1, -1, -1, -1); + propsnd0f0939f8(NULL, chr->prop, soundnum, -1, -1, 0, 0, 0, NULL, -1, NULL, -1, -1, -1, -1); #endif } @@ -267,10 +267,10 @@ void footstepCheckMagic(struct chrdata *chr) if (soundnum != -1 && chr->footstep != 0) { #if VERSION >= VERSION_NTSC_1_0 - func0f0939f8(NULL, chr->prop, soundnum, -1, + propsnd0f0939f8(NULL, chr->prop, soundnum, -1, -1, 1024, 0, 16, NULL, -1, NULL, -1, -1, -1, -1); #else - func0f0939f8(NULL, chr->prop, soundnum, -1, + propsnd0f0939f8(NULL, chr->prop, soundnum, -1, -1, 0, 0, 0, NULL, -1, NULL, -1, -1, -1, -1); #endif } diff --git a/src/game/mplayer/scenarios/hackthatmac.inc b/src/game/mplayer/scenarios/hackthatmac.inc index 2559414f2..71fba8afe 100644 --- a/src/game/mplayer/scenarios/hackthatmac.inc +++ b/src/game/mplayer/scenarios/hackthatmac.inc @@ -360,7 +360,7 @@ void htmTickChr(struct chrdata *chr) #else hudmsgCreateWithFlags(langGet(L_MPWEAPONS_018), HUDMSGTYPE_MPSCENARIO, HUDMSGFLAG_ONLYIFALIVE); // "Starting download." #endif - func0f0939f8(NULL, data->terminals[data->dlterminalnum].prop, SFX_01BF, -1, + propsnd0f0939f8(NULL, data->terminals[data->dlterminalnum].prop, SFX_01BF, -1, -1, 2, 2, 0, NULL, -1, NULL, -1, -1, -1, -1); } } diff --git a/src/game/prop.c b/src/game/prop.c index b4f37d911..9d716e129 100644 --- a/src/game/prop.c +++ b/src/game/prop.c @@ -485,7 +485,7 @@ void weaponPlayWhooshSound(s32 weaponnum, struct prop *prop) } #endif } else { - func0f0939f8(NULL, prop, soundnum, -1, + propsnd0f0939f8(NULL, prop, soundnum, -1, -1, 0, 0, 0, NULL, speed, NULL, -1, -1, -1, -1); } } @@ -548,7 +548,7 @@ void func0f060bac(s32 weaponnum, struct prop *prop) } #endif } else { - func0f0939f8(NULL, prop, soundnum, -1, -1, 0, 0, 0, NULL, speed, NULL, -1, -1, -1, -1); + propsnd0f0939f8(NULL, prop, soundnum, -1, -1, 0, 0, 0, NULL, speed, NULL, -1, -1, -1, -1); } } } @@ -6164,19 +6164,19 @@ void propsTickPadEffects(void) if ((random() % 2048) <= 50) { sparksCreate(rooms[0], NULL, &pad.pos, &up, &pad.up, SPARKTYPE_09); - func0f0939f8(NULL, NULL, propsndGetRandomSparkSound(), -1, -1, 0, 0, 0, &pad.pos, -1, rooms, -1, -1, -1, -1); + propsnd0f0939f8(NULL, NULL, propsndGetRandomSparkSound(), -1, -1, 0, 0, 0, &pad.pos, -1, rooms, -1, -1, -1, -1); } if ((random() % 2048) <= 15) { sparksCreate(rooms[0], NULL, &pad.pos, &up, &pad.up, SPARKTYPE_09); sparksCreate(rooms[0], NULL, &pad.pos, &up, &pad.up, SPARKTYPE_0A); - func0f0939f8(NULL, NULL, propsndGetRandomSparkSound(), -1, -1, 0, 0, 0, &pad.pos, -1, rooms, -1, -1, -1, -1); + propsnd0f0939f8(NULL, NULL, propsndGetRandomSparkSound(), -1, -1, 0, 0, 0, &pad.pos, -1, rooms, -1, -1, -1, -1); } if ((random() % 2048) <= 5) { sparksCreate(rooms[0], NULL, &pad.pos, &up, &pad.up, SPARKTYPE_09); sparksCreate(rooms[0], NULL, &pad.pos, &up, &pad.up, SPARKTYPE_0B); - func0f0939f8(NULL, NULL, propsndGetRandomSparkSound(), -1, -1, 0, 0, 0, &pad.pos, -1, rooms, -1, -1, -1, -1); + propsnd0f0939f8(NULL, NULL, propsndGetRandomSparkSound(), -1, -1, 0, 0, 0, &pad.pos, -1, rooms, -1, -1, -1, -1); } break; case PADEFFECT_OUTROSMOKE: diff --git a/src/game/propobj.c b/src/game/propobj.c index f59193d58..c18009083 100644 --- a/src/game/propobj.c +++ b/src/game/propobj.c @@ -6621,7 +6621,7 @@ bool func0f06cd00(struct defaultobj *obj, struct coord *pos, struct coord *arg2, struct coord spa4 = {0, 0, 0}; s0 = false; sparksCreate(prop->rooms[0], prop, &hitthing.unk00, &spa4, &hitthing.unk0c, SPARKTYPE_1A); - func0f0939f8(0, prop, SFX_HIT_WATER, -1, -1, 1024, 0, 0, 0, -1.0f, 0, -1, -1.0f, -1.0f, -1.0f); + propsnd0f0939f8(0, prop, SFX_HIT_WATER, -1, -1, 1024, 0, 0, 0, -1.0f, 0, -1, -1.0f, -1.0f, -1.0f); obj->hidden |= OBJHFLAG_REAPABLE; } } @@ -7879,7 +7879,7 @@ void knifePlayWooshSound(struct defaultobj *obj) func0f0926bc(obj->prop, 1, 0xffff); if (!lvIsPaused()) { - func0f0939f8(0, obj->prop, soundnums[index], -1, -1, 0, 0, 0, 0, -1.0f, 0, -1, -1.0f, -1.0f, -1.0f); + propsnd0f0939f8(0, obj->prop, soundnums[index], -1, -1, 0, 0, 0, 0, -1.0f, 0, -1, -1.0f, -1.0f, -1.0f); obj->projectile->lastwooshframe = g_Vars.lvframe60; } } @@ -12768,7 +12768,7 @@ glabel var7f1ab5c0pf /* f071bb4: e7a00024 */ swc1 $f0,0x24($sp) /* f071bb8: e7a00030 */ swc1 $f0,0x30($sp) /* f071bbc: e7a00034 */ swc1 $f0,0x34($sp) -/* f071bc0: 0fc24e3a */ jal func0f0939f8 +/* f071bc0: 0fc24e3a */ jal propsnd0f0939f8 /* f071bc4: e7a00038 */ swc1 $f0,0x38($sp) .PF0f071bc8: /* f071bc8: 8fae00c0 */ lw $t6,0xc0($sp) @@ -13633,7 +13633,7 @@ glabel var7f1ab5c0pf /* f071b04: e7a00024 */ swc1 $f0,0x24($sp) /* f071b08: e7a00030 */ swc1 $f0,0x30($sp) /* f071b0c: e7a00034 */ swc1 $f0,0x34($sp) -/* f071b10: 0fc24e0e */ jal func0f0939f8 +/* f071b10: 0fc24e0e */ jal propsnd0f0939f8 /* f071b14: e7a00038 */ swc1 $f0,0x38($sp) .PB0f071b18: /* f071b18: 8fae00c0 */ lw $t6,0xc0($sp) @@ -14494,7 +14494,7 @@ glabel var7f1aa314 /* f07192c: e7a00024 */ swc1 $f0,0x24($sp) /* f071930: e7a00030 */ swc1 $f0,0x30($sp) /* f071934: e7a00034 */ swc1 $f0,0x34($sp) -/* f071938: 0fc24e7e */ jal func0f0939f8 +/* f071938: 0fc24e7e */ jal propsnd0f0939f8 /* f07193c: e7a00038 */ swc1 $f0,0x38($sp) .L0f071940: /* f071940: 8fae00c0 */ lw $t6,0xc0($sp) @@ -20759,7 +20759,7 @@ glabel var7f1ab110jf /* f077a08: e7a00024 */ swc1 $f0,0x24($sp) /* f077a0c: e7a00030 */ swc1 $f0,0x30($sp) /* f077a10: e7a00034 */ swc1 $f0,0x34($sp) -/* f077a14: 0fc251de */ jal func0f0939f8 +/* f077a14: 0fc251de */ jal propsnd0f0939f8 /* f077a18: e7a00038 */ swc1 $f0,0x38($sp) /* f077a1c: 3c03800a */ lui $v1,0x800a /* f077a20: 10000052 */ b .JF0f077b6c @@ -20800,7 +20800,7 @@ glabel var7f1ab110jf /* f077aa8: e7a00024 */ swc1 $f0,0x24($sp) /* f077aac: e7a00030 */ swc1 $f0,0x30($sp) /* f077ab0: e7a00034 */ swc1 $f0,0x34($sp) -/* f077ab4: 0fc251de */ jal func0f0939f8 +/* f077ab4: 0fc251de */ jal propsnd0f0939f8 /* f077ab8: e7a00038 */ swc1 $f0,0x38($sp) /* f077abc: 3c01bf80 */ lui $at,0xbf80 /* f077ac0: 44810000 */ mtc1 $at,$f0 @@ -20820,7 +20820,7 @@ glabel var7f1ab110jf /* f077af8: e7a00024 */ swc1 $f0,0x24($sp) /* f077afc: e7a00030 */ swc1 $f0,0x30($sp) /* f077b00: e7a00034 */ swc1 $f0,0x34($sp) -/* f077b04: 0fc251de */ jal func0f0939f8 +/* f077b04: 0fc251de */ jal propsnd0f0939f8 /* f077b08: e7a00038 */ swc1 $f0,0x38($sp) /* f077b0c: 3c03800a */ lui $v1,0x800a /* f077b10: 10000016 */ b .JF0f077b6c @@ -20843,7 +20843,7 @@ glabel var7f1ab110jf /* f077b50: e7a00024 */ swc1 $f0,0x24($sp) /* f077b54: e7a00030 */ swc1 $f0,0x30($sp) /* f077b58: e7a00034 */ swc1 $f0,0x34($sp) -/* f077b5c: 0fc251de */ jal func0f0939f8 +/* f077b5c: 0fc251de */ jal propsnd0f0939f8 /* f077b60: e7a00038 */ swc1 $f0,0x38($sp) /* f077b64: 3c03800a */ lui $v1,0x800a /* f077b68: 8c63a63c */ lw $v1,-0x59c4($v1) @@ -24298,7 +24298,7 @@ glabel var7f1ab6dcpf /* f076b68: e7a00024 */ swc1 $f0,0x24($sp) /* f076b6c: e7a00030 */ swc1 $f0,0x30($sp) /* f076b70: e7a00034 */ swc1 $f0,0x34($sp) -/* f076b74: 0fc24e3a */ jal func0f0939f8 +/* f076b74: 0fc24e3a */ jal propsnd0f0939f8 /* f076b78: e7a00038 */ swc1 $f0,0x38($sp) /* f076b7c: 3c03800a */ lui $v1,0x800a /* f076b80: 10000052 */ b .PF0f076ccc @@ -24339,7 +24339,7 @@ glabel var7f1ab6dcpf /* f076c08: e7a00024 */ swc1 $f0,0x24($sp) /* f076c0c: e7a00030 */ swc1 $f0,0x30($sp) /* f076c10: e7a00034 */ swc1 $f0,0x34($sp) -/* f076c14: 0fc24e3a */ jal func0f0939f8 +/* f076c14: 0fc24e3a */ jal propsnd0f0939f8 /* f076c18: e7a00038 */ swc1 $f0,0x38($sp) /* f076c1c: 3c01bf80 */ lui $at,0xbf80 /* f076c20: 44810000 */ mtc1 $at,$f0 @@ -24359,7 +24359,7 @@ glabel var7f1ab6dcpf /* f076c58: e7a00024 */ swc1 $f0,0x24($sp) /* f076c5c: e7a00030 */ swc1 $f0,0x30($sp) /* f076c60: e7a00034 */ swc1 $f0,0x34($sp) -/* f076c64: 0fc24e3a */ jal func0f0939f8 +/* f076c64: 0fc24e3a */ jal propsnd0f0939f8 /* f076c68: e7a00038 */ swc1 $f0,0x38($sp) /* f076c6c: 3c03800a */ lui $v1,0x800a /* f076c70: 10000016 */ b .PF0f076ccc @@ -24382,7 +24382,7 @@ glabel var7f1ab6dcpf /* f076cb0: e7a00024 */ swc1 $f0,0x24($sp) /* f076cb4: e7a00030 */ swc1 $f0,0x30($sp) /* f076cb8: e7a00034 */ swc1 $f0,0x34($sp) -/* f076cbc: 0fc24e3a */ jal func0f0939f8 +/* f076cbc: 0fc24e3a */ jal propsnd0f0939f8 /* f076cc0: e7a00038 */ swc1 $f0,0x38($sp) /* f076cc4: 3c03800a */ lui $v1,0x800a /* f076cc8: 8c63a51c */ lw $v1,-0x5ae4($v1) @@ -27843,7 +27843,7 @@ glabel var7f1ab6dcpf /* f076ab8: e7a00024 */ swc1 $f0,0x24($sp) /* f076abc: e7a00030 */ swc1 $f0,0x30($sp) /* f076ac0: e7a00034 */ swc1 $f0,0x34($sp) -/* f076ac4: 0fc24e0e */ jal func0f0939f8 +/* f076ac4: 0fc24e0e */ jal propsnd0f0939f8 /* f076ac8: e7a00038 */ swc1 $f0,0x38($sp) /* f076acc: 3c03800a */ lui $v1,0x800a /* f076ad0: 10000052 */ b .PB0f076c1c @@ -27884,7 +27884,7 @@ glabel var7f1ab6dcpf /* f076b58: e7a00024 */ swc1 $f0,0x24($sp) /* f076b5c: e7a00030 */ swc1 $f0,0x30($sp) /* f076b60: e7a00034 */ swc1 $f0,0x34($sp) -/* f076b64: 0fc24e0e */ jal func0f0939f8 +/* f076b64: 0fc24e0e */ jal propsnd0f0939f8 /* f076b68: e7a00038 */ swc1 $f0,0x38($sp) /* f076b6c: 3c01bf80 */ lui $at,0xbf80 /* f076b70: 44810000 */ mtc1 $at,$f0 @@ -27904,7 +27904,7 @@ glabel var7f1ab6dcpf /* f076ba8: e7a00024 */ swc1 $f0,0x24($sp) /* f076bac: e7a00030 */ swc1 $f0,0x30($sp) /* f076bb0: e7a00034 */ swc1 $f0,0x34($sp) -/* f076bb4: 0fc24e0e */ jal func0f0939f8 +/* f076bb4: 0fc24e0e */ jal propsnd0f0939f8 /* f076bb8: e7a00038 */ swc1 $f0,0x38($sp) /* f076bbc: 3c03800a */ lui $v1,0x800a /* f076bc0: 10000016 */ b .PB0f076c1c @@ -27927,7 +27927,7 @@ glabel var7f1ab6dcpf /* f076c00: e7a00024 */ swc1 $f0,0x24($sp) /* f076c04: e7a00030 */ swc1 $f0,0x30($sp) /* f076c08: e7a00034 */ swc1 $f0,0x34($sp) -/* f076c0c: 0fc24e0e */ jal func0f0939f8 +/* f076c0c: 0fc24e0e */ jal propsnd0f0939f8 /* f076c10: e7a00038 */ swc1 $f0,0x38($sp) /* f076c14: 3c03800a */ lui $v1,0x800a /* f076c18: 8c63e4dc */ lw $v1,-0x1b24($v1) @@ -31381,7 +31381,7 @@ glabel var7f1aa438 /* f0768e4: e7a00024 */ swc1 $f0,0x24($sp) /* f0768e8: e7a00030 */ swc1 $f0,0x30($sp) /* f0768ec: e7a00034 */ swc1 $f0,0x34($sp) -/* f0768f0: 0fc24e7e */ jal func0f0939f8 +/* f0768f0: 0fc24e7e */ jal propsnd0f0939f8 /* f0768f4: e7a00038 */ swc1 $f0,0x38($sp) /* f0768f8: 3c03800a */ lui $v1,%hi(g_Vars+0xc) /* f0768fc: 10000052 */ b .L0f076a48 @@ -31422,7 +31422,7 @@ glabel var7f1aa438 /* f076984: e7a00024 */ swc1 $f0,0x24($sp) /* f076988: e7a00030 */ swc1 $f0,0x30($sp) /* f07698c: e7a00034 */ swc1 $f0,0x34($sp) -/* f076990: 0fc24e7e */ jal func0f0939f8 +/* f076990: 0fc24e7e */ jal propsnd0f0939f8 /* f076994: e7a00038 */ swc1 $f0,0x38($sp) /* f076998: 3c01bf80 */ lui $at,0xbf80 /* f07699c: 44810000 */ mtc1 $at,$f0 @@ -31442,7 +31442,7 @@ glabel var7f1aa438 /* f0769d4: e7a00024 */ swc1 $f0,0x24($sp) /* f0769d8: e7a00030 */ swc1 $f0,0x30($sp) /* f0769dc: e7a00034 */ swc1 $f0,0x34($sp) -/* f0769e0: 0fc24e7e */ jal func0f0939f8 +/* f0769e0: 0fc24e7e */ jal propsnd0f0939f8 /* f0769e4: e7a00038 */ swc1 $f0,0x38($sp) /* f0769e8: 3c03800a */ lui $v1,%hi(g_Vars+0xc) /* f0769ec: 10000016 */ b .L0f076a48 @@ -31465,7 +31465,7 @@ glabel var7f1aa438 /* f076a2c: e7a00024 */ swc1 $f0,0x24($sp) /* f076a30: e7a00030 */ swc1 $f0,0x30($sp) /* f076a34: e7a00034 */ swc1 $f0,0x34($sp) -/* f076a38: 0fc24e7e */ jal func0f0939f8 +/* f076a38: 0fc24e7e */ jal propsnd0f0939f8 /* f076a3c: e7a00038 */ swc1 $f0,0x38($sp) /* f076a40: 3c03800a */ lui $v1,%hi(g_Vars+0xc) /* f076a44: 8c639fcc */ lw $v1,%lo(g_Vars+0xc)($v1) @@ -34818,7 +34818,7 @@ glabel var7f1aa438 /* f075518: e7a00024 */ swc1 $f0,0x24($sp) /* f07551c: e7a00030 */ swc1 $f0,0x30($sp) /* f075520: e7a00034 */ swc1 $f0,0x34($sp) -/* f075524: 0fc24762 */ jal func0f0939f8 +/* f075524: 0fc24762 */ jal propsnd0f0939f8 /* f075528: e7a00038 */ swc1 $f0,0x38($sp) /* f07552c: 3c03800a */ lui $v1,0x800a /* f075530: 10000052 */ beqz $zero,.NB0f07567c @@ -34859,7 +34859,7 @@ glabel var7f1aa438 /* f0755b8: e7a00024 */ swc1 $f0,0x24($sp) /* f0755bc: e7a00030 */ swc1 $f0,0x30($sp) /* f0755c0: e7a00034 */ swc1 $f0,0x34($sp) -/* f0755c4: 0fc24762 */ jal func0f0939f8 +/* f0755c4: 0fc24762 */ jal propsnd0f0939f8 /* f0755c8: e7a00038 */ swc1 $f0,0x38($sp) /* f0755cc: 3c01bf80 */ lui $at,0xbf80 /* f0755d0: 44810000 */ mtc1 $at,$f0 @@ -34879,7 +34879,7 @@ glabel var7f1aa438 /* f075608: e7a00024 */ swc1 $f0,0x24($sp) /* f07560c: e7a00030 */ swc1 $f0,0x30($sp) /* f075610: e7a00034 */ swc1 $f0,0x34($sp) -/* f075614: 0fc24762 */ jal func0f0939f8 +/* f075614: 0fc24762 */ jal propsnd0f0939f8 /* f075618: e7a00038 */ swc1 $f0,0x38($sp) /* f07561c: 3c03800a */ lui $v1,0x800a /* f075620: 10000016 */ beqz $zero,.NB0f07567c @@ -34902,7 +34902,7 @@ glabel var7f1aa438 /* f075660: e7a00024 */ swc1 $f0,0x24($sp) /* f075664: e7a00030 */ swc1 $f0,0x30($sp) /* f075668: e7a00034 */ swc1 $f0,0x34($sp) -/* f07566c: 0fc24762 */ jal func0f0939f8 +/* f07566c: 0fc24762 */ jal propsnd0f0939f8 /* f075670: e7a00038 */ swc1 $f0,0x38($sp) /* f075674: 3c03800a */ lui $v1,0x800a /* f075678: 8c63e6cc */ lw $v1,-0x1934($v1) @@ -35339,13 +35339,13 @@ void doorTick(struct prop *doorprop) if (door->frac > soundpoint) { if (prevfrac <= soundpoint) { // frac increased past the soundpoint - func0f0939f8(NULL, doorprop, SFX_DOOR_8014, -1, + propsnd0f0939f8(NULL, doorprop, SFX_DOOR_8014, -1, -1, 0, 0, 12, 0, -1, 0, -1, -1, -1, -1); } } else { if (prevfrac > soundpoint) { // frac decreased past the soundpoint - func0f0939f8(NULL, doorprop, SFX_DOOR_8015, -1, + propsnd0f0939f8(NULL, doorprop, SFX_DOOR_8015, -1, -1, 0, 0, 12, 0, -1, 0, -1, -1, -1, -1); } } @@ -40170,7 +40170,7 @@ glabel var7f1aa5a8 /* f07ac40: e7a00024 */ swc1 $f0,0x24($sp) /* f07ac44: e7a00030 */ swc1 $f0,0x30($sp) /* f07ac48: e7a00034 */ swc1 $f0,0x34($sp) -/* f07ac4c: 0fc24e7e */ jal func0f0939f8 +/* f07ac4c: 0fc24e7e */ jal propsnd0f0939f8 /* f07ac50: e7a00038 */ swc1 $f0,0x38($sp) .L0f07ac54: /* f07ac54: 3c0a800a */ lui $t2,%hi(g_Vars+0x8) @@ -41132,7 +41132,7 @@ glabel var7f1aa5a8 /* f07ade0: e7a00024 */ swc1 $f0,0x24($sp) /* f07ade4: e7a00030 */ swc1 $f0,0x30($sp) /* f07ade8: e7a00034 */ swc1 $f0,0x34($sp) -/* f07adec: 0fc24e0e */ jal func0f0939f8 +/* f07adec: 0fc24e0e */ jal propsnd0f0939f8 /* f07adf0: e7a00038 */ swc1 $f0,0x38($sp) .PB0f07adf4: /* f07adf4: 3c0a800a */ lui $t2,0x800a @@ -42094,7 +42094,7 @@ glabel var7f1aa5a8 /* f07ac40: e7a00024 */ swc1 $f0,0x24($sp) /* f07ac44: e7a00030 */ swc1 $f0,0x30($sp) /* f07ac48: e7a00034 */ swc1 $f0,0x34($sp) -/* f07ac4c: 0fc24e7e */ jal func0f0939f8 +/* f07ac4c: 0fc24e7e */ jal propsnd0f0939f8 /* f07ac50: e7a00038 */ swc1 $f0,0x38($sp) .L0f07ac54: /* f07ac54: 3c0a800a */ lui $t2,%hi(g_Vars+0x8) @@ -43056,7 +43056,7 @@ glabel var7f1aa5a8 /* f07ac40: e7a00024 */ swc1 $f0,0x24($sp) /* f07ac44: e7a00030 */ swc1 $f0,0x30($sp) /* f07ac48: e7a00034 */ swc1 $f0,0x34($sp) -/* f07ac4c: 0fc24e7e */ jal func0f0939f8 +/* f07ac4c: 0fc24e7e */ jal propsnd0f0939f8 /* f07ac50: e7a00038 */ swc1 $f0,0x38($sp) .L0f07ac54: /* f07ac54: 3c0a800a */ lui $t2,%hi(g_Vars+0x8) @@ -46141,7 +46141,7 @@ glabel var7f1aa6e4 /* f07e468: e7a00024 */ swc1 $f0,0x24($sp) /* f07e46c: e7a00030 */ swc1 $f0,0x30($sp) /* f07e470: e7a00034 */ swc1 $f0,0x34($sp) -/* f07e474: 0fc251de */ jal func0f0939f8 +/* f07e474: 0fc251de */ jal propsnd0f0939f8 /* f07e478: e7a00038 */ swc1 $f0,0x38($sp) /* f07e47c: 8fa50278 */ lw $a1,0x278($sp) /* f07e480: 00003825 */ move $a3,$zero @@ -47107,7 +47107,7 @@ glabel var7f1aa6e4 /* f07d3b0: e7a00024 */ swc1 $f0,0x24($sp) /* f07d3b4: e7a00030 */ swc1 $f0,0x30($sp) /* f07d3b8: e7a00034 */ swc1 $f0,0x34($sp) -/* f07d3bc: 0fc24e7e */ jal func0f0939f8 +/* f07d3bc: 0fc24e7e */ jal propsnd0f0939f8 /* f07d3c0: e7a00038 */ swc1 $f0,0x38($sp) /* f07d3c4: 8fa50278 */ lw $a1,0x278($sp) /* f07d3c8: 00003825 */ or $a3,$zero,$zero @@ -48073,7 +48073,7 @@ glabel var7f1aa6e4 /* f07d3b0: e7a00024 */ swc1 $f0,0x24($sp) /* f07d3b4: e7a00030 */ swc1 $f0,0x30($sp) /* f07d3b8: e7a00034 */ swc1 $f0,0x34($sp) -/* f07d3bc: 0fc24e7e */ jal func0f0939f8 +/* f07d3bc: 0fc24e7e */ jal propsnd0f0939f8 /* f07d3c0: e7a00038 */ swc1 $f0,0x38($sp) /* f07d3c4: 8fa50278 */ lw $a1,0x278($sp) /* f07d3c8: 00003825 */ or $a3,$zero,$zero @@ -49037,7 +49037,7 @@ glabel var7f1aa6e0 /* f07be5c: e7a00024 */ swc1 $f0,0x24($sp) /* f07be60: e7a00030 */ swc1 $f0,0x30($sp) /* f07be64: e7a00034 */ swc1 $f0,0x34($sp) -/* f07be68: 0fc24762 */ jal func0f0939f8 +/* f07be68: 0fc24762 */ jal propsnd0f0939f8 /* f07be6c: e7a00038 */ swc1 $f0,0x38($sp) /* f07be70: 8fa50278 */ lw $a1,0x278($sp) /* f07be74: 00003825 */ or $a3,$zero,$zero @@ -49913,7 +49913,7 @@ glabel var7f1aa6e0 // hovercar->sparkstimer60 = 50; // // // Play damage sound -// func0f0939f8(NULL, prop, SFX_SHIELD_DAMAGE, -1, +// propsnd0f0939f8(NULL, prop, SFX_SHIELD_DAMAGE, -1, // -1, 1024, 0, 0, 0, -1, 0, -1, -1, -1, -1); // // // Create sparks @@ -50435,7 +50435,7 @@ u32 objTick(struct prop *prop) if (!silent) { // Play respawn sound - func0f0939f8(NULL, prop, SFX_REGEN, -1, + propsnd0f0939f8(NULL, prop, SFX_REGEN, -1, -1, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1); } } @@ -57541,7 +57541,7 @@ s32 propPlayPickupSound(struct prop *prop, s32 weapon) sound = SFX_PICKUP_GUN; } - return func0f0939f8(NULL, prop, sound, -1, + return propsnd0f0939f8(NULL, prop, sound, -1, -1, 1024, 0, 0, 0, -1, 0, -1, -1, -1, -1); } @@ -62697,21 +62697,21 @@ void doorPlayOpeningSound(s32 soundtype, struct prop *prop) if (sound1) { #if VERSION >= VERSION_NTSC_1_0 - func0f0939f8(NULL, prop, sound1, -1, + propsnd0f0939f8(NULL, prop, sound1, -1, -1, 1024, 0, 12, 0, -1, 0, -1, -1, -1, -1); #else - func0f0939f8(NULL, prop, sound1, -1, + propsnd0f0939f8(NULL, prop, sound1, -1, -1, 0, 0, 12, 0, -1, 0, -1, -1, -1, -1); #endif } if (sound2) { - func0f0939f8(NULL, prop, sound2, -1, + propsnd0f0939f8(NULL, prop, sound2, -1, -1, 0, 0, 12, 0, -1, 0, -1, -1, -1, -1); } if (sound3) { - func0f0939f8(NULL, prop, sound3, -1, + propsnd0f0939f8(NULL, prop, sound3, -1, -1, 0, 0, 12, 0, -1, 0, -1, -1, -1, -1); } } @@ -62761,21 +62761,21 @@ void doorPlayClosingSound(s32 soundtype, struct prop *prop) if (sound1) { #if VERSION >= VERSION_NTSC_1_0 - func0f0939f8(NULL, prop, sound1, -1, + propsnd0f0939f8(NULL, prop, sound1, -1, -1, 1024, 0, 12, 0, -1, 0, -1, -1, -1, -1); #else - func0f0939f8(NULL, prop, sound1, -1, + propsnd0f0939f8(NULL, prop, sound1, -1, -1, 0, 0, 12, 0, -1, 0, -1, -1, -1, -1); #endif } if (sound2) { - func0f0939f8(NULL, prop, sound2, -1, + propsnd0f0939f8(NULL, prop, sound2, -1, -1, 0, 0, 12, 0, -1, 0, -1, -1, -1, -1); } if (sound3) { - func0f0939f8(NULL, prop, sound3, -1, + propsnd0f0939f8(NULL, prop, sound3, -1, -1, 0, 0, 12, 0, -1, 0, -1, -1, -1, -1); } } @@ -62824,10 +62824,10 @@ void doorPlayOpenedSound(s32 soundtype, struct prop *prop) if (sound) { #if VERSION >= VERSION_NTSC_1_0 - func0f0939f8(NULL, prop, sound, -1, + propsnd0f0939f8(NULL, prop, sound, -1, -1, 1024, 0, 12, 0, -1, 0, -1, -1, -1, -1); #else - func0f0939f8(NULL, prop, sound, -1, + propsnd0f0939f8(NULL, prop, sound, -1, -1, 0, 0, 12, 0, -1, 0, -1, -1, -1, -1); #endif } @@ -62874,10 +62874,10 @@ void doorPlayClosedSound(s32 soundtype, struct prop *prop) if (sound) { #if VERSION >= VERSION_NTSC_1_0 - func0f0939f8(NULL, prop, sound, -1, + propsnd0f0939f8(NULL, prop, sound, -1, -1, 1024, 0, 12, 0, -1, 0, -1, -1, -1, -1); #else - func0f0939f8(NULL, prop, sound, -1, + propsnd0f0939f8(NULL, prop, sound, -1, -1, 0, 0, 12, 0, -1, 0, -1, -1, -1, -1); #endif } @@ -63254,10 +63254,10 @@ void doorCreateSparks(struct doorobj *door) sparksCreate(door->base.prop->rooms[0], door->base.prop, &sp88, &sp70, &pad.up, SPARKTYPE_0D); } - func0f0939f8(NULL, door->base.prop, propsndGetRandomSparkSound(), -1, + propsnd0f0939f8(NULL, door->base.prop, propsndGetRandomSparkSound(), -1, -1, 0, 0, 0, &sp88, -1, door->base.prop->rooms, -1, -1, -1, -1); - func0f0939f8(NULL, door->base.prop, propsndGetRandomSparkSound(), -1, + propsnd0f0939f8(NULL, door->base.prop, propsndGetRandomSparkSound(), -1, -1, 0, 0, 0, &sp7c, -1, door->base.prop->rooms, -1, -1, -1, -1); for (i = 0; door->base.prop->rooms[i] != -1; i++) { @@ -64638,22 +64638,22 @@ void projectileCreate(struct prop *fromprop, struct fireslotthing *arg1, struct switch (weaponnum) { case WEAPON_CHOPPERGUN: func0f0926bc(fromprop, 7, 0xffff); - func0f0939f8(0, fromprop, SFX_810E, -1, -1, 0, 0, 7, 0, -1.0f, 0, -1, -1.0f, -1.0f, -1.0f); + propsnd0f0939f8(0, fromprop, SFX_810E, -1, -1, 0, 0, 7, 0, -1.0f, 0, -1, -1.0f, -1.0f, -1.0f); arg1->unk08 = g_Vars.lvframe60 + 4; break; case WEAPON_RCP45: func0f0926bc(fromprop, 1, 0xffff); - func0f0939f8(0, fromprop, SFX_805A, -1, -1, 0, 0, 0, 0, -1.0f, 0, -1, -1.0f, -1.0f, -1.0f); + propsnd0f0939f8(0, fromprop, SFX_805A, -1, -1, 0, 0, 0, 0, -1.0f, 0, -1, -1.0f, -1.0f, -1.0f); arg1->unk08 = g_Vars.lvframe60 + 2; break; case WEAPON_WATCHLASER: func0f0926bc(fromprop, 1, 0xffff); - func0f0939f8(0, fromprop, SFX_8043, -1, -1, 0, 0, 0, 0, -1.0f, 0, -1, -1.0f, -1.0f, -1.0f); + propsnd0f0939f8(0, fromprop, SFX_8043, -1, -1, 0, 0, 0, 0, -1.0f, 0, -1, -1.0f, -1.0f, -1.0f); arg1->unk08 = g_Vars.lvframe60 + 8; break; default: func0f0926bc(fromprop, 1, 0xffff); - func0f0939f8(0, fromprop, SFX_8045, -1, -1, 0, 0, 0, 0, -1.0f, 0, -1, -1.0f, -1.0f, -1.0f); + propsnd0f0939f8(0, fromprop, SFX_8045, -1, -1, 0, 0, 0, 0, -1.0f, 0, -1, -1.0f, -1.0f, -1.0f); arg1->unk08 = g_Vars.lvframe60 + 2; break; } @@ -64707,7 +64707,7 @@ void projectileCreate(struct prop *fromprop, struct fireslotthing *arg1, struct rocket->base.projectile->unk014 = sp120.y; rocket->base.projectile->unk018 = sp120.z; - func0f0939f8(NULL, rocket->base.prop, SFX_LAUNCH_ROCKET_8053, -1, -1, 0, 0, 0, 0, -1.0f, 0, -1, -1.0f, -1.0f, -1.0f); + propsnd0f0939f8(NULL, rocket->base.prop, SFX_LAUNCH_ROCKET_8053, -1, -1, 0, 0, 0, 0, -1.0f, 0, -1, -1.0f, -1.0f, -1.0f); } } } diff --git a/src/game/propsnd.c b/src/game/propsnd.c index a57bf6559..eb6d931ef 100644 --- a/src/game/propsnd.c +++ b/src/game/propsnd.c @@ -175,7 +175,7 @@ void propsnd0f09294c(struct prop *prop, s16 soundnum, s32 arg2) } } - func0f0939f8(NULL, prop, soundnum, -1, -1, 2, 0, arg2, 0, -1.0f, 0, -1, -1.0f, -1.0f, -1.0f); + propsnd0f0939f8(NULL, prop, soundnum, -1, -1, 2, 0, arg2, 0, -1.0f, 0, -1, -1.0f, -1.0f, -1.0f); } } @@ -3544,1103 +3544,301 @@ void func0f0938ec(struct prop *prop) } #endif +s16 propsnd0f0939f8( + struct audiochannel *channel, + struct prop *prop, + s16 soundnum, + s16 padnum, + s32 arg4, + u16 flags, + u16 flags2, + s32 arg7, + struct coord *pos, + f32 arg9, + s16 *rooms, + s32 room, + f32 arg12, + f32 arg13, + f32 arg14) +{ + union soundnumhack spac; + OSPri prevpri; + u32 stack[2]; + s32 tmp; + #if VERSION >= VERSION_NTSC_1_0 -GLOBAL_ASM( -glabel func0f0939f8 -.late_rodata -glabel var7f1ab744 -.word 0x451c4000 -glabel var7f1ab748 -.word 0x453b8000 -.text -/* f0939f8: 27bdff50 */ addiu $sp,$sp,-176 -/* f0939fc: 8fae00cc */ lw $t6,0xcc($sp) -/* f093a00: afb00018 */ sw $s0,0x18($sp) -/* f093a04: 24010011 */ addiu $at,$zero,0x11 -/* f093a08: 00808025 */ or $s0,$a0,$zero -/* f093a0c: afbf001c */ sw $ra,0x1c($sp) -/* f093a10: afa500b4 */ sw $a1,0xb4($sp) -/* f093a14: afa600b8 */ sw $a2,0xb8($sp) -/* f093a18: 15c10003 */ bne $t6,$at,.L0f093a28 -/* f093a1c: afa700bc */ sw $a3,0xbc($sp) -/* f093a20: 0fc24e3b */ jal func0f0938ec -/* f093a24: 00a02025 */ or $a0,$a1,$zero -.L0f093a28: -/* f093a28: 87af00ba */ lh $t7,0xba($sp) -/* f093a2c: 8fb800cc */ lw $t8,0xcc($sp) -/* f093a30: 1600002b */ bnez $s0,.L0f093ae0 -/* f093a34: a7af00ac */ sh $t7,0xac($sp) -/* f093a38: 24010010 */ addiu $at,$zero,0x10 -/* f093a3c: 13010007 */ beq $t8,$at,.L0f093a5c -/* f093a40: 3c198006 */ lui $t9,%hi(var8005ddd4) -/* f093a44: 8f39ddd4 */ lw $t9,%lo(var8005ddd4)($t9) -/* f093a48: 2b21000d */ slti $at,$t9,0xd -/* f093a4c: 14200003 */ bnez $at,.L0f093a5c -/* f093a50: 00000000 */ nop -/* f093a54: 10000175 */ b .L0f09402c -/* f093a58: 2402ffff */ addiu $v0,$zero,-1 -.L0f093a5c: -/* f093a5c: 3c068009 */ lui $a2,%hi(g_Is4Mb) -/* f093a60: 90c60af0 */ lbu $a2,%lo(g_Is4Mb)($a2) -/* f093a64: 24070001 */ addiu $a3,$zero,0x1 -/* f093a68: 24040008 */ addiu $a0,$zero,0x8 -/* f093a6c: 14e60003 */ bne $a3,$a2,.L0f093a7c -/* f093a70: 24020028 */ addiu $v0,$zero,0x28 -/* f093a74: 10000001 */ b .L0f093a7c -/* f093a78: 2402001e */ addiu $v0,$zero,0x1e -.L0f093a7c: -/* f093a7c: 28410009 */ slti $at,$v0,0x9 -/* f093a80: 14200017 */ bnez $at,.L0f093ae0 -/* f093a84: 3c088007 */ lui $t0,%hi(g_AudioChannels) -/* f093a88: 8d08ae10 */ lw $t0,%lo(g_AudioChannels)($t0) -/* f093a8c: 00042900 */ sll $a1,$a0,0x4 -/* f093a90: 00a42823 */ subu $a1,$a1,$a0 -/* f093a94: 000528c0 */ sll $a1,$a1,0x3 -/* f093a98: 01051821 */ addu $v1,$t0,$a1 -/* f093a9c: 946a0030 */ lhu $t2,0x30($v1) -.L0f093aa0: -/* f093aa0: 24630078 */ addiu $v1,$v1,0x78 -/* f093aa4: 24020028 */ addiu $v0,$zero,0x28 -/* f093aa8: 314b0001 */ andi $t3,$t2,0x1 -/* f093aac: 51600005 */ beqzl $t3,.L0f093ac4 -/* f093ab0: 24840001 */ addiu $a0,$a0,0x1 -/* f093ab4: 00a88021 */ addu $s0,$a1,$t0 -/* f093ab8: 10000009 */ b .L0f093ae0 -/* f093abc: a604002e */ sh $a0,0x2e($s0) -/* f093ac0: 24840001 */ addiu $a0,$a0,0x1 -.L0f093ac4: -/* f093ac4: 14e60003 */ bne $a3,$a2,.L0f093ad4 -/* f093ac8: 24a50078 */ addiu $a1,$a1,0x78 -/* f093acc: 10000001 */ b .L0f093ad4 -/* f093ad0: 2402001e */ addiu $v0,$zero,0x1e -.L0f093ad4: -/* f093ad4: 0082082a */ slt $at,$a0,$v0 -/* f093ad8: 5420fff1 */ bnezl $at,.L0f093aa0 -/* f093adc: 946a0030 */ lhu $t2,0x30($v1) -.L0f093ae0: -/* f093ae0: 87ac00be */ lh $t4,0xbe($sp) -/* f093ae4: 24050042 */ addiu $a1,$zero,0x42 -/* f093ae8: 05800008 */ bltz $t4,.L0f093b0c -/* f093aec: 01802025 */ or $a0,$t4,$zero -/* f093af0: 0fc456ac */ jal padUnpack -/* f093af4: 27a60048 */ addiu $a2,$sp,0x48 -/* f093af8: 8fad0090 */ lw $t5,0x90($sp) -/* f093afc: 27a90048 */ addiu $t1,$sp,0x48 -/* f093b00: afa900d0 */ sw $t1,0xd0($sp) -/* f093b04: afa000b4 */ sw $zero,0xb4($sp) -/* f093b08: afad00dc */ sw $t5,0xdc($sp) -.L0f093b0c: -/* f093b0c: 16000003 */ bnez $s0,.L0f093b1c -/* f093b10: 8fa900d0 */ lw $t1,0xd0($sp) -/* f093b14: 10000145 */ b .L0f09402c -/* f093b18: 2402ffff */ addiu $v0,$zero,-1 -.L0f093b1c: -/* f093b1c: 3c038007 */ lui $v1,%hi(g_AudioPrevUuid) -/* f093b20: 2463ae14 */ addiu $v1,$v1,%lo(g_AudioPrevUuid) -/* f093b24: 8c620000 */ lw $v0,0x0($v1) -/* f093b28: 44801000 */ mtc1 $zero,$f2 -/* f093b2c: 24190040 */ addiu $t9,$zero,0x40 -/* f093b30: 2c41ffff */ sltiu $at,$v0,-1 -/* f093b34: 10200003 */ beqz $at,.L0f093b44 -/* f093b38: 244e0001 */ addiu $t6,$v0,0x1 -/* f093b3c: 10000002 */ b .L0f093b48 -/* f093b40: ac6e0000 */ sw $t6,0x0($v1) -.L0f093b44: -/* f093b44: ac600000 */ sw $zero,0x0($v1) -.L0f093b48: -/* f093b48: 97af00c6 */ lhu $t7,0xc6($sp) -/* f093b4c: 8fa200c0 */ lw $v0,0xc0($sp) -/* f093b50: 2407ffff */ addiu $a3,$zero,-1 -/* f093b54: a60f0030 */ sh $t7,0x30($s0) -/* f093b58: 97b800ca */ lhu $t8,0xca($sp) -/* f093b5c: ae000000 */ sw $zero,0x0($s0) -/* f093b60: a6070006 */ sh $a3,0x6($s0) -/* f093b64: a6070008 */ sh $a3,0x8($s0) -/* f093b68: a607000e */ sh $a3,0xe($s0) -/* f093b6c: 10470003 */ beq $v0,$a3,.L0f093b7c -/* f093b70: a6180032 */ sh $t8,0x32($s0) -/* f093b74: 10000002 */ b .L0f093b80 -/* f093b78: a6020004 */ sh $v0,0x4($s0) -.L0f093b7c: -/* f093b7c: a6070004 */ sh $a3,0x4($s0) -.L0f093b80: -/* f093b80: c7a000d4 */ lwc1 $f0,0xd4($sp) -/* f093b84: 240a7fff */ addiu $t2,$zero,0x7fff -/* f093b88: 240b0001 */ addiu $t3,$zero,0x1 -/* f093b8c: 4600103c */ c.lt.s $f2,$f0 -/* f093b90: a619000a */ sh $t9,0xa($s0) -/* f093b94: a600000c */ sh $zero,0xc($s0) -/* f093b98: a60a0010 */ sh $t2,0x10($s0) -/* f093b9c: 45000003 */ bc1f .L0f093bac -/* f093ba0: a20b001a */ sb $t3,0x1a($s0) -/* f093ba4: 10000005 */ b .L0f093bbc -/* f093ba8: e6000044 */ swc1 $f0,0x44($s0) -.L0f093bac: -/* f093bac: 3c01bf80 */ lui $at,0xbf80 -/* f093bb0: 44812000 */ mtc1 $at,$f4 -/* f093bb4: 00000000 */ nop -/* f093bb8: e6040044 */ swc1 $f4,0x44($s0) -.L0f093bbc: -/* f093bbc: c7a000e0 */ lwc1 $f0,0xe0($sp) -/* f093bc0: c6060044 */ lwc1 $f6,0x44($s0) -/* f093bc4: ae070020 */ sw $a3,0x20($s0) -/* f093bc8: ae07001c */ sw $a3,0x1c($s0) -/* f093bcc: e6060048 */ swc1 $f6,0x48($s0) -/* f093bd0: 87ac00be */ lh $t4,0xbe($sp) -/* f093bd4: 4600103c */ c.lt.s $f2,$f0 -/* f093bd8: 3c01bf80 */ lui $at,0xbf80 -/* f093bdc: a60c0024 */ sh $t4,0x24($s0) -/* f093be0: 8fad00b4 */ lw $t5,0xb4($sp) -/* f093be4: 44814000 */ mtc1 $at,$f8 -/* f093be8: ae0d0050 */ sw $t5,0x50($s0) -/* f093bec: 8fae00cc */ lw $t6,0xcc($sp) -/* f093bf0: a6020012 */ sh $v0,0x12($s0) -/* f093bf4: e6080040 */ swc1 $f8,0x40($s0) -/* f093bf8: 45000003 */ bc1f .L0f093c08 -/* f093bfc: a60e0028 */ sh $t6,0x28($s0) -/* f093c00: 10000005 */ b .L0f093c18 -/* f093c04: e6000034 */ swc1 $f0,0x34($s0) -.L0f093c08: -/* f093c08: 3c0143c8 */ lui $at,0x43c8 -/* f093c0c: 44815000 */ mtc1 $at,$f10 -/* f093c10: 00000000 */ nop -/* f093c14: e60a0034 */ swc1 $f10,0x34($s0) -.L0f093c18: -/* f093c18: c7a000e4 */ lwc1 $f0,0xe4($sp) -/* f093c1c: 4600103c */ c.lt.s $f2,$f0 -/* f093c20: 00000000 */ nop -/* f093c24: 45000003 */ bc1f .L0f093c34 -/* f093c28: 00000000 */ nop -/* f093c2c: 10000004 */ b .L0f093c40 -/* f093c30: e6000038 */ swc1 $f0,0x38($s0) -.L0f093c34: -/* f093c34: 3c017f1b */ lui $at,%hi(var7f1ab744) -/* f093c38: c430b744 */ lwc1 $f16,%lo(var7f1ab744)($at) -/* f093c3c: e6100038 */ swc1 $f16,0x38($s0) -.L0f093c40: -/* f093c40: c7a000e8 */ lwc1 $f0,0xe8($sp) -/* f093c44: 4600103c */ c.lt.s $f2,$f0 -/* f093c48: 00000000 */ nop -/* f093c4c: 45000003 */ bc1f .L0f093c5c -/* f093c50: 00000000 */ nop -/* f093c54: 10000004 */ b .L0f093c68 -/* f093c58: e600003c */ swc1 $f0,0x3c($s0) -.L0f093c5c: -/* f093c5c: 3c017f1b */ lui $at,%hi(var7f1ab748) -/* f093c60: c432b748 */ lwc1 $f18,%lo(var7f1ab748)($at) -/* f093c64: e612003c */ swc1 $f18,0x3c($s0) -.L0f093c68: -/* f093c68: a6000018 */ sh $zero,0x18($s0) -/* f093c6c: 8c6f0000 */ lw $t7,0x0($v1) -/* f093c70: ae0f0074 */ sw $t7,0x74($s0) -/* f093c74: 8fb800ac */ lw $t8,0xac($sp) -/* f093c78: 0018cfc2 */ srl $t9,$t8,0x1f -/* f093c7c: 53200065 */ beqzl $t9,.L0f093e14 -/* f093c80: 860c0018 */ lh $t4,0x18($s0) -/* f093c84: 97a400ac */ lhu $a0,0xac($sp) -/* f093c88: 3c0c8006 */ lui $t4,%hi(g_AudioRussMappings) -/* f093c8c: 258cdde4 */ addiu $t4,$t4,%lo(g_AudioRussMappings) -/* f093c90: 308a7fff */ andi $t2,$a0,0x7fff -/* f093c94: 000a5880 */ sll $t3,$t2,0x2 -/* f093c98: 016c1021 */ addu $v0,$t3,$t4 -/* f093c9c: 94450002 */ lhu $a1,0x2($v0) -/* f093ca0: 3c0e8006 */ lui $t6,%hi(g_AudioConfigs) -/* f093ca4: 25cee4d8 */ addiu $t6,$t6,%lo(g_AudioConfigs) -/* f093ca8: 00056940 */ sll $t5,$a1,0x5 -/* f093cac: 01ae1821 */ addu $v1,$t5,$t6 -/* f093cb0: c4640000 */ lwc1 $f4,0x0($v1) -/* f093cb4: 84480000 */ lh $t0,0x0($v0) -/* f093cb8: 24010064 */ addiu $at,$zero,0x64 -/* f093cbc: e6040034 */ swc1 $f4,0x34($s0) -/* f093cc0: c4660004 */ lwc1 $f6,0x4($v1) -/* f093cc4: e6060038 */ swc1 $f6,0x38($s0) -/* f093cc8: c4680008 */ lwc1 $f8,0x8($v1) -/* f093ccc: e608003c */ swc1 $f8,0x3c($s0) -/* f093cd0: 8c6f0018 */ lw $t7,0x18($v1) -/* f093cd4: a60f0018 */ sh $t7,0x18($s0) -/* f093cd8: 8c660010 */ lw $a2,0x10($v1) -/* f093cdc: 10c10007 */ beq $a2,$at,.L0f093cfc -/* f093ce0: 0006c080 */ sll $t8,$a2,0x2 -/* f093ce4: 0306c021 */ addu $t8,$t8,$a2 -/* f093ce8: 0018c0c0 */ sll $t8,$t8,0x3 -/* f093cec: 0306c021 */ addu $t8,$t8,$a2 -/* f093cf0: 0018c0c0 */ sll $t8,$t8,0x3 -/* f093cf4: 0306c023 */ subu $t8,$t8,$a2 -/* f093cf8: a6180010 */ sh $t8,0x10($s0) -.L0f093cfc: -/* f093cfc: c460000c */ lwc1 $f0,0xc($v1) -/* f093d00: 4600103c */ c.lt.s $f2,$f0 -/* f093d04: 00000000 */ nop -/* f093d08: 45020003 */ bc1fl .L0f093d18 -/* f093d0c: 8c620014 */ lw $v0,0x14($v1) -/* f093d10: e6000044 */ swc1 $f0,0x44($s0) -/* f093d14: 8c620014 */ lw $v0,0x14($v1) -.L0f093d18: -/* f093d18: 50470006 */ beql $v0,$a3,.L0f093d34 -/* f093d1c: 8c62001c */ lw $v0,0x1c($v1) -/* f093d20: 96190030 */ lhu $t9,0x30($s0) -/* f093d24: a602000a */ sh $v0,0xa($s0) -/* f093d28: 372a0020 */ ori $t2,$t9,0x20 -/* f093d2c: a60a0030 */ sh $t2,0x30($s0) -/* f093d30: 8c62001c */ lw $v0,0x1c($v1) -.L0f093d34: -/* f093d34: 304b0001 */ andi $t3,$v0,0x1 -/* f093d38: 51600006 */ beqzl $t3,.L0f093d54 -/* f093d3c: 304e0004 */ andi $t6,$v0,0x4 -/* f093d40: 960c0030 */ lhu $t4,0x30($s0) -/* f093d44: 358d0800 */ ori $t5,$t4,0x800 -/* f093d48: a60d0030 */ sh $t5,0x30($s0) -/* f093d4c: 8c62001c */ lw $v0,0x1c($v1) -/* f093d50: 304e0004 */ andi $t6,$v0,0x4 -.L0f093d54: -/* f093d54: 51c00006 */ beqzl $t6,.L0f093d70 -/* f093d58: 30590008 */ andi $t9,$v0,0x8 -/* f093d5c: 960f0032 */ lhu $t7,0x32($s0) -/* f093d60: 35f80001 */ ori $t8,$t7,0x1 -/* f093d64: a6180032 */ sh $t8,0x32($s0) -/* f093d68: 8c62001c */ lw $v0,0x1c($v1) -/* f093d6c: 30590008 */ andi $t9,$v0,0x8 -.L0f093d70: -/* f093d70: 5320000b */ beqzl $t9,.L0f093da0 -/* f093d74: 304e0010 */ andi $t6,$v0,0x10 -/* f093d78: 860a0004 */ lh $t2,0x4($s0) -/* f093d7c: 54ea0004 */ bnel $a3,$t2,.L0f093d90 -/* f093d80: 960c0030 */ lhu $t4,0x30($s0) -/* f093d84: 860b0010 */ lh $t3,0x10($s0) -/* f093d88: a60b0004 */ sh $t3,0x4($s0) -/* f093d8c: 960c0030 */ lhu $t4,0x30($s0) -.L0f093d90: -/* f093d90: 358d8000 */ ori $t5,$t4,0x8000 -/* f093d94: a60d0030 */ sh $t5,0x30($s0) -/* f093d98: 8c62001c */ lw $v0,0x1c($v1) -/* f093d9c: 304e0010 */ andi $t6,$v0,0x10 -.L0f093da0: -/* f093da0: 51c00006 */ beqzl $t6,.L0f093dbc -/* f093da4: 30590020 */ andi $t9,$v0,0x20 -/* f093da8: 960f0032 */ lhu $t7,0x32($s0) -/* f093dac: 35f80020 */ ori $t8,$t7,0x20 -/* f093db0: a6180032 */ sh $t8,0x32($s0) -/* f093db4: 8c62001c */ lw $v0,0x1c($v1) -/* f093db8: 30590020 */ andi $t9,$v0,0x20 -.L0f093dbc: -/* f093dbc: 53200006 */ beqzl $t9,.L0f093dd8 -/* f093dc0: 304c0040 */ andi $t4,$v0,0x40 -/* f093dc4: 960a0032 */ lhu $t2,0x32($s0) -/* f093dc8: 354b0010 */ ori $t3,$t2,0x10 -/* f093dcc: a60b0032 */ sh $t3,0x32($s0) -/* f093dd0: 8c62001c */ lw $v0,0x1c($v1) -/* f093dd4: 304c0040 */ andi $t4,$v0,0x40 -.L0f093dd8: -/* f093dd8: 51800005 */ beqzl $t4,.L0f093df0 -/* f093ddc: 960f0030 */ lhu $t7,0x30($s0) -/* f093de0: 960d0032 */ lhu $t5,0x32($s0) -/* f093de4: 35ae0040 */ ori $t6,$t5,0x40 -/* f093de8: a60e0032 */ sh $t6,0x32($s0) -/* f093dec: 960f0030 */ lhu $t7,0x30($s0) -.L0f093df0: -/* f093df0: 35f80040 */ ori $t8,$t7,0x40 -/* f093df4: a6180030 */ sh $t8,0x30($s0) -/* f093df8: a7a800ac */ sh $t0,0xac($sp) -/* f093dfc: 93b900ac */ lbu $t9,0xac($sp) -/* f093e00: 332aff7f */ andi $t2,$t9,0xff7f -/* f093e04: a3aa00ac */ sb $t2,0xac($sp) -/* f093e08: 87ab00ac */ lh $t3,0xac($sp) -/* f093e0c: a7ab00ba */ sh $t3,0xba($sp) -/* f093e10: 860c0018 */ lh $t4,0x18($s0) -.L0f093e14: -/* f093e14: 51800005 */ beqzl $t4,.L0f093e2c -/* f093e18: 87af00ac */ lh $t7,0xac($sp) -/* f093e1c: 960d0030 */ lhu $t5,0x30($s0) -/* f093e20: 35ae0002 */ ori $t6,$t5,0x2 -/* f093e24: a60e0030 */ sh $t6,0x30($s0) -/* f093e28: 87af00ac */ lh $t7,0xac($sp) -.L0f093e2c: -/* f093e2c: a60f0026 */ sh $t7,0x26($s0) -/* f093e30: 97b800ac */ lhu $t8,0xac($sp) -/* f093e34: 331907ff */ andi $t9,$t8,0x7ff -/* f093e38: a619002c */ sh $t9,0x2c($s0) -/* f093e3c: 8604002c */ lh $a0,0x2c($s0) -/* f093e40: 0c004103 */ jal sndIsFiltered -/* f093e44: afa900d0 */ sw $t1,0xd0($sp) -/* f093e48: 8fa300dc */ lw $v1,0xdc($sp) -/* f093e4c: 2407ffff */ addiu $a3,$zero,-1 -/* f093e50: 10400004 */ beqz $v0,.L0f093e64 -/* f093e54: 8fa900d0 */ lw $t1,0xd0($sp) -/* f093e58: 960a0032 */ lhu $t2,0x32($s0) -/* f093e5c: 354b0020 */ ori $t3,$t2,0x20 -/* f093e60: a60b0032 */ sh $t3,0x32($s0) -.L0f093e64: -/* f093e64: 8fac00ac */ lw $t4,0xac($sp) -/* f093e68: 000c6840 */ sll $t5,$t4,0x1 -/* f093e6c: 000d7782 */ srl $t6,$t5,0x1e -/* f093e70: 11c00004 */ beqz $t6,.L0f093e84 -/* f093e74: 00000000 */ nop -/* f093e78: 960f0032 */ lhu $t7,0x32($s0) -/* f093e7c: 35f80010 */ ori $t8,$t7,0x10 -/* f093e80: a6180032 */ sh $t8,0x32($s0) -.L0f093e84: -/* f093e84: 5120000b */ beqzl $t1,.L0f093eb4 -/* f093e88: ae000054 */ sw $zero,0x54($s0) -/* f093e8c: c52a0000 */ lwc1 $f10,0x0($t1) -/* f093e90: 26190058 */ addiu $t9,$s0,0x58 -/* f093e94: e60a0058 */ swc1 $f10,0x58($s0) -/* f093e98: c5300004 */ lwc1 $f16,0x4($t1) -/* f093e9c: e610005c */ swc1 $f16,0x5c($s0) -/* f093ea0: c5320008 */ lwc1 $f18,0x8($t1) -/* f093ea4: ae190054 */ sw $t9,0x54($s0) -/* f093ea8: 10000002 */ b .L0f093eb4 -/* f093eac: e6120060 */ swc1 $f18,0x60($s0) -/* f093eb0: ae000054 */ sw $zero,0x54($s0) -.L0f093eb4: -/* f093eb4: 8fa600d8 */ lw $a2,0xd8($sp) -/* f093eb8: 10c00011 */ beqz $a2,.L0f093f00 -/* f093ebc: 00000000 */ nop -/* f093ec0: 84ca0000 */ lh $t2,0x0($a2) -/* f093ec4: 00002825 */ or $a1,$zero,$zero -/* f093ec8: 02001825 */ or $v1,$s0,$zero -/* f093ecc: 10ea0008 */ beq $a3,$t2,.L0f093ef0 -/* f093ed0: 00c01025 */ or $v0,$a2,$zero -/* f093ed4: 84c40000 */ lh $a0,0x0($a2) -.L0f093ed8: -/* f093ed8: a4640064 */ sh $a0,0x64($v1) -/* f093edc: 84440002 */ lh $a0,0x2($v0) -/* f093ee0: 24a50001 */ addiu $a1,$a1,0x1 -/* f093ee4: 24630002 */ addiu $v1,$v1,0x2 -/* f093ee8: 14e4fffb */ bne $a3,$a0,.L0f093ed8 -/* f093eec: 24420002 */ addiu $v0,$v0,0x2 -.L0f093ef0: -/* f093ef0: 00055840 */ sll $t3,$a1,0x1 -/* f093ef4: 020b6021 */ addu $t4,$s0,$t3 -/* f093ef8: 10000007 */ b .L0f093f18 -/* f093efc: a5870064 */ sh $a3,0x64($t4) -.L0f093f00: -/* f093f00: 50670005 */ beql $v1,$a3,.L0f093f18 -/* f093f04: a6070064 */ sh $a3,0x64($s0) -/* f093f08: a6030064 */ sh $v1,0x64($s0) -/* f093f0c: 10000002 */ b .L0f093f18 -/* f093f10: a6070066 */ sh $a3,0x66($s0) -/* f093f14: a6070064 */ sh $a3,0x64($s0) -.L0f093f18: -/* f093f18: 55200008 */ bnezl $t1,.L0f093f3c -/* f093f1c: 96180032 */ lhu $t8,0x32($s0) -/* f093f20: 8e0d0050 */ lw $t5,0x50($s0) -/* f093f24: 55a00005 */ bnezl $t5,.L0f093f3c -/* f093f28: 96180032 */ lhu $t8,0x32($s0) -/* f093f2c: 960e0032 */ lhu $t6,0x32($s0) -/* f093f30: 35cf0010 */ ori $t7,$t6,0x10 -/* f093f34: a60f0032 */ sh $t7,0x32($s0) -/* f093f38: 96180032 */ lhu $t8,0x32($s0) -.L0f093f3c: -/* f093f3c: 33190010 */ andi $t9,$t8,0x10 -/* f093f40: 53200007 */ beqzl $t9,.L0f093f60 -/* f093f44: 960c0030 */ lhu $t4,0x30($s0) -/* f093f48: 860a0004 */ lh $t2,0x4($s0) -/* f093f4c: 54ea0004 */ bnel $a3,$t2,.L0f093f60 -/* f093f50: 960c0030 */ lhu $t4,0x30($s0) -/* f093f54: 860b0010 */ lh $t3,0x10($s0) -/* f093f58: a60b0004 */ sh $t3,0x4($s0) -/* f093f5c: 960c0030 */ lhu $t4,0x30($s0) -.L0f093f60: -/* f093f60: 358d1000 */ ori $t5,$t4,0x1000 -/* f093f64: a60d0030 */ sh $t5,0x30($s0) -/* f093f68: 0c003ee8 */ jal sndIsMp3 -/* f093f6c: 87a400ba */ lh $a0,0xba($sp) -/* f093f70: 10400014 */ beqz $v0,.L0f093fc4 -/* f093f74: 00000000 */ nop -/* f093f78: 960e0030 */ lhu $t6,0x30($s0) -/* f093f7c: 00002025 */ or $a0,$zero,$zero -/* f093f80: 35cf0010 */ ori $t7,$t6,0x10 -/* f093f84: 0c012230 */ jal osGetThreadPri -/* f093f88: a60f0030 */ sh $t7,0x30($s0) -/* f093f8c: 3c048009 */ lui $a0,%hi(g_AudioManager+0x18) -/* f093f90: afa200a8 */ sw $v0,0xa8($sp) -/* f093f94: 0c012230 */ jal osGetThreadPri -/* f093f98: 248415e0 */ addiu $a0,$a0,%lo(g_AudioManager+0x18) -/* f093f9c: 00002025 */ or $a0,$zero,$zero -/* f093fa0: 0c01210c */ jal osSetThreadPri -/* f093fa4: 24450001 */ addiu $a1,$v0,0x1 -/* f093fa8: 0fc24b01 */ jal propsndTickChannel -/* f093fac: 8604002e */ lh $a0,0x2e($s0) -/* f093fb0: 00002025 */ or $a0,$zero,$zero -/* f093fb4: 0c01210c */ jal osSetThreadPri -/* f093fb8: 8fa500a8 */ lw $a1,0xa8($sp) -/* f093fbc: 10000010 */ b .L0f094000 -/* f093fc0: 96030030 */ lhu $v1,0x30($s0) -.L0f093fc4: -/* f093fc4: 0c012230 */ jal osGetThreadPri -/* f093fc8: 00002025 */ or $a0,$zero,$zero -/* f093fcc: 3c048009 */ lui $a0,%hi(g_AudioManager+0x18) -/* f093fd0: afa200a8 */ sw $v0,0xa8($sp) -/* f093fd4: 0c012230 */ jal osGetThreadPri -/* f093fd8: 248415e0 */ addiu $a0,$a0,%lo(g_AudioManager+0x18) -/* f093fdc: 00002025 */ or $a0,$zero,$zero -/* f093fe0: 0c01210c */ jal osSetThreadPri -/* f093fe4: 24450001 */ addiu $a1,$v0,0x1 -/* f093fe8: 0fc24b01 */ jal propsndTickChannel -/* f093fec: 8604002e */ lh $a0,0x2e($s0) -/* f093ff0: 00002025 */ or $a0,$zero,$zero -/* f093ff4: 0c01210c */ jal osSetThreadPri -/* f093ff8: 8fa500a8 */ lw $a1,0xa8($sp) -/* f093ffc: 96030030 */ lhu $v1,0x30($s0) -.L0f094000: -/* f094000: 30780400 */ andi $t8,$v1,0x400 -/* f094004: 13000006 */ beqz $t8,.L0f094020 -/* f094008: 3079fbff */ andi $t9,$v1,0xfbff -/* f09400c: 960a0032 */ lhu $t2,0x32($s0) -/* f094010: a6190030 */ sh $t9,0x30($s0) -/* f094014: 3323ffff */ andi $v1,$t9,0xffff -/* f094018: 354b0010 */ ori $t3,$t2,0x10 -/* f09401c: a60b0032 */ sh $t3,0x32($s0) -.L0f094020: -/* f094020: 306cefff */ andi $t4,$v1,0xefff -/* f094024: a60c0030 */ sh $t4,0x30($s0) -/* f094028: 8602002e */ lh $v0,0x2e($s0) -.L0f09402c: -/* f09402c: 8fbf001c */ lw $ra,0x1c($sp) -/* f094030: 8fb00018 */ lw $s0,0x18($sp) -/* f094034: 27bd00b0 */ addiu $sp,$sp,0xb0 -/* f094038: 03e00008 */ jr $ra -/* f09403c: 00000000 */ nop -); + struct pad pad; + s32 i; + s32 j; + + if (arg7 == 0x11) { + func0f0938ec(prop); + } + + spac.packed = soundnum; + + if (channel == NULL) { + if (arg7 != 16 && var8005ddd4 > 12) { + return -1; + } + + for (i = 8; i < (IS4MB() ? 30 : 40); i++) { + if (g_AudioChannels[i].flags & AUDIOCHANNELFLAG_IDLE) { + channel = &g_AudioChannels[i]; + channel->channelnum = i; + break; + } + } + } #else -GLOBAL_ASM( -glabel func0f0939f8 -.late_rodata -glabel var7f1ab744 -.word 0x451c4000 -glabel var7f1ab748 -.word 0x453b8000 -.text -/* f091d88: 27bdff48 */ addiu $sp,$sp,-184 -/* f091d8c: afa600c0 */ sw $a2,0xc0($sp) -/* f091d90: 87ae00c2 */ lh $t6,0xc2($sp) -/* f091d94: afb00018 */ sw $s0,0x18($sp) -/* f091d98: 00808025 */ or $s0,$a0,$zero -/* f091d9c: afbf001c */ sw $ra,0x1c($sp) -/* f091da0: afa500bc */ sw $a1,0xbc($sp) -/* f091da4: afa700c4 */ sw $a3,0xc4($sp) -/* f091da8: 240cffff */ addiu $t4,$zero,-1 -/* f091dac: 00004025 */ or $t0,$zero,$zero -/* f091db0: 1480002b */ bnez $a0,.NB0f091e60 -/* f091db4: a7ae00b4 */ sh $t6,0xb4($sp) -/* f091db8: 3c068009 */ lui $a2,0x8009 -/* f091dbc: 90c630e0 */ lbu $a2,0x30e0($a2) -/* f091dc0: 24070001 */ addiu $a3,$zero,0x1 -/* f091dc4: 24050008 */ addiu $a1,$zero,0x8 -/* f091dc8: 14e60003 */ bne $a3,$a2,.NB0f091dd8 -/* f091dcc: 24020028 */ addiu $v0,$zero,0x28 -/* f091dd0: 10000001 */ beqz $zero,.NB0f091dd8 -/* f091dd4: 2402001e */ addiu $v0,$zero,0x1e -.NB0f091dd8: -/* f091dd8: 28410009 */ slti $at,$v0,0x9 -/* f091ddc: 14200020 */ bnez $at,.NB0f091e60 -/* f091de0: 3c0b8007 */ lui $t3,0x8007 -/* f091de4: 000520c0 */ sll $a0,$a1,0x3 -/* f091de8: 00852023 */ subu $a0,$a0,$a1 -/* f091dec: 8d6bd520 */ lw $t3,-0x2ae0($t3) -/* f091df0: 00042080 */ sll $a0,$a0,0x2 -/* f091df4: 00852021 */ addu $a0,$a0,$a1 -/* f091df8: 00042080 */ sll $a0,$a0,0x2 -/* f091dfc: 8faa00d4 */ lw $t2,0xd4($sp) -/* f091e00: 24090010 */ addiu $t1,$zero,0x10 -/* f091e04: 01641821 */ addu $v1,$t3,$a0 -/* f091e08: 946f0030 */ lhu $t7,0x30($v1) -.NB0f091e0c: -/* f091e0c: 24630074 */ addiu $v1,$v1,0x74 -/* f091e10: 24020028 */ addiu $v0,$zero,0x28 -/* f091e14: 31f80001 */ andi $t8,$t7,0x1 -/* f091e18: 13000007 */ beqz $t8,.NB0f091e38 -/* f091e1c: 00000000 */ sll $zero,$zero,0x0 -/* f091e20: 11490003 */ beq $t2,$t1,.NB0f091e30 -/* f091e24: 008b8021 */ addu $s0,$a0,$t3 -/* f091e28: 1000000d */ beqz $zero,.NB0f091e60 -/* f091e2c: a605002e */ sh $a1,0x2e($s0) -.NB0f091e30: -/* f091e30: 1000000b */ beqz $zero,.NB0f091e60 -/* f091e34: 00a06025 */ or $t4,$a1,$zero -.NB0f091e38: -/* f091e38: 15490002 */ bne $t2,$t1,.NB0f091e44 -/* f091e3c: 24a50001 */ addiu $a1,$a1,0x1 -/* f091e40: 25080001 */ addiu $t0,$t0,0x1 -.NB0f091e44: -/* f091e44: 14e60003 */ bne $a3,$a2,.NB0f091e54 -/* f091e48: 24840074 */ addiu $a0,$a0,0x74 -/* f091e4c: 10000001 */ beqz $zero,.NB0f091e54 -/* f091e50: 2402001e */ addiu $v0,$zero,0x1e -.NB0f091e54: -/* f091e54: 00a2082a */ slt $at,$a1,$v0 -/* f091e58: 5420ffec */ bnezl $at,.NB0f091e0c -/* f091e5c: 946f0030 */ lhu $t7,0x30($v1) -.NB0f091e60: -/* f091e60: 8faa00d4 */ lw $t2,0xd4($sp) -/* f091e64: 24090010 */ addiu $t1,$zero,0x10 -/* f091e68: 2901000c */ slti $at,$t0,0xc -/* f091e6c: 55490013 */ bnel $t2,$t1,.NB0f091ebc -/* f091e70: 87ae00c6 */ lh $t6,0xc6($sp) -/* f091e74: 14200003 */ bnez $at,.NB0f091e84 -/* f091e78: 2407ffff */ addiu $a3,$zero,-1 -/* f091e7c: 10000129 */ beqz $zero,.NB0f092324 -/* f091e80: 2402ffff */ addiu $v0,$zero,-1 -.NB0f091e84: -/* f091e84: 1187000a */ beq $t4,$a3,.NB0f091eb0 -/* f091e88: 000cc8c0 */ sll $t9,$t4,0x3 -/* f091e8c: 032cc823 */ subu $t9,$t9,$t4 -/* f091e90: 3c0d8007 */ lui $t5,0x8007 -/* f091e94: 8dadd520 */ lw $t5,-0x2ae0($t5) -/* f091e98: 0019c880 */ sll $t9,$t9,0x2 -/* f091e9c: 032cc821 */ addu $t9,$t9,$t4 -/* f091ea0: 0019c880 */ sll $t9,$t9,0x2 -/* f091ea4: 032d8021 */ addu $s0,$t9,$t5 -/* f091ea8: 10000003 */ beqz $zero,.NB0f091eb8 -/* f091eac: a60c002e */ sh $t4,0x2e($s0) -.NB0f091eb0: -/* f091eb0: 1000011c */ beqz $zero,.NB0f092324 -/* f091eb4: 2402ffff */ addiu $v0,$zero,-1 -.NB0f091eb8: -/* f091eb8: 87ae00c6 */ lh $t6,0xc6($sp) -.NB0f091ebc: -/* f091ebc: 2407ffff */ addiu $a3,$zero,-1 -/* f091ec0: 24050042 */ addiu $a1,$zero,0x42 -/* f091ec4: 05c0000a */ bltz $t6,.NB0f091ef0 -/* f091ec8: 01c02025 */ or $a0,$t6,$zero -/* f091ecc: 0fc43fc4 */ jal padUnpack -/* f091ed0: 27a6004c */ addiu $a2,$sp,0x4c -/* f091ed4: 8fab0094 */ lw $t3,0x94($sp) -/* f091ed8: 27a9004c */ addiu $t1,$sp,0x4c -/* f091edc: 2407ffff */ addiu $a3,$zero,-1 -/* f091ee0: 8faa00d4 */ lw $t2,0xd4($sp) -/* f091ee4: afa900d8 */ sw $t1,0xd8($sp) -/* f091ee8: afa000bc */ sw $zero,0xbc($sp) -/* f091eec: afab00e4 */ sw $t3,0xe4($sp) -.NB0f091ef0: -/* f091ef0: 8fa900d8 */ lw $t1,0xd8($sp) -/* f091ef4: 16000003 */ bnez $s0,.NB0f091f04 -/* f091ef8: 8fab00e4 */ lw $t3,0xe4($sp) -/* f091efc: 10000109 */ beqz $zero,.NB0f092324 -/* f091f00: 2402ffff */ addiu $v0,$zero,-1 -.NB0f091f04: -/* f091f04: 97af00ce */ lhu $t7,0xce($sp) -/* f091f08: 8fa200c8 */ lw $v0,0xc8($sp) -/* f091f0c: 44801000 */ mtc1 $zero,$f2 -/* f091f10: a60f0030 */ sh $t7,0x30($s0) -/* f091f14: 97b800d2 */ lhu $t8,0xd2($sp) -/* f091f18: ae000000 */ sw $zero,0x0($s0) -/* f091f1c: a6070006 */ sh $a3,0x6($s0) -/* f091f20: a6070008 */ sh $a3,0x8($s0) -/* f091f24: a607000e */ sh $a3,0xe($s0) -/* f091f28: 10470003 */ beq $v0,$a3,.NB0f091f38 -/* f091f2c: a6180032 */ sh $t8,0x32($s0) -/* f091f30: 10000002 */ beqz $zero,.NB0f091f3c -/* f091f34: a6020004 */ sh $v0,0x4($s0) -.NB0f091f38: -/* f091f38: a6070004 */ sh $a3,0x4($s0) -.NB0f091f3c: -/* f091f3c: c7a000dc */ lwc1 $f0,0xdc($sp) -/* f091f40: 24190040 */ addiu $t9,$zero,0x40 -/* f091f44: 240d7fff */ addiu $t5,$zero,0x7fff -/* f091f48: 4600103c */ c.lt.s $f2,$f0 -/* f091f4c: 240e0001 */ addiu $t6,$zero,0x1 -/* f091f50: a619000a */ sh $t9,0xa($s0) -/* f091f54: a600000c */ sh $zero,0xc($s0) -/* f091f58: a60d0010 */ sh $t5,0x10($s0) -/* f091f5c: 45000003 */ bc1f .NB0f091f6c -/* f091f60: a20e001a */ sb $t6,0x1a($s0) -/* f091f64: 10000005 */ beqz $zero,.NB0f091f7c -/* f091f68: e6000044 */ swc1 $f0,0x44($s0) -.NB0f091f6c: -/* f091f6c: 3c01bf80 */ lui $at,0xbf80 -/* f091f70: 44812000 */ mtc1 $at,$f4 -/* f091f74: 00000000 */ sll $zero,$zero,0x0 -/* f091f78: e6040044 */ swc1 $f4,0x44($s0) -.NB0f091f7c: -/* f091f7c: c7a000e8 */ lwc1 $f0,0xe8($sp) -/* f091f80: c6060044 */ lwc1 $f6,0x44($s0) -/* f091f84: ae070020 */ sw $a3,0x20($s0) -/* f091f88: ae07001c */ sw $a3,0x1c($s0) -/* f091f8c: e6060048 */ swc1 $f6,0x48($s0) -/* f091f90: 87af00c6 */ lh $t7,0xc6($sp) -/* f091f94: 4600103c */ c.lt.s $f2,$f0 -/* f091f98: 3c01bf80 */ lui $at,0xbf80 -/* f091f9c: a60f0024 */ sh $t7,0x24($s0) -/* f091fa0: 8fb800bc */ lw $t8,0xbc($sp) -/* f091fa4: 44814000 */ mtc1 $at,$f8 -/* f091fa8: a60a0028 */ sh $t2,0x28($s0) -/* f091fac: a6020012 */ sh $v0,0x12($s0) -/* f091fb0: ae180050 */ sw $t8,0x50($s0) -/* f091fb4: 45000003 */ bc1f .NB0f091fc4 -/* f091fb8: e6080040 */ swc1 $f8,0x40($s0) -/* f091fbc: 10000005 */ beqz $zero,.NB0f091fd4 -/* f091fc0: e6000034 */ swc1 $f0,0x34($s0) -.NB0f091fc4: -/* f091fc4: 3c0143c8 */ lui $at,0x43c8 -/* f091fc8: 44815000 */ mtc1 $at,$f10 -/* f091fcc: 00000000 */ sll $zero,$zero,0x0 -/* f091fd0: e60a0034 */ swc1 $f10,0x34($s0) -.NB0f091fd4: -/* f091fd4: c7a000ec */ lwc1 $f0,0xec($sp) -/* f091fd8: 3c017f1a */ lui $at,0x7f1a -/* f091fdc: 4600103c */ c.lt.s $f2,$f0 -/* f091fe0: 00000000 */ sll $zero,$zero,0x0 -/* f091fe4: 45000003 */ bc1f .NB0f091ff4 -/* f091fe8: 00000000 */ sll $zero,$zero,0x0 -/* f091fec: 10000003 */ beqz $zero,.NB0f091ffc -/* f091ff0: e6000038 */ swc1 $f0,0x38($s0) -.NB0f091ff4: -/* f091ff4: c4305a94 */ lwc1 $f16,0x5a94($at) -/* f091ff8: e6100038 */ swc1 $f16,0x38($s0) -.NB0f091ffc: -/* f091ffc: c7a000f0 */ lwc1 $f0,0xf0($sp) -/* f092000: 3c017f1a */ lui $at,0x7f1a -/* f092004: 4600103c */ c.lt.s $f2,$f0 -/* f092008: 00000000 */ sll $zero,$zero,0x0 -/* f09200c: 45000003 */ bc1f .NB0f09201c -/* f092010: 00000000 */ sll $zero,$zero,0x0 -/* f092014: 10000003 */ beqz $zero,.NB0f092024 -/* f092018: e600003c */ swc1 $f0,0x3c($s0) -.NB0f09201c: -/* f09201c: c4325a98 */ lwc1 $f18,0x5a98($at) -/* f092020: e612003c */ swc1 $f18,0x3c($s0) -.NB0f092024: -/* f092024: a6000018 */ sh $zero,0x18($s0) -/* f092028: 8fb900b4 */ lw $t9,0xb4($sp) -/* f09202c: 97a400b4 */ lhu $a0,0xb4($sp) -/* f092030: 3c188006 */ lui $t8,0x8006 -/* f092034: 00196fc2 */ srl $t5,$t9,0x1f -/* f092038: 11a0005a */ beqz $t5,.NB0f0921a4 -/* f09203c: 308e7fff */ andi $t6,$a0,0x7fff -/* f092040: 000e7880 */ sll $t7,$t6,0x2 -/* f092044: 2718f6f8 */ addiu $t8,$t8,-2312 -/* f092048: 01f81021 */ addu $v0,$t7,$t8 -/* f09204c: 94450002 */ lhu $a1,0x2($v0) -/* f092050: 3c0d8006 */ lui $t5,0x8006 -/* f092054: 25adfdd0 */ addiu $t5,$t5,-560 -/* f092058: 0005c940 */ sll $t9,$a1,0x5 -/* f09205c: 032d1821 */ addu $v1,$t9,$t5 -/* f092060: c4640000 */ lwc1 $f4,0x0($v1) -/* f092064: 84480000 */ lh $t0,0x0($v0) -/* f092068: 24010064 */ addiu $at,$zero,0x64 -/* f09206c: e6040034 */ swc1 $f4,0x34($s0) -/* f092070: c4660004 */ lwc1 $f6,0x4($v1) -/* f092074: e6060038 */ swc1 $f6,0x38($s0) -/* f092078: c4680008 */ lwc1 $f8,0x8($v1) -/* f09207c: e608003c */ swc1 $f8,0x3c($s0) -/* f092080: 8c6e0018 */ lw $t6,0x18($v1) -/* f092084: a60e0018 */ sh $t6,0x18($s0) -/* f092088: 8c660010 */ lw $a2,0x10($v1) -/* f09208c: 10c10007 */ beq $a2,$at,.NB0f0920ac -/* f092090: 00067880 */ sll $t7,$a2,0x2 -/* f092094: 01e67821 */ addu $t7,$t7,$a2 -/* f092098: 000f78c0 */ sll $t7,$t7,0x3 -/* f09209c: 01e67821 */ addu $t7,$t7,$a2 -/* f0920a0: 000f78c0 */ sll $t7,$t7,0x3 -/* f0920a4: 01e67823 */ subu $t7,$t7,$a2 -/* f0920a8: a60f0010 */ sh $t7,0x10($s0) -.NB0f0920ac: -/* f0920ac: c460000c */ lwc1 $f0,0xc($v1) -/* f0920b0: 4600103c */ c.lt.s $f2,$f0 -/* f0920b4: 00000000 */ sll $zero,$zero,0x0 -/* f0920b8: 45020003 */ bc1fl .NB0f0920c8 -/* f0920bc: 8c620014 */ lw $v0,0x14($v1) -/* f0920c0: e6000044 */ swc1 $f0,0x44($s0) -/* f0920c4: 8c620014 */ lw $v0,0x14($v1) -.NB0f0920c8: -/* f0920c8: 50470006 */ beql $v0,$a3,.NB0f0920e4 -/* f0920cc: 8c62001c */ lw $v0,0x1c($v1) -/* f0920d0: 96180030 */ lhu $t8,0x30($s0) -/* f0920d4: a602000a */ sh $v0,0xa($s0) -/* f0920d8: 37190020 */ ori $t9,$t8,0x20 -/* f0920dc: a6190030 */ sh $t9,0x30($s0) -/* f0920e0: 8c62001c */ lw $v0,0x1c($v1) -.NB0f0920e4: -/* f0920e4: 304d0001 */ andi $t5,$v0,0x1 -/* f0920e8: 51a00006 */ beqzl $t5,.NB0f092104 -/* f0920ec: 30580004 */ andi $t8,$v0,0x4 -/* f0920f0: 960e0030 */ lhu $t6,0x30($s0) -/* f0920f4: 35cf0800 */ ori $t7,$t6,0x800 -/* f0920f8: a60f0030 */ sh $t7,0x30($s0) -/* f0920fc: 8c62001c */ lw $v0,0x1c($v1) -/* f092100: 30580004 */ andi $t8,$v0,0x4 -.NB0f092104: -/* f092104: 53000006 */ beqzl $t8,.NB0f092120 -/* f092108: 304e0008 */ andi $t6,$v0,0x8 -/* f09210c: 96190032 */ lhu $t9,0x32($s0) -/* f092110: 372d0001 */ ori $t5,$t9,0x1 -/* f092114: a60d0032 */ sh $t5,0x32($s0) -/* f092118: 8c62001c */ lw $v0,0x1c($v1) -/* f09211c: 304e0008 */ andi $t6,$v0,0x8 -.NB0f092120: -/* f092120: 51c0000b */ beqzl $t6,.NB0f092150 -/* f092124: 304e0010 */ andi $t6,$v0,0x10 -/* f092128: 860f0004 */ lh $t7,0x4($s0) -/* f09212c: 54ef0004 */ bnel $a3,$t7,.NB0f092140 -/* f092130: 96190030 */ lhu $t9,0x30($s0) -/* f092134: 86180010 */ lh $t8,0x10($s0) -/* f092138: a6180004 */ sh $t8,0x4($s0) -/* f09213c: 96190030 */ lhu $t9,0x30($s0) -.NB0f092140: -/* f092140: 372d8000 */ ori $t5,$t9,0x8000 -/* f092144: a60d0030 */ sh $t5,0x30($s0) -/* f092148: 8c62001c */ lw $v0,0x1c($v1) -/* f09214c: 304e0010 */ andi $t6,$v0,0x10 -.NB0f092150: -/* f092150: 51c00006 */ beqzl $t6,.NB0f09216c -/* f092154: 30590020 */ andi $t9,$v0,0x20 -/* f092158: 960f0032 */ lhu $t7,0x32($s0) -/* f09215c: 35f80020 */ ori $t8,$t7,0x20 -/* f092160: a6180032 */ sh $t8,0x32($s0) -/* f092164: 8c62001c */ lw $v0,0x1c($v1) -/* f092168: 30590020 */ andi $t9,$v0,0x20 -.NB0f09216c: -/* f09216c: 53200005 */ beqzl $t9,.NB0f092184 -/* f092170: 960f0030 */ lhu $t7,0x30($s0) -/* f092174: 960d0032 */ lhu $t5,0x32($s0) -/* f092178: 35ae0010 */ ori $t6,$t5,0x10 -/* f09217c: a60e0032 */ sh $t6,0x32($s0) -/* f092180: 960f0030 */ lhu $t7,0x30($s0) -.NB0f092184: -/* f092184: 35f80040 */ ori $t8,$t7,0x40 -/* f092188: a6180030 */ sh $t8,0x30($s0) -/* f09218c: a7a800b4 */ sh $t0,0xb4($sp) -/* f092190: 93b900b4 */ lbu $t9,0xb4($sp) -/* f092194: 332dff7f */ andi $t5,$t9,0xff7f -/* f092198: a3ad00b4 */ sb $t5,0xb4($sp) -/* f09219c: 87ae00b4 */ lh $t6,0xb4($sp) -/* f0921a0: a7ae00c2 */ sh $t6,0xc2($sp) -.NB0f0921a4: -/* f0921a4: 87af00b4 */ lh $t7,0xb4($sp) -/* f0921a8: a60f0026 */ sh $t7,0x26($s0) -/* f0921ac: 97b800b4 */ lhu $t8,0xb4($sp) -/* f0921b0: 331907ff */ andi $t9,$t8,0x7ff -/* f0921b4: a619002c */ sh $t9,0x2c($s0) -/* f0921b8: 8fad00b4 */ lw $t5,0xb4($sp) -/* f0921bc: 000d7040 */ sll $t6,$t5,0x1 -/* f0921c0: 000e7f82 */ srl $t7,$t6,0x1e -/* f0921c4: 51e00005 */ beqzl $t7,.NB0f0921dc -/* f0921c8: 960d0032 */ lhu $t5,0x32($s0) -/* f0921cc: 96180032 */ lhu $t8,0x32($s0) -/* f0921d0: 37190010 */ ori $t9,$t8,0x10 -/* f0921d4: a6190032 */ sh $t9,0x32($s0) -/* f0921d8: 960d0032 */ lhu $t5,0x32($s0) -.NB0f0921dc: -/* f0921dc: 31ae0010 */ andi $t6,$t5,0x10 -/* f0921e0: 11c00006 */ beqz $t6,.NB0f0921fc -/* f0921e4: 00000000 */ sll $zero,$zero,0x0 -/* f0921e8: 860f0004 */ lh $t7,0x4($s0) -/* f0921ec: 14ef0003 */ bne $a3,$t7,.NB0f0921fc -/* f0921f0: 00000000 */ sll $zero,$zero,0x0 -/* f0921f4: 86180010 */ lh $t8,0x10($s0) -/* f0921f8: a6180004 */ sh $t8,0x4($s0) -.NB0f0921fc: -/* f0921fc: 5120000b */ beqzl $t1,.NB0f09222c -/* f092200: ae000054 */ sw $zero,0x54($s0) -/* f092204: c52a0000 */ lwc1 $f10,0x0($t1) -/* f092208: 26190058 */ addiu $t9,$s0,0x58 -/* f09220c: e60a0058 */ swc1 $f10,0x58($s0) -/* f092210: c5300004 */ lwc1 $f16,0x4($t1) -/* f092214: e610005c */ swc1 $f16,0x5c($s0) -/* f092218: c5320008 */ lwc1 $f18,0x8($t1) -/* f09221c: ae190054 */ sw $t9,0x54($s0) -/* f092220: 10000002 */ beqz $zero,.NB0f09222c -/* f092224: e6120060 */ swc1 $f18,0x60($s0) -/* f092228: ae000054 */ sw $zero,0x54($s0) -.NB0f09222c: -/* f09222c: 8fa600e0 */ lw $a2,0xe0($sp) -/* f092230: 10c00011 */ beqz $a2,.NB0f092278 -/* f092234: 00000000 */ sll $zero,$zero,0x0 -/* f092238: 84cd0000 */ lh $t5,0x0($a2) -/* f09223c: 00002825 */ or $a1,$zero,$zero -/* f092240: 02001825 */ or $v1,$s0,$zero -/* f092244: 10ed0008 */ beq $a3,$t5,.NB0f092268 -/* f092248: 00c01025 */ or $v0,$a2,$zero -/* f09224c: 84c40000 */ lh $a0,0x0($a2) -.NB0f092250: -/* f092250: a4640064 */ sh $a0,0x64($v1) -/* f092254: 84440002 */ lh $a0,0x2($v0) -/* f092258: 24a50001 */ addiu $a1,$a1,0x1 -/* f09225c: 24630002 */ addiu $v1,$v1,0x2 -/* f092260: 14e4fffb */ bne $a3,$a0,.NB0f092250 -/* f092264: 24420002 */ addiu $v0,$v0,0x2 -.NB0f092268: -/* f092268: 00057040 */ sll $t6,$a1,0x1 -/* f09226c: 020e7821 */ addu $t7,$s0,$t6 -/* f092270: 10000007 */ beqz $zero,.NB0f092290 -/* f092274: a5e70064 */ sh $a3,0x64($t7) -.NB0f092278: -/* f092278: 51670005 */ beql $t3,$a3,.NB0f092290 -/* f09227c: a6070064 */ sh $a3,0x64($s0) -/* f092280: a60b0064 */ sh $t3,0x64($s0) -/* f092284: 10000002 */ beqz $zero,.NB0f092290 -/* f092288: a6070066 */ sh $a3,0x66($s0) -/* f09228c: a6070064 */ sh $a3,0x64($s0) -.NB0f092290: -/* f092290: 96180030 */ lhu $t8,0x30($s0) -/* f092294: 37191000 */ ori $t9,$t8,0x1000 -/* f092298: a6190030 */ sh $t9,0x30($s0) -/* f09229c: 0c00400e */ jal sndIsMp3 -/* f0922a0: 87a400c2 */ lh $a0,0xc2($sp) -/* f0922a4: 10400008 */ beqz $v0,.NB0f0922c8 -/* f0922a8: 00000000 */ sll $zero,$zero,0x0 -/* f0922ac: 960d0030 */ lhu $t5,0x30($s0) -/* f0922b0: 8604002e */ lh $a0,0x2e($s0) -/* f0922b4: 35ae0010 */ ori $t6,$t5,0x10 -/* f0922b8: 0fc24495 */ jal propsndTickChannel -/* f0922bc: a60e0030 */ sh $t6,0x30($s0) -/* f0922c0: 10000010 */ beqz $zero,.NB0f092304 -/* f0922c4: 96020030 */ lhu $v0,0x30($s0) -.NB0f0922c8: -/* f0922c8: 0c012724 */ jal osGetThreadPri -/* f0922cc: 00002025 */ or $a0,$zero,$zero -/* f0922d0: 3c048009 */ lui $a0,0x8009 -/* f0922d4: afa200b0 */ sw $v0,0xb0($sp) -/* f0922d8: 0c012724 */ jal osGetThreadPri -/* f0922dc: 24843bd0 */ addiu $a0,$a0,0x3bd0 -/* f0922e0: 00002025 */ or $a0,$zero,$zero -/* f0922e4: 0c012600 */ jal osSetThreadPri -/* f0922e8: 24450001 */ addiu $a1,$v0,0x1 -/* f0922ec: 0fc24495 */ jal propsndTickChannel -/* f0922f0: 8604002e */ lh $a0,0x2e($s0) -/* f0922f4: 00002025 */ or $a0,$zero,$zero -/* f0922f8: 0c012600 */ jal osSetThreadPri -/* f0922fc: 8fa500b0 */ lw $a1,0xb0($sp) -/* f092300: 96020030 */ lhu $v0,0x30($s0) -.NB0f092304: -/* f092304: 24180001 */ addiu $t8,$zero,0x1 -/* f092308: 304f0400 */ andi $t7,$v0,0x400 -/* f09230c: 11e00003 */ beqz $t7,.NB0f09231c -/* f092310: 3059efff */ andi $t9,$v0,0xefff -/* f092314: 10000002 */ beqz $zero,.NB0f092320 -/* f092318: a6180030 */ sh $t8,0x30($s0) -.NB0f09231c: -/* f09231c: a6190030 */ sh $t9,0x30($s0) -.NB0f092320: -/* f092320: 8602002e */ lh $v0,0x2e($s0) -.NB0f092324: -/* f092324: 8fbf001c */ lw $ra,0x1c($sp) -/* f092328: 8fb00018 */ lw $s0,0x18($sp) -/* f09232c: 27bd00b8 */ addiu $sp,$sp,0xb8 -/* f092330: 03e00008 */ jr $ra -/* f092334: 00000000 */ sll $zero,$zero,0x0 -); + s32 t4 = -1; + struct pad pad; + s32 i; + s32 j; + s32 count = 0; + + spac.packed = soundnum; + + if (channel == NULL) { + for (i = 8; i < (IS4MB() ? 30 : 40); i++) { + if (g_AudioChannels[i].flags & AUDIOCHANNELFLAG_IDLE) { + channel = &g_AudioChannels[i]; + if (i); + + if (arg7 != 16) { + channel->channelnum = i; + } else { + t4 = i; + } + break; + } + + if (arg7 == 16) { + count++; + } + } + } + + if (arg7 == 16) { + if (count >= 12) { + return -1; + } + + if (t4 != -1) { + channel = &g_AudioChannels[t4]; + channel->channelnum = t4; + } else { + return -1; + } + } #endif -// Mismatch: Two beq operators are swapped in this expression: -// g_AudioConfigs[confignum].unk14 != -1 -//s16 func0f0939f8( -// struct audiochannel *channel, -// struct prop *prop, -// s16 soundnum, -// s16 padnum, -// s32 arg4, -// u16 flags, -// u16 flags2, -// s32 arg7, -// struct coord *pos, -// f32 arg9, -// s16 *rooms, -// s32 room, -// f32 arg12, -// f32 arg13, -// f32 arg14) -//{ -// union soundnumhack spac; -// OSPri prevpri; -// u32 stack[3]; -// struct pad pad; -// s32 i; -// s32 j; -// -// if (arg7 == 0x11) { -// func0f0938ec(prop); -// } -// -// spac.packed = soundnum; -// -// if (channel == NULL) { -// if (arg7 != 16 && var8005ddd4 > 12) { -// return -1; -// } -// -// for (i = 8; i < (IS4MB() ? 30 : 40); i++) { -// if (g_AudioChannels[i].flags & AUDIOCHANNELFLAG_IDLE) { -// channel = &g_AudioChannels[i]; -// channel->channelnum = i; -// break; -// } -// } -// } -// -// if (padnum >= 0) { -// padUnpack(padnum, PADFIELD_POS | PADFIELD_ROOM, &pad); -// pos = &pad.pos; -// room = pad.room; -// prop = NULL; -// } -// -// if (channel == NULL) { -// return -1; -// } -// -// if (g_AudioPrevUuid < 0xffffffff) { -// g_AudioPrevUuid++; -// } else { -// g_AudioPrevUuid = 0; -// } -// -// channel->flags = flags; -// channel->flags2 = flags2; -// channel->audiohandle = NULL; -// channel->unk06 = -1; -// channel->unk08 = -1; -// channel->unk0e = -1; -// channel->soundnum04 = (arg4 != -1) ? arg4 : -1; -// channel->unk0a = 64; -// channel->unk0c = 0; -// channel->unk10 = 0x7fff; -// channel->unk1a = 1; -// channel->unk44 = (arg9 > 0) ? arg9 : -1; -// channel->unk48 = channel->unk44; -// channel->unk20 = -1; -// channel->unk1c = -1; -// channel->padnum = padnum; -// channel->prop = prop; -// channel->unk28 = arg7; -// channel->unk12 = arg4; -// channel->unk40 = -1; -// channel->unk34 = (arg12 > 0) ? arg12 : 400; -// channel->unk38 = (arg13 > 0) ? arg13 : 2500; -// channel->unk3c = (arg14 > 0) ? arg14 : 3000; -// channel->unk18 = 0; -// channel->uuid = g_AudioPrevUuid; -// -// if (spac.bits2.hasconfig) { -// s32 id = spac.confignum; -// s32 confignum = g_AudioRussMappings[id].audioconfig_index; -// s32 newid = g_AudioRussMappings[id].soundnum; -// -// channel->unk34 = g_AudioConfigs[confignum].unk00; -// channel->unk38 = g_AudioConfigs[confignum].unk04; -// channel->unk3c = g_AudioConfigs[confignum].unk08; -// channel->unk18 = g_AudioConfigs[confignum].unk18; -// -// if (g_AudioConfigs[confignum].unk10 != 100) { -// channel->unk10 = g_AudioConfigs[confignum].unk10 * 327; -// } -// -// if (g_AudioConfigs[confignum].unk0c > 0) { -// channel->unk44 = g_AudioConfigs[confignum].unk0c; -// } -// -// if (g_AudioConfigs[confignum].unk14 != -1) { -// channel->unk0a = g_AudioConfigs[confignum].unk14; -// channel->flags |= AUDIOCHANNELFLAG_0020; -// } -// -// if (g_AudioConfigs[confignum].flags & AUDIOCONFIGFLAG_01) { -// channel->flags |= AUDIOCHANNELFLAG_0800; -// } -// -// if (g_AudioConfigs[confignum].flags & AUDIOCONFIGFLAG_04) { -// channel->flags2 |= AUDIOCHANNELFLAG2_0001; -// } -// -// if (g_AudioConfigs[confignum].flags & AUDIOCONFIGFLAG_08) { -// if (channel->soundnum04 == -1) { -// channel->soundnum04 = channel->unk10; -// } -// -// channel->flags |= AUDIOCHANNELFLAG_8000; -// } -// -// if (g_AudioConfigs[confignum].flags & AUDIOCONFIGFLAG_OFFENSIVE) { -// channel->flags2 |= AUDIOCHANNELFLAG2_OFFENSIVE; -// } -// -// if (g_AudioConfigs[confignum].flags & AUDIOCONFIGFLAG_20) { -// channel->flags2 |= AUDIOCHANNELFLAG2_0010; -// } -// -// if (g_AudioConfigs[confignum].flags & AUDIOCONFIGFLAG_40) { -// channel->flags2 |= AUDIOCHANNELFLAG2_0040; -// } -// -// channel->flags |= AUDIOCHANNELFLAG_0040; -// -// spac.packed = newid; -// spac.bits2.hasconfig = false; -// soundnum = spac.packed; -// } -// -// if (channel->unk18) { -// channel->flags |= AUDIOCHANNELFLAG_0002; -// } -// -// channel->soundnum26 = spac.packed; -// channel->unk2c = spac.id; -// -// if (sndIsFiltered(channel->unk2c)) { -// channel->flags2 |= AUDIOCHANNELFLAG2_OFFENSIVE; -// } -// -// if (spac.bits2.unk02) { -// channel->flags2 |= AUDIOCHANNELFLAG2_0010; -// } -// -// if (pos) { -// channel->pos.x = pos->x; -// channel->pos.y = pos->y; -// channel->pos.z = pos->z; -// channel->posptr = &channel->pos; -// } else { -// channel->posptr = NULL; -// } -// -// if (rooms) { -// // @dangerous: Array overflow will occur if rooms has more than 8 elements -// for (j = 0; rooms[j] != -1; j++) { -// channel->rooms[j] = rooms[j]; -// } -// -// channel->rooms[j] = -1; -// } else if (room != -1) { -// channel->rooms[0] = room; -// channel->rooms[1] = -1; -// } else { -// channel->rooms[0] = -1; -// } -// -// if (!pos && !channel->prop) { -// channel->flags2 |= AUDIOCHANNELFLAG2_0010; -// } -// -// if ((channel->flags2 & AUDIOCHANNELFLAG2_0010) && channel->soundnum04 == -1) { -// channel->soundnum04 = channel->unk10; -// } -// -// channel->flags |= AUDIOCHANNELFLAG_1000; -// -// if (sndIsMp3(soundnum)) { -// channel->flags |= AUDIOCHANNELFLAG_0010; -// -// prevpri = osGetThreadPri(0); -// osSetThreadPri(0, osGetThreadPri(&g_AudioManager.thread) + 1); -// propsndTickChannel(channel->channelnum); -// osSetThreadPri(0, prevpri); -// } else { -// prevpri = osGetThreadPri(0); -// osSetThreadPri(0, osGetThreadPri(&g_AudioManager.thread) + 1); -// propsndTickChannel(channel->channelnum); -// osSetThreadPri(0, prevpri); -// } -// -// if (channel->flags & AUDIOCHANNELFLAG_0400) { -// channel->flags &= ~AUDIOCHANNELFLAG_0400; -// channel->flags2 |= AUDIOCHANNELFLAG2_0010; -// } -// -// channel->flags &= ~AUDIOCHANNELFLAG_1000; -// -// return channel->channelnum; -//} + if (padnum >= 0) { + padUnpack(padnum, PADFIELD_POS | PADFIELD_ROOM, &pad); + pos = &pad.pos; + room = pad.room; + prop = NULL; + } + + if (channel == NULL) { + return -1; + } + +#if VERSION >= VERSION_NTSC_1_0 + if (g_AudioPrevUuid < 0xffffffff) { + g_AudioPrevUuid++; + } else { + g_AudioPrevUuid = 0; + } +#endif + + channel->flags = flags; + channel->flags2 = flags2; + channel->audiohandle = NULL; + channel->unk06 = -1; + channel->unk08 = -1; + channel->unk0e = -1; + channel->soundnum04 = (arg4 != -1) ? arg4 : -1; + channel->unk0a = 64; + channel->unk0c = 0; + channel->unk10 = 0x7fff; + channel->unk1a = 1; + channel->unk44 = (arg9 > 0) ? arg9 : -1; + channel->unk48 = channel->unk44; + channel->unk20 = -1; + channel->unk1c = -1; + channel->padnum = padnum; + channel->prop = prop; + channel->unk28 = arg7; + channel->unk12 = arg4; + channel->unk40 = -1; + channel->unk34 = (arg12 > 0) ? arg12 : 400; + channel->unk38 = (arg13 > 0) ? arg13 : 2500; + channel->unk3c = (arg14 > 0) ? arg14 : 3000; + channel->unk18 = 0; +#if VERSION >= VERSION_NTSC_1_0 + channel->uuid = g_AudioPrevUuid; +#endif + + if (spac.hasconfig) { + s32 id = spac.confignum; + s32 confignum = g_AudioRussMappings[id].audioconfig_index; + s32 newid = g_AudioRussMappings[id].soundnum; + + channel->unk34 = g_AudioConfigs[confignum].unk00; + channel->unk38 = g_AudioConfigs[confignum].unk04; + channel->unk3c = g_AudioConfigs[confignum].unk08; + channel->unk18 = g_AudioConfigs[confignum].unk18; + + if (g_AudioConfigs[confignum].unk10 != 100) { + channel->unk10 = g_AudioConfigs[confignum].unk10 * 327; + } + + if (g_AudioConfigs[confignum].unk0c > 0) { + channel->unk44 = g_AudioConfigs[confignum].unk0c; + } + + tmp = g_AudioConfigs[confignum].unk14; + + if (tmp != -1) { + channel->unk0a = tmp; + channel->flags |= AUDIOCHANNELFLAG_0020; + } + + if (g_AudioConfigs[confignum].flags & AUDIOCONFIGFLAG_01) { + channel->flags |= AUDIOCHANNELFLAG_0800; + } + + if (g_AudioConfigs[confignum].flags & AUDIOCONFIGFLAG_04) { + channel->flags2 |= AUDIOCHANNELFLAG2_0001; + } + + if (g_AudioConfigs[confignum].flags & AUDIOCONFIGFLAG_08) { + if (channel->soundnum04 == -1) { + channel->soundnum04 = channel->unk10; + } + + channel->flags |= AUDIOCHANNELFLAG_8000; + } + + if (g_AudioConfigs[confignum].flags & AUDIOCONFIGFLAG_OFFENSIVE) { + channel->flags2 |= AUDIOCHANNELFLAG2_OFFENSIVE; + } + + if (g_AudioConfigs[confignum].flags & AUDIOCONFIGFLAG_20) { + channel->flags2 |= AUDIOCHANNELFLAG2_0010; + } + +#if VERSION >= VERSION_NTSC_1_0 + if (g_AudioConfigs[confignum].flags & AUDIOCONFIGFLAG_40) { + channel->flags2 |= AUDIOCHANNELFLAG2_0040; + } +#endif + + channel->flags |= AUDIOCHANNELFLAG_0040; + + spac.packed = newid; + spac.hasconfig = false; + soundnum = spac.packed; + } + +#if VERSION >= VERSION_NTSC_1_0 + if (channel->unk18) { + channel->flags |= AUDIOCHANNELFLAG_0002; + } +#endif + + channel->soundnum26 = spac.packed; + channel->unk2c = spac.id; + +#if VERSION >= VERSION_NTSC_1_0 + if (sndIsFiltered(channel->unk2c)) { + channel->flags2 |= AUDIOCHANNELFLAG2_OFFENSIVE; + } +#endif + + if (spac.unk02) { + channel->flags2 |= AUDIOCHANNELFLAG2_0010; + } + +#if VERSION < VERSION_NTSC_1_0 + if (channel->flags2 & AUDIOCHANNELFLAG2_0010) { + if (channel->soundnum04 == -1) { + channel->soundnum04 = channel->unk10; + } + } +#endif + + if (pos) { + channel->pos.x = pos->x; + channel->pos.y = pos->y; + channel->pos.z = pos->z; + channel->posptr = &channel->pos; + } else { + channel->posptr = NULL; + } + + if (rooms) { + // @dangerous: Array overflow will occur if rooms has more than 8 elements + for (j = 0; rooms[j] != -1; j++) { + channel->rooms[j] = rooms[j]; + } + + channel->rooms[j] = -1; + } else if (room != -1) { + channel->rooms[0] = room; + channel->rooms[1] = -1; + } else { + channel->rooms[0] = -1; + } + +#if VERSION >= VERSION_NTSC_1_0 + if (!pos && !channel->prop) { + channel->flags2 |= AUDIOCHANNELFLAG2_0010; + } + + if ((channel->flags2 & AUDIOCHANNELFLAG2_0010) && channel->soundnum04 == -1) { + channel->soundnum04 = channel->unk10; + } +#endif + + channel->flags |= AUDIOCHANNELFLAG_1000; + + if (sndIsMp3(soundnum)) { + channel->flags |= AUDIOCHANNELFLAG_0010; + +#if VERSION >= VERSION_NTSC_1_0 + prevpri = osGetThreadPri(0); + osSetThreadPri(0, osGetThreadPri(&g_AudioManager.thread) + 1); + propsndTickChannel(channel->channelnum); + osSetThreadPri(0, prevpri); +#else + propsndTickChannel(channel->channelnum); +#endif + } else { + prevpri = osGetThreadPri(0); + osSetThreadPri(0, osGetThreadPri(&g_AudioManager.thread) + 1); + propsndTickChannel(channel->channelnum); + osSetThreadPri(0, prevpri); + } + +#if VERSION >= VERSION_NTSC_1_0 + if (channel->flags & AUDIOCHANNELFLAG_0400) { + channel->flags &= ~AUDIOCHANNELFLAG_0400; + channel->flags2 |= AUDIOCHANNELFLAG2_0010; + } + + channel->flags &= ~AUDIOCHANNELFLAG_1000; +#else + if (channel->flags & AUDIOCHANNELFLAG_0400) { + channel->flags = AUDIOCHANNELFLAG_IDLE; + } else { + channel->flags &= ~AUDIOCHANNELFLAG_1000; + } +#endif + + return channel->channelnum; +} s32 audioPlayFromProp(s32 channelnum, s16 soundnum, s32 arg2, struct prop *prop, s16 arg4, u16 arg5) { @@ -4670,18 +3868,18 @@ s32 audioPlayFromProp(s32 channelnum, s16 soundnum, s32 arg2, struct prop *prop, // empty } } else if (channelnum == 10) { - retchannelnum = func0f0939f8(NULL, prop, soundnum, -1, + retchannelnum = propsnd0f0939f8(NULL, prop, soundnum, -1, (arg2 ? 0 : -1), arg5 | 0x0080, 0, arg4, 0, -1, 0, -1, -1, -1, -1); #if VERSION >= VERSION_NTSC_1_0 } else if (channelnum < 0 || channelnum >= 8 || channelnum == 9) { - retchannelnum = func0f0939f8(NULL, prop, soundnum, -1, + retchannelnum = propsnd0f0939f8(NULL, prop, soundnum, -1, (arg2 ? 0 : -1), arg5, 0, arg4, 0, -1, 0, -1, -1, -1, -1); #else } else if (channelnum == 9) { - retchannelnum = func0f0939f8(NULL, prop, soundnum, -1, + retchannelnum = propsnd0f0939f8(NULL, prop, soundnum, -1, (arg2 ? 0 : -1), arg5, 0, arg4, 0, -1, 0, -1, -1, -1, -1); } else if (channelnum < 0 || channelnum >= 8) { - retchannelnum = func0f0939f8(NULL, prop, soundnum, -1, + retchannelnum = propsnd0f0939f8(NULL, prop, soundnum, -1, (arg2 ? 0 : -1), arg5, 0, arg4, 0, -1, 0, -1, -1, -1, -1); #endif } else { @@ -4691,7 +3889,7 @@ s32 audioPlayFromProp(s32 channelnum, s16 soundnum, s32 arg2, struct prop *prop, g_AudioChannels[channelnum].channelnum = channelnum; - func0f0939f8(&g_AudioChannels[channelnum], prop, soundnum, -1, + propsnd0f0939f8(&g_AudioChannels[channelnum], prop, soundnum, -1, (arg2 ? 0 : -1), arg5, 0, arg4, 0, -1, 0, -1, -1, -1, -1); retchannelnum = channelnum; @@ -4745,7 +3943,7 @@ void audioPlayFromProp2(s32 channelnum, s32 soundnum, s16 padnum, struct prop *p if (channel->unk28 == 11) { g_AudioChannels[channelnum].channelnum = (u16)channelnum; - func0f0939f8(&g_AudioChannels[channelnum], prop, channel->soundnum26, -1, + propsnd0f0939f8(&g_AudioChannels[channelnum], prop, channel->soundnum26, -1, -1, arg7, 0, 0, 0, -1, 0, -1, 400, arg5, arg6); } else { if ((channel->flags & AUDIOCHANNELFLAG_2000) == 0 && soundnum >= 0) { diff --git a/src/game/shards.c b/src/game/shards.c index 0d426b145..ff53212b7 100644 --- a/src/game/shards.c +++ b/src/game/shards.c @@ -79,7 +79,7 @@ void shardsCreate(struct coord *pos, f32 *rotx, f32 *roty, f32 *rotz, f32 relxmi basepos.z = (pos->f[2] + (relxmin + (speci >> 1)) * spcc[2]) + spc0[2] * (relymin + (speci >> 1)); if (type == SHARDTYPE_GLASS) { - func0f0939f8(NULL, NULL, SFX_GLASS_SHATTER, -1, + propsnd0f0939f8(NULL, NULL, SFX_GLASS_SHATTER, -1, -1, 0, 0, 0, &prop->pos, -1.0f, prop->rooms, -1, -1.0f, -1.0f, -1.0f); } else if (type == SHARDTYPE_BOTTLE) { /** @@ -88,10 +88,10 @@ void shardsCreate(struct coord *pos, f32 *rotx, f32 *roty, f32 *rotz, f32 relxmi * when you shoot the bottles, half of them don't play any breaking * sound effect. */ - func0f0939f8(NULL, NULL, SFX_BOTTLE_BREAK + (random() % 2) * 2, -1, + propsnd0f0939f8(NULL, NULL, SFX_BOTTLE_BREAK + (random() % 2) * 2, -1, -1, 0, 0, 0, &prop->pos, -1.0f, prop->rooms, -1, -1.0f, -1.0f, -1.0f); } else if (type == SHARDTYPE_WOOD) { - func0f0939f8(NULL, NULL, SFX_WOOD_BREAK, -1, + propsnd0f0939f8(NULL, NULL, SFX_WOOD_BREAK, -1, -1, 0, 0, 0, &prop->pos, -1.0f, prop->rooms, -1, -1.0f, -1.0f, -1.0f); } diff --git a/src/game/training.c b/src/game/training.c index 595f9cc1a..517c70788 100644 --- a/src/game/training.c +++ b/src/game/training.c @@ -1368,7 +1368,7 @@ glabel var7f1b941c /* f19f35c: e7a00024 */ swc1 $f0,0x24($sp) /* f19f360: e7a00030 */ swc1 $f0,0x30($sp) /* f19f364: e7a00034 */ swc1 $f0,0x34($sp) -/* f19f368: 0fc24e3a */ jal func0f0939f8 +/* f19f368: 0fc24e3a */ jal propsnd0f0939f8 /* f19f36c: e7a00038 */ swc1 $f0,0x38($sp) /* f19f370: 8fa8004c */ lw $t0,0x4c($sp) /* f19f374: 8fa30058 */ lw $v1,0x58($sp) @@ -1610,7 +1610,7 @@ glabel var7f1baa50pf /* f19fefc: e7a00024 */ swc1 $f0,0x24($sp) /* f19ff00: e7a00030 */ swc1 $f0,0x30($sp) /* f19ff04: e7a00034 */ swc1 $f0,0x34($sp) -/* f19ff08: 0fc24e0e */ jal func0f0939f8 +/* f19ff08: 0fc24e0e */ jal propsnd0f0939f8 /* f19ff0c: e7a00038 */ swc1 $f0,0x38($sp) /* f19ff10: 8fa8004c */ lw $t0,0x4c($sp) /* f19ff14: 8fa30058 */ lw $v1,0x58($sp) @@ -1864,7 +1864,7 @@ glabel var7f1b941c /* f19e258: e7a00024 */ swc1 $f0,0x24($sp) /* f19e25c: e7a00030 */ swc1 $f0,0x30($sp) /* f19e260: e7a00034 */ swc1 $f0,0x34($sp) -/* f19e264: 0fc24e7e */ jal func0f0939f8 +/* f19e264: 0fc24e7e */ jal propsnd0f0939f8 /* f19e268: e7a00038 */ swc1 $f0,0x38($sp) /* f19e26c: 8fa8004c */ lw $t0,0x4c($sp) /* f19e270: 8fa30058 */ lw $v1,0x58($sp) @@ -2107,7 +2107,7 @@ glabel var7f1b941c /* f198270: e7a00024 */ swc1 $f0,0x24($sp) /* f198274: e7a00030 */ swc1 $f0,0x30($sp) /* f198278: e7a00034 */ swc1 $f0,0x34($sp) -/* f19827c: 0fc24762 */ jal func0f0939f8 +/* f19827c: 0fc24762 */ jal propsnd0f0939f8 /* f198280: e7a00038 */ swc1 $f0,0x38($sp) /* f198284: 8fa8004c */ lw $t0,0x4c($sp) /* f198288: 8fa30058 */ lw $v1,0x58($sp) @@ -2250,7 +2250,7 @@ glabel var7f1b941c // } else { // if (g_FrNumSounds < 3) { // g_FrNumSounds++; -// func0f0939f8(NULL, g_FrData.targets[targetnum].prop, SFX_FR_CONVEYER, -1, +// propsnd0f0939f8(NULL, g_FrData.targets[targetnum].prop, SFX_FR_CONVEYER, -1, // -1, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1); // } // @@ -3568,7 +3568,7 @@ glabel var7f1b94e4 /* f1a09b0: afad002c */ sw $t5,0x2c($sp) /* f1a09b4: e7b80030 */ swc1 $f24,0x30($sp) /* f1a09b8: e7b80034 */ swc1 $f24,0x34($sp) -/* f1a09bc: 0fc251de */ jal func0f0939f8 +/* f1a09bc: 0fc251de */ jal propsnd0f0939f8 /* f1a09c0: e7b80038 */ swc1 $f24,0x38($sp) /* f1a09c4: c6000038 */ lwc1 $f0,0x38($s0) .JF0f1a09c8: @@ -3969,7 +3969,7 @@ glabel var7f1b94e4 /* f1a0f80: afa00028 */ sw $zero,0x28($sp) /* f1a0f84: e7b80030 */ swc1 $f24,0x30($sp) /* f1a0f88: e7b80034 */ swc1 $f24,0x34($sp) -/* f1a0f8c: 0fc251de */ jal func0f0939f8 +/* f1a0f8c: 0fc251de */ jal propsnd0f0939f8 /* f1a0f90: e7b80038 */ swc1 $f24,0x38($sp) .JF0f1a0f94: /* f1a0f94: c7a8014c */ lwc1 $f8,0x14c($sp) @@ -4666,7 +4666,7 @@ glabel var7f1b94e4 /* f1a1124: afad002c */ sw $t5,0x2c($sp) /* f1a1128: e7b80030 */ swc1 $f24,0x30($sp) /* f1a112c: e7b80034 */ swc1 $f24,0x34($sp) -/* f1a1130: 0fc24e3a */ jal func0f0939f8 +/* f1a1130: 0fc24e3a */ jal propsnd0f0939f8 /* f1a1134: e7b80038 */ swc1 $f24,0x38($sp) /* f1a1138: c6000038 */ lwc1 $f0,0x38($s0) .PF0f1a113c: @@ -5069,7 +5069,7 @@ glabel var7f1b94e4 /* f1a16fc: afa00028 */ sw $zero,0x28($sp) /* f1a1700: e7b80030 */ swc1 $f24,0x30($sp) /* f1a1704: e7b80034 */ swc1 $f24,0x34($sp) -/* f1a1708: 0fc24e3a */ jal func0f0939f8 +/* f1a1708: 0fc24e3a */ jal propsnd0f0939f8 /* f1a170c: e7b80038 */ swc1 $f24,0x38($sp) .PF0f1a1710: /* f1a1710: c7a8014c */ lwc1 $f8,0x14c($sp) @@ -5766,7 +5766,7 @@ glabel var7f1b94e4 /* f1a1cc4: afad002c */ sw $t5,0x2c($sp) /* f1a1cc8: e7b80030 */ swc1 $f24,0x30($sp) /* f1a1ccc: e7b80034 */ swc1 $f24,0x34($sp) -/* f1a1cd0: 0fc24e0e */ jal func0f0939f8 +/* f1a1cd0: 0fc24e0e */ jal propsnd0f0939f8 /* f1a1cd4: e7b80038 */ swc1 $f24,0x38($sp) /* f1a1cd8: c6000038 */ lwc1 $f0,0x38($s0) .PB0f1a1cdc: @@ -6169,7 +6169,7 @@ glabel var7f1b94e4 /* f1a229c: afa00028 */ sw $zero,0x28($sp) /* f1a22a0: e7b80030 */ swc1 $f24,0x30($sp) /* f1a22a4: e7b80034 */ swc1 $f24,0x34($sp) -/* f1a22a8: 0fc24e0e */ jal func0f0939f8 +/* f1a22a8: 0fc24e0e */ jal propsnd0f0939f8 /* f1a22ac: e7b80038 */ swc1 $f24,0x38($sp) .PB0f1a22b0: /* f1a22b0: c7a8014c */ lwc1 $f8,0x14c($sp) @@ -6866,7 +6866,7 @@ glabel var7f1b94e4 /* f1a0010: afad002c */ sw $t5,0x2c($sp) /* f1a0014: e7b80030 */ swc1 $f24,0x30($sp) /* f1a0018: e7b80034 */ swc1 $f24,0x34($sp) -/* f1a001c: 0fc24e7e */ jal func0f0939f8 +/* f1a001c: 0fc24e7e */ jal propsnd0f0939f8 /* f1a0020: e7b80038 */ swc1 $f24,0x38($sp) /* f1a0024: c6000038 */ lwc1 $f0,0x38($s0) .L0f1a0028: @@ -7273,7 +7273,7 @@ glabel var7f1b94e4 /* f1a05f8: afa00028 */ sw $zero,0x28($sp) /* f1a05fc: e7b80030 */ swc1 $f24,0x30($sp) /* f1a0600: e7b80034 */ swc1 $f24,0x34($sp) -/* f1a0604: 0fc24e7e */ jal func0f0939f8 +/* f1a0604: 0fc24e7e */ jal propsnd0f0939f8 /* f1a0608: e7b80038 */ swc1 $f24,0x38($sp) .L0f1a060c: /* f1a060c: c7a6014c */ lwc1 $f6,0x14c($sp) @@ -7979,7 +7979,7 @@ glabel var7f1b94e4 /* f19a018: afae002c */ sw $t6,0x2c($sp) /* f19a01c: e7b80030 */ swc1 $f24,0x30($sp) /* f19a020: e7b80034 */ swc1 $f24,0x34($sp) -/* f19a024: 0fc24762 */ jal func0f0939f8 +/* f19a024: 0fc24762 */ jal propsnd0f0939f8 /* f19a028: e7b80038 */ swc1 $f24,0x38($sp) /* f19a02c: c6000038 */ lwc1 $f0,0x38($s0) .NB0f19a030: @@ -8388,7 +8388,7 @@ glabel var7f1b94e4 /* f19a608: afa00028 */ sw $zero,0x28($sp) /* f19a60c: e7b80030 */ swc1 $f24,0x30($sp) /* f19a610: e7b80034 */ swc1 $f24,0x34($sp) -/* f19a614: 0fc24762 */ jal func0f0939f8 +/* f19a614: 0fc24762 */ jal propsnd0f0939f8 /* f19a618: e7b80038 */ swc1 $f24,0x38($sp) .NB0f19a61c: /* f19a61c: c7a80144 */ lwc1 $f8,0x144($sp) @@ -8845,7 +8845,7 @@ glabel var7f1b94e4 // && g_FrData.targets[i].silent // && g_FrData.targets[i].travelspeed != -1) { // g_FrData.targets[i].silent = false; -// func0f0939f8(NULL, g_FrData.targets[i].prop, SFX_FR_CONVEYER, -1, +// propsnd0f0939f8(NULL, g_FrData.targets[i].prop, SFX_FR_CONVEYER, -1, // -1, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1); // } // @@ -9023,7 +9023,7 @@ glabel var7f1b94e4 // // // 5b8 // func0f0926bc(prop, 1, 0xffff); -// func0f0939f8(NULL, prop, SFX_FR_CONVEYER_STOP, -1, +// propsnd0f0939f8(NULL, prop, SFX_FR_CONVEYER_STOP, -1, // -1, 1024, 0, 0, 0, -1, 0, -1, -1, -1, -1); // // if (g_FrNumSounds); diff --git a/src/include/game/propsnd.h b/src/include/game/propsnd.h index 1fca94bd2..146bc835c 100644 --- a/src/include/game/propsnd.h +++ b/src/include/game/propsnd.h @@ -21,7 +21,7 @@ void propsndTick(void); void func0f093630(struct prop *prop, f32 arg1, s32 arg2); void func0f093790(struct prop *prop, s32 arg1); void func0f0938ec(struct prop *prop); -s16 func0f0939f8(struct audiochannel *channel, struct prop *prop, s16 soundnum, s16 padnum, s32 arg4, u16 flags, u16 flags2, s32 arg7, struct coord *pos, f32 arg9, s16 *rooms, s32 room, f32 arg12, f32 arg13, f32 arg14); +s16 propsnd0f0939f8(struct audiochannel *channel, struct prop *prop, s16 soundnum, s16 padnum, s32 arg4, u16 flags, u16 flags2, s32 arg7, struct coord *pos, f32 arg9, s16 *rooms, s32 room, f32 arg12, f32 arg13, f32 arg14); 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);