Decompile currentPlayerGetGrabbedProp

This commit is contained in:
Ryan Dwyer 2020-03-01 00:23:12 +10:00
parent 4941000d02
commit 56b1365551
5 changed files with 16 additions and 23 deletions

View File

@ -6769,7 +6769,7 @@ glabel setupParseObject
.L0f06b004:
/* f06b004: 0fc4a24b */ jal setCurrentPlayerNum
/* f06b008: 02002025 */ or $a0,$s0,$zero
/* f06b00c: 0fc31f31 */ jal func0f0c7cc4
/* f06b00c: 0fc31f31 */ jal currentPlayerGetGrabbedProp
/* f06b010: 00000000 */ sll $zero,$zero,0x0
/* f06b014: 8e2b0014 */ lw $t3,0x14($s1)
/* f06b018: 104b0006 */ beq $v0,$t3,.L0f06b034
@ -29085,7 +29085,7 @@ glabel func0f07e758
/* f07f3dc: 00000000 */ sll $zero,$zero,0x0
/* f07f3e0: 10510005 */ beq $v0,$s1,.L0f07f3f8
/* f07f3e4: 00000000 */ sll $zero,$zero,0x0
/* f07f3e8: 0fc31f31 */ jal func0f0c7cc4
/* f07f3e8: 0fc31f31 */ jal currentPlayerGetGrabbedProp
/* f07f3ec: 00000000 */ sll $zero,$zero,0x0
/* f07f3f0: 54510006 */ bnel $v0,$s1,.L0f07f40c
/* f07f3f4: 8e02000c */ lw $v0,0xc($s0)
@ -37602,7 +37602,7 @@ glabel func0f086d60
/* f086db8: 0561000b */ bgez $t3,.L0f086de8
/* f086dbc: 24030001 */ addiu $v1,$zero,0x1
/* f086dc0: afa00028 */ sw $zero,0x28($sp)
/* f086dc4: 0fc31f31 */ jal func0f0c7cc4
/* f086dc4: 0fc31f31 */ jal currentPlayerGetGrabbedProp
/* f086dc8: afa5002c */ sw $a1,0x2c($sp)
/* f086dcc: 8fac0030 */ lw $t4,0x30($sp)
/* f086dd0: 8fa30028 */ lw $v1,0x28($sp)
@ -43711,7 +43711,7 @@ glabel func0f08c190
/* f08c284: 0000a025 */ or $s4,$zero,$zero
/* f08c288: 54410007 */ bnel $v0,$at,.L0f08c2a8
/* f08c28c: 24010003 */ addiu $at,$zero,0x3
/* f08c290: 0fc31f31 */ jal func0f0c7cc4
/* f08c290: 0fc31f31 */ jal currentPlayerGetGrabbedProp
/* f08c294: 00000000 */ sll $zero,$zero,0x0
/* f08c298: 8c530004 */ lw $s3,0x4($v0)
/* f08c29c: 10000009 */ beqz $zero,.L0f08c2c4

View File

@ -333,21 +333,14 @@ struct prop *currentPlayerGetHoverbike(void)
return NULL;
}
GLOBAL_ASM(
glabel func0f0c7cc4
/* f0c7cc4: 3c03800a */ lui $v1,0x800a
/* f0c7cc8: 8c63a244 */ lw $v1,-0x5dbc($v1)
/* f0c7ccc: 24010004 */ addiu $at,$zero,0x4
/* f0c7cd0: 00001025 */ or $v0,$zero,$zero
/* f0c7cd4: 8c6e01b0 */ lw $t6,0x1b0($v1)
/* f0c7cd8: 15c10003 */ bne $t6,$at,.L0f0c7ce8
/* f0c7cdc: 00000000 */ sll $zero,$zero,0x0
/* f0c7ce0: 03e00008 */ jr $ra
/* f0c7ce4: 8c621b5c */ lw $v0,0x1b5c($v1)
.L0f0c7ce8:
/* f0c7ce8: 03e00008 */ jr $ra
/* f0c7cec: 00000000 */ sll $zero,$zero,0x0
);
struct prop *currentPlayerGetGrabbedProp(void)
{
if (g_Vars.currentplayer->bondmovemode == MOVEMODE_GRABBEDPROP) {
return g_Vars.currentplayer->grabbedprop;
}
return NULL;
}
GLOBAL_ASM(
glabel currentPlayerGrabProp
@ -372,7 +365,7 @@ glabel currentPlayerGrabProp
void func0f0c7d30(u32 arg)
{
if (g_Vars.currentplayer->bondmovemode == MOVEMODE_HOLDINGPROP) {
if (g_Vars.currentplayer->bondmovemode == MOVEMODE_GRABBEDPROP) {
func0f0ccac4();
} else if (g_Vars.currentplayer->bondmovemode == MOVEMODE_HOVERBIKE) {
func0f0d2184();

View File

@ -1129,7 +1129,7 @@
#define MOVEMODE_NORMAL 0
#define MOVEMODE_HOVERBIKE 3
#define MOVEMODE_HOLDINGPROP 4
#define MOVEMODE_GRABBEDPROP 4
#define MOVEMODE_CUTSCENE 5
#define MPLOCKTYPE_NONE 0

View File

@ -15,7 +15,7 @@ bool currentPlayerIsAutoAimXEnabled(void);
u32 func0f0c7bd0(void);
void currentPlayerUpdateAutoAimXProp(struct prop *prop, f32 autoaimx);
struct prop *currentPlayerGetHoverbike(void);
u32 func0f0c7cc4(void);
struct prop *currentPlayerGetGrabbedProp(void);
void currentPlayerGrabProp(struct prop *prop);
void func0f0c7d30(u32 arg0);
void releaseObj(u32 arg0);

View File

@ -2697,7 +2697,7 @@ struct player {
/*0x1b50*/ u32 unk1b50;
/*0x1b54*/ u32 unk1b54;
/*0x1b58*/ u32 unk1b58;
/*0x1b5c*/ u32 unk1b5c;
/*0x1b5c*/ struct prop *grabbedprop;
/*0x1b60*/ u32 unk1b60;
/*0x1b64*/ u32 unk1b64;
/*0x1b68*/ u32 unk1b68;