Progress on func0f0c8b90

This commit is contained in:
Ryan Dwyer 2020-10-30 17:16:21 +10:00
parent 2f1ce378eb
commit a1cc8dd4b9
16 changed files with 916 additions and 849 deletions

View File

@ -207,7 +207,7 @@ void currentPlayerDismountBike(void)
currentPlayerSetMoveMode(MOVEMODE_WALK);
}
g_Vars.currentplayer->unk00d0 = 0;
g_Vars.currentplayer->bondactivateorreload = 0;
}
}

View File

@ -1657,9 +1657,9 @@ void func0f0ce1ac(void)
void func0f0ce450(void)
{
if (currentPlayerTryMountHoverbike(g_Vars.currentplayer->grabbedprop)) {
g_Vars.currentplayer->unk00d0 = 0;
g_Vars.currentplayer->bondactivateorreload = 0;
} else {
g_Vars.currentplayer->unk00d0 = 0;
g_Vars.currentplayer->bondactivateorreload = 0;
currentPlayerSetMoveMode(MOVEMODE_WALK);
}
}
@ -1705,32 +1705,32 @@ void currentPlayerUpdateSpeedForwardsGrab(f32 target, f32 speed)
void currentPlayerUpdateSpeedGrab(struct movedata *data)
{
// Sideways
if (data->stepleft) {
currentPlayerUpdateSpeedSidewaysGrab(-1, 0.2f / 3.0f, data->stepleft);
} else if (data->stepright) {
currentPlayerUpdateSpeedSidewaysGrab(1, 0.2f / 3.0f, data->stepright);
if (data->digitalstepleft) {
currentPlayerUpdateSpeedSidewaysGrab(-1, 0.2f / 3.0f, data->digitalstepleft);
} else if (data->digitalstepright) {
currentPlayerUpdateSpeedSidewaysGrab(1, 0.2f / 3.0f, data->digitalstepright);
} else if (data->unk14 == 0) {
currentPlayerUpdateSpeedSidewaysGrab(0, 0.2f / 3.0f, g_Vars.lvupdate240_60);
}
if (data->unk14) {
currentPlayerUpdateSpeedSidewaysGrab(data->unka4 * 0.014285714365542f, 0.2f / 3.0f, g_Vars.lvupdate240_60);
currentPlayerUpdateSpeedSidewaysGrab(data->analogstrafe * 0.014285714365542f, 0.2f / 3.0f, g_Vars.lvupdate240_60);
}
// Forward/back
if (data->stepforward) {
if (data->digitalstepforward) {
currentPlayerUpdateSpeedForwardsGrab(1, 0.2f / 3.0f);
g_Vars.currentplayer->speedmaxtime60 += g_Vars.lvupdate240_60;
} else if (data->stepback) {
} else if (data->digitalstepback) {
currentPlayerUpdateSpeedForwardsGrab(-1, 0.2f / 3.0f);
} else if (data->unk10 == 0) {
} else if (data->canlookahead == false) {
currentPlayerUpdateSpeedForwardsGrab(0, 0.2f / 3.0f);
}
if (data->unk10) {
currentPlayerUpdateSpeedForwardsGrab(data->unka8 * 0.014285714365542f, 0.2f / 3.0f);
if (data->canlookahead) {
currentPlayerUpdateSpeedForwardsGrab(data->analogwalk * 0.014285714365542f, 0.2f / 3.0f);
if (data->unka8 > 60) {
if (data->analogwalk > 60) {
g_Vars.currentplayer->speedmaxtime60 += g_Vars.lvupdate240_60;
} else {
g_Vars.currentplayer->speedmaxtime60 = 0;
@ -1756,7 +1756,7 @@ void currentPlayerUpdateSpeedGrab(struct movedata *data)
g_Vars.currentplayer->speedforwards *= 1.08f;
g_Vars.currentplayer->speedforwards *= g_Vars.currentplayer->speedboost;
if (data->unk10 == 0 && data->stepforward == false) {
if (data->canlookahead == false && data->digitalstepforward == false) {
g_Vars.currentplayer->speedmaxtime60 = 0;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1896,7 +1896,7 @@ void currentPlayerUpdatePrevPosWalk(void)
void func0f0c65a8(void)
{
if (g_Vars.currentplayer->walkinitmove) {
g_Vars.currentplayer->unk00d0 = 0;
g_Vars.currentplayer->bondactivateorreload = 0;
}
}
@ -1904,32 +1904,32 @@ void currentPlayerUpdateSpeedWalk(struct movedata *data)
{
if (g_Vars.currentplayer->walkinitmove == false) {
// Sideways
if (data->stepleft) {
currentPlayerUpdateSpeedSidewaysWalk(-1, 0.2f, data->stepleft);
} else if (data->stepright) {
currentPlayerUpdateSpeedSidewaysWalk(1, 0.2f, data->stepright);
if (data->digitalstepleft) {
currentPlayerUpdateSpeedSidewaysWalk(-1, 0.2f, data->digitalstepleft);
} else if (data->digitalstepright) {
currentPlayerUpdateSpeedSidewaysWalk(1, 0.2f, data->digitalstepright);
} else if (data->unk14 == false) {
currentPlayerUpdateSpeedSidewaysWalk(0, 0.2f, g_Vars.lvupdate240_60);
}
if (data->unk14) {
currentPlayerUpdateSpeedSidewaysWalk(data->unka4 * 0.014285714365542f, 0.2f, g_Vars.lvupdate240_60);
currentPlayerUpdateSpeedSidewaysWalk(data->analogstrafe * 0.014285714365542f, 0.2f, g_Vars.lvupdate240_60);
}
// Forward/back
if (data->stepforward) {
if (data->digitalstepforward) {
currentPlayerUpdateSpeedForwardsWalk(1, 1);
g_Vars.currentplayer->speedmaxtime60 += g_Vars.lvupdate240_60;
} else if (data->stepback) {
} else if (data->digitalstepback) {
currentPlayerUpdateSpeedForwardsWalk(-1, 1);
} else if (data->unk10 == false) {
} else if (data->canlookahead == false) {
currentPlayerUpdateSpeedForwardsWalk(0, 1);
}
if (data->unk10) {
currentPlayerUpdateSpeedForwardsWalk(data->unka8 * 0.014285714365542f, 1);
if (data->canlookahead) {
currentPlayerUpdateSpeedForwardsWalk(data->analogwalk * 0.014285714365542f, 1);
if (data->unka8 > 60) {
if (data->analogwalk > 60) {
g_Vars.currentplayer->speedmaxtime60 += g_Vars.lvupdate240_60;
} else {
g_Vars.currentplayer->speedmaxtime60 = 0;
@ -1956,14 +1956,14 @@ void currentPlayerUpdateSpeedWalk(struct movedata *data)
g_Vars.currentplayer->speedforwards *= 1.08f;
g_Vars.currentplayer->speedforwards *= g_Vars.currentplayer->speedboost;
if ((data->unk10 == 0 && data->stepforward == 0) ||
if ((data->canlookahead == false && data->digitalstepforward == false) ||
currentPlayerGetCrouchPos() != CROUCH_STAND) {
g_Vars.currentplayer->speedmaxtime60 = 0;
}
if (data->swaynegative) {
if (data->rleanleft) {
currentPlayerSetSwayTarget(-1);
} else if (data->swaypositive) {
} else if (data->rleanright) {
currentPlayerSetSwayTarget(1);
} else {
currentPlayerSetSwayTarget(0);

View File

@ -2941,7 +2941,7 @@ glabel var7f1a9ef4
/* f062a3c: 10000037 */ b .L0f062b1c
/* f062a40: 8fbf0024 */ lw $ra,0x24($sp)
/* f062a44: 3c04800a */ lui $a0,%hi(g_Vars+0x28c)
/* f062a48: 0fc22a7d */ jal func0f08a9f4
/* f062a48: 0fc22a7d */ jal playerDetonateRemoteMines
/* f062a4c: 8c84a24c */ lw $a0,%lo(g_Vars+0x28c)($a0)
/* f062a50: 10000032 */ b .L0f062b1c
/* f062a54: 8fbf0024 */ lw $ra,0x24($sp)

View File

@ -11246,7 +11246,7 @@ glabel var7f1ac764
);
GLOBAL_ASM(
glabel func0f0a0b30
glabel currentPlayerSwivelGunTowards
/* f0a0b30: 27bdffe8 */ addiu $sp,$sp,-24
/* f0a0b34: afbf0014 */ sw $ra,0x14($sp)
/* f0a0b38: e7ac0018 */ swc1 $f12,0x18($sp)

View File

@ -30,7 +30,6 @@ const char var7f1acdbc[] = "%s %s";
const char var7f1acdc4[] = "%s %s";
const u32 var7f1acdcc[] = {0x00000000};
//const u32 var7f1acdd0[] = {0x3dcccccd};
GLOBAL_ASM(
glabel func0f0b0420

View File

@ -5219,7 +5219,7 @@ glabel var7f1ad630
/* f0baf08: 00000000 */ nop
);
void currentPlayerPause(u32 mode)
void currentPlayerPause(s32 mode)
{
g_PauseMode = mode;

View File

@ -41227,7 +41227,7 @@ glabel func0f08a88c
);
GLOBAL_ASM(
glabel func0f08a9f4
glabel playerDetonateRemoteMines
/* f08a9f4: 3c028007 */ lui $v0,%hi(var80069910)
/* f08a9f8: 24429910 */ addiu $v0,$v0,%lo(var80069910)
/* f08a9fc: 8c4e0000 */ lw $t6,0x0($v0)

View File

@ -26,9 +26,9 @@ f32 func0f0c805c(f32 value);
void currentPlayerUpdateSpeedVerta(f32 value);
f32 func0f0c82f8(f32 value);
void currentPlayerUpdateSpeedThetaControl(f32 value);
u32 func0f0c8598(void);
s32 func0f0c8598(void);
void movedataReset(struct movedata *data);
void func0f0c8b90(bool arg0, bool arg1, bool arg2, bool arg3);
void func0f0c8b90(s32 arg0, s32 arg1, s32 arg2, s32 arg3);
void func0f0cb79c(struct player *player, struct coord *arg1, s16 *rooms);
void func0f0cb89c(struct player *player, s16 *rooms);
void func0f0cb8c4(struct player *player);

View File

@ -76,9 +76,9 @@ u32 func0f09f848(void);
u32 func0f09f974(void);
u32 func0f09fa20(void);
u32 func0f09fa84(void);
void func0f0a0394(void);
void func0f0a0b30(f32 autoaimx, f32 autoaimy);
u32 func0f0a0b98(void);
void func0f0a0394(f32 autoaimx, f32 autoaimy, f32 arg2, f32 arg3);
void currentPlayerSwivelGunTowards(f32 autoaimx, f32 autoaimy, f32 autoaimdamp);
void func0f0a0b98(f32 arg0, f32 arg1);
void currentPlayerGetCrossPos(f32 *x, f32 *y);
void func0f0a0c08(struct coord *arg0, struct coord *arg1);
u32 func0f0a0c44(void);
@ -93,8 +93,8 @@ u32 getCurrentPlayerWeaponId(u32 arg0);
u32 func0f0a1a10(void);
u32 func0f0a1a68(void);
u32 func0f0a1ab0(void);
u32 func0f0a1b50(void);
u32 func0f0a1c2c(void);
void func0f0a1b50(void);
void func0f0a1c2c(void);
bool func0f0a1d14(u32 weaponnum);
u32 func0f0a1df4(void);
void currentPlayerEquipWeaponWrapper(bool arg0, s32 weaponnum);

View File

@ -21,7 +21,7 @@ void func0f0b4d04(struct coord *in, f32 *out);
void func0f0b4d68(struct coord *in, struct coord *out);
void func0f0b4dec(struct coord *in, struct coord *out);
void func0f0b4e68(struct coord *in, f32 divisor, struct coord *out);
u32 func0f0b4eb8(void);
void func0f0b4eb8(struct coord *arg0, f32 arg1[2], f32 zoom, f32 aspect);
void currentPlayerSetUnk1738(u32 value);
void currentPlayerSetUnk173c(u32 value);
u32 currentPlayerGetUnk173c(void);

View File

@ -34,7 +34,7 @@ f32 currentPlayerGetTeleportFovY(void);
void currentPlayerUpdateZoom(void);
void func0f0bace0(void);
void func0f0bad6c(void);
void currentPlayerPause(u32 mode);
void currentPlayerPause(s32 mode);
void func0f0baf38(void);
Gfx *func0f0baf84(Gfx *gdl);
Gfx *fadeDraw(Gfx *gdl, u32 r, u32 g, u32 b, f32 frac);

View File

@ -258,7 +258,7 @@ u32 func0f089f8c(void);
u32 func0f08a38c(void);
u32 func0f08a724(void);
u32 func0f08a88c(void);
u32 func0f08a9f4(void);
void playerDetonateRemoteMines(s32 playernum);
struct weaponobj *func0f08aa70(s32 weaponnum, struct prop *prop);
struct weaponobj *weaponFindThrown(s32 weaponnum);
u32 func0f08ab64(void);

View File

@ -27,15 +27,15 @@ u32 func00014484(void);
void func00014810(bool arg0);
u32 func0001481c(void);
u32 func00014848(void);
u32 func00014904(void);
u32 func000149c0(void);
u32 func00014a78(void);
u32 func00014b50(void);
u32 func00014c98(u32 arg0, s8 contpadnum, u32 buttons);
s32 func00014e10(u32 arg0);
s32 func00014eb8(u32 arg0);
s32 func00014f60(s8 arg0, u16 arg1);
u16 func00015020(s8 arg0, u16 arg1);
s32 func00014904(u32 samplenum, s8 contpadnum);
s32 func000149c0(u32 samplenum, s8 contpadnum);
u32 func00014a78(u32 samplenum, s8 contpadnum, u32 buttons);
u32 func00014b50(u32 samplenum, s8 contpadnum, u32 buttons);
u32 func00014c98(u32 *arg0, s8 contpadnum, u32 buttons);
s8 func00014e10(s8 contpadnum);
s8 func00014eb8(s8 contpadnum);
u16 func00014f60(s8 contpadnum, u16 arg1);
u16 func00015020(s8 contpadnum, u16 arg1);
u32 func000150c4(void);
u32 func000150e8(void);
u32 func00015144(void);

View File

@ -2204,7 +2204,7 @@ struct player {
/*0x00c8*/ s32 badrockettime;
/*0x00cc*/ u32 unk00cc;
/*0x00d0*/ u32 unk00d0;
/*0x00d0*/ s32 bondactivateorreload;
/*0x00d4*/ u32 unk00d4;
/*0x00d8*/ bool isdead;
/*0x00dc*/ f32 bondhealth;
@ -2216,15 +2216,15 @@ struct player {
/*0x00f4*/ u32 damageshowtime;
/*0x00f8*/ f32 healthshowtime;
/*0x00fc*/ u32 healthshowmode;
/*0x0100*/ bool docentreupdown;
/*0x0100*/ s32 docentreupdown;
/*0x0104*/ u32 unk0104;
/*0x0108*/ bool prevupdown;
/*0x010c*/ bool movecentrerelease;
/*0x0110*/ bool lookaheadcentreenabled;
/*0x0114*/ bool automovecentreenabled;
/*0x0118*/ bool fastmovecentreenabled;
/*0x011c*/ bool automovecentre;
/*0x0120*/ bool insightaimmode;
/*0x0108*/ s32 prevupdown;
/*0x010c*/ s32 movecentrerelease;
/*0x0110*/ s32 lookaheadcentreenabled;
/*0x0114*/ s32 automovecentreenabled;
/*0x0118*/ s32 fastmovecentreenabled;
/*0x011c*/ s32 automovecentre;
/*0x0120*/ s32 insightaimmode;
/*0x0124*/ bool autoyaimenabled;
/*0x0128*/ f32 autoaimy;
@ -2617,7 +2617,7 @@ struct player {
/*0x1798*/ f32 screenyminf;
/*0x179c*/ f32 screenxmaxf;
/*0x17a0*/ f32 screenymaxf;
/*0x17a4*/ u32 unk17a4;
/*0x17a4*/ s32 gunsightoff;
/*0x17a8*/ s32 ammoheldarr[33]; // ammo quantities not loaded into a gun
/*0x182c*/ u32 unk182c;
/*0x1830*/ u32 unk1830;
@ -2706,7 +2706,7 @@ struct player {
/*0x1a10*/ struct coord grabbedposoffset;
/*0x1a1c*/ s32 grabbeddoextra;
/*0x1a20*/ f32 grabbedrotextra;
/*0x1a24*/ u32 pausemode;
/*0x1a24*/ s32 pausemode;
/*0x1a28*/ u32 pausetime60;
/*0x1a2c*/ struct coord grabbedposextra;
/*0x1a38*/ f32 grabbedrotextrasum;
@ -2743,7 +2743,7 @@ struct player {
/*0x1b5c*/ struct prop *grabbedprop;
/*0x1b60*/ f32 unk1b60;
/*0x1b64*/ s32 grabstarttime;
/*0x1b68*/ u32 unk1b68;
/*0x1b68*/ f32 autoaimdamp;
/*0x1b6c*/ struct coord bondforcespeed;
/*0x1b78*/ bool bondtankexplode;
/*0x1b7c*/ s32 bondviewlevtime60;
@ -2764,9 +2764,9 @@ struct player {
/*0x1bbc*/ struct coord cam_look;
/*0x1bc8*/ struct coord cam_up;
/*0x1bd4*/ u32 unk1bd4;
/*0x1bd8*/ s32 unk1bd8;
/*0x1bdc*/ s32 unk1bdc;
/*0x1be0*/ u32 cachedlookahead;
/*0x1bd8*/ s32 autocontrol_x;
/*0x1bdc*/ s32 autocontrol_y;
/*0x1be0*/ s32 cachedlookahead;
/*0x1be4*/ u16 lookaheadframe;
/*0x1be6*/ u8 numaibuddies;
/*0x1be7*/ u8 aibuddynums[MAX_SIMULANTS];
@ -6364,49 +6364,49 @@ struct tilething {
};
struct movedata {
/*0x00*/ u32 unk00;
/*0x04*/ u32 unk04;
/*0x08*/ u32 unk08;
/*0x0c*/ u32 unk0c;
/*0x10*/ bool unk10;
/*0x14*/ bool unk14;
/*0x18*/ u32 unk18;
/*0x1c*/ u32 unk1c;
/*0x20*/ s32 stepforward;
/*0x24*/ s32 stepback;
/*0x28*/ s32 stepleft;
/*0x2c*/ s32 stepright;
/*0x00*/ s32 canswivelgun;
/*0x04*/ s32 canmanualaim;
/*0x08*/ s32 triggeron;
/*0x0c*/ s32 btapcount;
/*0x10*/ s32 canlookahead;
/*0x14*/ s32 unk14;
/*0x18*/ s32 cannaturalturn;
/*0x1c*/ s32 cannaturalpitch;
/*0x20*/ s32 digitalstepforward;
/*0x24*/ s32 digitalstepback;
/*0x28*/ s32 digitalstepleft;
/*0x2c*/ s32 digitalstepright;
/*0x30*/ f32 unk30;
/*0x34*/ f32 unk34;
/*0x38*/ f32 unk38;
/*0x3c*/ f32 unk3c;
/*0x40*/ f32 unk40;
/*0x44*/ f32 unk44;
/*0x48*/ u32 unk48;
/*0x4c*/ u32 unk4c;
/*0x38*/ f32 speedvertadown;
/*0x3c*/ f32 speedvertaup;
/*0x40*/ f32 aimturnleftspeed;
/*0x44*/ f32 aimturnrightspeed;
/*0x48*/ s32 weaponbackoffset;
/*0x4c*/ s32 weaponforwardoffset;
/*0x50*/ u32 unk50;
/*0x54*/ u32 unk54;
/*0x58*/ u32 unk58;
/*0x5c*/ f32 unk5c;
/*0x60*/ f32 unk60;
/*0x5c*/ f32 zoomoutfovpersec;
/*0x60*/ f32 zoominfovpersec;
/*0x64*/ s32 crouchdown;
/*0x68*/ s32 crouchup;
/*0x6c*/ u32 swaynegative;
/*0x70*/ u32 swaypositive;
/*0x74*/ u32 unk74;
/*0x78*/ u32 unk78;
/*0x7c*/ u32 unk7c;
/*0x80*/ bool eyesshut;
/*0x84*/ u32 unk84;
/*0x88*/ u32 unk88;
/*0x8c*/ u32 unk8c;
/*0x90*/ u32 unk90;
/*0x94*/ u32 unk94;
/*0x98*/ u32 unk98;
/*0x9c*/ u32 unk9c;
/*0xa0*/ u32 unka0;
/*0xa4*/ s32 unka4;
/*0xa8*/ s32 unka8;
/*0x6c*/ s32 rleanleft;
/*0x70*/ s32 rleanright;
/*0x74*/ s32 detonating;
/*0x78*/ s32 canautoaim;
/*0x7c*/ s32 farsighttempautoseek;
/*0x80*/ s32 eyesshut;
/*0x84*/ s32 invertpitch;
/*0x88*/ s32 disablelookahead;
/*0x8c*/ s32 c1stickxsafe; // raw values but adjusted to remove dead zone
/*0x90*/ s32 c1stickysafe;
/*0x94*/ s32 c1stickxraw; // raw values from control stick
/*0x98*/ s32 c1stickyraw;
/*0x9c*/ s32 analogturn;
/*0xa0*/ s32 analogpitch;
/*0xa4*/ s32 analogstrafe;
/*0xa8*/ s32 analogwalk;
};
struct var80065750 {