Decompile bgunConsiderToggleGunFunction
This commit is contained in:
parent
14ba2d2d94
commit
fb42f18163
|
|
@ -996,7 +996,7 @@ void amTick(void)
|
|||
g_AmIndex = g_Vars.currentplayernum;
|
||||
|
||||
if (g_AmMenus[g_AmIndex].togglefunc) {
|
||||
if (bgunConsiderToggleGunFunction(60, false, 1) > 0) {
|
||||
if (bgunConsiderToggleGunFunction(60, false, true) > 0) {
|
||||
g_AmMenus[g_AmIndex].togglefunc = false;
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -917,17 +917,17 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i
|
|||
if (g_Vars.currentplayer->usedowntime >= -1) {
|
||||
if (joyGetButtonsPressedOnSample(i, shootpad, shootallowedbuttons & Z_TRIG)
|
||||
&& g_Vars.currentplayer->usedowntime > -1
|
||||
&& bgunConsiderToggleGunFunction(g_Vars.currentplayer->usedowntime, 1, 0)) {
|
||||
&& bgunConsiderToggleGunFunction(g_Vars.currentplayer->usedowntime, true, false) != USETIMER_CONTINUE) {
|
||||
g_Vars.currentplayer->usedowntime = -3;
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->usedowntime > -1) {
|
||||
if (g_Vars.currentplayer->usedowntime > TICKS(25)) {
|
||||
result = bgunConsiderToggleGunFunction(g_Vars.currentplayer->usedowntime, 0, 0);
|
||||
result = bgunConsiderToggleGunFunction(g_Vars.currentplayer->usedowntime, false, false);
|
||||
|
||||
if (result == 1) {
|
||||
if (result == USETIMER_STOP) {
|
||||
g_Vars.currentplayer->usedowntime = -1;
|
||||
} else if (result == 2) {
|
||||
} else if (result == USETIMER_REPEAT) {
|
||||
g_Vars.currentplayer->usedowntime = -2;
|
||||
} else {
|
||||
g_Vars.currentplayer->usedowntime++;
|
||||
|
|
@ -937,7 +937,7 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i
|
|||
}
|
||||
}
|
||||
} else if (g_Vars.currentplayer->usedowntime >= -2) {
|
||||
bgunConsiderToggleGunFunction(g_Vars.currentplayer->usedowntime, 0, 0);
|
||||
bgunConsiderToggleGunFunction(g_Vars.currentplayer->usedowntime, false, false);
|
||||
}
|
||||
} else {
|
||||
// Released B - activate or reload
|
||||
|
|
@ -1276,17 +1276,17 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i
|
|||
if (g_Vars.currentplayer->usedowntime >= -1) {
|
||||
if (joyGetButtonsPressedOnSample(i, contpad1, shootbuttons & c1allowedbuttons)
|
||||
&& g_Vars.currentplayer->usedowntime >= 0
|
||||
&& bgunConsiderToggleGunFunction(g_Vars.currentplayer->usedowntime, 1, 0)) {
|
||||
&& bgunConsiderToggleGunFunction(g_Vars.currentplayer->usedowntime, true, false) != USETIMER_CONTINUE) {
|
||||
g_Vars.currentplayer->usedowntime = -3;
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->usedowntime >= 0) {
|
||||
if (g_Vars.currentplayer->usedowntime > TICKS(25)) {
|
||||
s32 result = bgunConsiderToggleGunFunction(g_Vars.currentplayer->usedowntime, 0, 0);
|
||||
s32 result = bgunConsiderToggleGunFunction(g_Vars.currentplayer->usedowntime, false, false);
|
||||
|
||||
if (result == 1) {
|
||||
if (result == USETIMER_STOP) {
|
||||
g_Vars.currentplayer->usedowntime = -1;
|
||||
} else if (result == 2) {
|
||||
} else if (result == USETIMER_REPEAT) {
|
||||
g_Vars.currentplayer->usedowntime = -2;
|
||||
} else {
|
||||
g_Vars.currentplayer->usedowntime++;
|
||||
|
|
@ -1297,7 +1297,7 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i
|
|||
}
|
||||
} else {
|
||||
if (g_Vars.currentplayer->usedowntime >= -2) {
|
||||
bgunConsiderToggleGunFunction(g_Vars.currentplayer->usedowntime, 0, 0);
|
||||
bgunConsiderToggleGunFunction(g_Vars.currentplayer->usedowntime, false, false);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1280,7 +1280,7 @@ void handTickAttack(s32 handnum)
|
|||
struct gset gset;
|
||||
bool cloaked;
|
||||
|
||||
g_Vars.currentplayer->hands[handnum].unk0d0f_03 = false;
|
||||
g_Vars.currentplayer->hands[handnum].activatesecondary = false;
|
||||
|
||||
gsetPopulateFromCurrentPlayer(handnum, &gset);
|
||||
frIncrementNumShots();
|
||||
|
|
|
|||
|
|
@ -4158,6 +4158,10 @@
|
|||
#define TVCMDLIST_35 0x35
|
||||
#define TVCMDLIST_36 0x36
|
||||
|
||||
#define USETIMER_CONTINUE 0
|
||||
#define USETIMER_STOP 1
|
||||
#define USETIMER_REPEAT 2
|
||||
|
||||
#define VEHICLEMODE_OFF 0
|
||||
#define VEHICLEMODE_ENGINESTART 1
|
||||
#define VEHICLEMODE_RUNNING 2
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ void bgunPlayPropHitSound(struct gset *gset, struct prop *prop, s32 texturenum);
|
|||
void bgunPlayGlassHitSound(struct coord *pos, s16 *rooms, s32 texturenum);
|
||||
void bgunPlayBgHitSound(struct gset *gset, struct coord *hitpos, s32 texturenum, s16 *arg3);
|
||||
void bgunSetTriggerOn(s32 handnum, bool on);
|
||||
s32 bgunConsiderToggleGunFunction(s32 usedowntime, bool firing, s32 arg2);
|
||||
s32 bgunConsiderToggleGunFunction(s32 usedowntime, bool trigpressed, bool fromactivemenu);
|
||||
void bgun0f0a8c50(void);
|
||||
bool bgunIsUsingSecondaryFunction(void);
|
||||
void bgunTickGameplay(bool triggeron);
|
||||
|
|
|
|||
|
|
@ -2250,7 +2250,7 @@ struct hand {
|
|||
/*0x0d0f*/ u8 createsmoke : 1;
|
||||
/*0x0d0f*/ u8 forcecreatesmoke : 1;
|
||||
/*0x0d0f*/ u8 unk0d0f_02 : 1;
|
||||
/*0x0d0f*/ u8 unk0d0f_03 : 1;
|
||||
/*0x0d0f*/ u8 activatesecondary : 1;
|
||||
/*0x0d0f*/ u8 unk0d0f_04 : 4;
|
||||
/*0x0d10*/ f32 unk0d10;
|
||||
/*0x0d14*/ f32 unk0d14;
|
||||
|
|
|
|||
Loading…
Reference in New Issue