Decompile _freePVoice

This commit is contained in:
Ryan Dwyer 2021-03-27 23:21:36 +10:00
parent b552dcea23
commit 6795507776
5 changed files with 11 additions and 24 deletions

View File

@ -326,7 +326,7 @@ typedef struct PVoice_s {
*/
ALParam *__allocParam(void);
void __freeParam(ALParam *param);
void _freePVoice(ALSynth *drvr, PVoice *pvoice);
void _freePVoice(PVoice *pvoice);
void _collectPVoices(void);
s32 _timeToSamples(ALSynth *ALSynth, s32 micros);

View File

@ -5,7 +5,6 @@
#include "types.h"
u32 func00030ce0(void);
u32 func000315f4(void);
u32 func00031634(void);
u32 func00031698(void);
u32 func000316d0(void);

View File

@ -594,26 +594,14 @@ void _collectPVoices(void)
}
}
GLOBAL_ASM(
glabel func000315f4
/* 315f4: 27bdffe8 */ addiu $sp,$sp,-24
/* 315f8: afbf0014 */ sw $ra,0x14($sp)
/* 315fc: afa40018 */ sw $a0,0x18($sp)
/* 31600: 0c00c5e9 */ jal alUnlink
/* 31604: 8fa40018 */ lw $a0,0x18($sp)
/* 31608: 3c058006 */ lui $a1,%hi(alGlobals)
/* 3160c: 8ca5f114 */ lw $a1,%lo(alGlobals)($a1)
/* 31610: 8fa40018 */ lw $a0,0x18($sp)
/* 31614: 0c00c5dc */ jal alLink
/* 31618: 24a50014 */ addiu $a1,$a1,20
/* 3161c: 10000001 */ b .L00031624
/* 31620: 00000000 */ nop
.L00031624:
/* 31624: 8fbf0014 */ lw $ra,0x14($sp)
/* 31628: 27bd0018 */ addiu $sp,$sp,0x18
/* 3162c: 03e00008 */ jr $ra
/* 31630: 00000000 */ nop
);
void _freePVoice(PVoice *pvoice)
{
/*
* move the voice from the allocated list to the lame list
*/
alUnlink((ALLink *)pvoice);
alLink((ALLink *)pvoice, &alGlobals->drvr.pLameList);
}
GLOBAL_ASM(
glabel func00031634

View File

@ -253,7 +253,7 @@ glabel func0003d1a0
/* 3d244: 00000000 */ nop
.L0003d248:
/* 3d248: 8fad0020 */ lw $t5,0x20($sp)
/* 3d24c: 0c00c57d */ jal func000315f4
/* 3d24c: 0c00c57d */ jal _freePVoice
/* 3d250: 8da40008 */ lw $a0,0x8($t5)
.L0003d254:
/* 3d254: 8fab0020 */ lw $t3,0x20($sp)

View File

@ -6051,7 +6051,7 @@ glabel func0003e8c0
/* 3f008: 8d0c000c */ lw $t4,0xc($t0)
/* 3f00c: ad800088 */ sw $zero,0x88($t4)
/* 3f010: 8fb80020 */ lw $t8,0x20($sp)
/* 3f014: 0c00c57d */ jal func000315f4
/* 3f014: 0c00c57d */ jal _freePVoice
/* 3f018: 8f04000c */ lw $a0,0xc($t8)
/* 3f01c: 1000003c */ b .L0003f110
/* 3f020: 00000000 */ nop