This commit is contained in:
Ethan Roseman 2020-12-18 11:31:02 +09:00
parent 052f201f6e
commit c0421dcda4
2 changed files with 8 additions and 3 deletions

View File

@ -457,6 +457,8 @@ extern UnkAl834* D_8009A628;
extern UnkAl6CC* D_8009A640;
extern UnkAlA9C* D_8009A664;
extern u16 D_800A0F50;
extern s32* D_800A3FE0;
extern s32* D_800A3FE4;
extern s32 D_800A3FE8;

View File

@ -42,6 +42,7 @@ void nuAuCleanDMABuffers(void) {
NUDMAState* state = &nuAuDmaState;
NUDMABuffer* dmaPtr = state->firstUsed;
// A bit odd, this
do {
NUDMAState* state = &nuAuDmaState;
NUDMABuffer* nextPtr;
@ -49,11 +50,14 @@ void nuAuCleanDMABuffers(void) {
while (dmaPtr != NULL) {
nextPtr = dmaPtr->node.next;
if ((dmaPtr->frameCnt + 1) < nuAuFrameCounter) {
if (dmaPtr->frameCnt + 1 < nuAuFrameCounter) {
if (state->firstUsed == dmaPtr) {
state->firstUsed = nextPtr;
}
alUnlink(dmaPtr);
if (state->firstFree != 0) {
alLink(dmaPtr, state->firstFree);
} else {
@ -62,6 +66,7 @@ void nuAuCleanDMABuffers(void) {
dmaPtr->node.prev = 0;
}
}
dmaPtr = nextPtr;
}
@ -71,8 +76,6 @@ void nuAuCleanDMABuffers(void) {
} while (0);
}
extern u16 D_800A0F50;
INCLUDE_ASM(s32, "code_25f00_len_940", func_8004B328);
// void func_8004B328(s16 arg0, s32 arg1) {
// s32 temp_s0;