diff --git a/linker_scripts/us/symbol_addrs_code.txt b/linker_scripts/us/symbol_addrs_code.txt index d63f748..c02b74b 100644 --- a/linker_scripts/us/symbol_addrs_code.txt +++ b/linker_scripts/us/symbol_addrs_code.txt @@ -1365,7 +1365,7 @@ func_80045D60 = 0x80045D60; // type:func func_80045FF0 = 0x80045FF0; // type:func func_80046EF0 = 0x80046EF0; // type:func n_alEnvmixerPull = 0x80046F60; // type:func -func_80047500 = 0x80047500; // type:func +n_alEnvmixerParam = 0x80047500; // type:func func_800475A4 = 0x800475A4; // type:func func_800477D0 = 0x800477D0; // type:func func_80047958 = 0x80047958; // type:func @@ -1392,7 +1392,7 @@ _n_collectPVoices = 0x80049648; // type:func _n_freePVoice = 0x800496AC; // type:func _n_timeToSamplesNoRound = 0x800496E0; // type:func _n_timeToSamples = 0x80049734; // type:func -func_80049760 = 0x80049760; // type:func +n_alSynSetPan = 0x80049760; // type:func func_800497E0 = 0x800497E0; // type:func func_8004980C = 0x8004980C; // type:func func_80049890 = 0x80049890; // type:func diff --git a/src/47B60.c b/src/47B60.c index 0ca45d8..0f199ba 100644 --- a/src/47B60.c +++ b/src/47B60.c @@ -2,7 +2,7 @@ #pragma GLOBAL_ASM("asm/us/nonmatchings/47B60/n_alEnvmixerPull.s") -#pragma GLOBAL_ASM("asm/us/nonmatchings/47B60/func_80047500.s") +#pragma GLOBAL_ASM("asm/us/nonmatchings/47B60/n_alEnvmixerParam.s") #pragma GLOBAL_ASM("asm/us/nonmatchings/47B60/func_800475A4.s") diff --git a/src/4A360.c b/src/4A360.c deleted file mode 100644 index 23c953a..0000000 --- a/src/4A360.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "global.h" - -#pragma GLOBAL_ASM("asm/us/nonmatchings/4A360/func_80049760.s") diff --git a/src/4F7F0.c b/src/4F7F0.c index 82bb1ca..bf81bb2 100644 --- a/src/4F7F0.c +++ b/src/4F7F0.c @@ -20,7 +20,6 @@ struct UnkStruct8004EBF0 { char filler[0x8]; struct UnkStructUnk8* unk8; }; -void func_80047500(void*, u8, void*, void*); void func_8004EBF0(struct UnkStruct8004EBF0* arg0, f32 arg1) { struct UnkArray4* temp_v0; @@ -32,7 +31,7 @@ void func_8004EBF0(struct UnkStruct8004EBF0* arg0, f32 arg1) { temp_v0->unk8 = 7; temp_v0->unkC = arg1; temp_v0->unk0 = 0; - func_80047500(arg0->unk8, 3, temp_v0, arg0); + n_alEnvmixerParam(arg0->unk8, 3, temp_v0); } } } diff --git a/src/libnaudio/n_synsetpan.c b/src/libnaudio/n_synsetpan.c new file mode 100644 index 0000000..22a3d06 --- /dev/null +++ b/src/libnaudio/n_synsetpan.c @@ -0,0 +1,51 @@ +/*==================================================================== + * + * Copyright 1993, Silicon Graphics, Inc. + * All Rights Reserved. + * + * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, + * Inc.; the contents of this file may not be disclosed to third + * parties, copied or duplicated in any form, in whole or in part, + * without the prior written permission of Silicon Graphics, Inc. + * + * RESTRICTED RIGHTS LEGEND: + * Use, duplication or disclosure by the Government is subject to + * restrictions as set forth in subdivision (c)(1)(ii) of the Rights + * in Technical Data and Computer Software clause at DFARS + * 252.227-7013, and/or in similar or successor clauses in the FAR, + * DOD or NASA FAR Supplement. Unpublished - rights reserved under the + * Copyright Laws of the United States. + *====================================================================*/ + +#include +#include +#include "n_synthInternals.h" + +void n_alSynSetPan(N_ALVoice *v, u8 pan) +{ + ALParam *update; + + if (v->pvoice) { + + /* + * get new update struct from the free list + */ + update = __n_allocParam(); + ALFailIf(update == 0, ERR_ALSYN_NO_UPDATE); + + /* + * set offset and pan data + */ +#ifdef SAMPLE_ROUND + update->delta = SAMPLE184( n_syn->paramSamples + v->pvoice->offset); +#else + update->delta = n_syn->paramSamples + v->pvoice->offset; +#endif + update->type = AL_FILTER_SET_PAN; + update->data.i = pan; + update->next = 0; + + n_alEnvmixerParam(v->pvoice, AL_FILTER_ADD_UPDATE, update); + } +} + diff --git a/yamls/us/rom.yaml b/yamls/us/rom.yaml index 7da6278..245b1c0 100644 --- a/yamls/us/rom.yaml +++ b/yamls/us/rom.yaml @@ -96,7 +96,7 @@ - [0x49790, c] - [0x49BA0, c] - [0x49DC0, c, libnaudio/n_synthesizer] - - [0x4A360, c] + - [0x4A360, c, libnaudio/n_synsetpan] - [0x4A3E0, c] - [0x4B940, c, 4B940] - [0x4BA90, c, 4BA90]