Decompile mpGetBeauHeadId

This commit is contained in:
Ryan Dwyer 2020-01-19 21:09:05 +10:00
parent 31176b14f6
commit c0221e30d0
8 changed files with 27 additions and 25 deletions

View File

@ -3997,7 +3997,7 @@ glabel func0f0f38b0
/* f0f3a44: 00000000 */ sll $zero,$zero,0x0
/* f0f3a48: 0fc52a7e */ jal func0f14a9f8
/* f0f3a4c: 02222023 */ subu $a0,$s1,$v0
/* f0f3a50: 0fc62ed9 */ jal func0f18bb64
/* f0f3a50: 0fc62ed9 */ jal mpGetBeauHeadId
/* f0f3a54: 304400ff */ andi $a0,$v0,0xff
/* f0f3a58: 0fc62ec7 */ jal func0f18bb1c
/* f0f3a5c: afa20400 */ sw $v0,0x400($sp)

View File

@ -5268,7 +5268,7 @@ glabel func0f17b4f8
/* f17b614: 8faf003c */ lw $t7,0x3c($sp)
/* f17b618: 0fc52a7e */ jal func0f14a9f8
/* f17b61c: 01e22023 */ subu $a0,$t7,$v0
/* f17b620: 0fc62ed9 */ jal func0f18bb64
/* f17b620: 0fc62ed9 */ jal mpGetBeauHeadId
/* f17b624: 304400ff */ andi $a0,$v0,0xff
/* f17b628: 3c188007 */ lui $t8,0x8007
/* f17b62c: 8f181448 */ lw $t8,0x1448($t8)

View File

@ -5123,15 +5123,13 @@ glabel func0f18bb48
/* f18bb60: 9042752e */ lbu $v0,0x752e($v0)
);
s32 mpGetBeauHeadId(u8 headnum)
{
return g_MpBeauHeads[headnum].headid;
}
GLOBAL_ASM(
glabel func0f18bb64
/* f18bb64: 308e00ff */ andi $t6,$a0,0xff
/* f18bb68: 000e7880 */ sll $t7,$t6,0x2
/* f18bb6c: 3c028008 */ lui $v0,0x8008
/* f18bb70: 004f1021 */ addu $v0,$v0,$t7
/* f18bb74: afa40000 */ sw $a0,0x0($sp)
/* f18bb78: 03e00008 */ jr $ra
/* f18bb7c: 84427518 */ lh $v0,0x7518($v0)
glabel func0f18bb80
/* f18bb80: 03e00008 */ jr $ra
/* f18bb84: 24020005 */ addiu $v0,$zero,0x5
);
@ -5242,8 +5240,8 @@ glabel func0f18bc9c
/* f18bd48: 8ca57a54 */ lw $a1,0x7a54($a1)
/* f18bd4c: 8fa60018 */ lw $a2,0x18($sp)
.L0f18bd50:
/* f18bd50: 3c038008 */ lui $v1,%hi(mpheadstable)
/* f18bd54: 2463752c */ addiu $v1,$v1,%lo(mpheadstable)
/* f18bd50: 3c038008 */ lui $v1,%hi(g_MpHeads)
/* f18bd54: 2463752c */ addiu $v1,$v1,%lo(g_MpHeads)
/* f18bd58: 00001025 */ or $v0,$zero,$zero
/* f18bd5c: 2404004b */ addiu $a0,$zero,0x4b
.L0f18bd60:

View File

@ -2780,13 +2780,13 @@ glabel func0f19bfa0
/* f19bfe8: 24060028 */ addiu $a2,$zero,0x28
/* f19bfec: 3c11800b */ lui $s1,%hi(g_MpSimulants)
/* f19bff0: 3c1e800b */ lui $s8,%hi(var800ac798)
/* f19bff4: 3c178008 */ lui $s7,%hi(mpheadstable)
/* f19bff4: 3c178008 */ lui $s7,%hi(g_MpHeads)
/* f19bff8: 3c168008 */ lui $s6,%hi(g_MpBodies)
/* f19bffc: 3c148008 */ lui $s4,%hi(g_MpGeneralSimulants)
/* f19c000: 00408025 */ or $s0,$v0,$zero
/* f19c004: 2694772c */ addiu $s4,$s4,%lo(g_MpGeneralSimulants)
/* f19c008: 26d677bc */ addiu $s6,$s6,%lo(g_MpBodies)
/* f19c00c: 26f7752c */ addiu $s7,$s7,%lo(mpheadstable)
/* f19c00c: 26f7752c */ addiu $s7,$s7,%lo(g_MpHeads)
/* f19c010: 27dec798 */ addiu $s8,$s8,%lo(var800ac798)
/* f19c014: 2631c538 */ addiu $s1,$s1,%lo(g_MpSimulants)
/* f19c018: 92240047 */ lbu $a0,0x47($s1)

View File

@ -49,7 +49,7 @@ u32 func0f18bb1c(void);
s32 mpGetNumHeads(void);
u32 func0f18bb2c(void);
u32 func0f18bb48(void);
u32 func0f18bb64(void);
s32 mpGetBeauHeadId(u8 headnum);
u32 mpGetNumBodies(void);
s32 mpGetBodyId(u8 bodynum);
s32 mpGetBodyIndexByBodyId(u16 bodyid);

View File

@ -298,7 +298,8 @@ extern struct mpweaponset mpweaponsetstable[];
extern u32 var800874c8;
extern u32 var800874cc;
extern u32 var800874f0;
extern struct mpheadentry mpheadstable[];
extern struct mphead g_MpBeauHeads[];
extern struct mphead g_MpHeads[];
extern u32 table_0x2d678[];
extern struct mpsimulant g_MpGeneralSimulants[];
extern struct mpsimulant mpspecialsimulants[];

View File

@ -2846,8 +2846,8 @@ struct mpweaponset {
u8 slots[16];
};
struct mpheadentry {
u16 head;
struct mphead {
s16 headid;
u8 unlockvalue;
};

View File

@ -11927,14 +11927,17 @@ u32 var80087508 = 0x00000000;
u32 var8008750c = 0x00000000;
u32 var80087510 = 0x00000000;
u32 var80087514 = 0x00000000;
u32 var80087518 = 0x002b0000;
u32 var8008751c = 0x00310000;
u32 var80087520 = 0x00320000;
u32 var80087524 = 0x00330000;
u32 var80087528 = 0x00340000;
// 2d54c
struct mpheadentry mpheadstable[] = {
struct mphead g_MpBeauHeads[] = {
// head, unlock value
{ HEAD_BEAU2, 0x00 },
{ HEAD_BEAU3, 0x00 },
{ HEAD_BEAU4, 0x00 },
{ HEAD_BEAU5, 0x00 },
{ HEAD_BEAU6, 0x00 },
};
struct mphead g_MpHeads[] = {
// head, unlock value
{ /*0x00*/ 0x04, 0x00 },
{ /*0x01*/ 0x0c, 0x41 },