Decompile handGetXOffset

This commit is contained in:
Ryan Dwyer 2020-05-05 23:25:03 +10:00
parent 979f8e611c
commit fedfe70afe
4 changed files with 9 additions and 20 deletions

View File

@ -7289,7 +7289,7 @@ glabel var7f1ac628
/* f09d73c: e7aa005c */ swc1 $f10,0x5c($sp)
/* f09d740: c61001a8 */ lwc1 $f16,0x1a8($s0)
/* f09d744: 46104100 */ add.s $f4,$f8,$f16
/* f09d748: 0fc2c4bb */ jal func0f0b12ec
/* f09d748: 0fc2c4bb */ jal handGetXOffset
/* f09d74c: e7a40060 */ swc1 $f4,0x60($sp)
/* f09d750: c7b2005c */ lwc1 $f18,0x5c($sp)
/* f09d754: 8e2f0034 */ lw $t7,0x34($s1)
@ -21214,11 +21214,11 @@ void func0f0a93e0(struct coord *coord)
{
struct player *player = g_Vars.currentplayer;
player->hands[0].unk07f8.x = func0f0b12ec(0) + coord->x;
player->hands[0].unk07f8.x = handGetXOffset(0) + coord->x;
player->hands[0].unk07f8.y = coord->y;
player->hands[0].unk07f8.z = coord->z;
player->hands[1].unk07f8.x = func0f0b12ec(1) + coord->x;
player->hands[1].unk07f8.x = handGetXOffset(1) + coord->x;
player->hands[1].unk07f8.y = coord->y;
player->hands[1].unk07f8.z = coord->z;
}

View File

@ -975,21 +975,10 @@ void currentPlayerSetWeaponSway(struct coord *sway)
}
}
GLOBAL_ASM(
glabel func0f0b12ec
/* f0b12ec: 00047900 */ sll $t7,$a0,0x4
/* f0b12f0: 01e47823 */ subu $t7,$t7,$a0
/* f0b12f4: 000f7880 */ sll $t7,$t7,0x2
/* f0b12f8: 01e47821 */ addu $t7,$t7,$a0
/* f0b12fc: 3c0e800a */ lui $t6,%hi(g_Vars+0x284)
/* f0b1300: 8dcea244 */ lw $t6,%lo(g_Vars+0x284)($t6)
/* f0b1304: 000f78c0 */ sll $t7,$t7,0x3
/* f0b1308: 01e47821 */ addu $t7,$t7,$a0
/* f0b130c: 000f7880 */ sll $t7,$t7,0x2
/* f0b1310: 01cfc021 */ addu $t8,$t6,$t7
/* f0b1314: 03e00008 */ jr $ra
/* f0b1318: c70007f4 */ lwc1 $f0,0x7f4($t8)
);
f32 handGetXOffset(u32 hand)
{
return g_Vars.currentplayer->hands[hand].xoffset;
}
GLOBAL_ASM(
glabel func0f0b131c

View File

@ -25,7 +25,7 @@ struct weaponfunc *weaponGetFunction(u8 *arg0, s32 which);
struct weaponfunc *currentPlayerGetWeaponFunction(u32 hand);
u32 func0f0b11bc(void);
struct inventory_ammo *weaponGetAmmoByFunction(u32 weaponnum, u32 funcnum);
f32 func0f0b12ec(u32 arg0);
f32 handGetXOffset(u32 arg0);
u32 func0f0b131c(void);
f32 func0f0b14d8(void);
u32 func0f0b1588(void);

View File

@ -1277,7 +1277,7 @@ struct hand {
/*0x07e8*/ u32 unk07e8;
/*0x07ec*/ u32 unk07ec;
/*0x07f0*/ u32 unk07f0;
/*0x07f4*/ u32 unk07f4;
/*0x07f4*/ f32 xoffset;
/*0x07f8*/ struct coord unk07f8;
/*0x0804*/ u32 unk0804;
/*0x0808*/ u32 unk0808;