Decompile playerTickChrBody

This commit is contained in:
Ryan Dwyer 2022-01-17 12:20:17 +10:00
parent cff5ff6609
commit ca55385682
16 changed files with 337 additions and 1402 deletions

View File

@ -108,12 +108,12 @@ struct var800a4cf0 var800a4cf0;
s32 g_StageIndex = 1;
u32 var8007fc04 = 0x00000000;
u8 *var8007fc08 = NULL;
s16 var8007fc0c = 0;
#if VERSION < VERSION_NTSC_1_0
u32 var80082474nb = 0;
#endif
s16 var8007fc0c = 0;
s16 var8007fc10 = 0;
s32 var8007fc14 = 0;
u32 var8007fc18 = 0x01000100;

View File

@ -9225,7 +9225,7 @@ bool bgun0f09dd7c(void)
|| (g_Vars.currentplayer->gunctrl.gunmemnew < 0 && g_Vars.currentplayer->gunctrl.unk15b0 == 4);
}
u32 bgun0f09ddcc(void)
u32 bgunGetGunMemType(void)
{
return g_Vars.currentplayer->gunctrl.gunmemtype;
}
@ -9235,12 +9235,12 @@ u32 bgun0f09dddc(void)
return g_Vars.currentplayer->gunctrl.unk1590;
}
u8 *bgun0f09ddec(void)
u8 *bgunGetGunMem(void)
{
return g_Vars.currentplayer->gunctrl.unk158c;
return g_Vars.currentplayer->gunctrl.gunmem;
}
u32 bgun0f09ddfc(void)
u32 bgunCalculateGunMemCapacity(void)
{
if (IS4MB() && PLAYERCOUNT() == 2) {
return var800700ac;
@ -9975,9 +9975,9 @@ glabel bgun0f09e4e0
/* f09e680: 925915b1 */ lbu $t9,0x15b1($s2)
/* f09e684: 1720000f */ bnez $t9,.L0f09e6c4
/* f09e688: 00000000 */ nop
/* f09e68c: 0fc2777b */ jal bgun0f09ddec
/* f09e68c: 0fc2777b */ jal bgunGetGunMem
/* f09e690: 00000000 */ nop
/* f09e694: 0fc2777f */ jal bgun0f09ddfc
/* f09e694: 0fc2777f */ jal bgunCalculateGunMemCapacity
/* f09e698: ae4215a0 */ sw $v0,0x15a0($s2)
/* f09e69c: 24080001 */ addiu $t0,$zero,0x1
/* f09e6a0: 26491594 */ addiu $t1,$s2,0x1594
@ -9999,9 +9999,9 @@ glabel bgun0f09e4e0
/* f09e6dc: a651159c */ sh $s1,0x159c($s2)
/* f09e6e0: a640159c */ sh $zero,0x159c($s2)
.L0f09e6e4:
/* f09e6e4: 0fc2777b */ jal bgun0f09ddec
/* f09e6e4: 0fc2777b */ jal bgunGetGunMem
/* f09e6e8: ae401594 */ sw $zero,0x1594($s2)
/* f09e6ec: 0fc2777f */ jal bgun0f09ddfc
/* f09e6ec: 0fc2777f */ jal bgunCalculateGunMemCapacity
/* f09e6f0: ae4215a0 */ sw $v0,0x15a0($s2)
/* f09e6f4: ae4215a4 */ sw $v0,0x15a4($s2)
.L0f09e6f8:
@ -10227,7 +10227,7 @@ glabel bgun0f09e4e0
/* f09ea10: ae4f0dd8 */ sw $t7,0xdd8($s2)
/* f09ea14: ae400dd8 */ sw $zero,0xdd8($s2)
.L0f09ea18:
/* f09ea18: 0fc2777f */ jal bgun0f09ddfc
/* f09ea18: 0fc2777f */ jal bgunCalculateGunMemCapacity
/* f09ea1c: 00000000 */ nop
/* f09ea20: 240a0004 */ addiu $t2,$zero,0x4
/* f09ea24: a24a15b0 */ sb $t2,0x15b0($s2)
@ -10382,9 +10382,9 @@ glabel bgun0f09e4e0
/* f09c52c: 924815b1 */ lbu $t0,0x15b1($s2)
/* f09c530: 1500000f */ bnez $t0,.NB0f09c570
/* f09c534: 00000000 */ sll $zero,$zero,0x0
/* f09c538: 0fc26f42 */ jal bgun0f09ddec
/* f09c538: 0fc26f42 */ jal bgunGetGunMem
/* f09c53c: 00000000 */ sll $zero,$zero,0x0
/* f09c540: 0fc26f46 */ jal bgun0f09ddfc
/* f09c540: 0fc26f46 */ jal bgunCalculateGunMemCapacity
/* f09c544: ae4215a0 */ sw $v0,0x15a0($s2)
/* f09c548: 24090001 */ addiu $t1,$zero,0x1
/* f09c54c: 264a1594 */ addiu $t2,$s2,0x1594
@ -10406,9 +10406,9 @@ glabel bgun0f09e4e0
/* f09c588: a651159c */ sh $s1,0x159c($s2)
/* f09c58c: a640159c */ sh $zero,0x159c($s2)
.NB0f09c590:
/* f09c590: 0fc26f42 */ jal bgun0f09ddec
/* f09c590: 0fc26f42 */ jal bgunGetGunMem
/* f09c594: ae401594 */ sw $zero,0x1594($s2)
/* f09c598: 0fc26f46 */ jal bgun0f09ddfc
/* f09c598: 0fc26f46 */ jal bgunCalculateGunMemCapacity
/* f09c59c: ae4215a0 */ sw $v0,0x15a0($s2)
/* f09c5a0: ae4215a4 */ sw $v0,0x15a4($s2)
.NB0f09c5a4:
@ -10634,7 +10634,7 @@ glabel bgun0f09e4e0
/* f09c8bc: ae580dd8 */ sw $t8,0xdd8($s2)
/* f09c8c0: ae400dd8 */ sw $zero,0xdd8($s2)
.NB0f09c8c4:
/* f09c8c4: 0fc26f46 */ jal bgun0f09ddfc
/* f09c8c4: 0fc26f46 */ jal bgunCalculateGunMemCapacity
/* f09c8c8: 00000000 */ sll $zero,$zero,0x0
/* f09c8cc: 240b0004 */ addiu $t3,$zero,0x4
/* f09c8d0: a24b15b0 */ sb $t3,0x15b0($s2)
@ -21904,7 +21904,7 @@ glabel var7f1add20pf
/* f0a5f6c: 820d0008 */ lb $t5,0x8($s0)
/* f0a5f70: 51a00006 */ beqzl $t5,.PF0f0a5f8c
/* f0a5f74: a2000007 */ sb $zero,0x7($s0)
/* f0a5f78: 0fc27820 */ jal bgun0f09ddcc
/* f0a5f78: 0fc27820 */ jal bgunGetGunMemType
/* f0a5f7c: 00000000 */ nop
/* f0a5f80: 54400003 */ bnezl $v0,.PF0f0a5f90
/* f0a5f84: 820c0007 */ lb $t4,0x7($s0)
@ -23443,7 +23443,7 @@ glabel var7f1aca70
/* f0a5c54: 820d0008 */ lb $t5,0x8($s0)
/* f0a5c58: 51a00006 */ beqzl $t5,.L0f0a5c74
/* f0a5c5c: a2000007 */ sb $zero,0x7($s0)
/* f0a5c60: 0fc27773 */ jal bgun0f09ddcc
/* f0a5c60: 0fc27773 */ jal bgunGetGunMemType
/* f0a5c64: 00000000 */ nop
/* f0a5c68: 54400003 */ bnezl $v0,.L0f0a5c78
/* f0a5c6c: 820c0007 */ lb $t4,0x7($s0)

View File

@ -411,17 +411,17 @@ glabel func0f10d730
void func0f10d770(void)
{
func0f0f8bb4(&g_Menus[0].unk840, bgun0f09ddfc() - func0f0e4fe0(), 0);
g_Menus[0].mpconfigbuffer = bgun0f09ddec() + func0f0e4fe0();
func0f0f8bb4(&g_Menus[0].unk840, bgunCalculateGunMemCapacity() - func0f0e4fe0(), 0);
g_Menus[0].mpconfigbuffer = bgunGetGunMem() + func0f0e4fe0();
func0f0f8bb4(&g_Menus[1].unk840, bgun0f09ddfc() - func0f0e4fe0(), 0);
g_Menus[1].mpconfigbuffer = bgun0f09ddec() + func0f0e4fe0();
func0f0f8bb4(&g_Menus[1].unk840, bgunCalculateGunMemCapacity() - func0f0e4fe0(), 0);
g_Menus[1].mpconfigbuffer = bgunGetGunMem() + func0f0e4fe0();
func0f0f8bb4(&g_Menus[2].unk840, bgun0f09ddfc() - func0f0e4fe0(), 0);
g_Menus[2].mpconfigbuffer = bgun0f09ddec() + func0f0e4fe0();
func0f0f8bb4(&g_Menus[2].unk840, bgunCalculateGunMemCapacity() - func0f0e4fe0(), 0);
g_Menus[2].mpconfigbuffer = bgunGetGunMem() + func0f0e4fe0();
func0f0f8bb4(&g_Menus[3].unk840, bgun0f09ddfc() - func0f0e4fe0(), 0);
g_Menus[3].mpconfigbuffer = bgun0f09ddec() + func0f0e4fe0();
func0f0f8bb4(&g_Menus[3].unk840, bgunCalculateGunMemCapacity() - func0f0e4fe0(), 0);
g_Menus[3].mpconfigbuffer = bgunGetGunMem() + func0f0e4fe0();
}
#if VERSION >= VERSION_NTSC_1_0

View File

@ -144,10 +144,10 @@ void func0f010bb0(void)
if (IS4MB() && PLAYERCOUNT() == 2) {
i = ALIGN16(var800700ac);
} else {
i = ALIGN16(bgun0f09ddfc());
i = ALIGN16(bgunCalculateGunMemCapacity());
}
g_Vars.currentplayer->gunctrl.unk158c = mempAlloc(i, MEMPOOL_STAGE);
g_Vars.currentplayer->gunctrl.gunmem = mempAlloc(i, MEMPOOL_STAGE);
g_Vars.currentplayer->gunctrl.handfilenum = 0;
g_Vars.currentplayer->gunctrl.unk15a0 = 0;
g_Vars.currentplayer->gunctrl.unk15a4 = 0;

View File

@ -2947,7 +2947,7 @@ glabel var7f1a827c
// g_Vars.currentplayer->bondexploding = false;
// g_NumSpawnPoints = 0;
// g_Vars.currentplayer->bondtankexplode = false;
// g_Vars.currentplayer->unk1bd4 = 0;
// g_Vars.currentplayer->gunmem2 = NULL;
// g_PlayersWithControl[0] = true;
// g_PlayersWithControl[1] = true;
// g_PlayersWithControl[2] = true;

View File

@ -205,10 +205,10 @@ void menuTick(void)
var8009dfc0 = true;
}
if (var8009dfc0 && g_Vars.currentplayer->unk1bd4) {
if (var8009dfc0 && g_Vars.currentplayer->gunmem2) {
func0f0b9538();
if (g_Vars.currentplayer->unk1bd4);
if (g_Vars.currentplayer->gunmem2);
}
}
} else {

File diff suppressed because it is too large Load Diff

View File

@ -5574,7 +5574,7 @@ glabel func0f0e5000
/* f0e5070: 8e380000 */ lw $t8,0x0($s1)
/* f0e5074: 5700005d */ bnezl $t8,.L0f0e51ec
/* f0e5078: 3c012f80 */ lui $at,0x2f80
/* f0e507c: 0fc2777b */ jal bgun0f09ddec
/* f0e507c: 0fc2777b */ jal bgunGetGunMem
/* f0e5080: 00000000 */ nop
/* f0e5084: 14400003 */ bnez $v0,.L0f0e5094
/* f0e5088: ae220000 */ sw $v0,0x0($s1)
@ -6441,7 +6441,7 @@ glabel func0f0e5000
/* f0e5070: 8e380000 */ lw $t8,0x0($s1)
/* f0e5074: 5700005d */ bnezl $t8,.L0f0e51ec
/* f0e5078: 3c012f80 */ lui $at,0x2f80
/* f0e507c: 0fc2777b */ jal bgun0f09ddec
/* f0e507c: 0fc2777b */ jal bgunGetGunMem
/* f0e5080: 00000000 */ nop
/* f0e5084: 14400003 */ bnez $v0,.L0f0e5094
/* f0e5088: ae220000 */ sw $v0,0x0($s1)

View File

@ -6198,9 +6198,9 @@ glabel var7f1b3c40pf
/* f0f4074: 24040001 */ li $a0,0x1
/* f0f4078: 10400007 */ beqz $v0,.PF0f0f4098
/* f0f407c: 00000000 */ nop
/* f0f4080: 0fc27828 */ jal bgun0f09ddec
/* f0f4080: 0fc27828 */ jal bgunGetGunMem
/* f0f4084: 00000000 */ nop
/* f0f4088: 0fc2782c */ jal bgun0f09ddfc
/* f0f4088: 0fc2782c */ jal bgunCalculateGunMemCapacity
/* f0f408c: ae020004 */ sw $v0,0x4($s0)
/* f0f4090: 10000003 */ b .PF0f0f40a0
/* f0f4094: ae020008 */ sw $v0,0x8($s0)
@ -7800,9 +7800,9 @@ glabel var7f1b2948
/* f0f3920: 24040001 */ addiu $a0,$zero,0x1
/* f0f3924: 10400007 */ beqz $v0,.L0f0f3944
/* f0f3928: 00000000 */ nop
/* f0f392c: 0fc2777b */ jal bgun0f09ddec
/* f0f392c: 0fc2777b */ jal bgunGetGunMem
/* f0f3930: 00000000 */ nop
/* f0f3934: 0fc2777f */ jal bgun0f09ddfc
/* f0f3934: 0fc2777f */ jal bgunCalculateGunMemCapacity
/* f0f3938: ae020004 */ sw $v0,0x4($s0)
/* f0f393c: 10000003 */ b .L0f0f394c
/* f0f3940: ae020008 */ sw $v0,0x8($s0)
@ -9409,9 +9409,9 @@ glabel var7f1b2948
/* f0f0464: 24040001 */ addiu $a0,$zero,0x1
/* f0f0468: 10400007 */ beqz $v0,.NB0f0f0488
/* f0f046c: 00000000 */ sll $zero,$zero,0x0
/* f0f0470: 0fc26f42 */ jal bgun0f09ddec
/* f0f0470: 0fc26f42 */ jal bgunGetGunMem
/* f0f0474: 00000000 */ sll $zero,$zero,0x0
/* f0f0478: 0fc26f46 */ jal bgun0f09ddfc
/* f0f0478: 0fc26f46 */ jal bgunCalculateGunMemCapacity
/* f0f047c: ae220004 */ sw $v0,0x4($s1)
/* f0f0480: 10000003 */ beqz $zero,.NB0f0f0490
/* f0f0484: ae220008 */ sw $v0,0x8($s1)

View File

@ -400,7 +400,7 @@ void playerAllocate(s32 index)
g_Vars.players[index]->badrockettime = 0;
g_Vars.players[index]->gunctrl.gunmemtype = 0;
g_Vars.players[index]->gunctrl.unk158c = NULL;
g_Vars.players[index]->gunctrl.gunmem = NULL;
g_Vars.players[index]->gunctrl.unk1590 = 0;
g_Vars.players[index]->gunctrl.weaponnum = WEAPON_NONE;

View File

@ -105,7 +105,6 @@ struct skeleton *g_Skeletons[] = {
&g_SkelBB,
};
GLOBAL_ASM(
glabel func0f1a7560
/* f1a7560: 27bdff70 */ addiu $sp,$sp,-144
@ -247,9 +246,9 @@ void modelPromoteTypeToPointer(struct modelfiledata *filedata)
}
}
void *func0f1a7794(u16 fileid, u8 *arg1, s32 arg2, s32 arg3)
struct modelfiledata *func0f1a7794(u16 fileid, u8 *arg1, s32 arg2, s32 *arg3)
{
void *filedata;
struct modelfiledata *filedata;
g_LoadType = LOADTYPE_MODEL;

View File

@ -57,9 +57,9 @@ void bgunCalculateBlend(s32 hand);
u32 bgun0f09d550(void);
void bgun0f09d8dc(f32 breathing, f32 arg1, f32 arg2, f32 arg3, f32 arg4);
bool bgun0f09dd7c(void);
u32 bgun0f09ddcc(void);
u8 *bgun0f09ddec(void);
u32 bgun0f09ddfc(void);
u32 bgunGetGunMemType(void);
u8 *bgunGetGunMem(void);
u32 bgunCalculateGunMemCapacity(void);
void bgun0f09df50(void);
void bgun0f09df64(s32 weaponnum);
void bgun0f09df9c(void);

View File

@ -11,9 +11,9 @@ void currentPlayerResetToDefault(void);
bool currentPlayerAssumeChrForAnti(struct chrdata *chr, s32 param_2);
void currentPlayerSpawn(void);
void func0f0b85a0(struct playerbond *pb, struct coord *pos);
void func0f0b85f8(void);
void playersTickAllChrBodies(void);
void currentPlayerChooseBodyAndHead(s32 *bodynum, s32 *headnum, s32 *arg2);
void func0f0b8ba0(void);
void playerTickChrBody(void);
void func0f0b9538(void);
void currentPlayerTickMpSwirl(void);
void currentPlayerExecutePreparedWarp(void);

View File

@ -4,9 +4,9 @@
#include "data.h"
#include "types.h"
void func0f1a7560(void *ptr, u16 fileid, u32 arg2, void *arg3, s32 arg4, bool arg5);
void func0f1a7560(void *ptr, u16 fileid, u32 arg2, void *arg3, s32 *arg4, bool arg5);
void modelPromoteTypeToPointer(struct modelfiledata *filedata);
void *func0f1a7794(u16 fileid, u8 *arg1, s32 arg2, s32 arg3);
struct modelfiledata *func0f1a7794(u16 fileid, u8 *arg1, s32 arg2, s32 *arg3);
void *fileLoad(u16 fileid);
#endif

View File

@ -26,10 +26,10 @@ u32 func0f17218c(void);
u32 func0f172554(void);
u32 func0f1729f8(void);
u32 func0f172b5c(void);
u32 func0f172e70(void);
void func0f172e70(s32 *arg0, void *arg1, s32 arg2);
u32 func0f172e8c(void);
u32 func0f172f44(void);
u32 func0f172f54(void);
void func0f172f54(s32 *arg0);
void func0f172f5c(Gfx *gdl, s32 arg1, s32 arg2);
void func0f173010(u32 *texturenum, u32 arg1, u32 arg2);
u32 func0f173434(void);

View File

@ -2469,7 +2469,7 @@ struct gunctrl {
/*0x1583*/ u8 passivemode : 1;
/*0x1584*/ s32 gunmemnew;
/*0x1588*/ s32 gunmemtype;
/*0x158c*/ void *unk158c;
/*0x158c*/ u8 *gunmem;
/*0x1590*/ u32 unk1590;
/*0x1594*/ struct modelfiledata *unk1594;
/*0x1598*/ s32 unk1598;
@ -2906,7 +2906,7 @@ struct player {
/*0x1bb0*/ struct coord cam_pos;
/*0x1bbc*/ struct coord cam_look;
/*0x1bc8*/ struct coord cam_up;
/*0x1bd4*/ u32 unk1bd4;
/*0x1bd4*/ u8 *gunmem2;
/*0x1bd8*/ s32 autocontrol_x;
/*0x1bdc*/ s32 autocontrol_y;
/*0x1be0*/ f32 cachedlookahead;