Decompile currentPlayerClearInventory
This commit is contained in:
parent
71539817b2
commit
e58dff6e96
|
|
@ -12873,10 +12873,10 @@ bool aiClearInventory(void)
|
|||
setCurrentPlayerNum(playernum);
|
||||
|
||||
if (g_Vars.currentplayer == g_Vars.bond || g_Vars.currentplayer == g_Vars.coop) {
|
||||
func0f111600();
|
||||
currentPlayerClearInventory();
|
||||
g_Vars.currentplayer->unk00c4 = 0;
|
||||
currentPlayerGiveWeapon(1);
|
||||
currentPlayerEquipWeaponInCutscene(1);
|
||||
currentPlayerGiveWeapon(WEAPON_UNARMED);
|
||||
currentPlayerEquipWeaponInCutscene(WEAPON_UNARMED);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include "game/data/data_0083d0.h"
|
||||
#include "game/data/data_0160b0.h"
|
||||
#include "game/data/data_020df0.h"
|
||||
#include "library/library_121e0.h"
|
||||
#include "types.h"
|
||||
|
||||
void currentPlayerInitGunsHeld(void)
|
||||
|
|
@ -29,6 +30,6 @@ void currentPlayerInitGunsHeld(void)
|
|||
void func0f012530(s32 arg0)
|
||||
{
|
||||
g_Vars.currentplayer->equipmaxitems = arg0 + 30;
|
||||
g_Vars.currentplayer->unk1868 = malloc((g_Vars.currentplayer->equipmaxitems * 20 + 15 | 0xf) ^ 0xf, 4);
|
||||
func0f111600();
|
||||
g_Vars.currentplayer->equipment = malloc((g_Vars.currentplayer->equipmaxitems * sizeof(struct invitem) + 15 | 0xf) ^ 0xf, 4);
|
||||
currentPlayerClearInventory();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20229,7 +20229,7 @@ glabel func0f0a8d34
|
|||
/* f0a8d94: 28410002 */ slti $at,$v0,0x2
|
||||
/* f0a8d98: 14200005 */ bnez $at,.L0f0a8db0
|
||||
/* f0a8d9c: 00000000 */ sll $zero,$zero,0x0
|
||||
/* f0a8da0: 0fc44580 */ jal func0f111600
|
||||
/* f0a8da0: 0fc44580 */ jal currentPlayerClearInventory
|
||||
/* f0a8da4: 00000000 */ sll $zero,$zero,0x0
|
||||
/* f0a8da8: 0fc44762 */ jal currentPlayerGiveWeapon
|
||||
/* f0a8dac: 24040001 */ addiu $a0,$zero,0x1
|
||||
|
|
|
|||
|
|
@ -5812,7 +5812,7 @@ glabel func0f0b72dc
|
|||
/* f0b75cc: 1000000a */ beqz $zero,.L0f0b75f8
|
||||
/* f0b75d0: 00000000 */ sll $zero,$zero,0x0
|
||||
.L0f0b75d4:
|
||||
/* f0b75d4: 0fc44580 */ jal func0f111600
|
||||
/* f0b75d4: 0fc44580 */ jal currentPlayerClearInventory
|
||||
/* f0b75d8: 00000000 */ sll $zero,$zero,0x0
|
||||
/* f0b75dc: 00001825 */ or $v1,$zero,$zero
|
||||
/* f0b75e0: 24020084 */ addiu $v0,$zero,0x84
|
||||
|
|
|
|||
|
|
@ -14,34 +14,17 @@
|
|||
#include "game/game_19c990.h"
|
||||
#include "game/lang.h"
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel func0f111600
|
||||
/* f111600: 3c05800a */ lui $a1,%hi(g_Vars)
|
||||
/* f111604: 24a59fc0 */ addiu $a1,$a1,%lo(g_Vars)
|
||||
/* f111608: 8ca30284 */ lw $v1,0x284($a1)
|
||||
/* f11160c: 00001025 */ or $v0,$zero,$zero
|
||||
/* f111610: 00002025 */ or $a0,$zero,$zero
|
||||
/* f111614: 8c6e186c */ lw $t6,0x186c($v1)
|
||||
/* f111618: 2406ffff */ addiu $a2,$zero,-1
|
||||
/* f11161c: 59c0000c */ blezl $t6,.L0f111650
|
||||
/* f111620: ac601864 */ sw $zero,0x1864($v1)
|
||||
/* f111624: 8c6f1868 */ lw $t7,0x1868($v1)
|
||||
.L0f111628:
|
||||
/* f111628: 24420001 */ addiu $v0,$v0,0x1
|
||||
/* f11162c: 01e4c021 */ addu $t8,$t7,$a0
|
||||
/* f111630: af060000 */ sw $a2,0x0($t8)
|
||||
/* f111634: 8ca30284 */ lw $v1,0x284($a1)
|
||||
/* f111638: 24840014 */ addiu $a0,$a0,0x14
|
||||
/* f11163c: 8c79186c */ lw $t9,0x186c($v1)
|
||||
/* f111640: 0059082a */ slt $at,$v0,$t9
|
||||
/* f111644: 5420fff8 */ bnezl $at,.L0f111628
|
||||
/* f111648: 8c6f1868 */ lw $t7,0x1868($v1)
|
||||
/* f11164c: ac601864 */ sw $zero,0x1864($v1)
|
||||
.L0f111650:
|
||||
/* f111650: 8ca80284 */ lw $t0,0x284($a1)
|
||||
/* f111654: 03e00008 */ jr $ra
|
||||
/* f111658: ad001874 */ sw $zero,0x1874($t0)
|
||||
);
|
||||
void currentPlayerClearInventory(void)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < g_Vars.currentplayer->equipmaxitems; i++) {
|
||||
g_Vars.currentplayer->equipment[i].type = -1;
|
||||
}
|
||||
|
||||
g_Vars.currentplayer->unk1864 = 0;
|
||||
g_Vars.currentplayer->equipcuritem = 0;
|
||||
}
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel func0f11165c
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#include <ultra64.h>
|
||||
#include "types.h"
|
||||
|
||||
void func0f111600(void);
|
||||
void currentPlayerClearInventory(void);
|
||||
u32 func0f11165c(void);
|
||||
void func0f11179c(struct invitem *item);
|
||||
u32 func0f1118cc(void);
|
||||
|
|
|
|||
Loading…
Reference in New Issue