From f2cb971f676dec5668ba04bac5336b26d37643d4 Mon Sep 17 00:00:00 2001 From: Mittenshugg Date: Wed, 5 Aug 2020 23:52:30 -0500 Subject: [PATCH] alEvtqNew --- lib/src/unknown_0C9C90.c | 21 ++++++++++++++++++++- src/unknown_064830.c | 2 ++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/lib/src/unknown_0C9C90.c b/lib/src/unknown_0C9C90.c index 4665ec56..5c03a14f 100644 --- a/lib/src/unknown_0C9C90.c +++ b/lib/src/unknown_0C9C90.c @@ -3,11 +3,30 @@ #include "types.h" #include "macros.h" +#include "audio_internal.h" GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/alEvtqFlushType.s") + + GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/alEvtqPostEvent.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/alEvtqNextEvent.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/alEvtqNew.s") + +//GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/alEvtqNew.s") +void alEvtqNew(ALEventQueue *evtq, ALEventListItem *items, s32 itemCount) +{ + s32 i; + + evtq->eventCount = 0; + evtq->allocList.next = 0; + evtq->allocList.prev = 0; + evtq->freeList.next = 0; + evtq->freeList.prev = 0; + + for (i = 0; i < itemCount; i++) { + alLink((ALLink *)&items[i], &evtq->freeList); + } +} + GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/alSynAddPlayer.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/_allocatePVoice.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9C90/alSynAllocVoice.s") diff --git a/src/unknown_064830.c b/src/unknown_064830.c index a0f84c20..0fce57db 100644 --- a/src/unknown_064830.c +++ b/src/unknown_064830.c @@ -30,6 +30,8 @@ s32 alFxParam(void* filter, s32 paramID, void* param) { GLOBAL_ASM("asm/non_matchings/unknown_064830/alFxParamHdl.s") GLOBAL_ASM("asm/non_matchings/unknown_064830/_loadOutputBuffer.s") + + /* * This routine is for loading data from the delay line buff. If the * address of curr_ptr < r->base, it will force it to be within r->base