Decompile activemenuOpen

This commit is contained in:
Ryan Dwyer 2020-02-26 19:28:18 +10:00
parent df73ed5207
commit e9052bc1d4
4 changed files with 29 additions and 69 deletions

View File

@ -2148,7 +2148,7 @@ glabel func0f0c8b90
/* f0c9590: 28410010 */ slti $at,$v0,0x10
/* f0c9594: 14200006 */ bnez $at,.L0f0c95b0
/* f0c9598: 24480001 */ addiu $t0,$v0,0x1
/* f0c959c: 0fc3fbda */ jal func0f0fef68
/* f0c959c: 0fc3fbda */ jal activemenuOpen
/* f0c95a0: 00000000 */ sll $zero,$zero,0x0
/* f0c95a4: 8e590284 */ lw $t9,0x284($s2)
/* f0c95a8: 10000014 */ beqz $zero,.L0f0c95fc
@ -3081,7 +3081,7 @@ glabel func0f0c8b90
/* f0ca2bc: 28410010 */ slti $at,$v0,0x10
/* f0ca2c0: 14200006 */ bnez $at,.L0f0ca2dc
/* f0ca2c4: 244e0001 */ addiu $t6,$v0,0x1
/* f0ca2c8: 0fc3fbda */ jal func0f0fef68
/* f0ca2c8: 0fc3fbda */ jal activemenuOpen
/* f0ca2cc: 00000000 */ sll $zero,$zero,0x0
/* f0ca2d0: 8e4d0284 */ lw $t5,0x284($s2)
/* f0ca2d4: 10000017 */ beqz $zero,.L0f0ca334

View File

@ -1420,68 +1420,23 @@ glabel func0f0fecd4
/* f0fef64: 27bd0030 */ addiu $sp,$sp,0x30
);
GLOBAL_ASM(
glabel func0f0fef68
.late_rodata
glabel var7f1b2cdc
.word 0x3e99999a
.text
/* f0fef68: 3c04800a */ lui $a0,%hi(g_Vars)
/* f0fef6c: 24849fc0 */ addiu $a0,$a0,%lo(g_Vars)
/* f0fef70: 8c830284 */ lw $v1,0x284($a0)
/* f0fef74: 27bdffe8 */ addiu $sp,$sp,-24
/* f0fef78: afbf0014 */ sw $ra,0x14($sp)
/* f0fef7c: 8c6e1580 */ lw $t6,0x1580($v1)
/* f0fef80: 3c05800a */ lui $a1,%hi(g_ActiveMenuIndex)
/* f0fef84: 31cf0001 */ andi $t7,$t6,0x1
/* f0fef88: 55e0002a */ bnezl $t7,.L0f0ff034
/* f0fef8c: 8fbf0014 */ lw $ra,0x14($sp)
/* f0fef90: 8c98028c */ lw $t8,0x28c($a0)
/* f0fef94: 24a521b8 */ addiu $a1,$a1,%lo(g_ActiveMenuIndex)
/* f0fef98: 24190001 */ addiu $t9,$zero,0x1
/* f0fef9c: acb80000 */ sw $t8,0x0($a1)
/* f0fefa0: a0790250 */ sb $t9,0x250($v1)
/* f0fefa4: 8c88028c */ lw $t0,0x28c($a0)
/* f0fefa8: 3c018007 */ lui $at,0x8007
/* f0fefac: 3c0c800a */ lui $t4,%hi(g_ActiveMenuThings)
/* f0fefb0: 00084880 */ sll $t1,$t0,0x2
/* f0fefb4: 00290821 */ addu $at,$at,$t1
/* f0fefb8: ac200750 */ sw $zero,0x750($at)
/* f0fefbc: 8caa0000 */ lw $t2,0x0($a1)
/* f0fefc0: 44802000 */ mtc1 $zero,$f4
/* f0fefc4: 258c20d0 */ addiu $t4,$t4,%lo(g_ActiveMenuThings)
/* f0fefc8: 000a58c0 */ sll $t3,$t2,0x3
/* f0fefcc: 016a5823 */ subu $t3,$t3,$t2
/* f0fefd0: 000b58c0 */ sll $t3,$t3,0x3
/* f0fefd4: 016c1021 */ addu $v0,$t3,$t4
/* f0fefd8: a0400000 */ sb $zero,0x0($v0)
/* f0fefdc: 0fc3fb35 */ jal func0f0fecd4
/* f0fefe0: e444001c */ swc1 $f4,0x1c($v0)
/* f0fefe4: 0fc3fade */ jal activemenuChangeScreen
/* f0fefe8: 00002025 */ or $a0,$zero,$zero
/* f0fefec: 3c0d800a */ lui $t5,0x800a
/* f0feff0: 8dad21b8 */ lw $t5,0x21b8($t5)
/* f0feff4: 3c0f800a */ lui $t7,%hi(g_ActiveMenuThings)
/* f0feff8: 25ef20d0 */ addiu $t7,$t7,%lo(g_ActiveMenuThings)
/* f0feffc: 000d70c0 */ sll $t6,$t5,0x3
/* f0ff000: 01cd7023 */ subu $t6,$t6,$t5
/* f0ff004: 000e70c0 */ sll $t6,$t6,0x3
/* f0ff008: 01cf1021 */ addu $v0,$t6,$t7
/* f0ff00c: 84580004 */ lh $t8,0x4($v0)
/* f0ff010: 3c017f1b */ lui $at,%hi(var7f1b2cdc)
/* f0ff014: 27190005 */ addiu $t9,$t8,0x5
/* f0ff018: a4590002 */ sh $t9,0x2($v0)
/* f0ff01c: c4262cdc */ lwc1 $f6,%lo(var7f1b2cdc)($at)
/* f0ff020: a0400034 */ sb $zero,0x34($v0)
/* f0ff024: a0400033 */ sb $zero,0x33($v0)
/* f0ff028: a0400032 */ sb $zero,0x32($v0)
/* f0ff02c: e4460018 */ swc1 $f6,0x18($v0)
/* f0ff030: 8fbf0014 */ lw $ra,0x14($sp)
.L0f0ff034:
/* f0ff034: 27bd0018 */ addiu $sp,$sp,0x18
/* f0ff038: 03e00008 */ jr $ra
/* f0ff03c: 00000000 */ sll $zero,$zero,0x0
);
void activemenuOpen(void)
{
if ((g_Vars.currentplayer->unk1580_s32 & 1) == 0) {
g_ActiveMenuIndex = g_Vars.currentplayernum;
g_Vars.currentplayer->activemenumode = 1;
g_PlayersWithControl[g_Vars.currentplayernum] = false;
g_ActiveMenuThings[g_ActiveMenuIndex].screenindex = 0;
g_ActiveMenuThings[g_ActiveMenuIndex].unk1c = 0;
func0f0fecd4();
activemenuChangeScreen(0);
g_ActiveMenuThings[g_ActiveMenuIndex].unk02 = g_ActiveMenuThings[g_ActiveMenuIndex].unk04 + 5;
g_ActiveMenuThings[g_ActiveMenuIndex].unk18 = 0.3;
g_ActiveMenuThings[g_ActiveMenuIndex].unk34 = 0;
g_ActiveMenuThings[g_ActiveMenuIndex].unk33 = 0;
g_ActiveMenuThings[g_ActiveMenuIndex].unk32 = 0;
}
}
void activemenuClose(void)
{

View File

@ -13,7 +13,7 @@ u32 func0f0fe848(void);
u32 func0f0fea14(void);
void activemenuChangeScreen(s32 step);
u32 func0f0fecd4(void);
u32 func0f0fef68(void);
void activemenuOpen(void);
void activemenuClose(void);
u32 func0f0ff0bc(void);
u32 func0f0ff274(void);

View File

@ -2388,7 +2388,12 @@ struct player {
/*0x1574*/ u32 unk1574;
/*0x1578*/ u32 unk1578;
/*0x157c*/ u32 unk157c;
/*0x1580*/ s8 unk1580;
union {
s8 unk1580;
s32 unk1580_s32;
};
/*0x1584*/ u32 unk1584;
/*0x1588*/ u32 unk1588;
/*0x158c*/ u32 unk158c;
@ -4842,15 +4847,15 @@ struct activemenuthing {
/*0x0e*/ u8 slotnum;
/*0x10*/ u32 unk10;
/*0x14*/ u32 unk14;
/*0x18*/ f32 unk18;
/*0x1c*/ u32 unk1c;
/*0x18*/ f32 unk18; // seems like a fade duration or current alpha level
/*0x1c*/ f32 unk1c;
/*0x20*/ u8 weaponnums[8];
/*0x28*/ u32 unk28;
/*0x2c*/ u32 unk2c;
/*0x30*/ u16 unk30;
/*0x32*/ u8 unk32;
/*0x33*/ u8 unk33;
/*0x34*/ u32 unk34;
/*0x34*/ u8 unk34;
};
struct objective {