Decompile currentPlayerSetGunSightVisible
This commit is contained in:
parent
307687f6a3
commit
0551c0e808
|
|
@ -2964,7 +2964,7 @@ glabel var7f1ad8e4
|
|||
/* f0ca9f0: c7ac00b4 */ lwc1 $f12,0xb4($sp)
|
||||
/* f0ca9f4: 24040002 */ addiu $a0,$zero,0x2
|
||||
.L0f0ca9f8:
|
||||
/* f0ca9f8: 0fc2af1d */ jal func0f0abc74
|
||||
/* f0ca9f8: 0fc2af1d */ jal currentPlayerSetGunSightVisible
|
||||
/* f0ca9fc: 8fa50208 */ lw $a1,0x208($sp)
|
||||
/* f0caa00: c7ac0210 */ lwc1 $f12,0x210($sp)
|
||||
/* f0caa04: 44808000 */ mtc1 $zero,$f16
|
||||
|
|
@ -4885,7 +4885,7 @@ glabel var7f1ad8e4
|
|||
// func0f028590(spb4);
|
||||
// }
|
||||
//
|
||||
// func0f0abc74(2, movedata.unk54);
|
||||
// currentPlayerSetGunSightVisible(GUNSIGHTREASON_AIMING, movedata.unk54);
|
||||
//
|
||||
// if (movedata.zoomoutfovpersec > 0) {
|
||||
// currentPlayerZoomOut(movedata.zoomoutfovpersec);
|
||||
|
|
|
|||
|
|
@ -5275,7 +5275,7 @@ bool aiRevokeControl(void)
|
|||
u32 prevplayernum = g_Vars.currentplayernum;
|
||||
u32 playernum = propGetPlayerNum(chr->prop);
|
||||
setCurrentPlayerNum(playernum);
|
||||
func0f0abc74(4, false);
|
||||
currentPlayerSetGunSightVisible(GUNSIGHTREASON_NOCONTROL, false);
|
||||
func0f0a95ec(2, false);
|
||||
|
||||
if ((cmd[3] & 2) == 0) {
|
||||
|
|
@ -5306,7 +5306,7 @@ bool aiGrantControl(void)
|
|||
if (chr && chr->prop && chr->prop->type == PROPTYPE_PLAYER) {
|
||||
u32 prevplayernum = g_Vars.currentplayernum;
|
||||
setCurrentPlayerNum(propGetPlayerNum(chr->prop));
|
||||
func0f0abc74(4, true);
|
||||
currentPlayerSetGunSightVisible(GUNSIGHTREASON_NOCONTROL, true);
|
||||
func0f0a95ec(2, true);
|
||||
currentPlayerUnsetFlag(PLAYERFLAG_NOCONTROL);
|
||||
countdownTimerSetVisible(16, true);
|
||||
|
|
|
|||
|
|
@ -23659,25 +23659,15 @@ void speedpillTick(void)
|
|||
}
|
||||
}
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel func0f0abc74
|
||||
/* f0abc74: 10a00008 */ beqz $a1,.L0f0abc98
|
||||
/* f0abc78: 3c02800a */ lui $v0,%hi(g_Menus+0x37a4)
|
||||
/* f0abc7c: 3c02800a */ lui $v0,%hi(g_Vars+0x284)
|
||||
/* f0abc80: 8c42a244 */ lw $v0,%lo(g_Vars+0x284)($v0)
|
||||
/* f0abc84: 00807827 */ nor $t7,$a0,$zero
|
||||
/* f0abc88: 8c4e17a4 */ lw $t6,%lo(g_Menus+0x37a4)($v0)
|
||||
/* f0abc8c: 01cfc024 */ and $t8,$t6,$t7
|
||||
/* f0abc90: 03e00008 */ jr $ra
|
||||
/* f0abc94: ac5817a4 */ sw $t8,0x17a4($v0)
|
||||
.L0f0abc98:
|
||||
/* f0abc98: 8c42a244 */ lw $v0,-0x5dbc($v0)
|
||||
/* f0abc9c: 8c5917a4 */ lw $t9,0x17a4($v0)
|
||||
/* f0abca0: 03244025 */ or $t0,$t9,$a0
|
||||
/* f0abca4: ac4817a4 */ sw $t0,0x17a4($v0)
|
||||
/* f0abca8: 03e00008 */ jr $ra
|
||||
/* f0abcac: 00000000 */ nop
|
||||
);
|
||||
void currentPlayerSetGunSightVisible(u32 reason, bool visible)
|
||||
{
|
||||
if (visible) {
|
||||
g_Vars.currentplayer->gunsightoff &= ~reason;
|
||||
return;
|
||||
}
|
||||
|
||||
g_Vars.currentplayer->gunsightoff |= reason;
|
||||
}
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel func0f0abcb0
|
||||
|
|
|
|||
|
|
@ -5702,7 +5702,7 @@ glabel var7f1ad674
|
|||
/* f0bb84c: 00000000 */ nop
|
||||
/* f0bb850: 4502001d */ bc1fl .L0f0bb8c8
|
||||
/* f0bb854: 8c4900d8 */ lw $t1,0xd8($v0)
|
||||
/* f0bb858: 0fc2af1d */ jal func0f0abc74
|
||||
/* f0bb858: 0fc2af1d */ jal currentPlayerSetGunSightVisible
|
||||
/* f0bb85c: 00002825 */ or $a1,$zero,$zero
|
||||
/* f0bb860: 0fc30865 */ jal currentPlayerGetHealth
|
||||
/* f0bb864: 00000000 */ nop
|
||||
|
|
@ -5821,7 +5821,7 @@ glabel var7f1ad674
|
|||
/* f0bba08: 8f1900d8 */ lw $t9,0xd8($t8)
|
||||
/* f0bba0c: 17200003 */ bnez $t9,.L0f0bba1c
|
||||
/* f0bba10: 00000000 */ nop
|
||||
/* f0bba14: 0fc2af1d */ jal func0f0abc74
|
||||
/* f0bba14: 0fc2af1d */ jal currentPlayerSetGunSightVisible
|
||||
/* f0bba18: 24050001 */ addiu $a1,$zero,0x1
|
||||
.L0f0bba1c:
|
||||
/* f0bba1c: 0fc305f3 */ jal currentPlayerIsHealthVisible
|
||||
|
|
@ -8236,7 +8236,7 @@ glabel var7f1ad6ac
|
|||
/* f0bdc84: 0fc2a57b */ jal func0f0a95ec
|
||||
/* f0bdc88: 00402825 */ or $a1,$v0,$zero
|
||||
/* f0bdc8c: 02a02025 */ or $a0,$s5,$zero
|
||||
/* f0bdc90: 0fc2af1d */ jal func0f0abc74
|
||||
/* f0bdc90: 0fc2af1d */ jal currentPlayerSetGunSightVisible
|
||||
/* f0bdc94: 24050001 */ addiu $a1,$zero,0x1
|
||||
/* f0bdc98: 8e6302ac */ lw $v1,0x2ac($s3)
|
||||
/* f0bdc9c: 10600002 */ beqz $v1,.L0f0bdca8
|
||||
|
|
@ -10431,7 +10431,7 @@ glabel var7f1ad6ac
|
|||
// currentPlayerSetAutoAimX(optionsGetAutoAim(g_Vars.currentplayerstats->mpindex));
|
||||
// currentPlayerSetAutoMoveCentreEnabled(optionsGetLookAhead(g_Vars.currentplayerstats->mpindex));
|
||||
// func0f0a95ec(1, optionsGetAmmoOnScreen(g_Vars.currentplayerstats->mpindex));
|
||||
// func0f0abc74(1, 1);
|
||||
// currentPlayerSetGunSightVisible(GUNSIGHTREASON_1, true);
|
||||
//
|
||||
// // dc9c
|
||||
// if ((g_Vars.tickmode == TICKMODE_0 || g_Vars.tickmode == TICKMODE_1)
|
||||
|
|
|
|||
|
|
@ -735,6 +735,10 @@
|
|||
#define GOPOSFLAG_DUCK 0x40
|
||||
#define GOPOSFLAG_80 0x80
|
||||
|
||||
#define GUNSIGHTREASON_1 1
|
||||
#define GUNSIGHTREASON_AIMING 2
|
||||
#define GUNSIGHTREASON_NOCONTROL 4
|
||||
|
||||
#define HANGARBIO_INSTITUTE 0
|
||||
#define HANGARBIO_DDTOWER 1
|
||||
#define HANGARBIO_LABBASEMENT 2
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ void speedpillRevert(s32 arg0);
|
|||
void func0f0abba8(void);
|
||||
void func0f0abbe8(void);
|
||||
void speedpillTick(void);
|
||||
void func0f0abc74(u32 arg0, s32 arg1);
|
||||
void currentPlayerSetGunSightVisible(u32 bits, bool visible);
|
||||
Gfx *func0f0abcb0(Gfx *gdl);
|
||||
u32 func0f0abd30(void);
|
||||
u32 getCurrentPlayerWeaponIdWrapper(u32 arg0);
|
||||
|
|
|
|||
|
|
@ -2621,7 +2621,7 @@ struct player {
|
|||
/*0x1798*/ f32 screenyminf;
|
||||
/*0x179c*/ f32 screenxmaxf;
|
||||
/*0x17a0*/ f32 screenymaxf;
|
||||
/*0x17a4*/ s32 gunsightoff;
|
||||
/*0x17a4*/ u32 gunsightoff;
|
||||
/*0x17a8*/ s32 ammoheldarr[33]; // ammo quantities not loaded into a gun
|
||||
/*0x182c*/ u32 unk182c;
|
||||
/*0x1830*/ u32 unk1830;
|
||||
|
|
|
|||
Loading…
Reference in New Issue