Decompile channelGetUnk06

This commit is contained in:
Ryan Dwyer 2021-01-09 00:29:18 +10:00
parent 898c3d9512
commit df3209abfb
5 changed files with 10 additions and 23 deletions

View File

@ -4819,7 +4819,7 @@ bool ai00d4(void)
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
s16 thing = cmd[4] | (cmd[3] << 8);
if (func0f092914((s8)cmd[2]) < thing) {
if (channelGetUnk06((s8)cmd[2]) < thing) {
g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[5]);
} else {
g_Vars.aioffset += 6;

View File

@ -188,24 +188,10 @@ glabel func0f0927d4
/* f092910: 00601025 */ or $v0,$v1,$zero
);
GLOBAL_ASM(
glabel func0f092914
/* f092914: 0480000a */ bltz $a0,.L0f092940
/* f092918: 28810008 */ slti $at,$a0,0x8
/* f09291c: 10200008 */ beqz $at,.L0f092940
/* f092920: 3c0e8007 */ lui $t6,%hi(g_AudioChannels)
/* f092924: 8dceae10 */ lw $t6,%lo(g_AudioChannels)($t6)
/* f092928: 00047900 */ sll $t7,$a0,0x4
/* f09292c: 01e47823 */ subu $t7,$t7,$a0
/* f092930: 000f78c0 */ sll $t7,$t7,0x3
/* f092934: 01cfc021 */ addu $t8,$t6,$t7
/* f092938: 03e00008 */ jr $ra
/* f09293c: 87020006 */ lh $v0,0x6($t8)
.L0f092940:
/* f092940: 00001825 */ or $v1,$zero,$zero
/* f092944: 03e00008 */ jr $ra
/* f092948: 00601025 */ or $v0,$v1,$zero
);
s32 channelGetUnk06(s32 channelnum)
{
return (channelnum >= 0 && channelnum <= 7) ? g_AudioChannels[channelnum].unk06 : 0;
}
GLOBAL_ASM(
glabel func0f09294c

View File

@ -1942,9 +1942,9 @@
mkshort(0x00d3), \
channel,
#define cmd00d4(u1, u2, label) \
#define cmd00d4(channel, u2, label) \
mkshort(0x00d4), \
u1, \
channel, \
mkshort(u2), \
label,

View File

@ -6,7 +6,7 @@
bool func0f092610(struct prop *prop, s32 arg1);
void func0f0926bc(struct prop *prop, s32 arg1, u16 arg2);
s32 func0f0927d4(f32 arg0, f32 arg1, f32 arg2, f32 arg3, s16 arg4);
s32 func0f092914(s32 arg0);
s32 channelGetUnk06(s32 channelnum);
u32 func0f09294c(void);
void func0f092a98(s32 channelnum);
u32 func0f092b50(void);

View File

@ -6678,7 +6678,8 @@ struct var800a45c4 {
struct audiochannel {
/*0x00*/ struct audiohandle *audiohandle;
/*0x04*/ u32 unk04;
/*0x04*/ u16 unk04;
/*0x06*/ s16 unk06;
/*0x08*/ u32 unk08;
/*0x0c*/ u32 unk0c;
/*0x10*/ u32 unk10;