mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-06-14 14:07:56 -04:00
Rename PALDOWN macro to TICKS
This commit is contained in:
@@ -432,8 +432,8 @@ void amGetSlotDetails(s32 slot, u32 *flags, char *label)
|
||||
if (invGetWeaponNumByIndex(g_AmMenus[g_AmIndex].invindexes[slot]) == WEAPON_CLOAKINGDEVICE) {
|
||||
// Special case: "Cloak %d"
|
||||
qty = bgunGetReservedAmmoCount(AMMOTYPE_CLOAK);
|
||||
secs = qty / PALDOWN(60);
|
||||
modulo = (qty - (secs * PALDOWN(60))) * 100 / PALDOWN(60);
|
||||
secs = qty / TICKS(60);
|
||||
modulo = (qty - (secs * TICKS(60))) * 100 / TICKS(60);
|
||||
sprintf(label, langGet(L_OPTIONS_491), secs + (modulo > 0 ? 1 : 0)); // "cloak %d"
|
||||
} else {
|
||||
strcpy(label, invGetShortNameByIndex(g_AmMenus[g_AmIndex].invindexes[slot]));
|
||||
|
||||
+1
-1
@@ -167,7 +167,7 @@ void bbikeTryDismountAngle(f32 relativeangle, f32 distance)
|
||||
void bbikeHandleActivate(void)
|
||||
{
|
||||
if (g_Vars.currentplayer->bondvehiclemode == VEHICLEMODE_RUNNING
|
||||
&& g_Vars.lvframe60 - g_Vars.currentplayer->activatetimelast < PALDOWN(25)) {
|
||||
&& g_Vars.lvframe60 - g_Vars.currentplayer->activatetimelast < TICKS(25)) {
|
||||
struct hoverbikeobj *bike = (struct hoverbikeobj *)g_Vars.currentplayer->hoverbike->obj;
|
||||
struct modelrodata_bbox *bbox = objFindBboxRodata(&bike->base);
|
||||
|
||||
|
||||
@@ -567,7 +567,7 @@ bool eyespyTryLaunch(void)
|
||||
playerpos.y = g_Vars.currentplayer->prop->pos.y;
|
||||
playerpos.z = g_Vars.currentplayer->prop->pos.z;
|
||||
|
||||
chr->soundtimer = PALDOWN(10);
|
||||
chr->soundtimer = TICKS(10);
|
||||
|
||||
g_Vars.currentplayer->eyespy->held = false;
|
||||
g_Vars.currentplayer->eyespy->up.x = 0;
|
||||
|
||||
+48
-48
@@ -2283,7 +2283,7 @@ void bgun0f098df8(s32 weaponfunc, struct handweaponinfo *info, struct hand *hand
|
||||
|
||||
if (checkunequipped && reloadindex >= 0) {
|
||||
#if VERSION >= VERSION_PAL_FINAL
|
||||
amount -= hand->gunroundsspent[reloadindex] / PALDOWN(256);
|
||||
amount -= hand->gunroundsspent[reloadindex] / TICKS(256);
|
||||
#else
|
||||
amount -= hand->gunroundsspent[reloadindex] >> 8;
|
||||
#endif
|
||||
@@ -3376,10 +3376,10 @@ s32 bgunTickIncAutoSwitch(struct handweaponinfo *info, s32 handnum, struct hand
|
||||
}
|
||||
|
||||
if (hand->stateminor == 0) {
|
||||
s32 delay = PALDOWN(16);
|
||||
s32 delay = TICKS(16);
|
||||
|
||||
if (g_Vars.normmplayerisrunning) {
|
||||
delay = PALDOWN(12);
|
||||
delay = TICKS(12);
|
||||
}
|
||||
|
||||
if (hand->stateframes >= delay) {
|
||||
@@ -3460,7 +3460,7 @@ s32 bgunTickIncAutoSwitch(struct handweaponinfo *info, s32 handnum, struct hand
|
||||
if (bgunSetState(handnum, HANDSTATE_RELOAD)) {
|
||||
if (info->weaponnum == WEAPON_COMBATKNIFE) {
|
||||
hand->mode = HANDMODE_11;
|
||||
hand->pausetime60 = PALDOWN(17);
|
||||
hand->pausetime60 = TICKS(17);
|
||||
hand->count60 = 0;
|
||||
hand->count = -1;
|
||||
hand->stateminor = 2;
|
||||
@@ -5494,7 +5494,7 @@ glabel var7f1ac31c
|
||||
// hand->gs_int1 = -1;
|
||||
// hand->gs_int2 = 0;
|
||||
//
|
||||
// if (hand2->state == HANDSTATE_RELOAD && hand2->stateframes < PALDOWN(20)) {
|
||||
// if (hand2->state == HANDSTATE_RELOAD && hand2->stateframes < TICKS(20)) {
|
||||
// hand->stateminor = 9;
|
||||
// }
|
||||
// }
|
||||
@@ -5502,7 +5502,7 @@ glabel var7f1ac31c
|
||||
// if (hand->stateminor == 9) {
|
||||
// struct hand *hand2 = &g_Vars.currentplayer->hands[1 - handnum];
|
||||
//
|
||||
// if (hand2->state == HANDSTATE_RELOAD && hand2->stateframes < PALDOWN(20)) {
|
||||
// if (hand2->state == HANDSTATE_RELOAD && hand2->stateframes < TICKS(20)) {
|
||||
// return 0;
|
||||
// }
|
||||
//
|
||||
@@ -5585,14 +5585,14 @@ glabel var7f1ac31c
|
||||
// if (1);
|
||||
//
|
||||
// if (hand->stateminor == 1) {
|
||||
// if (hand->count60 > PALDOWN(15) || !hand->visible) {
|
||||
// if (hand->count60 > TICKS(15) || !hand->visible) {
|
||||
// hand->mode = HANDMODE_11;
|
||||
// hand->stateminor++;
|
||||
// hand->pausetime60 = PALDOWN(17);
|
||||
// hand->pausetime60 = TICKS(17);
|
||||
// hand->count60 = 0;
|
||||
// hand->count = 0;
|
||||
// } else {
|
||||
// bgun0f099780(hand, (hand->count60 * 0.87252569198608f) / PALDOWN(16));
|
||||
// bgun0f099780(hand, (hand->count60 * 0.87252569198608f) / TICKS(16));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
@@ -5655,7 +5655,7 @@ glabel var7f1ac31c
|
||||
// g_Vars.currentplayer->doautoselect = false;
|
||||
// }
|
||||
//
|
||||
// if (hand->count60 >= PALDOWN(23)
|
||||
// if (hand->count60 >= TICKS(23)
|
||||
// || !weaponGetModelNum2(info->weaponnum)
|
||||
// || !weaponHasFlag(info->weaponnum, WEAPONFLAG_00000040)
|
||||
// || weaponHasFlag(info->weaponnum, WEAPONFLAG_00000080)) {
|
||||
@@ -5667,7 +5667,7 @@ glabel var7f1ac31c
|
||||
// return lvupdate;
|
||||
// }
|
||||
// } else {
|
||||
// bgun0f099780(hand, (PALDOWN(23) - hand->count60) * 0.87252569198608f / PALDOWN(23));
|
||||
// bgun0f099780(hand, (TICKS(23) - hand->count60) * 0.87252569198608f / TICKS(23));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
@@ -5776,7 +5776,7 @@ s32 bgun0f09a3f8(struct hand *hand, struct weaponfunc *func)
|
||||
s32 delay = 3;
|
||||
|
||||
if (hand->gset.weaponnum == WEAPON_SHOTGUN) {
|
||||
delay = PALDOWN(13);
|
||||
delay = TICKS(13);
|
||||
}
|
||||
|
||||
if (hand->stateframes < delay) {
|
||||
@@ -6991,23 +6991,23 @@ bool bgun0f09aba4(struct hand *hand, struct handweaponinfo *info, s32 handnum, s
|
||||
weapondef = info->definition;
|
||||
|
||||
if (unk24 >= 4) {
|
||||
unk24 = PALDOWN(unk24);
|
||||
unk24 = TICKS(unk24);
|
||||
}
|
||||
|
||||
if (unk25 >= 4) {
|
||||
unk25 = PALDOWN(unk25);
|
||||
unk25 = TICKS(unk25);
|
||||
}
|
||||
|
||||
if (unk26 >= 4) {
|
||||
unk26 = PALDOWN(unk26);
|
||||
unk26 = TICKS(unk26);
|
||||
}
|
||||
|
||||
if (unk27 >= 4) {
|
||||
unk27 = PALDOWN(unk27);
|
||||
unk27 = TICKS(unk27);
|
||||
}
|
||||
|
||||
if (unk18 >= 4) {
|
||||
unk18 = PALDOWN(unk18);
|
||||
unk18 = TICKS(unk18);
|
||||
}
|
||||
|
||||
sum = unk24 + unk25;
|
||||
@@ -7267,7 +7267,7 @@ bool bgunTickIncAttackingThrow(s32 handnum, struct hand *hand)
|
||||
}
|
||||
|
||||
if (hand->stateminor == 2) {
|
||||
if (hand->stateframes > PALDOWN(func->recoverytime60)) {
|
||||
if (hand->stateframes > TICKS(func->recoverytime60)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -7287,7 +7287,7 @@ bool bgunTickIncAttackingThrow(s32 handnum, struct hand *hand)
|
||||
if (hand->stateminor == 55) {
|
||||
bgunResetAnim(hand);
|
||||
|
||||
if (hand->stateframes > PALDOWN(func->activatetime60 + 240)) {
|
||||
if (hand->stateframes > TICKS(func->activatetime60 + 240)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -7299,7 +7299,7 @@ bool bgunTickIncAttackingThrow(s32 handnum, struct hand *hand)
|
||||
// If held a grenade too long, force throw it and enter the wait state
|
||||
if (hand->gset.weaponnum == WEAPON_GRENADE
|
||||
&& hand->gset.weaponfunc == FUNC_PRIMARY
|
||||
&& hand->primetimer > PALDOWN(func->activatetime60)) {
|
||||
&& hand->primetimer > TICKS(func->activatetime60)) {
|
||||
hand->firing = true;
|
||||
hand->attacktype = HANDATTACKTYPE_THROWPROJECTILE;
|
||||
hand->loadedammo[func->base.ammoindex]--;
|
||||
@@ -7625,7 +7625,7 @@ bool bgunTickIncAttackingClose(s32 handnum, struct hand *hand)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (hand->stateframes > PALDOWN(60)) {
|
||||
if (hand->stateframes > TICKS(60)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -7660,7 +7660,7 @@ bool bgunTickIncAttackingSpecial(struct hand *hand)
|
||||
}
|
||||
|
||||
if (hand->stateminor == 2) {
|
||||
if (hand->stateframes > PALDOWN(func->unk18)) {
|
||||
if (hand->stateframes > TICKS(func->unk18)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -7694,8 +7694,8 @@ s32 bgunTickIncAttackEmpty(struct handweaponinfo *info, s32 handnum, struct hand
|
||||
case WEAPON_PP9I:
|
||||
case WEAPON_CC13:
|
||||
// These weapons are weapons with visible finger trigger animations
|
||||
if (hand->stateframes > PALDOWN(25)) {
|
||||
hand->stateframes -= PALDOWN(25);
|
||||
if (hand->stateframes > TICKS(25)) {
|
||||
hand->stateframes -= TICKS(25);
|
||||
hand->stateflags = 0;
|
||||
|
||||
bgunResetAnim(hand);
|
||||
@@ -7717,7 +7717,7 @@ s32 bgunTickIncAttackEmpty(struct handweaponinfo *info, s32 handnum, struct hand
|
||||
}
|
||||
}
|
||||
|
||||
if (!restartedanim && hand->stateframes > PALDOWN(25)) {
|
||||
if (!restartedanim && hand->stateframes > TICKS(25)) {
|
||||
playsound = true;
|
||||
}
|
||||
} else if (bgun0f098a44(hand, 5)) {
|
||||
@@ -7727,10 +7727,10 @@ s32 bgunTickIncAttackEmpty(struct handweaponinfo *info, s32 handnum, struct hand
|
||||
default:
|
||||
// Weapons without visible trigger animations must
|
||||
// still play the click sound every 25 frames
|
||||
if (hand->stateframes > PALDOWN(25)) {
|
||||
if (hand->stateframes > TICKS(25)) {
|
||||
playsound = true;
|
||||
|
||||
hand->stateframes -= PALDOWN(25);
|
||||
hand->stateframes -= TICKS(25);
|
||||
hand->stateflags = 0;
|
||||
|
||||
bgunResetAnim(hand);
|
||||
@@ -8022,14 +8022,14 @@ s32 bgunTickIncChangeGun(struct handweaponinfo *info, s32 handnum, struct hand *
|
||||
// Handle possible delay between gun disappearing and new one equipping,
|
||||
// as well as throwing the gun if that's what we're doing
|
||||
if (hand->stateminor == 1) {
|
||||
s32 delay = PALDOWN(16);
|
||||
s32 delay = TICKS(16);
|
||||
bool somebool = false;
|
||||
u32 stack2;
|
||||
|
||||
hand->count = 0;
|
||||
|
||||
if (g_Vars.normmplayerisrunning) {
|
||||
delay = PALDOWN(12);
|
||||
delay = TICKS(12);
|
||||
}
|
||||
|
||||
if (weapon->unequip_animation && (hand->stateflags & HANDSTATEFLAG_00000001) == 0) {
|
||||
@@ -8106,10 +8106,10 @@ s32 bgunTickIncChangeGun(struct handweaponinfo *info, s32 handnum, struct hand *
|
||||
|
||||
// Handle delay if new weapon has no equip animation, and play sound
|
||||
if (hand->stateminor == 3) {
|
||||
s32 delay = PALDOWN(23);
|
||||
s32 delay = TICKS(23);
|
||||
|
||||
if (g_Vars.normmplayerisrunning) {
|
||||
delay = PALDOWN(12);
|
||||
delay = TICKS(12);
|
||||
}
|
||||
|
||||
if (weaponHasFlag(hand->gset.weaponnum, WEAPONFLAG_00004000)) {
|
||||
@@ -11050,7 +11050,7 @@ struct defaultobj *bgun0f09ee18(struct chrdata *chr, struct gset *gset, struct c
|
||||
weaponobj->timer240 = func->activatetime60;
|
||||
|
||||
if (weaponobj->timer240 >= 2) {
|
||||
weaponobj->timer240 = PALDOWN(weaponobj->timer240 * 4);
|
||||
weaponobj->timer240 = TICKS(weaponobj->timer240 * 4);
|
||||
}
|
||||
|
||||
if (weaponobj->weaponnum == WEAPON_GRENADE || weaponobj->weaponnum == WEAPON_NBOMB) {
|
||||
@@ -11082,7 +11082,7 @@ struct defaultobj *bgun0f09ee18(struct chrdata *chr, struct gset *gset, struct c
|
||||
if (obj->hidden & OBJHFLAG_AIRBORNE) {
|
||||
obj->projectile->flags |= PROJECTILEFLAG_00000002;
|
||||
obj->projectile->unk08c = 0.1f;
|
||||
obj->projectile->unk0b4 = PALDOWN(240);
|
||||
obj->projectile->unk0b4 = TICKS(240);
|
||||
|
||||
func0f0939f8(NULL, obj->prop, SFX_THROW, -1,
|
||||
-1, 0, 0, 0, NULL, -1, NULL, -1, -1, -1, -1);
|
||||
@@ -16867,7 +16867,7 @@ void bgunLoseGun(struct prop *attackerprop)
|
||||
objSetDropped(prop2, DROPTYPE_DEFAULT);
|
||||
|
||||
if (obj->hidden & OBJHFLAG_AIRBORNE) {
|
||||
obj->projectile->unk0b4 = PALDOWN(240);
|
||||
obj->projectile->unk0b4 = TICKS(240);
|
||||
obj->projectile->unk108 = attackerprop;
|
||||
}
|
||||
|
||||
@@ -28909,7 +28909,7 @@ void bgunsTick(bool triggeron)
|
||||
if (player->hands[HAND_LEFT].inuse
|
||||
&& player->hands[HAND_RIGHT].inuse
|
||||
&& player->gunctrl.weaponnum != WEAPON_REMOTEMINE) {
|
||||
if (player->playertrigtime240 > PALDOWN(80)) {
|
||||
if (player->playertrigtime240 > TICKS(80)) {
|
||||
gunsfiring[player->curguntofire] = 1;
|
||||
|
||||
if (bgun0f099008(1 - player->curguntofire)
|
||||
@@ -29392,8 +29392,8 @@ void bgun0f0a9da8(struct abmag *mag, s32 remaining, s32 capacity, s32 height)
|
||||
}
|
||||
|
||||
if (mag->change < 0 && mag->change > newchange) {
|
||||
if (mag->timer60 > -mag->change * PALDOWN(64)) {
|
||||
mag->timer60 = -mag->change * PALDOWN(64);
|
||||
if (mag->timer60 > -mag->change * TICKS(64)) {
|
||||
mag->timer60 = -mag->change * TICKS(64);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29416,18 +29416,18 @@ void bgun0f0a9da8(struct abmag *mag, s32 remaining, s32 capacity, s32 height)
|
||||
if (mag->change != 0) {
|
||||
mag->timer60 += (s16)g_Vars.lvupdate240_60 * height;
|
||||
|
||||
if (mag->timer60 > PALDOWN(255)) {
|
||||
if (mag->timer60 > TICKS(255)) {
|
||||
if (mag->change > 0) {
|
||||
while (mag->timer60 > PALDOWN(255) && mag->change > 0) {
|
||||
while (mag->timer60 > TICKS(255) && mag->change > 0) {
|
||||
mag->change--;
|
||||
mag->ref++;
|
||||
mag->timer60 -= PALDOWN(64);
|
||||
mag->timer60 -= TICKS(64);
|
||||
}
|
||||
} else {
|
||||
while (mag->timer60 > PALDOWN(255) && mag->change < 0) {
|
||||
while (mag->timer60 > TICKS(255) && mag->change < 0) {
|
||||
mag->change++;
|
||||
mag->ref--;
|
||||
mag->timer60 -= PALDOWN(64);
|
||||
mag->timer60 -= TICKS(64);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -35150,8 +35150,8 @@ void bgunAddBoostc(s32 amount)
|
||||
{
|
||||
g_Vars.speedpilltime += amount;
|
||||
|
||||
if (g_Vars.speedpilltime > 5 * 60 * PALDOWN(60)) { // 5 minutes
|
||||
g_Vars.speedpilltime = 5 * 60 * PALDOWN(60);
|
||||
if (g_Vars.speedpilltime > 5 * 60 * TICKS(60)) { // 5 minutes
|
||||
g_Vars.speedpilltime = 5 * 60 * TICKS(60);
|
||||
}
|
||||
|
||||
if (!g_Vars.speedpillwant) {
|
||||
@@ -35176,18 +35176,18 @@ void bgunSubtractBoost(s32 amount)
|
||||
void bgunApplyBoost(void)
|
||||
{
|
||||
if (lvGetSlowMotionType() != SLOWMOTION_OFF) {
|
||||
bgunSubtractBoost(PALDOWN(1200));
|
||||
bgunSubtractBoost(TICKS(1200));
|
||||
} else {
|
||||
bgunAddBoostc(PALDOWN(600));
|
||||
bgunAddBoostc(TICKS(600));
|
||||
}
|
||||
}
|
||||
|
||||
void bgunRevertBoost(void)
|
||||
{
|
||||
if (lvGetSlowMotionType() != SLOWMOTION_OFF) {
|
||||
bgunAddBoostc(PALDOWN(1200));
|
||||
bgunAddBoostc(TICKS(1200));
|
||||
} else {
|
||||
bgunSubtractBoost(PALDOWN(600));
|
||||
bgunSubtractBoost(TICKS(600));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -198,7 +198,7 @@ void bheadUpdate(f32 arg0, f32 arg1)
|
||||
|
||||
g_Vars.currentplayer->headwalkingtime60 += g_Vars.lvupdate240_60;
|
||||
|
||||
if (g_Vars.currentplayer->headwalkingtime60 > PALDOWN(60)) {
|
||||
if (g_Vars.currentplayer->headwalkingtime60 > TICKS(60)) {
|
||||
bheadSetdamp(PAL ? 0.9785f : 0.982f);
|
||||
} else {
|
||||
bheadSetdamp(PAL ? 0.99699f : 0.99748998880386f);
|
||||
|
||||
+9
-9
@@ -99,7 +99,7 @@ void bmoveUpdateAutoAimYProp(struct prop *prop, f32 autoaimy)
|
||||
|
||||
if (prop != g_Vars.currentplayer->autoyaimprop) {
|
||||
if (g_Vars.currentplayer->autoyaimtime60 < 0) {
|
||||
g_Vars.currentplayer->autoyaimtime60 = PALDOWN(30);
|
||||
g_Vars.currentplayer->autoyaimtime60 = TICKS(30);
|
||||
g_Vars.currentplayer->autoyaimprop = prop;
|
||||
} else {
|
||||
return;
|
||||
@@ -152,7 +152,7 @@ void bmoveUpdateAutoAimXProp(struct prop *prop, f32 autoaimx)
|
||||
|
||||
if (prop != g_Vars.currentplayer->autoxaimprop) {
|
||||
if (g_Vars.currentplayer->autoxaimtime60 < 0) {
|
||||
g_Vars.currentplayer->autoxaimtime60 = PALDOWN(30);
|
||||
g_Vars.currentplayer->autoxaimtime60 = TICKS(30);
|
||||
g_Vars.currentplayer->autoxaimprop = prop;
|
||||
} else {
|
||||
return;
|
||||
@@ -889,7 +889,7 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i
|
||||
|
||||
if (g_Vars.currentplayer->invdowntime > -1
|
||||
&& joyGetButtonsOnSample(i, shootpad, shootallowedbuttons & Z_TRIG) == 0) {
|
||||
if (g_Vars.currentplayer->invdowntime > PALDOWN(15)) {
|
||||
if (g_Vars.currentplayer->invdowntime > TICKS(15)) {
|
||||
amOpen();
|
||||
g_Vars.currentplayer->invdowntime = -1;
|
||||
} else {
|
||||
@@ -922,7 +922,7 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->usedowntime > -1) {
|
||||
if (g_Vars.currentplayer->usedowntime > PALDOWN(25)) {
|
||||
if (g_Vars.currentplayer->usedowntime > TICKS(25)) {
|
||||
result = bgunConsiderToggleGunFunction(g_Vars.currentplayer->usedowntime, 0, 0);
|
||||
|
||||
if (result == 1) {
|
||||
@@ -1006,7 +1006,7 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i
|
||||
}
|
||||
} else {
|
||||
if (g_Vars.currentplayer->aimtaptime > 0
|
||||
&& g_Vars.currentplayer->aimtaptime < PALDOWN(15)) {
|
||||
&& g_Vars.currentplayer->aimtaptime < TICKS(15)) {
|
||||
if (movedata.crouchdown) {
|
||||
movedata.crouchdown--;
|
||||
} else {
|
||||
@@ -1247,7 +1247,7 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i
|
||||
|
||||
if (g_Vars.currentplayer->invdowntime >= 0 && joyGetButtonsOnSample(i, contpad1, shootbuttons & c1allowedbuttons) == 0) {
|
||||
// Holding A and haven't pressed Z
|
||||
if (g_Vars.currentplayer->invdowntime > PALDOWN(15)) {
|
||||
if (g_Vars.currentplayer->invdowntime > TICKS(15)) {
|
||||
amOpen();
|
||||
g_Vars.currentplayer->invdowntime = -1;
|
||||
} else {
|
||||
@@ -1281,7 +1281,7 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->usedowntime >= 0) {
|
||||
if (g_Vars.currentplayer->usedowntime > PALDOWN(25)) {
|
||||
if (g_Vars.currentplayer->usedowntime > TICKS(25)) {
|
||||
s32 result = bgunConsiderToggleGunFunction(g_Vars.currentplayer->usedowntime, 0, 0);
|
||||
|
||||
if (result == 1) {
|
||||
@@ -1364,7 +1364,7 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i
|
||||
}
|
||||
} else {
|
||||
// Released aim
|
||||
if (g_Vars.currentplayer->aimtaptime > 0 && g_Vars.currentplayer->aimtaptime < PALDOWN(15)) {
|
||||
if (g_Vars.currentplayer->aimtaptime > 0 && g_Vars.currentplayer->aimtaptime < TICKS(15)) {
|
||||
// Was only a tap, so uncrouch
|
||||
if (movedata.crouchdown) {
|
||||
movedata.crouchdown--;
|
||||
@@ -1539,7 +1539,7 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i
|
||||
// Speed boost
|
||||
// After 3 seconds of holding forward at max speed, apply boost multiplier.
|
||||
// The multiplier starts at 1 and reaches 1.25 after about 0.1 seconds.
|
||||
if (g_Vars.currentplayer->speedmaxtime60 >= PALDOWN(180)) {
|
||||
if (g_Vars.currentplayer->speedmaxtime60 >= TICKS(180)) {
|
||||
if (g_Vars.currentplayer->speedboost < 1.25f) {
|
||||
g_Vars.currentplayer->speedboost += 0.01f * g_Vars.lvupdate240freal;
|
||||
}
|
||||
|
||||
+4
-4
@@ -2473,7 +2473,7 @@ void bwalkUpdateVertical(void)
|
||||
g_Vars.currentplayer->isfalling = true;
|
||||
g_Vars.currentplayer->fallstart = g_Vars.lvframe60;
|
||||
} else {
|
||||
if (g_Vars.lvframe60 - g_Vars.currentplayer->fallstart > PALDOWN(240)) {
|
||||
if (g_Vars.lvframe60 - g_Vars.currentplayer->fallstart > TICKS(240)) {
|
||||
// Have been falling for 4 seconds
|
||||
playerDie(true);
|
||||
}
|
||||
@@ -2538,10 +2538,10 @@ void bwalkUpdateVertical(void)
|
||||
// landing. Eg. The faster the fall speed, the longer Jo will take to
|
||||
// stand back to full height again.
|
||||
if (g_Vars.currentplayer->bdeltapos.y < -13.333333f) {
|
||||
g_Vars.currentplayer->crouchtime240 = PALDOWN(60);
|
||||
g_Vars.currentplayer->crouchtime240 = TICKS(60);
|
||||
g_Vars.currentplayer->crouchfall = -90;
|
||||
} else if (g_Vars.currentplayer->bdeltapos.y < -5.0f) {
|
||||
g_Vars.currentplayer->crouchtime240 = PALDOWN(60);
|
||||
g_Vars.currentplayer->crouchtime240 = TICKS(60);
|
||||
g_Vars.currentplayer->crouchfall =
|
||||
(-5.0f - g_Vars.currentplayer->bdeltapos.y) * -90.0f / 8.333333f;
|
||||
}
|
||||
@@ -2572,7 +2572,7 @@ void bwalkUpdateVertical(void)
|
||||
|
||||
if (g_Vars.mplayerisrunning == false
|
||||
&& (chr->headnum == HEAD_DARK_COMBAT || chr->headnum == HEAD_DARK_FROCK)
|
||||
&& g_Vars.lvframe60 - g_Vars.currentplayer->fallstart > PALDOWN(40)) {
|
||||
&& g_Vars.lvframe60 - g_Vars.currentplayer->fallstart > TICKS(40)) {
|
||||
// Play Jo landing grunt
|
||||
s32 sounds[] = {
|
||||
SFX_JO_LANDING_046F,
|
||||
|
||||
+17
-17
@@ -51,12 +51,12 @@ struct botdifficulty g_BotDifficulties[] = {
|
||||
// | | | | | | unk18
|
||||
// | | | | | | | dizzyamount
|
||||
// | | | | | | | |
|
||||
/* meat */ { PALDOWN(90), 0.26175770163536, 0.52351540327072, PALDOWN(600), 10, 0.69802051782608, 0.34901025891304, PALDOWN(1000) },
|
||||
/* easy */ { PALDOWN(60), 0.12215359508991, 0.24430719017982, PALDOWN(360), 10, 0.49733963608742, 0.13960410654545, PALDOWN(1000) },
|
||||
/* norm */ { PALDOWN(30), 0.069802053272724, 0.13960410654545, PALDOWN(180), 4, 0.34901025891304, 0.08725256472826, PALDOWN(1500) },
|
||||
/* hard */ { PALDOWN(15), 0.026175770908594, 0.069802053272724, PALDOWN(90), 2, 0.24430719017982, 0.034901026636362, PALDOWN(2500) },
|
||||
/* perf */ { PALDOWN(0), 0, 0.034901026636362, PALDOWN(45), 1, 0.17450512945652, 0, PALDOWN(4000) },
|
||||
/* dark */ { PALDOWN(0), 0, 0, PALDOWN(0), 0, 0.13960410654545, 0, PALDOWN(4000) },
|
||||
/* meat */ { TICKS(90), 0.26175770163536, 0.52351540327072, TICKS(600), 10, 0.69802051782608, 0.34901025891304, TICKS(1000) },
|
||||
/* easy */ { TICKS(60), 0.12215359508991, 0.24430719017982, TICKS(360), 10, 0.49733963608742, 0.13960410654545, TICKS(1000) },
|
||||
/* norm */ { TICKS(30), 0.069802053272724, 0.13960410654545, TICKS(180), 4, 0.34901025891304, 0.08725256472826, TICKS(1500) },
|
||||
/* hard */ { TICKS(15), 0.026175770908594, 0.069802053272724, TICKS(90), 2, 0.24430719017982, 0.034901026636362, TICKS(2500) },
|
||||
/* perf */ { TICKS(0), 0, 0.034901026636362, TICKS(45), 1, 0.17450512945652, 0, TICKS(4000) },
|
||||
/* dark */ { TICKS(0), 0, 0, TICKS(0), 0, 0.13960410654545, 0, TICKS(4000) },
|
||||
{ 0 },
|
||||
};
|
||||
|
||||
@@ -2647,7 +2647,7 @@ bool botIsAboutToAttack(struct chrdata *chr, bool arg1)
|
||||
}
|
||||
|
||||
if (chr->aibot->config->difficulty > BOTDIFF_MEAT) {
|
||||
if (chr->aibot->chrslastseen60[mpindex] >= g_Vars.lvframe60 - PALDOWN(240)
|
||||
if (chr->aibot->chrslastseen60[mpindex] >= g_Vars.lvframe60 - TICKS(240)
|
||||
|| (arrayIntersects(chr->prop->rooms, target->rooms))) {
|
||||
result = true;
|
||||
}
|
||||
@@ -3758,8 +3758,8 @@ glabel var7f1b8ef0
|
||||
//
|
||||
// // Dampen blur
|
||||
// if (chr->blurdrugamount > 0) {
|
||||
// if (chr->blurdrugamount > PALDOWN(5000)) {
|
||||
// chr->blurdrugamount = PALDOWN(5000);
|
||||
// if (chr->blurdrugamount > TICKS(5000)) {
|
||||
// chr->blurdrugamount = TICKS(5000);
|
||||
// }
|
||||
//
|
||||
// chr->blurdrugamount -= g_Vars.lvupdate240_60 * (chr->blurnumtimesdied + 1);
|
||||
@@ -3787,11 +3787,11 @@ glabel var7f1b8ef0
|
||||
// } else if (chr->myaction == MA_AIBOTFOLLOW
|
||||
// && aibot->followingplayernum >= 0
|
||||
// && aibot->chrdistances[aibot->followingplayernum] < 300
|
||||
// && aibot->unk1e4 >= g_Vars.lvframe60 - PALDOWN(60)
|
||||
// && aibot->unk1e4 >= g_Vars.lvframe60 - TICKS(60)
|
||||
// && aibot->config->difficulty != BOTDIFF_MEAT) {
|
||||
// targetangle = chrGetInverseTheta(g_MpAllChrPtrs[aibot->followingplayernum]);
|
||||
// } else if (chr->myaction == MA_AIBOTDEFEND
|
||||
// && aibot->unk1e4 >= g_Vars.lvframe60 - PALDOWN(60)
|
||||
// && aibot->unk1e4 >= g_Vars.lvframe60 - TICKS(60)
|
||||
// && aibot->config->difficulty != BOTDIFF_MEAT) {
|
||||
// targetangle = aibot->unk098;
|
||||
// } else {
|
||||
@@ -3807,7 +3807,7 @@ glabel var7f1b8ef0
|
||||
// }
|
||||
//
|
||||
// if (chr->blurdrugamount > 0 && !chrIsDead(chr) && aibot->skrocket == NULL) {
|
||||
// targetangle += chr->blurdrugamount * 0.00031410926021636f * sinf((g_Vars.lvframe60 % PALDOWN(120)) * 0.052351541817188f);
|
||||
// targetangle += chr->blurdrugamount * 0.00031410926021636f * sinf((g_Vars.lvframe60 % TICKS(120)) * 0.052351541817188f);
|
||||
//
|
||||
// if (targetangle >= M_BADTAU) {
|
||||
// targetangle -= M_BADTAU;
|
||||
@@ -4143,7 +4143,7 @@ void botLoseGun(struct chrdata *chr, struct prop *attackerprop)
|
||||
chr->hidden |= CHRHFLAG_00000001;
|
||||
|
||||
if (obj->hidden & OBJHFLAG_AIRBORNE) {
|
||||
obj->projectile->unk0b4 = PALDOWN(240);
|
||||
obj->projectile->unk0b4 = TICKS(240);
|
||||
obj->projectile->unk108 = attackerprop;
|
||||
}
|
||||
}
|
||||
@@ -4191,7 +4191,7 @@ void botSetTarget(struct chrdata *botchr, s32 propnum)
|
||||
botchr->aibot->unk208 = 0;
|
||||
|
||||
if (botchr->aibot->targetinsight && otherchr) {
|
||||
botchr->aibot->targetcloaktimer60 = PALDOWN(120);
|
||||
botchr->aibot->targetcloaktimer60 = TICKS(120);
|
||||
} else {
|
||||
botchr->aibot->targetcloaktimer60 = 0;
|
||||
}
|
||||
@@ -4213,7 +4213,7 @@ void botSetTarget(struct chrdata *botchr, s32 propnum)
|
||||
|
||||
if (botchr->aibot->targetinsight && otherchr) {
|
||||
if ((otherchr->hidden & CHRHFLAG_CLOAKED) == 0) {
|
||||
botchr->aibot->targetcloaktimer60 = PALDOWN(120);
|
||||
botchr->aibot->targetcloaktimer60 = TICKS(120);
|
||||
} else {
|
||||
if (botchr->aibot->targetcloaktimer60 > 0) {
|
||||
botchr->aibot->targetcloaktimer60 -= g_Vars.lvupdate240_60;
|
||||
@@ -4271,7 +4271,7 @@ void bot0f192a74(struct chrdata *chr)
|
||||
|
||||
if (aibot->unk1cc <= 0) {
|
||||
aibot->unk1d0 = random();
|
||||
aibot->unk1cc = PALDOWN(20) + random() % PALDOWN(20);
|
||||
aibot->unk1cc = TICKS(20) + random() % TICKS(20);
|
||||
}
|
||||
|
||||
if (g_Vars.lvupdate240 > 0) {
|
||||
@@ -4412,7 +4412,7 @@ void botChooseGeneralTarget(struct chrdata *botchr)
|
||||
// However, the usage of canseecloaked appears to be botched.
|
||||
// It is implemented in botIsTargetInvisible, but that function is not
|
||||
// called here while canseecloaked is true.
|
||||
if (random() % PALDOWN(4 * 60 * 60) < g_MpNumChrs * g_Vars.lvupdate240_60) {
|
||||
if (random() % TICKS(4 * 60 * 60) < g_MpNumChrs * g_Vars.lvupdate240_60) {
|
||||
aibot->canseecloaked = true;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -307,10 +307,10 @@ u32 botactGetProjectileThrowInterval(u32 weapon)
|
||||
{
|
||||
switch (weapon) {
|
||||
case WEAPON_COMBATKNIFE:
|
||||
return PALDOWN(120);
|
||||
return TICKS(120);
|
||||
case WEAPON_GRENADE:
|
||||
case WEAPON_NBOMB:
|
||||
return PALDOWN(90);
|
||||
return TICKS(90);
|
||||
case WEAPON_CROSSBOW:
|
||||
case WEAPON_TRANQUILIZER:
|
||||
case WEAPON_LASER:
|
||||
@@ -318,7 +318,7 @@ u32 botactGetProjectileThrowInterval(u32 weapon)
|
||||
case WEAPON_PROXIMITYMINE:
|
||||
case WEAPON_REMOTEMINE:
|
||||
default:
|
||||
return PALDOWN(60);
|
||||
return TICKS(60);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -138,7 +138,7 @@ void botcmdTickDistMode(struct chrdata *chr)
|
||||
if (!insight) {
|
||||
newmode = BOTDISTMODE_ADVANCE;
|
||||
aibot->unk050 = targetprop;
|
||||
aibot->unk09d = PALDOWN(20) + (random() % PALDOWN(120));
|
||||
aibot->unk09d = TICKS(20) + (random() % TICKS(120));
|
||||
} else if (aibot->unk050) {
|
||||
if (aibot->unk09d > g_Vars.lvupdate240_60) {
|
||||
aibot->unk09d -= g_Vars.lvupdate240_60;
|
||||
@@ -178,7 +178,7 @@ void botcmdTickDistMode(struct chrdata *chr)
|
||||
break;
|
||||
}
|
||||
|
||||
aibot->distmodettl60 = PALDOWN(60);
|
||||
aibot->distmodettl60 = TICKS(60);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+12
-12
@@ -79,7 +79,7 @@ struct aibotweaponpreference g_AibotWeaponPreferences[] = {
|
||||
/*0x2e*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_EYESPY
|
||||
/*0x2f*/ { 4, 4, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_XRAYSCANNER
|
||||
/*0x30*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_IRSCANNER
|
||||
/*0x31*/ { 218, 218, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, PALDOWN(1200), 0, 0, 0, 1, 0 }, // WEAPON_CLOAKINGDEVICE
|
||||
/*0x31*/ { 218, 218, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, TICKS(1200), 0, 0, 0, 1, 0 }, // WEAPON_CLOAKINGDEVICE
|
||||
/*0x32*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_HORIZONSCANNER
|
||||
/*0x33*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_TESTER
|
||||
/*0x34*/ { 0, 0, 0, 0, 0, 0, BOTDISTCFG_DEFAULT, BOTDISTCFG_DEFAULT, 0, 0, 0, 0, 1, 0 }, // WEAPON_ROCKETLAUNCHER_34
|
||||
@@ -684,7 +684,7 @@ void botinvScoreWeapon(struct chrdata *chr, s32 weaponnum, s32 funcnum, s32 arg3
|
||||
score2 = 0;
|
||||
}
|
||||
} else {
|
||||
if (comparewithtarget && chr->target != -1 && chrGetTargetProp(chr)->chr->blurdrugamount > PALDOWN(3500)) {
|
||||
if (comparewithtarget && chr->target != -1 && chrGetTargetProp(chr)->chr->blurdrugamount > TICKS(3500)) {
|
||||
score1 = 0;
|
||||
score2 = 0;
|
||||
} else {
|
||||
@@ -705,7 +705,7 @@ void botinvScoreWeapon(struct chrdata *chr, s32 weaponnum, s32 funcnum, s32 arg3
|
||||
if (chr->aibot->config->difficulty <= BOTDIFF_MEAT) {
|
||||
score1 = 0;
|
||||
score2 = 0;
|
||||
} else if (bluramount > PALDOWN(3500) && (chr->aibot->random1 % 2) == 0) {
|
||||
} else if (bluramount > TICKS(3500) && (chr->aibot->random1 % 2) == 0) {
|
||||
score1 = chr->aibot->random1 % 140 + 48;
|
||||
score2 = 188;
|
||||
} else if (chr->aibot->random1 % 10 == 0) {
|
||||
@@ -716,15 +716,15 @@ void botinvScoreWeapon(struct chrdata *chr, s32 weaponnum, s32 funcnum, s32 arg3
|
||||
score2 = 0;
|
||||
}
|
||||
} else {
|
||||
if (bluramount >= PALDOWN(5000)) {
|
||||
if (bluramount >= TICKS(5000)) {
|
||||
score2 = 48;
|
||||
|
||||
if (chr->aibot->random1 % 2) {
|
||||
score1 = 0;
|
||||
score2 = 0;
|
||||
}
|
||||
} else if (bluramount > PALDOWN(3500)) {
|
||||
u32 value = (-bluramount * 16 + (PAL ? 66656 : 80000)) / PALDOWN(1500);
|
||||
} else if (bluramount > TICKS(3500)) {
|
||||
u32 value = (-bluramount * 16 + (PAL ? 66656 : 80000)) / TICKS(1500);
|
||||
|
||||
if (value > 15) {
|
||||
value = 15;
|
||||
@@ -761,7 +761,7 @@ void botinvScoreWeapon(struct chrdata *chr, s32 weaponnum, s32 funcnum, s32 arg3
|
||||
f32 float2;
|
||||
|
||||
if (g_Vars.lvframe60 > 0) {
|
||||
killrate = g_Vars.totalkills * PALDOWN(3600.0f) / (f32)(g_Vars.lvframe60 * g_MpNumChrs);
|
||||
killrate = g_Vars.totalkills * TICKS(3600.0f) / (f32)(g_Vars.lvframe60 * g_MpNumChrs);
|
||||
|
||||
if (killrate < 1) {
|
||||
killrate = 1;
|
||||
@@ -771,7 +771,7 @@ void botinvScoreWeapon(struct chrdata *chr, s32 weaponnum, s32 funcnum, s32 arg3
|
||||
weaponindex = mpGetWeaponSlotByWeaponNum(weaponnum);
|
||||
|
||||
if (weaponindex >= 0) {
|
||||
float2 = ceilf(chr->aibot->equipdurations60[weaponindex][funcnum] * (1.0f / PALDOWN(3600.0f)));
|
||||
float2 = ceilf(chr->aibot->equipdurations60[weaponindex][funcnum] * (1.0f / TICKS(3600.0f)));
|
||||
|
||||
if (float2 > 0) {
|
||||
float1 = chr->aibot->killsbygunfunc[weaponindex][funcnum];
|
||||
@@ -885,7 +885,7 @@ void botinvTick(struct chrdata *chr)
|
||||
aibot->dampensuicidesttl60 -= g_Vars.lvupdate240_60;
|
||||
|
||||
if (aibot->dampensuicidesttl60 < 0) {
|
||||
aibot->dampensuicidesttl60 = PALDOWN(3600) + random() % PALDOWN(60);
|
||||
aibot->dampensuicidesttl60 = TICKS(3600) + random() % TICKS(60);
|
||||
|
||||
for (i = 0; i < 6; i++) {
|
||||
aibot->suicidesbygunfunc[i][0] *= 0.9f;
|
||||
@@ -897,7 +897,7 @@ void botinvTick(struct chrdata *chr)
|
||||
aibot->unk2a4 -= g_Vars.lvupdate240_60;
|
||||
|
||||
if (aibot->unk2a4 < 0) {
|
||||
aibot->unk2a4 = PALDOWN(600) + random() % PALDOWN(3000);
|
||||
aibot->unk2a4 = TICKS(600) + random() % TICKS(3000);
|
||||
|
||||
for (i = 0; i < 6; i++) {
|
||||
if (aibot->config->difficulty == BOTDIFF_MEAT) {
|
||||
@@ -915,7 +915,7 @@ void botinvTick(struct chrdata *chr)
|
||||
aibot->random1ttl60 -= g_Vars.lvupdate240_60;
|
||||
|
||||
if (aibot->random1ttl60 < 0) {
|
||||
aibot->random1ttl60 = PALDOWN(120) + random() % PALDOWN(600);
|
||||
aibot->random1ttl60 = TICKS(120) + random() % TICKS(600);
|
||||
aibot->random1 = random();
|
||||
}
|
||||
|
||||
@@ -1044,7 +1044,7 @@ bool botinvSwitchToWeapon(struct chrdata *chr, s32 weaponnum, s32 funcnum)
|
||||
changingfunc = funcnum != aibot->gunfunc;
|
||||
|
||||
if (changinggun) {
|
||||
aibot->changeguntimer60 = PALDOWN(60);
|
||||
aibot->changeguntimer60 = TICKS(60);
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
aibot->cyclonedischarging[i] = false;
|
||||
|
||||
@@ -43,7 +43,7 @@ void casingTick(struct casing *casing)
|
||||
&& g_Vars.currentplayer->hands[1].mode != HANDMODE_2) {
|
||||
sp58 = random() * (1.0f / U32_MAX) * 0.25f + 0.98f;
|
||||
|
||||
var8009d0d8 = PALDOWN(20);
|
||||
var8009d0d8 = TICKS(20);
|
||||
sndStart(var80095200, SFX_8051, &g_CasingAudioHandles[i], -1, -1, -1.0f, -1, -1);
|
||||
|
||||
if (g_CasingAudioHandles[i]) {
|
||||
|
||||
+19
-19
@@ -1283,7 +1283,7 @@ void chrInit(struct prop *prop, u8 *ailist)
|
||||
chr->bdlist[i++] = 0;
|
||||
}
|
||||
|
||||
chr->talktimer = PALDOWN(3600);
|
||||
chr->talktimer = TICKS(3600);
|
||||
chr->cloakfadefrac = 0;
|
||||
chr->cloakfadefinished = false;
|
||||
chr->inlift = false;
|
||||
@@ -1335,7 +1335,7 @@ void chrInit(struct prop *prop, u8 *ailist)
|
||||
chr->p1p2 = g_Vars.bondplayernum;
|
||||
chr->lastattacker = NULL;
|
||||
chr->race = RACE_HUMAN;
|
||||
chr->aimtesttimer60 = random() % PALDOWN(30);
|
||||
chr->aimtesttimer60 = random() % TICKS(30);
|
||||
chr->lastfootsample = 0;
|
||||
chr->poisoncounter = 0;
|
||||
chr->poisonprop = NULL;
|
||||
@@ -1614,10 +1614,10 @@ f32 chrGetFlinchAmount(struct chrdata *chr)
|
||||
value = 1 - sinf((value - 4) * (PAL ? 0.07478791475296f : 0.060405626893044f));
|
||||
}
|
||||
} else {
|
||||
if (value < PALDOWN(10)) {
|
||||
value = sinf(value * 1.5705462694168f / PALDOWN(10));
|
||||
if (value < TICKS(10)) {
|
||||
value = sinf(value * 1.5705462694168f / TICKS(10));
|
||||
} else {
|
||||
value = 1 - sinf((value - PALDOWN(10)) * (PAL ? 0.098159141838551f : 0.078527316451073f));
|
||||
value = 1 - sinf((value - TICKS(10)) * (PAL ? 0.098159141838551f : 0.078527316451073f));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1795,7 +1795,7 @@ void chrHandleJointPositioned(s32 joint, Mtxf *mtx)
|
||||
}
|
||||
|
||||
// Apply head bobbing when dizzy
|
||||
if (g_CurModelChr->blurdrugamount > PALDOWN(1000)
|
||||
if (g_CurModelChr->blurdrugamount > TICKS(1000)
|
||||
&& g_Vars.tickmode != TICKMODE_CUTSCENE
|
||||
&& g_CurModelChr->actiontype != ACT_DEAD
|
||||
&& g_CurModelChr->actiontype != ACT_DIE) {
|
||||
@@ -2319,7 +2319,7 @@ void chrUncloak(struct chrdata *chr, bool value)
|
||||
void chrUncloakTemporarily(struct chrdata *chr)
|
||||
{
|
||||
chrUncloak(chr, true);
|
||||
chr->cloakpause = PALDOWN(120);
|
||||
chr->cloakpause = TICKS(120);
|
||||
}
|
||||
|
||||
void chrUpdateCloak(struct chrdata *chr)
|
||||
@@ -2509,9 +2509,9 @@ void chrSetPoisoned(struct chrdata *chr, struct prop *poisonprop)
|
||||
|
||||
if (g_Vars.normmplayerisrunning) {
|
||||
chr->poisonprop = poisonprop;
|
||||
chr->poisoncounter += PALDOWN(3360);
|
||||
chr->poisoncounter += TICKS(3360);
|
||||
} else if (chr->poisoncounter == 0) {
|
||||
chr->poisoncounter = PALDOWN(1680);
|
||||
chr->poisoncounter = TICKS(1680);
|
||||
chr->poisonprop = poisonprop;
|
||||
}
|
||||
}
|
||||
@@ -2528,8 +2528,8 @@ void chrTickPoisoned(struct chrdata *chr)
|
||||
if (!g_Vars.normmplayerisrunning) {
|
||||
chr->poisoncounter = 0;
|
||||
} else {
|
||||
if (chr->poisoncounter > PALDOWN(3600)) {
|
||||
chr->poisoncounter = PALDOWN(3600);
|
||||
if (chr->poisoncounter > TICKS(3600)) {
|
||||
chr->poisoncounter = TICKS(3600);
|
||||
}
|
||||
|
||||
if (g_MpSetup.options & MPOPTION_ONEHITKILLS) {
|
||||
@@ -2540,8 +2540,8 @@ void chrTickPoisoned(struct chrdata *chr)
|
||||
&& g_Vars.players[playermgrGetPlayerNumByProp(chr->prop)]->bondhealth < 0.001f) {
|
||||
// Player who's alive but on almost zero health
|
||||
if (g_Vars.normmplayerisrunning) {
|
||||
if (chr->poisoncounter > PALDOWN(3600)) {
|
||||
chr->poisoncounter = PALDOWN(3600);
|
||||
if (chr->poisoncounter > TICKS(3600)) {
|
||||
chr->poisoncounter = TICKS(3600);
|
||||
}
|
||||
|
||||
if (g_MpSetup.options & MPOPTION_ONEHITKILLS) {
|
||||
@@ -2559,12 +2559,12 @@ void chrTickPoisoned(struct chrdata *chr)
|
||||
}
|
||||
|
||||
chr->poisoncounter = 0;
|
||||
} else if (chr->poisoncounter < PALDOWN(1680)) {
|
||||
} else if (chr->poisoncounter < TICKS(1680)) {
|
||||
chr->blurdrugamount += g_Vars.lvupdate240 * 10;
|
||||
}
|
||||
|
||||
if (g_Vars.normmplayerisrunning) {
|
||||
if (chr->poisoncounter / PALDOWN(720) != (chr->poisoncounter + g_Vars.lvupdate240) / PALDOWN(720)) {
|
||||
if (chr->poisoncounter / TICKS(720) != (chr->poisoncounter + g_Vars.lvupdate240) / TICKS(720)) {
|
||||
chrDamageByMisc(chr, 1.3f, &coord, &gset, chr->poisonprop);
|
||||
}
|
||||
}
|
||||
@@ -2649,7 +2649,7 @@ s32 chrTick(struct prop *prop)
|
||||
if (g_Vars.in_cutscene) {
|
||||
chr->drugheadcount = 0;
|
||||
chr->drugheadsway = 0;
|
||||
} else if (chr->blurdrugamount > PALDOWN(1000) && chr->actiontype != ACT_DRUGGEDKO) {
|
||||
} else if (chr->blurdrugamount > TICKS(1000) && chr->actiontype != ACT_DRUGGEDKO) {
|
||||
chr->drugheadcount += g_Vars.lvupdate240 >> 1;
|
||||
chr->drugheadsway = cosf(chr->drugheadcount / 255.0f * M_BADTAU) * 20.0f;
|
||||
} else if (chr->drugheadsway != 0.0f) {
|
||||
@@ -3628,7 +3628,7 @@ Gfx *chrRender(struct prop *prop, Gfx *gdl, bool withalpha)
|
||||
}
|
||||
|
||||
if (chr->aibot && chr->aibot->unk058 > 0) {
|
||||
alpha = (f32)alpha * (PALDOWN(120) - chr->aibot->unk058) * (PAL ? 0.01f : 0.0083333337679505f);
|
||||
alpha = (f32)alpha * (TICKS(120) - chr->aibot->unk058) * (PAL ? 0.01f : 0.0083333337679505f);
|
||||
}
|
||||
|
||||
chrGetBloodColour(chr->bodynum, spec, NULL);
|
||||
@@ -11170,7 +11170,7 @@ void shieldhitsTick(void)
|
||||
if (g_ShieldHitActive) {
|
||||
for (i = 0; i < 20; i++) {
|
||||
if (g_ShieldHits[i].prop) {
|
||||
if (g_ShieldHits[i].lvframe60 >= g_Vars.lvframe60 - PALDOWN(80)) {
|
||||
if (g_ShieldHits[i].lvframe60 >= g_Vars.lvframe60 - TICKS(80)) {
|
||||
changed = true;
|
||||
g_ShieldHits[i].shield += (propGetShieldThing(&g_ShieldHits[i].prop) - g_ShieldHits[i].shield) * g_Vars.lvupdate240f * (PAL ? 0.0151515156f : 0.0125f);
|
||||
}
|
||||
@@ -11204,7 +11204,7 @@ void shieldhitsTick(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (time60 < PALDOWN(30)) {
|
||||
if (time60 < TICKS(30)) {
|
||||
g_ShieldHits[i].unk018[j] = time60;
|
||||
} else {
|
||||
g_ShieldHits[i].unk018[j] = -2;
|
||||
|
||||
+49
-49
@@ -2468,10 +2468,10 @@ void chrAttackWalk(struct chrdata *chr, bool run)
|
||||
|
||||
chr->act_attackwalk.frame60count = 0;
|
||||
#if PAL
|
||||
// This is really PALDOWN(400.0f), but off by one bit :(
|
||||
chr->act_attackwalk.frame60max = random() % (s32)(333.33331298828f * var80062cac) + PALDOWN(120);
|
||||
// This is really TICKS(400.0f), but off by one bit :(
|
||||
chr->act_attackwalk.frame60max = random() % (s32)(333.33331298828f * var80062cac) + TICKS(120);
|
||||
#else
|
||||
chr->act_attackwalk.frame60max = random() % (s32)(400 * var80062cac) + PALDOWN(120);
|
||||
chr->act_attackwalk.frame60max = random() % (s32)(400 * var80062cac) + TICKS(120);
|
||||
#endif
|
||||
chr->act_attackwalk.facedtarget = false;
|
||||
chr->act_attackwalk.animcfg = animcfg;
|
||||
@@ -3118,7 +3118,7 @@ void chrBeginDeath(struct chrdata *chr, struct coord *dir, f32 relangle, s32 hit
|
||||
|
||||
chr->act_die.notifychrindex = 0;
|
||||
chr->act_die.timeextra = 0;
|
||||
chr->act_die.drcarollimagedelay = PALDOWN(45);
|
||||
chr->act_die.drcarollimagedelay = TICKS(45);
|
||||
chr->act_die.thudframe1 = -1;
|
||||
chr->act_die.thudframe2 = -1;
|
||||
|
||||
@@ -3675,7 +3675,7 @@ void chrYeetFromPos(struct chrdata *chr, struct coord *exppos, f32 force)
|
||||
chr->act_die.thudframe1 = row->thudframe;
|
||||
chr->act_die.thudframe2 = -1;
|
||||
chr->act_die.timeextra = 0;
|
||||
chr->act_die.drcarollimagedelay = PALDOWN(45);
|
||||
chr->act_die.drcarollimagedelay = TICKS(45);
|
||||
|
||||
if (chr->race == RACE_DRCAROLL) {
|
||||
chr->drcarollimage_left = 1 + (s32)((random() % 400) * 0.01f);
|
||||
@@ -3693,22 +3693,22 @@ void chrYeetFromPos(struct chrdata *chr, struct coord *exppos, f32 force)
|
||||
|
||||
s32 gsetGetBlurAmount(struct gset *gset)
|
||||
{
|
||||
s32 amount = PALDOWN(1000);
|
||||
s32 amount = TICKS(1000);
|
||||
|
||||
if (g_Vars.normmplayerisrunning == false) {
|
||||
amount = PALDOWN(250);
|
||||
amount = TICKS(250);
|
||||
}
|
||||
|
||||
if (gset->weaponnum == WEAPON_TRANQUILIZER) {
|
||||
amount = PALDOWN(2000);
|
||||
amount = TICKS(2000);
|
||||
}
|
||||
|
||||
if (gset->weaponnum == WEAPON_BOLT) {
|
||||
amount = PALDOWN(5000);
|
||||
amount = TICKS(5000);
|
||||
}
|
||||
|
||||
if (gset->weaponnum == WEAPON_NBOMB) {
|
||||
amount = PALDOWN(100);
|
||||
amount = TICKS(100);
|
||||
}
|
||||
|
||||
return amount;
|
||||
@@ -3842,7 +3842,7 @@ void chrChoke(struct chrdata *chr, s32 choketype)
|
||||
SFX_ARGH_DRCAROLL_025A,
|
||||
};
|
||||
|
||||
if (g_DrCarollDyingTimer > PALDOWN(10)) {
|
||||
if (g_DrCarollDyingTimer > TICKS(10)) {
|
||||
g_DrCarollDyingTimer = 0;
|
||||
|
||||
soundnum = sounds[nextindexdrcaroll];
|
||||
@@ -4769,7 +4769,7 @@ void chrDamage(struct chrdata *chr, f32 damage, struct coord *vector, struct gse
|
||||
if (!achr
|
||||
|| !achr->aibot
|
||||
|| !gsetHasFunctionFlags(gset, FUNCFLAG_00400000)
|
||||
|| chr->blurdrugamount < PALDOWN(4500)) {
|
||||
|| chr->blurdrugamount < TICKS(4500)) {
|
||||
chr->blurdrugamount += gsetGetBlurAmount(gset) * blurscale;
|
||||
}
|
||||
|
||||
@@ -4890,7 +4890,7 @@ void chrDamage(struct chrdata *chr, f32 damage, struct coord *vector, struct gse
|
||||
chr->blurdrugamount += gsetGetBlurAmount(gset);
|
||||
chr->blurnumtimesdied = 0;
|
||||
|
||||
if (!chr->aibot && chr->blurdrugamount >= PALDOWN(5000)) {
|
||||
if (!chr->aibot && chr->blurdrugamount >= TICKS(5000)) {
|
||||
onehitko = true;
|
||||
}
|
||||
}
|
||||
@@ -6821,7 +6821,7 @@ bool chrTryRunSideways(struct chrdata *chr)
|
||||
|
||||
if ((race == RACE_HUMAN || race == RACE_SKEDAR)
|
||||
&& chrIsReadyForOrders(chr)
|
||||
&& g_Vars.lvframe60 - chr->lastwalk60 > PALDOWN(180)) {
|
||||
&& g_Vars.lvframe60 - chr->lastwalk60 > TICKS(180)) {
|
||||
struct prop *prop = chr->prop;
|
||||
f32 distance = 200.0f + random() * (1.0f / U32_MAX) * 200.0f;
|
||||
struct coord vector;
|
||||
@@ -6867,7 +6867,7 @@ bool chrTryAttackWalk(struct chrdata *chr)
|
||||
|
||||
if (chrCanSeeAttackTarget(chr, &prop->pos, prop->rooms, false)
|
||||
&& (chrGetHeldUsableProp(chr, 0) || chrGetHeldUsableProp(chr, 1))
|
||||
&& g_Vars.lvframe60 - chr->lastwalk60 > PALDOWN(120)) {
|
||||
&& g_Vars.lvframe60 - chr->lastwalk60 > TICKS(120)) {
|
||||
struct prop *target = chrGetTargetProp(chr);
|
||||
f32 x = target->pos.x - prop->pos.x;
|
||||
f32 y = target->pos.y - prop->pos.y;
|
||||
@@ -6896,7 +6896,7 @@ bool chrTryAttackRun(struct chrdata *chr)
|
||||
|
||||
if (chrCanSeeAttackTarget(chr, &prop->pos, prop->rooms, false)
|
||||
&& (chrGetHeldUsableProp(chr, 0) || chrGetHeldUsableProp(chr, 1))
|
||||
&& g_Vars.lvframe60 - chr->lastwalk60 > PALDOWN(180)) {
|
||||
&& g_Vars.lvframe60 - chr->lastwalk60 > TICKS(180)) {
|
||||
struct prop *target = chrGetTargetProp(chr);
|
||||
f32 x = target->pos.x - prop->pos.x;
|
||||
f32 y = target->pos.y - prop->pos.y;
|
||||
@@ -7671,7 +7671,7 @@ bool chrDropItem(struct chrdata *chr, u32 modelnum, u32 weaponnum)
|
||||
if (weapon && weapon->base.prop) {
|
||||
modelSetScale(weapon->base.model, weapon->base.model->scale);
|
||||
propReparent(weapon->base.prop, chr->prop);
|
||||
weapon->timer240 = PALDOWN(720);
|
||||
weapon->timer240 = TICKS(720);
|
||||
objSetDropped(weapon->base.prop, DROPTYPE_DEFAULT);
|
||||
chr->hidden |= CHRHFLAG_00000001;
|
||||
|
||||
@@ -8183,7 +8183,7 @@ void chrTickDead(struct chrdata *chr)
|
||||
if (chr->act_dead.fadetimer60 >= 0) {
|
||||
chr->act_dead.fadetimer60 += g_Vars.lvupdate240_60;
|
||||
|
||||
if (chr->act_dead.fadetimer60 >= PALDOWN(90)) {
|
||||
if (chr->act_dead.fadetimer60 >= TICKS(90)) {
|
||||
// Fade finished
|
||||
chr->fadealpha = 0;
|
||||
|
||||
@@ -8194,7 +8194,7 @@ void chrTickDead(struct chrdata *chr)
|
||||
}
|
||||
} else {
|
||||
// Still fading
|
||||
chr->fadealpha = (PALDOWN(90) - chr->act_dead.fadetimer60) * 255 / PALDOWN(90);
|
||||
chr->fadealpha = (TICKS(90) - chr->act_dead.fadetimer60) * 255 / TICKS(90);
|
||||
}
|
||||
} else {
|
||||
// If fade has been triggered (this can happen when the corpse is on
|
||||
@@ -8211,7 +8211,7 @@ void chrTickDead(struct chrdata *chr)
|
||||
chr->act_dead.invistimer60 += g_Vars.lvupdate240_60;
|
||||
}
|
||||
|
||||
if (chr->act_dead.fadewheninvis && chr->act_dead.invistimer60 >= PALDOWN(120)) {
|
||||
if (chr->act_dead.fadewheninvis && chr->act_dead.invistimer60 >= TICKS(120)) {
|
||||
// Remove corpse (off-screen)
|
||||
if (aibot == NULL) {
|
||||
chr->hidden |= CHRHFLAG_REAPED;
|
||||
@@ -8346,7 +8346,7 @@ void chrTickDie(struct chrdata *chr)
|
||||
if (race == RACE_DRCAROLL) {
|
||||
struct prop *prop = chr->prop;
|
||||
|
||||
if (g_DrCarollDyingTimer > PALDOWN(120) && chr->voicebox) {
|
||||
if (g_DrCarollDyingTimer > TICKS(120) && chr->voicebox) {
|
||||
// Play speech
|
||||
u16 phrases[] = {
|
||||
SFX_DRCAROLL_SYSTEMS_FAILURE,
|
||||
@@ -8366,12 +8366,12 @@ void chrTickDie(struct chrdata *chr)
|
||||
if (chr->act_die.drcarollimagedelay > 0) {
|
||||
chr->act_die.drcarollimagedelay -= g_Vars.lvupdate240_60;
|
||||
} else {
|
||||
chr->act_die.drcarollimagedelay = (random() % PALDOWN(1000)) * 0.01f + 5.0f;
|
||||
chr->act_die.drcarollimagedelay = (random() % TICKS(1000)) * 0.01f + 5.0f;
|
||||
chr->drcarollimage_left = 1 + (s32)((random() % 400) * 0.01f);
|
||||
chr->drcarollimage_right = 1 + (s32)((random() % 400) * 0.01f);
|
||||
}
|
||||
|
||||
if (g_DrCarollDyingTimer > PALDOWN(310)) {
|
||||
if (g_DrCarollDyingTimer > TICKS(310)) {
|
||||
// Explode
|
||||
func0f0926bc(prop, 1, 0xffff);
|
||||
explosionCreateSimple(prop, &prop->pos, prop->rooms, EXPLOSIONTYPE_8, g_Vars.currentplayernum);
|
||||
@@ -8587,10 +8587,10 @@ void chrTickDruggedKo(struct chrdata *chr)
|
||||
if (chr->act_dead.fadetimer60 >= 0) {
|
||||
chr->act_dead.fadetimer60 += g_Vars.lvupdate240_60;
|
||||
|
||||
if (chr->act_dead.fadetimer60 >= PALDOWN(90)) {
|
||||
if (chr->act_dead.fadetimer60 >= TICKS(90)) {
|
||||
reap = true;
|
||||
} else {
|
||||
chr->fadealpha = (PALDOWN(90) - chr->act_dead.fadetimer60) * 255 / PALDOWN(90);
|
||||
chr->fadealpha = (TICKS(90) - chr->act_dead.fadetimer60) * 255 / TICKS(90);
|
||||
}
|
||||
} else if ((chr->chrflags & CHRCFLAG_KEEPCORPSEKO) == 0) {
|
||||
if (chr->act_dead.fadenow) {
|
||||
@@ -8603,7 +8603,7 @@ void chrTickDruggedKo(struct chrdata *chr)
|
||||
chr->act_dead.invistimer60 += g_Vars.lvupdate240_60;
|
||||
}
|
||||
|
||||
if (chr->act_dead.fadewheninvis && chr->act_dead.invistimer60 >= PALDOWN(120)) {
|
||||
if (chr->act_dead.fadewheninvis && chr->act_dead.invistimer60 >= TICKS(120)) {
|
||||
reap = true;
|
||||
}
|
||||
}
|
||||
@@ -15393,7 +15393,7 @@ glabel var7f1a9184
|
||||
// if (chr->aibot
|
||||
// && chr->aibot->weaponnum == WEAPON_REAPER
|
||||
// && chr->aibot->gunfunc == FUNC_PRIMARY) {
|
||||
// sp208 = (PALDOWN(90) - chr->aibot->reaperspeed[handnum]);
|
||||
// sp208 = (TICKS(90) - chr->aibot->reaperspeed[handnum]);
|
||||
// sp208 *= 1.0f / 1.8f;
|
||||
// tickspershot *= sp208 + 1;
|
||||
// }
|
||||
@@ -16054,7 +16054,7 @@ void chrTickFire(struct chrdata *chr)
|
||||
return;
|
||||
}
|
||||
|
||||
if (chr->act_attack.lastontarget60 < chr->act_attack.lastfire60 - PALDOWN(30)
|
||||
if (chr->act_attack.lastontarget60 < chr->act_attack.lastfire60 - TICKS(30)
|
||||
&& model->anim->animnum2 == 0
|
||||
&& curframe > chr->act_attack.animcfg->unk18 + 10
|
||||
&& curframe < chr->act_attack.animcfg->unk1c
|
||||
@@ -16175,7 +16175,7 @@ void chrTickFire(struct chrdata *chr)
|
||||
f32 f12 = chr->act_attack.animcfg->unk1c - chr->act_attack.animcfg->unk18;
|
||||
|
||||
if (f12 < 30) {
|
||||
if (chr->act_attack.pausecount >= PALDOWN(60) - (s32)(PAL ? f12 * (50.0f / 60.0f) : f12) * 2) {
|
||||
if (chr->act_attack.pausecount >= TICKS(60) - (s32)(PAL ? f12 * (50.0f / 60.0f) : f12) * 2) {
|
||||
modelSetAnimSpeed(model, 0.5f, 0);
|
||||
} else {
|
||||
modelSetAnimSpeed(model, 0.1f, 0);
|
||||
@@ -17211,7 +17211,7 @@ void chrTickThrowGrenade(struct chrdata *chr)
|
||||
weapon = weaponprop->weapon;
|
||||
objSetDropped(weaponprop, DROPTYPE_THROWGRENADE);
|
||||
chr->hidden |= CHRHFLAG_00000001;
|
||||
weapon->timer240 = PALDOWN(240);
|
||||
weapon->timer240 = TICKS(240);
|
||||
}
|
||||
|
||||
frame2 = modelGetCurAnimFrame(model);
|
||||
@@ -17239,7 +17239,7 @@ bool chrDetectDangerousObject(struct chrdata *chr, u8 flags)
|
||||
if (prop) {
|
||||
if ((flags & 1) && prop->weapon &&
|
||||
prop->weapon->weaponnum == WEAPON_GRENADE &&
|
||||
prop->weapon->timer240 < PALDOWN(480)) {
|
||||
prop->weapon->timer240 < TICKS(480)) {
|
||||
pass = true;
|
||||
}
|
||||
|
||||
@@ -17300,7 +17300,7 @@ bool func0f043f2c(struct chrdata *chr, struct coord *runpos, u32 arg2, f32 *turn
|
||||
|
||||
if (chr->aibot) {
|
||||
if (chr->blurdrugamount > 0) {
|
||||
angle1 += chr->blurdrugamount * PALUPF(0.00031410926021636f) * sinf((g_Vars.lvframe60 % PALDOWN(1200)) * PALUPF(0.0052351541817188f));
|
||||
angle1 += chr->blurdrugamount * PALUPF(0.00031410926021636f) * sinf((g_Vars.lvframe60 % TICKS(1200)) * PALUPF(0.0052351541817188f));
|
||||
|
||||
if (angle1 >= M_BADTAU) {
|
||||
angle1 -= M_BADTAU;
|
||||
@@ -17384,7 +17384,7 @@ void chrTickAttackWalk(struct chrdata *chr)
|
||||
|
||||
// If stuck or time exceeded, stop
|
||||
if (chr->invalidmove == 1
|
||||
|| chr->lastmoveok60 < g_Vars.lvframe60 - PALDOWN(60)
|
||||
|| chr->lastmoveok60 < g_Vars.lvframe60 - TICKS(60)
|
||||
|| chr->act_attackwalk.frame60count > chr->act_attackwalk.frame60max) {
|
||||
if (modelGetCurAnimFrame(model) > modelGetNumAnimFrames(model) * 0.5f) {
|
||||
modelSetAnimSpeedAuto(model, 0, 16);
|
||||
@@ -17411,7 +17411,7 @@ void chrTickAttackWalk(struct chrdata *chr)
|
||||
chr->act_attackwalk.facedtarget = true;
|
||||
}
|
||||
|
||||
if (chr->act_attackwalk.frame60count > PALDOWN(20)) {
|
||||
if (chr->act_attackwalk.frame60count > TICKS(20)) {
|
||||
func0f03e9f4(chr, chr->act_attackwalk.animcfg,
|
||||
chr->act_attackwalk.firegun[HAND_LEFT],
|
||||
chr->act_attackwalk.firegun[HAND_RIGHT], 1);
|
||||
@@ -17419,7 +17419,7 @@ void chrTickAttackWalk(struct chrdata *chr)
|
||||
chrResetAimEndProperties(chr);
|
||||
}
|
||||
|
||||
if (chr->act_attackwalk.facedtarget && chr->act_attackwalk.frame60count > PALDOWN(30)) {
|
||||
if (chr->act_attackwalk.facedtarget && chr->act_attackwalk.frame60count > TICKS(30)) {
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (chr->act_attackwalk.firegun[i]) {
|
||||
if (!chr->act_attackwalk.everytick[i]) {
|
||||
@@ -17430,15 +17430,15 @@ void chrTickAttackWalk(struct chrdata *chr)
|
||||
|
||||
if (chr->act_attackwalk.everytick[1 - i]) {
|
||||
if (chr->act_attackwalk.singleshot[i]) {
|
||||
chr->act_attackwalk.nextshot60 += PALDOWN(90);
|
||||
chr->act_attackwalk.nextshot60 += TICKS(90);
|
||||
} else {
|
||||
chr->act_attackwalk.nextshot60 += PALDOWN(20);
|
||||
chr->act_attackwalk.nextshot60 += TICKS(20);
|
||||
}
|
||||
} else {
|
||||
if (chr->act_attackwalk.singleshot[i]) {
|
||||
chr->act_attackwalk.nextshot60 += PALDOWN(180);
|
||||
chr->act_attackwalk.nextshot60 += TICKS(180);
|
||||
} else {
|
||||
chr->act_attackwalk.nextshot60 += PALDOWN(40);
|
||||
chr->act_attackwalk.nextshot60 += TICKS(40);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17567,7 +17567,7 @@ void chrTickRunPos(struct chrdata *chr)
|
||||
chr->lastwalk60 = g_Vars.lvframe60;
|
||||
|
||||
if (chr->invalidmove == 1
|
||||
|| g_Vars.lvframe60 - PALDOWN(60) > chr->lastmoveok60
|
||||
|| g_Vars.lvframe60 - TICKS(60) > chr->lastmoveok60
|
||||
|| posIsArrivingLaterallyAtPos(&chr->prevpos, &prop->pos, &chr->act_runpos.pos, chr->act_runpos.neardist)) {
|
||||
if (race == RACE_HUMAN) {
|
||||
modelGetAnimNum(model);
|
||||
@@ -19114,7 +19114,7 @@ void chrTickGoPos(struct chrdata *chr)
|
||||
chr->act_gopos.waydata.age++;
|
||||
|
||||
// If stuck for 1 second
|
||||
if (chr->lastmoveok60 < g_Vars.lvframe60 - PALDOWN(60)) {
|
||||
if (chr->lastmoveok60 < g_Vars.lvframe60 - TICKS(60)) {
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
if (chr->goposforce >= 0) {
|
||||
// Try and warp the chr past whatever obstacle is blocking them?
|
||||
@@ -19138,7 +19138,7 @@ void chrTickGoPos(struct chrdata *chr)
|
||||
// eyespy, pad is nothing special and not in lift, then enter the magic move
|
||||
// mode.
|
||||
if (chr->act_gopos.waydata.mode != WAYMODE_MAGIC
|
||||
&& chr->act_gopos.waydata.lastvisible60 + PALDOWN(180) < g_Vars.lvframe60
|
||||
&& chr->act_gopos.waydata.lastvisible60 + TICKS(180) < g_Vars.lvframe60
|
||||
&& g_Vars.normmplayerisrunning == false
|
||||
&& chrIsRoomOffScreen(chr, &curwppos, curwprooms) // related to eyespy
|
||||
&& (curwpflags & (PADFLAG_AIWAITLIFT | PADFLAG_AIONLIFT)) == 0
|
||||
@@ -19412,7 +19412,7 @@ void chrTickPatrol(struct chrdata *chr)
|
||||
|
||||
// Consider starting magic
|
||||
if (chr->act_patrol.waydata.mode != WAYMODE_MAGIC
|
||||
&& g_Vars.lvframe60 > chr->act_patrol.waydata.lastvisible60 + PALDOWN(180)
|
||||
&& g_Vars.lvframe60 > chr->act_patrol.waydata.lastvisible60 + TICKS(180)
|
||||
&& !g_Vars.normmplayerisrunning
|
||||
&& chrIsRoomOffScreen(chr, &sp58, sp48)
|
||||
&& (flags & (PADFLAG_AIWAITLIFT | PADFLAG_AIONLIFT)) == 0
|
||||
@@ -19499,8 +19499,8 @@ bool chrStartSkJump(struct chrdata *chr, u8 arg1, u8 arg2, s32 arg3, u8 arg4)
|
||||
thing = sqrtf(diffs[0] * diffs[0] + diffs[1] * diffs[1]) * 2.5f / PALUPF(21.0f);
|
||||
time60 = thing;
|
||||
|
||||
if (time60 < PALDOWN(10)) {
|
||||
time60 = PALDOWN(10);
|
||||
if (time60 < TICKS(10)) {
|
||||
time60 = TICKS(10);
|
||||
}
|
||||
|
||||
chr->act_skjump.vel[0] = diffs[0] / time60;
|
||||
@@ -19649,7 +19649,7 @@ void chraTick(struct chrdata *chr)
|
||||
// Consider setting shootingatmelist
|
||||
if (chr->prop) {
|
||||
if (chr->aimtesttimer60 < 1) {
|
||||
chr->aimtesttimer60 = PALDOWN(30);
|
||||
chr->aimtesttimer60 = TICKS(30);
|
||||
|
||||
if (chr->aishootingatmelist >= 0
|
||||
&& ailistFindById(chr->aishootingatmelist) != chr->ailist
|
||||
@@ -21230,7 +21230,7 @@ glabel func0f048398
|
||||
|
||||
bool chrSawTargetRecently(struct chrdata *chr)
|
||||
{
|
||||
if (chr->lastseetarget60 > 0 && g_Vars.lvframe60 - chr->lastseetarget60 < PALDOWN(600)) {
|
||||
if (chr->lastseetarget60 > 0 && g_Vars.lvframe60 - chr->lastseetarget60 < TICKS(600)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -21239,7 +21239,7 @@ bool chrSawTargetRecently(struct chrdata *chr)
|
||||
|
||||
bool chrHeardTargetRecently(struct chrdata *chr)
|
||||
{
|
||||
if (chr->lastheartarget60 > 0 && g_Vars.lvframe60 - chr->lastheartarget60 < PALDOWN(600)) {
|
||||
if (chr->lastheartarget60 > 0 && g_Vars.lvframe60 - chr->lastheartarget60 < TICKS(600)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -22808,7 +22808,7 @@ struct prop *chrSpawnAtCoord(s32 bodynum, s32 headnum, struct coord *pos, s16 *r
|
||||
) {
|
||||
// If we've found a chr that's ready to be reaped, great.
|
||||
// Bail out of the loop.
|
||||
if (g_ChrSlots[index].act_dead.invistimer60 >= PALDOWN(120)) {
|
||||
if (g_ChrSlots[index].act_dead.invistimer60 >= TICKS(120)) {
|
||||
replacechr = &g_ChrSlots[index];
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -6016,7 +6016,7 @@ bool aiSetLights(void)
|
||||
roomSetLightsOn(roomnum, true);
|
||||
break;
|
||||
default:
|
||||
roomSetLighting(roomnum, cmd[4], cmd[5], cmd[6], PALDOWN(cmd[7]));
|
||||
roomSetLighting(roomnum, cmd[4], cmd[5], cmd[6], TICKS(cmd[7]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9822,7 +9822,7 @@ bool aiSetChrPresetToUnalertedTeammate(void)
|
||||
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
|
||||
s16 *chrnums = teamGetChrIds(g_Vars.chrdata->team);
|
||||
|
||||
if (g_Vars.chrdata->talktimer > PALDOWN(480) && g_Vars.chrdata->listening) {
|
||||
if (g_Vars.chrdata->talktimer > TICKS(480) && g_Vars.chrdata->listening) {
|
||||
g_Vars.chrdata->listening = 0;
|
||||
}
|
||||
|
||||
@@ -10417,9 +10417,9 @@ bool aiChrAdjustMotionBlur(void)
|
||||
|
||||
if (chr) {
|
||||
if (cmd[4] == 0) {
|
||||
chr->blurdrugamount -= PALDOWN(cmd[3]);
|
||||
chr->blurdrugamount -= TICKS(cmd[3]);
|
||||
} else {
|
||||
chr->blurdrugamount += PALDOWN(cmd[3]);
|
||||
chr->blurdrugamount += TICKS(cmd[3]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10711,7 +10711,7 @@ bool ai0184(void)
|
||||
bool aiIfSoundTimer(void)
|
||||
{
|
||||
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
|
||||
s32 value = PALDOWN(cmd[3] | (cmd[2] << 8));
|
||||
s32 value = TICKS(cmd[3] | (cmd[2] << 8));
|
||||
|
||||
if ((g_Vars.chrdata->soundtimer > value && cmd[4] == 0) ||
|
||||
(g_Vars.chrdata->soundtimer < value && cmd[4] == 1)) {
|
||||
|
||||
+10
-10
@@ -4855,7 +4855,7 @@ void creditsTick(void)
|
||||
var800a4168 = var800a4164;
|
||||
var800a4164 += g_Vars.diffframe240;
|
||||
var800a416c += g_Vars.diffframe240;
|
||||
var800a4160 = (var800a416c % PALDOWN(4800)) / PALDOWN(4800.0f);
|
||||
var800a4160 = (var800a416c % TICKS(4800)) / TICKS(4800.0f);
|
||||
|
||||
func0f13899c();
|
||||
|
||||
@@ -5062,10 +5062,10 @@ Gfx *creditsRender(Gfx *gdl)
|
||||
|
||||
creditsTick();
|
||||
|
||||
if (g_CreditsData->slidesenabled || g_CreditsData->unk4204 < PALDOWN(60) || g_CreditsData->unk4204 > PALDOWN(1200)) {
|
||||
if (g_CreditsData->slidesenabled || g_CreditsData->unk4204 < TICKS(60) || g_CreditsData->unk4204 > TICKS(1200)) {
|
||||
u32 stack;
|
||||
|
||||
if (!g_CreditsData->slidesenabled && g_CreditsData->unk4204 > PALDOWN(1200)) {
|
||||
if (!g_CreditsData->slidesenabled && g_CreditsData->unk4204 > TICKS(1200)) {
|
||||
if (!var8007f130) {
|
||||
var8007f130 = true;
|
||||
var8007f6dc = 0;
|
||||
@@ -5075,7 +5075,7 @@ Gfx *creditsRender(Gfx *gdl)
|
||||
|
||||
var8007f6dc += g_Vars.diffframe240;
|
||||
|
||||
if (var8007f6dc > PALDOWN(14400)) {
|
||||
if (var8007f6dc > TICKS(14400)) {
|
||||
var8007f6dc = 0;
|
||||
}
|
||||
|
||||
@@ -5083,7 +5083,7 @@ Gfx *creditsRender(Gfx *gdl)
|
||||
g_CreditsData->unk2ef0.unk524 = 0;
|
||||
g_CreditsData->unk2ef0.unk520 = g_CreditsData->unk2ef0.unk548 = -0.26175770163536;
|
||||
g_CreditsData->unk2ef0.unk528 = g_CreditsData->unk2ef0.unk550 = 0;
|
||||
g_CreditsData->unk2ef0.unk538 = 833.0f - (var8007f6dc / PALDOWN(14400.0f)) * 2413.0f;
|
||||
g_CreditsData->unk2ef0.unk538 = 833.0f - (var8007f6dc / TICKS(14400.0f)) * 2413.0f;
|
||||
g_CreditsData->unk2ef0.unk53c = PAL ? 65.86 : 70.86;
|
||||
g_CreditsData->unk2ef0.unk540 = -2050;
|
||||
g_CreditsData->unk2ef0.unk544 = 1.467;
|
||||
@@ -5123,12 +5123,12 @@ Gfx *creditsRender(Gfx *gdl)
|
||||
if (!g_CreditsData->slidesenabled) {
|
||||
u32 alpha = 0;
|
||||
|
||||
if (g_CreditsData->unk4204 < PALDOWN(60)) {
|
||||
alpha = g_CreditsData->unk4204 * 0xff / PALDOWN(60);
|
||||
if (g_CreditsData->unk4204 < TICKS(60)) {
|
||||
alpha = g_CreditsData->unk4204 * 0xff / TICKS(60);
|
||||
}
|
||||
|
||||
if (g_CreditsData->unk4204 > PALDOWN(1200) && g_CreditsData->unk4204 < PALDOWN(1260)) {
|
||||
alpha = 0xff - (g_CreditsData->unk4204 - PALDOWN(1200)) * 0xff / PALDOWN(60);
|
||||
if (g_CreditsData->unk4204 > TICKS(1200) && g_CreditsData->unk4204 < TICKS(1260)) {
|
||||
alpha = 0xff - (g_CreditsData->unk4204 - TICKS(1200)) * 0xff / TICKS(60);
|
||||
}
|
||||
|
||||
if (alpha) {
|
||||
@@ -5201,7 +5201,7 @@ void creditsInit(void)
|
||||
g_CreditsAltTitleRequested = false;
|
||||
|
||||
g_CreditsData->slidesenabled = false;
|
||||
g_CreditsData->unk4204 = PALDOWN(1140);
|
||||
g_CreditsData->unk4204 = TICKS(1140);
|
||||
}
|
||||
|
||||
playerConfigureVi();
|
||||
|
||||
@@ -131,7 +131,7 @@ f32 explosionGetHorizontalRangeAtFrame(struct explosion *exp, s32 frame)
|
||||
f32 changerate = PALUPF(type->changerateh);
|
||||
f32 result;
|
||||
|
||||
if (exp->type == EXPLOSIONTYPE_14 && frame > PALDOWN(32)) {
|
||||
if (exp->type == EXPLOSIONTYPE_14 && frame > TICKS(32)) {
|
||||
result = frame * PALUPF(3.0f) + 40.0f;
|
||||
|
||||
if (result > 300) {
|
||||
@@ -150,7 +150,7 @@ f32 explosionGetVerticalRangeAtFrame(struct explosion *exp, s32 frame)
|
||||
f32 changerate = PALUPF(type->changeratev);
|
||||
f32 result;
|
||||
|
||||
if (exp->type == EXPLOSIONTYPE_14 && frame > PALDOWN(32)) {
|
||||
if (exp->type == EXPLOSIONTYPE_14 && frame > TICKS(32)) {
|
||||
result = 20;
|
||||
} else {
|
||||
result = type->rangev + changerate * frame;
|
||||
|
||||
@@ -742,7 +742,7 @@ Gfx *getitleRender(Gfx *gdl)
|
||||
|
||||
gdl = func0f0155f0(gdl, var8009cc8c, (sp30 * sp2c) / 255);
|
||||
|
||||
if (var80062498 >= PALDOWN(1040) && var80062498 >= PALDOWN(1160)) {
|
||||
if (var80062498 >= TICKS(1040) && var80062498 >= TICKS(1160)) {
|
||||
var80062498 = 0;
|
||||
var80062414++;
|
||||
var80062414++;
|
||||
|
||||
@@ -3828,7 +3828,7 @@ void audioPlayFromProp2(s32 channelnum, s32 soundnum, s16 padnum, struct prop *p
|
||||
}
|
||||
|
||||
if (a1) {
|
||||
channel->unk1c = PALDOWN(arg4);
|
||||
channel->unk1c = TICKS(arg4);
|
||||
}
|
||||
|
||||
if (padnum != -1) {
|
||||
|
||||
@@ -602,7 +602,7 @@ u8 gsetGetFireslotDuration(struct gset *gset)
|
||||
}
|
||||
|
||||
if (result >= 4) {
|
||||
result = PALDOWN(result);
|
||||
result = TICKS(result);
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -655,7 +655,7 @@ s8 weaponGetNumTicksPerShot(u32 weaponnum, u32 funcindex)
|
||||
}
|
||||
|
||||
if (result > 3) {
|
||||
result = PALDOWN(result);
|
||||
result = TICKS(result);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
@@ -9818,7 +9818,7 @@ Gfx *func0f126c3c(Gfx *gdl, f32 x, f32 y, f32 z, f32 arg4, f32 arg5)
|
||||
|
||||
if (xpos >= viewleft && xpos < viewleft + viewwidth
|
||||
&& ypos >= viewtop && ypos < viewtop + viewheight) {
|
||||
gdl = func0f126384(gdl, xpos, ypos, arg5, arg4, PALDOWN(90), 1.0f);
|
||||
gdl = func0f126384(gdl, xpos, ypos, arg5, arg4, TICKS(90), 1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1276,10 +1276,10 @@ void hudmsgCreateFromArgs(char *text, s32 type, s32 conf00, s32 conf01, s32 conf
|
||||
hudmsgCalculatePosition(msg);
|
||||
|
||||
if (flags & HUDMSGFLAG_NOCHANNEL) {
|
||||
msg->showduration = PALDOWN(arg14);
|
||||
msg->showduration = TICKS(arg14);
|
||||
msg->channelnum = -1;
|
||||
} else {
|
||||
msg->showduration = PALDOWN(g_HudmsgTypes[type].duration);
|
||||
msg->showduration = TICKS(g_HudmsgTypes[type].duration);
|
||||
msg->channelnum = arg14;
|
||||
}
|
||||
}
|
||||
|
||||
+14
-14
@@ -607,8 +607,8 @@ bool lvCheckCmpFollowThreat(struct threat *threat, s32 index)
|
||||
if (chrIsDead(threat->prop->chr)) {
|
||||
if (index >= 0) {
|
||||
// Existing threat
|
||||
if (g_Vars.currentplayer->targetset[index] < PALDOWN(129)) {
|
||||
g_Vars.currentplayer->targetset[index] = PALDOWN(129);
|
||||
if (g_Vars.currentplayer->targetset[index] < TICKS(129)) {
|
||||
g_Vars.currentplayer->targetset[index] = TICKS(129);
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->targetset[index] >= (PAL ? 146 : 175)) {
|
||||
@@ -1121,14 +1121,14 @@ Gfx *lvRender(Gfx *gdl)
|
||||
if (chr->blurdrugamount > 0
|
||||
&& !g_Vars.currentplayer->invincible
|
||||
&& !g_Vars.currentplayer->training) {
|
||||
bluramount = (chr->blurdrugamount * 130) / PALDOWN(5000) + 100;
|
||||
bluramount = (chr->blurdrugamount * 130) / TICKS(5000) + 100;
|
||||
|
||||
if (bluramount > 230) {
|
||||
bluramount = 230;
|
||||
}
|
||||
|
||||
if (chr->blurdrugamount > PALDOWN(5000)) {
|
||||
chr->blurdrugamount = PALDOWN(5000);
|
||||
if (chr->blurdrugamount > TICKS(5000)) {
|
||||
chr->blurdrugamount = TICKS(5000);
|
||||
}
|
||||
|
||||
chr->blurdrugamount -= g_Vars.lvupdate240_60 * (chr->blurnumtimesdied + 1);
|
||||
@@ -1409,13 +1409,13 @@ Gfx *lvRender(Gfx *gdl)
|
||||
g_CutsceneStaticTimer -= g_Vars.diffframe60;
|
||||
|
||||
if (g_CutsceneStaticTimer < 0) {
|
||||
g_CutsceneStaticTimer = random() % PALDOWN(200) + PALDOWN(40);
|
||||
g_CutsceneStaticTimer = random() % TICKS(200) + TICKS(40);
|
||||
g_CutsceneStaticActive = false;
|
||||
}
|
||||
|
||||
gdl = bviewRenderFilmLens(gdl, 0xffffffff, 0xffffffff);
|
||||
|
||||
if (g_CutsceneStaticTimer < PALDOWN(15)) {
|
||||
if (g_CutsceneStaticTimer < TICKS(15)) {
|
||||
if (g_CutsceneStaticActive == false) {
|
||||
g_CutsceneStaticActive = true;
|
||||
sndStart(var80095200, SFX_INFIL_STATIC_MEDIUM, NULL, -1, -1, -1, -1, -1);
|
||||
@@ -1449,7 +1449,7 @@ Gfx *lvRender(Gfx *gdl)
|
||||
gdl = bviewRenderSlayerRocketLens(gdl, 0xffffffff, 0xffffffff);
|
||||
|
||||
if (g_Vars.currentplayer->badrockettime > 0) {
|
||||
u32 slayerstatic = g_Vars.currentplayer->badrockettime * 255 / PALDOWN(90);
|
||||
u32 slayerstatic = g_Vars.currentplayer->badrockettime * 255 / TICKS(90);
|
||||
|
||||
if (slayerstatic > 255) {
|
||||
slayerstatic = 255;
|
||||
@@ -1470,7 +1470,7 @@ Gfx *lvRender(Gfx *gdl)
|
||||
&& g_Vars.tickmode != TICKMODE_CUTSCENE) {
|
||||
s32 xraything = 99;
|
||||
|
||||
if (g_Vars.currentplayer->erasertime < PALDOWN(200)) {
|
||||
if (g_Vars.currentplayer->erasertime < TICKS(200)) {
|
||||
#if PAL
|
||||
xraything = 249 - ((g_Vars.currentplayer->erasertime * 180 / 50) >> 2);
|
||||
#else
|
||||
@@ -2183,7 +2183,7 @@ void lvTick(void)
|
||||
if (g_MpTimeLimit60 > 0) {
|
||||
s32 elapsed = g_StageTimeElapsed60;
|
||||
s32 nexttime = g_Vars.lvupdate240_60 + g_StageTimeElapsed60;
|
||||
s32 warntime = PALDOWN(g_MpTimeLimit60) - PALDOWN(3600);
|
||||
s32 warntime = TICKS(g_MpTimeLimit60) - TICKS(3600);
|
||||
|
||||
// Show HUD message at one minute remaining
|
||||
if (elapsed < warntime && nexttime >= warntime) {
|
||||
@@ -2195,16 +2195,16 @@ void lvTick(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (elapsed < PALDOWN(g_MpTimeLimit60) && nexttime >= PALDOWN(g_MpTimeLimit60)) {
|
||||
if (elapsed < TICKS(g_MpTimeLimit60) && nexttime >= TICKS(g_MpTimeLimit60)) {
|
||||
// Match is ending due to time limit reached
|
||||
mainEndStage();
|
||||
}
|
||||
|
||||
// Sound alarm at 10 seconds remaining
|
||||
if (nexttime >= PALDOWN(g_MpTimeLimit60) - PALDOWN(600)
|
||||
if (nexttime >= TICKS(g_MpTimeLimit60) - TICKS(600)
|
||||
&& g_MiscAudioHandle == NULL
|
||||
&& !lvIsPaused()
|
||||
&& nexttime < PALDOWN(g_MpTimeLimit60)) {
|
||||
&& nexttime < TICKS(g_MpTimeLimit60)) {
|
||||
snd00010718(&g_MiscAudioHandle, 0, 0x7fff, 0x40, 163, 1, 1, -1, 1);
|
||||
}
|
||||
}
|
||||
@@ -2257,7 +2257,7 @@ void lvTick(void)
|
||||
}
|
||||
|
||||
g_StageTimeElapsed60 += g_Vars.lvupdate240_60;
|
||||
g_StageTimeElapsed1f = g_StageTimeElapsed60 / PALDOWN(60.0f);
|
||||
g_StageTimeElapsed1f = g_StageTimeElapsed60 / TICKS(60.0f);
|
||||
|
||||
viSetUseZBuf(true);
|
||||
|
||||
|
||||
+4
-4
@@ -4872,8 +4872,8 @@ void func0f105948(s32 weaponnum)
|
||||
|
||||
func0f0f372c(&g_Menus[g_MpPlayerNum].unk840, 0, 0, 0, 0, 0, 0, 1, 1);
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.unk578 = PALDOWN(60);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk574 = PALDOWN(120);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk578 = TICKS(60);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk574 = TICKS(120);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk54c = -0.2f;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk524 = -0.2f;
|
||||
}
|
||||
@@ -4901,8 +4901,8 @@ s32 inventoryMenuDialog(s32 operation, struct menudialogdef *dialogdef, union ha
|
||||
|
||||
if (g_InventoryWeapon == WEAPON_DISGUISE40 || g_InventoryWeapon == WEAPON_DISGUISE41) {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk05c = ANIM_006A;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk578 = PALDOWN(60);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk574 = PALDOWN(120);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk578 = TICKS(60);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk574 = TICKS(120);
|
||||
}
|
||||
} else {
|
||||
var80072d88 = 255;
|
||||
|
||||
+6
-6
@@ -18459,7 +18459,7 @@ glabel var7f1b2ac8
|
||||
// if (item) {
|
||||
// if (item->type == MENUITEMTYPE_SLIDER || item->type == MENUITEMTYPE_10) {
|
||||
// if (g_Menus[g_MpPlayerNum].curdialog->dimmed) {
|
||||
// digitalrepeatinterval = PALDOWN(5);
|
||||
// digitalrepeatinterval = TICKS(5);
|
||||
// xdeadzone = 20;
|
||||
// stickintervalbase = 30;
|
||||
// xstickintervalmult = 10;
|
||||
@@ -18468,7 +18468,7 @@ glabel var7f1b2ac8
|
||||
//
|
||||
// if (item->type == MENUITEMTYPE_KEYBOARD) {
|
||||
// allowdiagonal = true;
|
||||
// digitalrepeatinterval = PALDOWN(5);
|
||||
// digitalrepeatinterval = TICKS(5);
|
||||
// xdeadzone = 20;
|
||||
// xstickintervalmult = 10;
|
||||
// ystickintervalmult = 10;
|
||||
@@ -18502,7 +18502,7 @@ glabel var7f1b2ac8
|
||||
// }
|
||||
//
|
||||
// // If held for 1 second, repeat faster
|
||||
// if (menu->xrepeattimer60 > PALDOWN(60)) {
|
||||
// if (menu->xrepeattimer60 > TICKS(60)) {
|
||||
// menu->xrepeatmode = MENUREPEATMODE_FAST;
|
||||
// }
|
||||
//
|
||||
@@ -18552,7 +18552,7 @@ glabel var7f1b2ac8
|
||||
// if (interval > 0) {
|
||||
//#if PAL
|
||||
// if (interval > 3) {
|
||||
// interval = PALDOWN(interval);
|
||||
// interval = TICKS(interval);
|
||||
// }
|
||||
//#endif
|
||||
// oldslot = menu->xrepeattimer60 / interval;
|
||||
@@ -18605,7 +18605,7 @@ glabel var7f1b2ac8
|
||||
// }
|
||||
//
|
||||
// // If held for 1 second, repeat faster
|
||||
// if (menu->yrepeattimer60 > PALDOWN(60)) {
|
||||
// if (menu->yrepeattimer60 > TICKS(60)) {
|
||||
// menu->yrepeatmode = MENUREPEATMODE_FAST;
|
||||
// }
|
||||
//
|
||||
@@ -18655,7 +18655,7 @@ glabel var7f1b2ac8
|
||||
// if (interval > 0) {
|
||||
//#if PAL
|
||||
// if (interval > 3) {
|
||||
// interval = PALDOWN(interval);
|
||||
// interval = TICKS(interval);
|
||||
// }
|
||||
//#endif
|
||||
//
|
||||
|
||||
@@ -1264,7 +1264,7 @@ Gfx *mpRenderModalText(Gfx *gdl)
|
||||
s32 countdowny = viGetViewTop() + viGetViewHeight() / 2 + textheight + 2;
|
||||
s32 coutndownx = viGetViewLeft() + viGetViewWidth() / 2;
|
||||
|
||||
sprintf(text, "%d\n", (g_Vars.currentplayer->deadtimer + PALDOWN(60) - 1) / PALDOWN(60));
|
||||
sprintf(text, "%d\n", (g_Vars.currentplayer->deadtimer + TICKS(60) - 1) / TICKS(60));
|
||||
|
||||
textMeasure(&textheight, &textwidth, text, g_CharsHandelGothicSm, g_FontHandelGothicSm, 0);
|
||||
x = coutndownx - textwidth / 2;
|
||||
@@ -4825,7 +4825,7 @@ glabel mpChooseTrack
|
||||
//
|
||||
// // 568
|
||||
// g_MpLockInfo.unk04 = tracknum;
|
||||
// g_MusicLife60 = g_MpTracks[tracknum].duration * PALDOWN(60);
|
||||
// g_MusicLife60 = g_MpTracks[tracknum].duration * TICKS(60);
|
||||
//
|
||||
// return g_MpTracks[tracknum].musicnum;
|
||||
// }
|
||||
@@ -4849,7 +4849,7 @@ glabel mpChooseTrack
|
||||
//
|
||||
// // 608
|
||||
// if (tracknum == -1) {
|
||||
// g_MusicLife60 = g_MpTracks[0].duration * PALDOWN(60);
|
||||
// g_MusicLife60 = g_MpTracks[0].duration * TICKS(60);
|
||||
// return g_MpTracks[0].musicnum;
|
||||
// }
|
||||
//
|
||||
@@ -4859,7 +4859,7 @@ glabel mpChooseTrack
|
||||
//
|
||||
// // 654
|
||||
// g_MpLockInfo.unk04 = tracknum;
|
||||
// g_MusicLife60 = g_MpTracks[tracknum].duration * PALDOWN(60);
|
||||
// g_MusicLife60 = g_MpTracks[tracknum].duration * TICKS(60);
|
||||
//
|
||||
// return g_MpTracks[tracknum].musicnum;
|
||||
// }
|
||||
@@ -4875,13 +4875,13 @@ glabel mpChooseTrack
|
||||
// } while (tracknum == g_MpLockInfo.unk04);
|
||||
//
|
||||
// g_MpLockInfo.unk04 = tracknum;
|
||||
// g_MusicLife60 = g_MpTracks[tracknum].duration * PALDOWN(60);
|
||||
// g_MusicLife60 = g_MpTracks[tracknum].duration * TICKS(60);
|
||||
// return g_MpTracks[tracknum].musicnum;
|
||||
// }
|
||||
//
|
||||
// tracknum = mpGetTrackNumAtSlotIndex(tracknum);
|
||||
// g_MpLockInfo.unk04 = tracknum;
|
||||
// g_MusicLife60 = g_MpTracks[g_MpLockInfo.unk04].duration * PALDOWN(60);
|
||||
// g_MusicLife60 = g_MpTracks[g_MpLockInfo.unk04].duration * TICKS(60);
|
||||
//
|
||||
// return g_MpTracks[tracknum].musicnum;
|
||||
//}
|
||||
|
||||
@@ -259,7 +259,7 @@ void htmTick(void)
|
||||
if (g_ScenarioData.htm.uplink == NULL || g_ScenarioData.htm.uplink->type != PROPTYPE_WEAPON) {
|
||||
var800869ec = NULL;
|
||||
} else {
|
||||
var800869ec->prop->timetoregen = PALDOWN(1200);
|
||||
var800869ec->prop->timetoregen = TICKS(1200);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -442,7 +442,7 @@ void htmTickChr(struct chrdata *chr)
|
||||
} else {
|
||||
*time += g_Vars.lvupdate240;
|
||||
|
||||
if (*time > 20 * PALDOWN(240)) {
|
||||
if (*time > 20 * TICKS(240)) {
|
||||
data->numpoints[playernum]++;
|
||||
data->playernuminrange = playernum;
|
||||
|
||||
@@ -490,7 +490,7 @@ Gfx *htmRenderHud(Gfx *gdl)
|
||||
a1 = viGetViewWidth() / 3;
|
||||
barleft = t6 - a1 / 2;
|
||||
barright = t6 + a1 / 2;
|
||||
s1 = barleft + (s32) (a1 * (dltime / PALDOWN(4800.0f)));
|
||||
s1 = barleft + (s32) (a1 * (dltime / TICKS(4800.0f)));
|
||||
|
||||
gdl = func0f153628(gdl);
|
||||
gdl = gfxSetPrimColour(gdl, 0x60000060);
|
||||
|
||||
@@ -198,7 +198,7 @@ void htbTick(void)
|
||||
if (g_ScenarioData.htb.token == NULL || g_ScenarioData.htb.token->type != PROPTYPE_WEAPON) {
|
||||
var800869ec = NULL;
|
||||
} else {
|
||||
var800869ec->prop->timetoregen = PALDOWN(1200);
|
||||
var800869ec->prop->timetoregen = TICKS(1200);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ void htbTickChr(struct chrdata *chr)
|
||||
if (chr->aibot->hasbriefcase) {
|
||||
chr->aibot->unk0a0 += g_Vars.lvupdate240;
|
||||
|
||||
if (chr->aibot->unk0a0 >= PALDOWN(7200)) {
|
||||
if (chr->aibot->unk0a0 >= TICKS(7200)) {
|
||||
sndStart(var80095200, SFX_MP_SCOREPOINT, NULL, -1, -1, -1, -1, -1);
|
||||
g_MpAllChrConfigPtrs[mpPlayerGetIndex(chr)]->numpoints++;
|
||||
chr->aibot->unk0a0 = 0;
|
||||
@@ -282,7 +282,7 @@ void htbTickChr(struct chrdata *chr)
|
||||
if (invHasBriefcase()) {
|
||||
g_Vars.currentplayerstats->tokenheldtime += g_Vars.lvupdate240;
|
||||
|
||||
if (g_Vars.currentplayerstats->tokenheldtime >= PALDOWN(7200)) {
|
||||
if (g_Vars.currentplayerstats->tokenheldtime >= TICKS(7200)) {
|
||||
sndStart(var80095200, SFX_MP_SCOREPOINT, NULL, -1, -1, -1, -1, -1);
|
||||
g_MpAllChrConfigPtrs[g_Vars.currentplayernum]->numpoints++;
|
||||
hudmsgCreateWithFlags(langGet(L_MPWEAPONS_024), HUDMSGTYPE_MPSCENARIO, HUDMSGFLAG_ONLYIFALIVE); // "1 Point!"
|
||||
|
||||
@@ -347,7 +347,7 @@ void kohTick(void)
|
||||
if (!dualoccupancy) {
|
||||
g_ScenarioData.koh.elapsed240 += g_Vars.lvupdate240;
|
||||
|
||||
if (g_ScenarioData.koh.elapsed240 >= g_Vars.mphilltime * PALDOWN(240) + PALDOWN(2400)) {
|
||||
if (g_ScenarioData.koh.elapsed240 >= g_Vars.mphilltime * TICKS(240) + TICKS(2400)) {
|
||||
// Scored a point
|
||||
sndStart(var80095200, SFX_MP_SCOREPOINT, 0, -1, -1, -1, -1, -1);
|
||||
|
||||
@@ -455,15 +455,15 @@ Gfx *kohRenderHud(Gfx *gdl)
|
||||
x = viGetViewLeft() + viGetViewWidth() / 2;
|
||||
y = viGetViewTop() + 10;
|
||||
|
||||
time240 = g_Vars.mphilltime * PALDOWN(240) - g_ScenarioData.koh.elapsed240;
|
||||
time240 = g_Vars.mphilltime * TICKS(240) - g_ScenarioData.koh.elapsed240;
|
||||
time240 += PAL ? 2199 : 2400;
|
||||
mins = time240 / PALDOWN(60 * 240);
|
||||
time240 -= PALDOWN(60 * 240) * mins;
|
||||
mins = time240 / TICKS(60 * 240);
|
||||
time240 -= TICKS(60 * 240) * mins;
|
||||
|
||||
#if PAL
|
||||
secs = time240 / PALDOWN(240);
|
||||
secs = time240 / TICKS(240);
|
||||
#else
|
||||
secs = (time240 + (PALDOWN(240) - 1)) / PALDOWN(240);
|
||||
secs = (time240 + (TICKS(240) - 1)) / TICKS(240);
|
||||
#endif
|
||||
|
||||
if ((g_Vars.mphilltime * 60 + 600) / 3600) {
|
||||
|
||||
@@ -179,7 +179,7 @@ void pacTick(void)
|
||||
{
|
||||
data->age240 += g_Vars.lvupdate240;
|
||||
|
||||
if (data->age240 > (u32)PALDOWN(240 * 60)) {
|
||||
if (data->age240 > (u32)TICKS(240 * 60)) {
|
||||
data->age240 = 0;
|
||||
data->survivalcounts[data->victims[data->victimindex]]++;
|
||||
scenarioCreateHudmsg(data->victims[data->victimindex], langGet(L_MPWEAPONS_007)); // "Have a point for living!"
|
||||
@@ -206,7 +206,7 @@ Gfx *pacRenderHud(Gfx *gdl)
|
||||
if (g_Vars.currentplayernum == data->victims[data->victimindex])
|
||||
#endif
|
||||
{
|
||||
time240 = PALDOWN(60 * 240) - data->age240;
|
||||
time240 = TICKS(60 * 240) - data->age240;
|
||||
x = viGetViewLeft() + viGetViewWidth() / 2;
|
||||
y = viGetViewTop() + 10;
|
||||
|
||||
@@ -214,9 +214,9 @@ Gfx *pacRenderHud(Gfx *gdl)
|
||||
time240 = 0;
|
||||
}
|
||||
|
||||
mins = time240 / PALDOWN(60 * 240);
|
||||
time240 -= PALDOWN(60 * 240) * mins;
|
||||
secs = (time240 + (PALDOWN(240) - 1)) / PALDOWN(240);
|
||||
mins = time240 / TICKS(60 * 240);
|
||||
time240 -= TICKS(60 * 240) * mins;
|
||||
secs = (time240 + (TICKS(240) - 1)) / TICKS(240);
|
||||
sprintf(text, "%d:%02d", mins, secs);
|
||||
|
||||
gdl = func0f153628(gdl);
|
||||
|
||||
@@ -538,8 +538,8 @@ s32 mpCharacterBodyMenuHandler(s32 operation, struct menuitem *item, union handl
|
||||
g_Menus[g_MpPlayerNum].unk840.unk00c = mpbodynum << 16 | 0xffff | mpheadnum << 24;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk574 += g_Vars.diffframe60;
|
||||
|
||||
if (g_Menus[g_MpPlayerNum].unk840.unk574 > PALDOWN(480)) {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk574 -= PALDOWN(480);
|
||||
if (g_Menus[g_MpPlayerNum].unk840.unk574 > TICKS(480)) {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk574 -= TICKS(480);
|
||||
}
|
||||
|
||||
if (g_Menus[g_MpPlayerNum].unk840.unk578 > 0) {
|
||||
@@ -585,8 +585,8 @@ s32 mpCharacterBodyMenuHandler(s32 operation, struct menuitem *item, union handl
|
||||
g_Menus[g_MpPlayerNum].unk840.unk524 = -0.2f;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk54c = -0.2f;
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.unk578 = PALDOWN(60);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk574 = PALDOWN(120);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk578 = TICKS(60);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk574 = TICKS(120);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk000 = 8;
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
|
||||
+4
-4
@@ -43,7 +43,7 @@ u16 g_MusicVolume = 0x5000;
|
||||
|
||||
s32 g_MusicDeathTimer240 = 0; // Counts down 5 seconds while death music plays
|
||||
s32 g_MusicAge60 = 0; // The current age of the MP track being played
|
||||
s32 g_MusicLife60 = PALDOWN(120); // The max age of any MP track (this value is changed in MP code)
|
||||
s32 g_MusicLife60 = TICKS(120); // The max age of any MP track (this value is changed in MP code)
|
||||
s32 g_MusicSilenceTimer60 = 0; // Counts down the 2 second silence between MP track changes
|
||||
|
||||
#if VERSION < VERSION_NTSC_1_0
|
||||
@@ -633,7 +633,7 @@ void musicStartMpDeath(void)
|
||||
|
||||
_musicStartMpDeath(0);
|
||||
|
||||
g_MusicDeathTimer240 = PALDOWN(1200);
|
||||
g_MusicDeathTimer240 = TICKS(1200);
|
||||
g_MusicMpDeathIsPlaying = true;
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
@@ -769,8 +769,8 @@ void musicSetXReason(s32 reason, u32 minsecs, u32 maxsecs)
|
||||
{
|
||||
if (g_AudioXReasonsActive[reason] == false) {
|
||||
g_AudioXReasonsActive[reason] = true;
|
||||
g_MusicXReasonMinDurations[reason] = minsecs * PALDOWN(240);
|
||||
g_MusicXReasonMaxDurations[reason] = maxsecs * PALDOWN(240);
|
||||
g_MusicXReasonMinDurations[reason] = minsecs * TICKS(240);
|
||||
g_MusicXReasonMaxDurations[reason] = maxsecs * TICKS(240);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+11
-11
@@ -2774,9 +2774,9 @@ s32 nbombCalculateAlpha(struct nbomb *nbomb)
|
||||
{
|
||||
s32 alpha = 127;
|
||||
|
||||
if (nbomb->age240 > PALDOWN(310)) {
|
||||
if (nbomb->age240 < PALDOWN(350)) {
|
||||
alpha = (PALDOWN(350) * 127 - nbomb->age240 * 127) / PALDOWN(40);
|
||||
if (nbomb->age240 > TICKS(310)) {
|
||||
if (nbomb->age240 < TICKS(350)) {
|
||||
alpha = (TICKS(350) * 127 - nbomb->age240 * 127) / TICKS(40);
|
||||
} else {
|
||||
alpha = 0;
|
||||
}
|
||||
@@ -3684,17 +3684,17 @@ void nbombTick(struct nbomb *nbomb)
|
||||
|
||||
nbomb->age240 += increment;
|
||||
|
||||
if (nbomb->age240 < PALDOWN(80)) {
|
||||
if (nbomb->age240 < TICKS(80)) {
|
||||
nbomb->radius = nbomb->age240 / (PAL ? 66.0f : 80.0f);
|
||||
nbomb->radius = sqrtf(sqrtf(nbomb->radius));
|
||||
nbomb->unk18 = 0;
|
||||
} else {
|
||||
nbomb->radius = sinf((nbomb->age240 - PALDOWN(80)) * (PAL ? 0.062800005078316f : 0.0523333363235f)) * 0.05f + 1.0f;
|
||||
nbomb->radius = sinf((nbomb->age240 - TICKS(80)) * (PAL ? 0.062800005078316f : 0.0523333363235f)) * 0.05f + 1.0f;
|
||||
|
||||
// Return value is not used - could have been printed
|
||||
sinf((nbomb->age240 - PALDOWN(80)) * (PAL ? 0.062800005078316f : 0.0523333363235f));
|
||||
sinf((nbomb->age240 - TICKS(80)) * (PAL ? 0.062800005078316f : 0.0523333363235f));
|
||||
|
||||
nbomb->unk18 = ((nbomb->age240 - PALDOWN(80)) / (PAL ? 225.0f : 270.0f)) * 3.0f;
|
||||
nbomb->unk18 = ((nbomb->age240 - TICKS(80)) / (PAL ? 225.0f : 270.0f)) * 3.0f;
|
||||
}
|
||||
|
||||
nbomb->radius *= 500.0f;
|
||||
@@ -3745,7 +3745,7 @@ void nbombsTick(void)
|
||||
|
||||
somevalue = 0;
|
||||
|
||||
if (youngest240 < PALDOWN(350)) {
|
||||
if (youngest240 < TICKS(350)) {
|
||||
if (g_Vars.lvupdate240 != 0) {
|
||||
if (g_NbombAudioHandle == 0) {
|
||||
sndStart(var80095200, SFX_SHIP_HUM, &g_NbombAudioHandle, -1, -1, -1, -1, -1);
|
||||
@@ -3756,11 +3756,11 @@ void nbombsTick(void)
|
||||
if (g_NbombAudioHandle) {
|
||||
f32 speed = func0f006b08(20) * 0.02f + 0.4f;
|
||||
|
||||
if (youngest240 > PALDOWN(300)) {
|
||||
somevalue = (1.0f - (f32)(youngest240 - PALDOWN(300)) / (PAL ? 41.0f : 50.0f)) * 32767.0f;
|
||||
if (youngest240 > TICKS(300)) {
|
||||
somevalue = (1.0f - (f32)(youngest240 - TICKS(300)) / (PAL ? 41.0f : 50.0f)) * 32767.0f;
|
||||
}
|
||||
|
||||
if (youngest240 >= PALDOWN(350)) {
|
||||
if (youngest240 >= TICKS(350)) {
|
||||
somevalue = 0;
|
||||
}
|
||||
|
||||
|
||||
+13
-13
@@ -856,8 +856,8 @@ bool playerSpawnAnti(struct chrdata *hostchr, bool force)
|
||||
bgunEquipWeapon2(HAND_RIGHT, WEAPON_UNARMED);
|
||||
}
|
||||
|
||||
g_Vars.currentplayer->invdowntime = PALDOWN(-40);
|
||||
g_Vars.currentplayer->usedowntime = PALDOWN(-40);
|
||||
g_Vars.currentplayer->invdowntime = TICKS(-40);
|
||||
g_Vars.currentplayer->usedowntime = TICKS(-40);
|
||||
|
||||
bgunGiveMaxAmmo(true);
|
||||
|
||||
@@ -2947,7 +2947,7 @@ void playerTickExplode(void)
|
||||
|
||||
explosionCreateSimple(NULL, &pos, g_Vars.currentplayer->prop->rooms, EXPLOSIONTYPE_18, g_Vars.currentplayernum);
|
||||
|
||||
g_Vars.currentplayer->bondnextexplode = g_Vars.lvframe60 + PALDOWN(15) + (random() % PALDOWN(15));
|
||||
g_Vars.currentplayer->bondnextexplode = g_Vars.lvframe60 + TICKS(15) + (random() % TICKS(15));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3826,11 +3826,11 @@ void playerTick(bool arg0)
|
||||
eyespy->buttonheld = eyespy->camerabuttonheld = false;
|
||||
eyespy->camerashuttertime = 0;
|
||||
eyespy->startuptimer60 = 0;
|
||||
eyespy->prop->chr->soundtimer = PALDOWN(10);
|
||||
eyespy->prop->chr->soundtimer = TICKS(10);
|
||||
sndStart(var80095200, SFX_DETONATE, NULL, -1, -1, -1, -1, -1);
|
||||
}
|
||||
|
||||
g_Vars.currentplayer->invdowntime = PALDOWN(-40);
|
||||
g_Vars.currentplayer->invdowntime = TICKS(-40);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3865,10 +3865,10 @@ void playerTick(bool arg0)
|
||||
playerTickChrBody();
|
||||
|
||||
if (g_Vars.currentplayer->haschrbody) {
|
||||
g_Vars.currentplayer->invdowntime = PALDOWN(-40);
|
||||
g_Vars.currentplayer->invdowntime = TICKS(-40);
|
||||
bmoveTick(0, 0, 0, 1);
|
||||
playerTickCutscene(arg0);
|
||||
g_Vars.currentplayer->invdowntime = PALDOWN(-40);
|
||||
g_Vars.currentplayer->invdowntime = TICKS(-40);
|
||||
}
|
||||
|
||||
for (i = 0; i < PLAYERCOUNT(); i++) {
|
||||
@@ -3945,7 +3945,7 @@ void playerTick(bool arg0)
|
||||
// Allow 2 seconds of this, then blow up rocket
|
||||
g_Vars.currentplayer->badrockettime += g_Vars.lvupdate240_60;
|
||||
|
||||
if (g_Vars.currentplayer->badrockettime > PALDOWN(120)) {
|
||||
if (g_Vars.currentplayer->badrockettime > TICKS(120)) {
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
g_Vars.currentplayer->visionmode = VISIONMODE_SLAYERROCKETSTATIC;
|
||||
#else
|
||||
@@ -5470,7 +5470,7 @@ Gfx *playerRenderHud(Gfx *gdl)
|
||||
|
||||
if (g_BossFile.locktype == MPLOCKTYPE_CHALLENGE) {
|
||||
if (g_Vars.currentplayer->deadtimer < 0) {
|
||||
g_Vars.currentplayer->deadtimer = PALDOWN(600);
|
||||
g_Vars.currentplayer->deadtimer = TICKS(600);
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->deadtimer >= 0) {
|
||||
@@ -5521,21 +5521,21 @@ Gfx *playerRenderHud(Gfx *gdl)
|
||||
gdl = func0f15b114(gdl);
|
||||
|
||||
if (g_Vars.currentplayer->eyespy) {
|
||||
if (g_Vars.currentplayer->eyespy->startuptimer60 < PALDOWN(50)) {
|
||||
if (g_Vars.currentplayer->eyespy->startuptimer60 < TICKS(50)) {
|
||||
gdl = bviewRenderFisheye(gdl, -1, 255, 0, g_Vars.currentplayer->eyespy->startuptimer60, g_Vars.currentplayer->eyespy->hit);
|
||||
} else {
|
||||
s32 time = g_Vars.currentplayer->eyespy->camerashuttertime;
|
||||
|
||||
if (time > 0) {
|
||||
if (g_Vars.currentplayer->eyespy->mode == EYESPYMODE_CAMSPY) {
|
||||
gdl = bviewRenderFisheye(gdl, -1, 255, time, PALDOWN(50), g_Vars.currentplayer->eyespy->hit);
|
||||
gdl = bviewRenderFisheye(gdl, -1, 255, time, TICKS(50), g_Vars.currentplayer->eyespy->hit);
|
||||
} else {
|
||||
gdl = bviewRenderFisheye(gdl, -1, 255, 0, PALDOWN(50), g_Vars.currentplayer->eyespy->hit);
|
||||
gdl = bviewRenderFisheye(gdl, -1, 255, 0, TICKS(50), g_Vars.currentplayer->eyespy->hit);
|
||||
}
|
||||
|
||||
g_Vars.currentplayer->eyespy->camerashuttertime -= g_Vars.lvupdate240_60;
|
||||
} else {
|
||||
gdl = bviewRenderFisheye(gdl, -1, 255, 0, PALDOWN(50), g_Vars.currentplayer->eyespy->hit);
|
||||
gdl = bviewRenderFisheye(gdl, -1, 255, 0, TICKS(50), g_Vars.currentplayer->eyespy->hit);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -620,7 +620,7 @@ void playerInit(void)
|
||||
|
||||
if (cheatIsActive(CHEAT_CLOAKINGDEVICE)) {
|
||||
invGiveSingleWeapon(WEAPON_CLOAKINGDEVICE);
|
||||
bgunSetAmmoQuantity(AMMOTYPE_CLOAK, PALDOWN(7200));
|
||||
bgunSetAmmoQuantity(AMMOTYPE_CLOAK, TICKS(7200));
|
||||
}
|
||||
|
||||
if (cheatIsActive(CHEAT_PERFECTDARKNESS)) {
|
||||
|
||||
+1
-1
@@ -1371,7 +1371,7 @@ void propExecuteTickOperation(struct prop *prop, s32 op)
|
||||
&& prop->obj && (prop->obj->hidden2 & OBJH2FLAG_CANREGEN)) {
|
||||
struct defaultobj *obj = prop->obj;
|
||||
|
||||
prop->timetoregen = PALDOWN(1200);
|
||||
prop->timetoregen = TICKS(1200);
|
||||
|
||||
obj->damage = 0;
|
||||
obj->hidden |= OBJHFLAG_00000800;
|
||||
|
||||
+24
-24
@@ -33162,7 +33162,7 @@ void doorTick(struct prop *doorprop)
|
||||
if (door->lastopen60 > 0
|
||||
&& door->mode == DOORMODE_IDLE
|
||||
&& (door->base.flags & OBJFLAG_DOOR_KEEPOPEN) == 0
|
||||
&& door->lastopen60 < g_Vars.lvframe60 - PALDOWN(door->autoclosetime)) {
|
||||
&& door->lastopen60 < g_Vars.lvframe60 - TICKS(door->autoclosetime)) {
|
||||
// Check if any sibling is automatic
|
||||
struct doorobj *loopdoor = door->sibling;
|
||||
bool pass = door->doorflags & DOORFLAG_AUTOMATIC;
|
||||
@@ -34943,7 +34943,7 @@ void cctvTick(struct prop *camprop)
|
||||
camera->seebondtime60 += g_Vars.lvupdate240_60;
|
||||
}
|
||||
|
||||
if (camera->seebondtime60 >= (s32)(PALDOWN(300) * g_CameraWaitMultiplier)) {
|
||||
if (camera->seebondtime60 >= (s32)(TICKS(300) * g_CameraWaitMultiplier)) {
|
||||
alarmActivate();
|
||||
camera->seebondtime60 = 0;
|
||||
}
|
||||
@@ -40627,7 +40627,7 @@ bool chopperAttack(struct chopperobj *obj)
|
||||
|
||||
if (chopper) {
|
||||
chopper->attackmode = CHOPPERMODE_COMBAT;
|
||||
chopper->patroltimer60 = PALDOWN(240);
|
||||
chopper->patroltimer60 = TICKS(240);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -40641,7 +40641,7 @@ bool chopperStop(struct chopperobj *obj)
|
||||
|
||||
if (chopper) {
|
||||
chopper->attackmode = CHOPPERMODE_PATROL;
|
||||
chopper->patroltimer60 = PALDOWN(120);
|
||||
chopper->patroltimer60 = TICKS(120);
|
||||
chopper->power = 0;
|
||||
|
||||
return true;
|
||||
@@ -49366,7 +49366,7 @@ u32 func0f07e474(struct prop *prop)
|
||||
// Prop is taken/unavailable
|
||||
regenning = true;
|
||||
|
||||
if (prop->timetoregen >= PALDOWN(60)) {
|
||||
if (prop->timetoregen >= TICKS(60)) {
|
||||
regenning = false;
|
||||
}
|
||||
|
||||
@@ -49375,8 +49375,8 @@ u32 func0f07e474(struct prop *prop)
|
||||
// If ready to start fading in but propCanRegen returns false, wait
|
||||
// another second and try again. In practice propCanRegen will always
|
||||
// return true so this condition will never pass.
|
||||
if (prop->timetoregen < PALDOWN(60) && !regenning && !propCanRegen(prop)) {
|
||||
prop->timetoregen += PALDOWN(60);
|
||||
if (prop->timetoregen < TICKS(60) && !regenning && !propCanRegen(prop)) {
|
||||
prop->timetoregen += TICKS(60);
|
||||
}
|
||||
|
||||
if (prop->timetoregen <= 0) {
|
||||
@@ -49388,7 +49388,7 @@ u32 func0f07e474(struct prop *prop)
|
||||
} else {
|
||||
obj->hidden &= ~OBJHFLAG_00001000;
|
||||
}
|
||||
} else if (prop->timetoregen < PALDOWN(60) && !regenning) {
|
||||
} else if (prop->timetoregen < TICKS(60) && !regenning) {
|
||||
// 1 second left - time to start fading in
|
||||
if (obj->damage == 0 && (obj->hidden2 & OBJH2FLAG_DESTROYED) == 0) {
|
||||
if (obj->flags & OBJFLAG_INSIDEANOTHEROBJ) {
|
||||
@@ -52188,8 +52188,8 @@ Gfx *objRender(struct prop *prop, Gfx *gdl, bool withalpha)
|
||||
if (obj->type != OBJTYPE_TINTEDGLASS) {
|
||||
frac = func0f08e6bc(prop, model0001af80(obj->model));
|
||||
|
||||
if (prop->timetoregen > 0 && prop->timetoregen < PALDOWN(60)) {
|
||||
frac *= (PALDOWN(60.0f) - prop->timetoregen) * (PAL ? 0.019999999552965f : 0.016666667535901f);
|
||||
if (prop->timetoregen > 0 && prop->timetoregen < TICKS(60)) {
|
||||
frac *= (TICKS(60.0f) - prop->timetoregen) * (PAL ? 0.019999999552965f : 0.016666667535901f);
|
||||
}
|
||||
|
||||
alpha = frac * 255.0f;
|
||||
@@ -59432,7 +59432,7 @@ bool currentPlayerTryMountHoverbike(struct prop *prop)
|
||||
u32 stack[2];
|
||||
|
||||
if (obj->type == OBJTYPE_HOVERBIKE
|
||||
&& g_Vars.lvframe60 - g_Vars.currentplayer->activatetimelast < PALDOWN(30)
|
||||
&& g_Vars.lvframe60 - g_Vars.currentplayer->activatetimelast < TICKS(30)
|
||||
&& (obj->hidden & OBJHFLAG_MOUNTED) == 0) {
|
||||
if (obj->hidden & OBJHFLAG_GRABBED) {
|
||||
if (bmoveGetGrabbedProp() == prop) {
|
||||
@@ -60856,7 +60856,7 @@ s32 ammocrateGetPickupAmmoQty(struct ammocrateobj *crate)
|
||||
case AMMOTYPE_MAGNUM : qty = 5; break;
|
||||
case AMMOTYPE_REAPER : qty = 200; break;
|
||||
case AMMOTYPE_DART : qty = 4; break;
|
||||
case AMMOTYPE_CLOAK : qty = PALDOWN(1200); break;
|
||||
case AMMOTYPE_CLOAK : qty = TICKS(1200); break;
|
||||
case AMMOTYPE_SEDATIVE : qty = 16; break;
|
||||
case AMMOTYPE_BOOST : qty = 1; break;
|
||||
}
|
||||
@@ -60899,7 +60899,7 @@ s32 weaponGetPickupAmmoQty(struct weaponobj *weapon)
|
||||
case AMMOTYPE_DEVASTATOR: qty = 3; break;
|
||||
case AMMOTYPE_REAPER: qty = 200; break;
|
||||
case AMMOTYPE_DART: qty = 10; break;
|
||||
case AMMOTYPE_CLOAK: qty = PALDOWN(1200); break;
|
||||
case AMMOTYPE_CLOAK: qty = TICKS(1200); break;
|
||||
case AMMOTYPE_SEDATIVE: qty = 16; break;
|
||||
case AMMOTYPE_BOOST: qty = 1; break;
|
||||
}
|
||||
@@ -60915,7 +60915,7 @@ s32 weaponGetPickupAmmoQty(struct weaponobj *weapon)
|
||||
case AMMOTYPE_DEVASTATOR: qty = 3; break;
|
||||
case AMMOTYPE_REAPER: qty = 100; break;
|
||||
case AMMOTYPE_DART: qty = 4; break;
|
||||
case AMMOTYPE_CLOAK: qty = PALDOWN(1200); break;
|
||||
case AMMOTYPE_CLOAK: qty = TICKS(1200); break;
|
||||
case AMMOTYPE_BOOST: qty = 2; break;
|
||||
case AMMOTYPE_SEDATIVE: qty = 16; break;
|
||||
}
|
||||
@@ -66759,7 +66759,7 @@ void doorStartOpen(struct doorobj *door)
|
||||
}
|
||||
}
|
||||
|
||||
door->fadetime60 = door->doortype == DOORTYPE_LASER ? PALDOWN(60) : 0;
|
||||
door->fadetime60 = door->doortype == DOORTYPE_LASER ? TICKS(60) : 0;
|
||||
|
||||
if (door->doortype == DOORTYPE_LASER) {
|
||||
door->laserfade = 255;
|
||||
@@ -66776,7 +66776,7 @@ void doorStartClose(struct doorobj *door)
|
||||
|
||||
doorPlayClosingSound(door->soundtype, door->base.prop);
|
||||
|
||||
door->fadetime60 = door->doortype == DOORTYPE_LASER ? PALDOWN(60) : 0;
|
||||
door->fadetime60 = door->doortype == DOORTYPE_LASER ? TICKS(60) : 0;
|
||||
|
||||
if (door->doortype == DOORTYPE_LASER) {
|
||||
door->laserfade = 0;
|
||||
@@ -67139,11 +67139,11 @@ bool doorCalcIntendedFrac(struct doorobj *door)
|
||||
}
|
||||
|
||||
if (door->mode == DOORMODE_OPENING) {
|
||||
door->laserfade = (u32)((door->fadetime60 * 255.0f) / PALDOWN(60.0f));
|
||||
door->laserfade = (u32)((door->fadetime60 * 255.0f) / TICKS(60.0f));
|
||||
return false;
|
||||
}
|
||||
|
||||
door->laserfade = (u32)(((PALDOWN(60.0f) - door->fadetime60) * 255.0f) / PALDOWN(60.0f));
|
||||
door->laserfade = (u32)(((TICKS(60.0f) - door->fadetime60) * 255.0f) / TICKS(60.0f));
|
||||
}
|
||||
|
||||
if (door->mode == DOORMODE_OPENING || door->mode == DOORMODE_CLOSING) {
|
||||
@@ -67303,11 +67303,11 @@ void doorsCalcFrac(struct doorobj *door)
|
||||
struct prop *target = chrGetTargetProp(chr);
|
||||
|
||||
if (chrGoToPos(chr, &target->pos, target->rooms, 0)) {
|
||||
chr->goposforce = PALDOWN(600);
|
||||
chr->goposforce = TICKS(600);
|
||||
}
|
||||
} else if (chr->actiontype == ACT_GOPOS) {
|
||||
if (chr->goposforce >= 0 || chr->lastmoveok60 < g_Vars.lvframe60 - PALDOWN(60)) {
|
||||
chr->goposforce = PALDOWN(600);
|
||||
if (chr->goposforce >= 0 || chr->lastmoveok60 < g_Vars.lvframe60 - TICKS(60)) {
|
||||
chr->goposforce = TICKS(600);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -68120,7 +68120,7 @@ void gasTick(void)
|
||||
envApplyTransitionFrac(g_GasReleaseTimer240 / g_GasReleaseTimerMax240);
|
||||
|
||||
if (g_GasEnableDamage) {
|
||||
if (g_GasLastCough60 < g_Vars.lvframe60 - PALDOWN(225)) {
|
||||
if (g_GasLastCough60 < g_Vars.lvframe60 - TICKS(225)) {
|
||||
g_GasLastCough60 = g_Vars.lvframe60;
|
||||
|
||||
if (g_GasReleaseTimer240 >= 600) {
|
||||
@@ -68338,8 +68338,8 @@ void alarmTick(void)
|
||||
|
||||
// For G5, stop alarm after 55 seconds.
|
||||
// For all other levels, stop alarm after 30 seconds.
|
||||
if ((g_AlarmTimer > PALDOWN(1800) && mainGetStageNum() != STAGE_G5BUILDING)
|
||||
|| (g_AlarmTimer > PALDOWN(3300) && mainGetStageNum() == STAGE_G5BUILDING)) {
|
||||
if ((g_AlarmTimer > TICKS(1800) && mainGetStageNum() != STAGE_G5BUILDING)
|
||||
|| (g_AlarmTimer > TICKS(3300) && mainGetStageNum() == STAGE_G5BUILDING)) {
|
||||
alarmDeactivate();
|
||||
}
|
||||
|
||||
|
||||
@@ -283,7 +283,7 @@ Gfx *shardsRenderWood(Gfx *gdl)
|
||||
if (g_Vars.currentplayer->visionmode == VISIONMODE_XRAY) {
|
||||
u8 (*colours)[4] = gfxAllocateColours(3);
|
||||
|
||||
if (g_Shards[i].age60 >= PALDOWN(100)) {
|
||||
if (g_Shards[i].age60 >= TICKS(100)) {
|
||||
f32 frac = g_Shards[i].age60 / (PAL ? 41.666664123535f : 50.0f);
|
||||
|
||||
if (frac > 1) {
|
||||
@@ -877,7 +877,7 @@ Gfx *shardsRenderGlass(Gfx *gdl)
|
||||
if (g_Vars.currentplayer->visionmode == VISIONMODE_XRAY) {
|
||||
u8 (*colours)[4] = gfxAllocateColours(3);
|
||||
|
||||
if (g_Shards[i].age60 >= PALDOWN(100)) {
|
||||
if (g_Shards[i].age60 >= TICKS(100)) {
|
||||
f32 frac = g_Shards[i].age60 / (PAL ? 41.666664123535f : 50.0f);
|
||||
|
||||
if (frac > 1) {
|
||||
|
||||
@@ -11,7 +11,7 @@ void shardsTick(void)
|
||||
s32 j;
|
||||
|
||||
if (g_ShardsActive) {
|
||||
lvupdate = (g_Vars.lvupdate240_60 < PALDOWN(15)) ? g_Vars.lvupdate240_60 : PALDOWN(15);
|
||||
lvupdate = (g_Vars.lvupdate240_60 < TICKS(15)) ? g_Vars.lvupdate240_60 : TICKS(15);
|
||||
|
||||
for (i = 0; i < g_MaxShards; i++) {
|
||||
if (g_Shards[i].age60 > 0) {
|
||||
@@ -28,7 +28,7 @@ void shardsTick(void)
|
||||
g_Shards[i].vel.y -= PALUPF(0.1f);
|
||||
}
|
||||
|
||||
if (g_Shards[i].age60 >= PALDOWN(150)) {
|
||||
if (g_Shards[i].age60 >= TICKS(150)) {
|
||||
g_Shards[i].age60 = 0;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -175,17 +175,17 @@ void sightTick(bool sighton)
|
||||
g_Vars.currentplayer->sighttimer240 += g_Vars.lvupdate240;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (g_Vars.currentplayer->targetset[i] > PALDOWN(512)) {
|
||||
if (g_Vars.currentplayer->targetset[i] > TICKS(512)) {
|
||||
if (g_Vars.currentplayer->targetset[i] < (PAL ? 850 : 1024) - g_Vars.lvupdate240) {
|
||||
g_Vars.currentplayer->targetset[i] += g_Vars.lvupdate240;
|
||||
} else {
|
||||
g_Vars.currentplayer->targetset[i] = PALDOWN(1020);
|
||||
g_Vars.currentplayer->targetset[i] = TICKS(1020);
|
||||
}
|
||||
} else {
|
||||
if (g_Vars.currentplayer->targetset[i] < (PAL ? 426 : 516) - g_Vars.lvupdate240) {
|
||||
g_Vars.currentplayer->targetset[i] += g_Vars.lvupdate240;
|
||||
} else {
|
||||
g_Vars.currentplayer->targetset[i] = PALDOWN(512);
|
||||
g_Vars.currentplayer->targetset[i] = TICKS(512);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -60,13 +60,13 @@ void splatTick(struct prop *prop)
|
||||
|
||||
if (thudframe != -1.0f && modelGetCurAnimFrame(chr->model) < thudframe) {
|
||||
osSyncPrintf("SPLAT : Not Dead Enough %s%s%f", "", "", modelGetCurAnimFrame(chr->model));
|
||||
} else if (chr->tickssincesplat > PALDOWN(30) && chr->deaddropsplatsadded < 6) {
|
||||
chr->deaddropsplatsadded += splatsCreate(1, 1.1f, prop, NULL, 0, 0, isskedar, 1, PALDOWN(150), attacker, random() & 8);
|
||||
} else if (chr->tickssincesplat > TICKS(30) && chr->deaddropsplatsadded < 6) {
|
||||
chr->deaddropsplatsadded += splatsCreate(1, 1.1f, prop, NULL, 0, 0, isskedar, 1, TICKS(150), attacker, random() & 8);
|
||||
}
|
||||
} else {
|
||||
u32 value = chr->bulletstaken * chr->tickssincesplat;
|
||||
|
||||
if (value > PALDOWN(240)) {
|
||||
if (value > TICKS(240)) {
|
||||
f32 dist = coordsGetDistance(&chr->lastdroppos, &prop->pos);
|
||||
s32 addmore = false;
|
||||
|
||||
@@ -79,7 +79,7 @@ void splatTick(struct prop *prop)
|
||||
}
|
||||
|
||||
if (addmore) {
|
||||
chr->woundedsplatsadded += splatsCreate(1, 0.3f, prop, NULL, 0, 0, isskedar, 2, PALDOWN(80), attacker, 0);
|
||||
chr->woundedsplatsadded += splatsCreate(1, 0.3f, prop, NULL, 0, 0, isskedar, 2, TICKS(80), attacker, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ void splatsCreateForChrHit(struct prop *prop, struct splat *arg1, struct coord *
|
||||
u32 rand = random() % 3;
|
||||
|
||||
if (rand) {
|
||||
chr->stdsplatsadded += splatsCreate(rand, 0.8f, prop, arg1, arg2, arg3, arg4, arg5, PALDOWN(50), arg6, 0);
|
||||
chr->stdsplatsadded += splatsCreate(rand, 0.8f, prop, arg1, arg2, arg3, arg4, arg5, TICKS(50), arg6, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+14
-14
@@ -322,7 +322,7 @@ void titleTickLegal(void)
|
||||
|
||||
g_TitleTimer += g_Vars.lvupdate240_60;
|
||||
|
||||
if (g_TitleTimer > PALDOWN(180)) {
|
||||
if (g_TitleTimer > TICKS(180)) {
|
||||
titleSetNextMode(TITLEMODE_CHECKCONTROLLERS);
|
||||
}
|
||||
}
|
||||
@@ -941,14 +941,14 @@ void titleTickPdLogo(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (g_TitleButtonPressed && g_TitleTimer > PALDOWN(666)) {
|
||||
if (g_TitleButtonPressed && g_TitleTimer > TICKS(666)) {
|
||||
titleSetNextMode(TITLEMODE_SKIP);
|
||||
}
|
||||
|
||||
if (joyGetButtonsPressedThisFrame(0, 0xffff)) {
|
||||
g_TitleButtonPressed = g_TitleFastForward = true;
|
||||
|
||||
if (g_TitleTimer < PALDOWN(549)) {
|
||||
if (g_TitleTimer < TICKS(549)) {
|
||||
titleSetNextMode(TITLEMODE_PDLOGO);
|
||||
}
|
||||
}
|
||||
@@ -1536,7 +1536,7 @@ void titleSkipToPdTitle(void)
|
||||
var80062804 = 1;
|
||||
g_PdLogoUnusedRotEnabled = true;
|
||||
g_PdLogoLightMoving = true;
|
||||
g_TitleTimer = PALDOWN(549);
|
||||
g_TitleTimer = TICKS(549);
|
||||
g_PdLogoIsFirstTick = false;
|
||||
|
||||
musicStartTemporaryPrimary(MUSIC_TITLE2);
|
||||
@@ -4686,7 +4686,7 @@ void titleTickRarePresents(void)
|
||||
|
||||
g_TitleTimer += g_Vars.lvupdate240_60;
|
||||
|
||||
if (g_TitleTimer > PALDOWN(300)) {
|
||||
if (g_TitleTimer > TICKS(300)) {
|
||||
titleSetNextMode(TITLEMODE_PDLOGO);
|
||||
} else if (joyGetButtonsPressedThisFrame(0, 0xffff)) {
|
||||
titleSetNextMode(TITLEMODE_SKIP);
|
||||
@@ -4778,8 +4778,8 @@ Gfx *titleRenderRarePresents(Gfx *gdl)
|
||||
|
||||
gdl = bviewRenderRarePresents(gdl);
|
||||
|
||||
if (g_TitleTimer > PALDOWN(222)) {
|
||||
f32 alpha = ((g_TitleTimer - PALDOWN(222.0f)) / PALDOWN(78.0f));
|
||||
if (g_TitleTimer > TICKS(222)) {
|
||||
f32 alpha = ((g_TitleTimer - TICKS(222.0f)) / TICKS(78.0f));
|
||||
u32 stack;
|
||||
|
||||
gdl = func0f153a34(gdl, viGetViewLeft(), viGetViewTop(),
|
||||
@@ -4851,7 +4851,7 @@ void titleTickNintendoLogo(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (g_TitleFastForward && !g_TitleButtonPressed && g_TitleTimer > PALDOWN(140)) {
|
||||
if (g_TitleFastForward && !g_TitleButtonPressed && g_TitleTimer > TICKS(140)) {
|
||||
g_TitleButtonPressed = true;
|
||||
g_TitleFastForward = false;
|
||||
titleSetNextMode(TITLEMODE_PDLOGO);
|
||||
@@ -5015,11 +5015,11 @@ void titleTickRareLogo(void)
|
||||
g_TitleButtonPressed = true;
|
||||
titleSetNextMode(TITLEMODE_PDLOGO);
|
||||
} else if (!g_TitleButtonPressed) {
|
||||
if (g_TitleTimer < PALDOWN(60)) {
|
||||
if (g_TitleTimer < TICKS(60)) {
|
||||
g_TitleButtonPressed = true;
|
||||
|
||||
if (g_TitleTimer < PALDOWN(100)) {
|
||||
g_TitleTimer = PALDOWN(100);
|
||||
if (g_TitleTimer < TICKS(100)) {
|
||||
g_TitleTimer = TICKS(100);
|
||||
}
|
||||
} else {
|
||||
g_TitleFastForward = true;
|
||||
@@ -5028,9 +5028,9 @@ void titleTickRareLogo(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (g_TitleTimer > PALDOWN(240)
|
||||
if (g_TitleTimer > TICKS(240)
|
||||
|| g_TitleFastForward
|
||||
|| (g_TitleButtonPressed && g_TitleTimer > PALDOWN(140))) {
|
||||
|| (g_TitleButtonPressed && g_TitleTimer > TICKS(140))) {
|
||||
titleSetNextMode(TITLEMODE_NINTENDOLOGO);
|
||||
}
|
||||
}
|
||||
@@ -5045,7 +5045,7 @@ Gfx *titleRenderRareLogo(Gfx *gdl)
|
||||
{
|
||||
struct modelrenderdata renderdata = { NULL, true, 3 };
|
||||
s32 i;
|
||||
f32 fracdone = g_TitleTimer / PALDOWN(240.0f);
|
||||
f32 fracdone = g_TitleTimer / TICKS(240.0f);
|
||||
Mtxf sp118;
|
||||
s32 j;
|
||||
s32 s0;
|
||||
|
||||
@@ -1108,7 +1108,7 @@ s32 ciCharacterProfileMenuDialog(s32 operation, struct menudialogdef *dialogdef,
|
||||
scale = 1.0f;
|
||||
}
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.unk574 = PALDOWN(120);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk574 = TICKS(120);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk580 = 0;
|
||||
|
||||
#if VERSION >= VERSION_PAL_FINAL
|
||||
@@ -1150,7 +1150,7 @@ s32 ciCharacterProfileMenuDialog(s32 operation, struct menudialogdef *dialogdef,
|
||||
g_Menus[g_MpPlayerNum].unk840.unk51c = 0.00393f;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk524 = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk54c = 0;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk578 = PALDOWN(60);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk578 = TICKS(60);
|
||||
break;
|
||||
case MENUOP_CLOSE:
|
||||
break;
|
||||
@@ -1397,8 +1397,8 @@ s32 dtTrainingDetailsMenuDialog(s32 operation, struct menudialogdef *dialogdef,
|
||||
|
||||
if (weaponnum == WEAPON_DISGUISE41) {
|
||||
g_Menus[g_MpPlayerNum].unk840.unk05c = ANIM_006A;
|
||||
g_Menus[g_MpPlayerNum].unk840.unk578 = PALDOWN(60);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk574 = PALDOWN(120);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk578 = TICKS(60);
|
||||
g_Menus[g_MpPlayerNum].unk840.unk574 = TICKS(120);
|
||||
}
|
||||
|
||||
g_Menus[g_MpPlayerNum].unk840.unk54c = 18.849555969238f * var80061630;
|
||||
|
||||
@@ -397,10 +397,10 @@ void frInitLighting(void)
|
||||
s32 roomnum;
|
||||
|
||||
for (roomnum = 7; roomnum < 10; roomnum++) {
|
||||
roomSetLighting(roomnum, LIGHTOP_3, 50, 100, PALDOWN(32));
|
||||
roomSetLighting(roomnum, LIGHTOP_3, 50, 100, TICKS(32));
|
||||
}
|
||||
|
||||
roomSetLighting(ROOM_DISH_FIRINGRANGE, LIGHTOP_3, 25, 100, PALDOWN(32));
|
||||
roomSetLighting(ROOM_DISH_FIRINGRANGE, LIGHTOP_3, 25, 100, TICKS(32));
|
||||
|
||||
g_FrData.donelighting = true;
|
||||
|
||||
@@ -416,10 +416,10 @@ void frRestoreLighting(void)
|
||||
s32 roomnum;
|
||||
|
||||
for (roomnum = 7; roomnum < 10; roomnum++) {
|
||||
roomSetLighting(roomnum, LIGHTOP_3, 100, 50, PALDOWN(8));
|
||||
roomSetLighting(roomnum, LIGHTOP_3, 100, 50, TICKS(8));
|
||||
}
|
||||
|
||||
roomSetLighting(ROOM_DISH_FIRINGRANGE, LIGHTOP_3, 100, 25, PALDOWN(8));
|
||||
roomSetLighting(ROOM_DISH_FIRINGRANGE, LIGHTOP_3, 100, 25, TICKS(8));
|
||||
|
||||
g_FrData.donelighting = false;
|
||||
|
||||
@@ -537,7 +537,7 @@ void frInitDefaults(void)
|
||||
wallhitsRemoveByProp(g_FrData.targets[i].prop, 1);
|
||||
}
|
||||
|
||||
g_FrData.timetaken = PALDOWN(-240);
|
||||
g_FrData.timetaken = TICKS(-240);
|
||||
g_FrData.score = 0;
|
||||
g_FrData.numtargets = 0;
|
||||
g_FrData.targetsdestroyed = 0;
|
||||
@@ -2761,7 +2761,7 @@ void frSetFailReason(s32 failreason)
|
||||
|
||||
g_FrData.failreason = frWasTooInaccurate() ? FRFAILREASON_INACCURATE : failreason;
|
||||
g_FrData.menutype = FRMENUTYPE_FAILED;
|
||||
g_FrData.menucountdown = PALDOWN(60);
|
||||
g_FrData.menucountdown = TICKS(60);
|
||||
}
|
||||
|
||||
void frSetCompleted(void)
|
||||
@@ -2777,7 +2777,7 @@ void frSetCompleted(void)
|
||||
g_FrData.menutype = FRMENUTYPE_COMPLETED;
|
||||
}
|
||||
|
||||
g_FrData.menucountdown = PALDOWN(60);
|
||||
g_FrData.menucountdown = TICKS(60);
|
||||
}
|
||||
|
||||
bool frIsTargetOneHitExplodable(struct prop *prop)
|
||||
@@ -2987,7 +2987,7 @@ bool frIsAmmoWasted(void)
|
||||
hand = &g_Vars.currentplayer->hands[HAND_RIGHT];
|
||||
|
||||
if (bgunGetReservedAmmoCount(ammotype) + hand->loadedammo[0] == 0) {
|
||||
g_FrData.proxyendtimer = PALDOWN(300);
|
||||
g_FrData.proxyendtimer = TICKS(300);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -6993,7 +6993,7 @@ void frCalculateHit(struct defaultobj *obj, struct coord *hitpos, f32 maulerchar
|
||||
} else if (frGetWeaponBySlot(g_FrData.slot) == WEAPON_MAULER) {
|
||||
g_FrData.targets[i].damage += (f32)((s32)(maulercharge * 0.1f) + 1);
|
||||
} else if ((g_FrData.targets[i].flags & FRTARGETFLAG_TMPINVINCIBLE) == 0
|
||||
|| g_FrData.targets[i].invincibletimer >= PALDOWN(300)) {
|
||||
|| g_FrData.targets[i].invincibletimer >= TICKS(300)) {
|
||||
g_FrData.targets[i].damage++;
|
||||
}
|
||||
|
||||
@@ -7011,7 +7011,7 @@ void frCalculateHit(struct defaultobj *obj, struct coord *hitpos, f32 maulerchar
|
||||
g_FrData.numhitsring3++;
|
||||
}
|
||||
|
||||
g_FrData.feedbackttl = PALDOWN(60);
|
||||
g_FrData.feedbackttl = TICKS(60);
|
||||
g_FrData.score += g_FrData.feedbackzone;
|
||||
}
|
||||
}
|
||||
@@ -8115,7 +8115,7 @@ bool frFormatTime(char *buffer)
|
||||
{
|
||||
s32 mins = 0;
|
||||
s32 mult = 1;
|
||||
f32 secs = g_FrData.timetaken / PALDOWN(60.0f);
|
||||
f32 secs = g_FrData.timetaken / TICKS(60.0f);
|
||||
u8 failed = false;
|
||||
|
||||
if (g_FrData.timelimit != 255 && secs >= g_FrData.timelimit) {
|
||||
@@ -8147,7 +8147,7 @@ bool frGetHudMiddleSubtext(char *buffer)
|
||||
s32 secs;
|
||||
s32 mins;
|
||||
|
||||
if (g_FrData.timetaken < PALDOWN(-180)) {
|
||||
if (g_FrData.timetaken < TICKS(-180)) {
|
||||
sprintf(buffer, "%s", langGet(L_MISC_420)); // "FIRE TO START"
|
||||
return false;
|
||||
}
|
||||
@@ -8278,7 +8278,7 @@ Gfx *frRenderHud(Gfx *gdl)
|
||||
}
|
||||
|
||||
if (g_FrData.menucountdown != 0) {
|
||||
alpha = (f32)(g_FrData.menucountdown * 160) / PALDOWN(60.0f);
|
||||
alpha = (f32)(g_FrData.menucountdown * 160) / TICKS(60.0f);
|
||||
}
|
||||
|
||||
gdl = func0f153628(gdl);
|
||||
|
||||
+1
-1
@@ -5947,7 +5947,7 @@ void func0f141704(struct prop *prop)
|
||||
}
|
||||
|
||||
if (index != -1) {
|
||||
func0f13e640(&var800a41b0[index], PALDOWN(120));
|
||||
func0f13e640(&var800a41b0[index], TICKS(120));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,13 +56,13 @@
|
||||
(p[2] - g_Vars.currentplayer->eraserpos.f[2]) * (p[2] - g_Vars.currentplayer->eraserpos.f[2]))
|
||||
|
||||
#if PAL
|
||||
#define PALDOWN(val) ((val) * 50 / 60)
|
||||
#define TICKS(val) ((val) * 50 / 60)
|
||||
#define PALUP(val) ((val) * 60 / 50)
|
||||
#define PALUPF(val) ((val) * 1.2f)
|
||||
#define FRAMEDURATION (1 / 50.0f)
|
||||
#else
|
||||
#define TICKS(val) (val)
|
||||
#define PALUP(val) (val)
|
||||
#define PALDOWN(val) (val)
|
||||
#define PALUPF(val) (val)
|
||||
#define FRAMEDURATION (1 / 60.0f)
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -344,7 +344,7 @@ void joyDisableTemporarily(void)
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
g_JoyDisableCooldown[i] = PALDOWN(60);
|
||||
g_JoyDisableCooldown[i] = TICKS(60);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1049,7 +1049,7 @@ void musicTick(void)
|
||||
// then start a 2 second time before starting the new one.
|
||||
g_MusicAge60 = 0;
|
||||
musicQueueFadeEvent(TRACKTYPE_PRIMARY, 2, 1);
|
||||
g_MusicSilenceTimer60 = PALDOWN(120);
|
||||
g_MusicSilenceTimer60 = TICKS(120);
|
||||
}
|
||||
|
||||
if (g_MpEnableMusicSwitching && g_Vars.normmplayerisrunning) {
|
||||
@@ -1126,7 +1126,7 @@ void musicTick(void)
|
||||
// Check if the player is in an ambient room every 0.25 seconds
|
||||
if (g_Vars.lvupdate240 > g_MusicNextAmbientTick240) {
|
||||
musicTickAmbient();
|
||||
g_MusicNextAmbientTick240 = PALDOWN(60);
|
||||
g_MusicNextAmbientTick240 = TICKS(60);
|
||||
} else {
|
||||
g_MusicNextAmbientTick240 -= g_Vars.lvupdate240;
|
||||
}
|
||||
|
||||
+3
-3
@@ -2167,7 +2167,7 @@ void sndTick(void)
|
||||
switch (g_SndCurMp3.responsetype) {
|
||||
case MP3RESPONSETYPE_ACKNOWLEDGE:
|
||||
case MP3RESPONSETYPE_WHISPER:
|
||||
g_SndCurMp3.responsetimer240 = PALDOWN(60);
|
||||
g_SndCurMp3.responsetimer240 = TICKS(60);
|
||||
break;
|
||||
case MP3RESPONSETYPE_GREETING:
|
||||
g_SndCurMp3.responsetimer240 = 1;
|
||||
@@ -2573,7 +2573,7 @@ void sndStartMp3(s16 soundnum, s32 arg1, s32 arg2, s32 arg3)
|
||||
|
||||
void sndPlayNosedive(s32 seconds)
|
||||
{
|
||||
g_SndNosediveDuration240 = seconds * PALDOWN(240);
|
||||
g_SndNosediveDuration240 = seconds * TICKS(240);
|
||||
g_SndNosediveAge240 = 0;
|
||||
g_SndNosediveVolume = 0;
|
||||
g_SndNosediveHandle = NULL;
|
||||
@@ -2653,7 +2653,7 @@ void sndTickNosedive(void)
|
||||
|
||||
void sndPlayUfo(s32 seconds)
|
||||
{
|
||||
g_SndUfoDuration240 = seconds * PALDOWN(240);
|
||||
g_SndUfoDuration240 = seconds * TICKS(240);
|
||||
g_SndUfoAge240 = 0;
|
||||
g_SndUfoVolume = 0;
|
||||
g_SndUfoHandle = NULL;
|
||||
|
||||
Reference in New Issue
Block a user