mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
- second part of final bsin replacement.
This commit is contained in:
parent
05117f9f5d
commit
b2fd1fdaa4
6 changed files with 22 additions and 22 deletions
|
@ -3398,7 +3398,7 @@ int ParseState::parse(void)
|
|||
int lValue;
|
||||
insptr++;
|
||||
i = *(insptr++); // ID of def
|
||||
lValue = bsin(GetGameVarID(*insptr, g_ac, g_p).safeValue());
|
||||
lValue = int(16384 * BobVal(GetGameVarID(*insptr, g_ac, g_p).safeValue()));
|
||||
SetGameVarID(i, lValue, g_ac, g_p);
|
||||
insptr++;
|
||||
break;
|
||||
|
|
|
@ -92,7 +92,7 @@ static bool animatefist(int gs, player_struct* p, double look_anghalf, double lo
|
|||
hud_drawsprite(
|
||||
(-fisti + 222 + plravel),
|
||||
(looking_arc + 194 + BobVal((6 + fisti) * 128.) * 32),
|
||||
clamp(65536. - bcosf(fisti * 64., 2), 40920., 90612.), 0, FIST, gs, fistpal, 2);
|
||||
clamp(65536. - 65536. * BobVal(512 + fisti * 64.), 40920., 90612.), 0, FIST, gs, fistpal, 2);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ void displayweapon_d(int snum, double interpfrac)
|
|||
gun_pos -= hard_landing;
|
||||
|
||||
weapon_xoffset = (160)-90;
|
||||
weapon_xoffset -= bcosf(weapon_sway * 0.5) * (1. / 1536.);
|
||||
weapon_xoffset -= BobVal(512 + weapon_sway * 0.5) * (16384. / 1536.);
|
||||
weapon_xoffset -= 58 + p->weapon_ang;
|
||||
|
||||
shade = p->GetActor()->spr.shade;
|
||||
|
@ -362,8 +362,8 @@ void displayweapon_d(int snum, double interpfrac)
|
|||
pin = ((gs.displayflags & DUKE3D_NO_WIDESCREEN_PINNING)) ? 0 : RS_ALIGN_R;
|
||||
auto rpgpic = RPGGUN;
|
||||
|
||||
weapon_xoffset -= bsinf(768 + (kickback_pic * 128.), -11);
|
||||
gun_pos += bsinf(768 + (kickback_pic * 128.), -11);
|
||||
weapon_xoffset -= BobVal(768 + (kickback_pic * 128.)) * 8;
|
||||
gun_pos += BobVal(768 + (kickback_pic * 128.)) * 8;
|
||||
|
||||
if (*kb > 0)
|
||||
{
|
||||
|
@ -408,7 +408,7 @@ void displayweapon_d(int snum, double interpfrac)
|
|||
{
|
||||
if (*kb > 0)
|
||||
{
|
||||
gun_pos -= bsinf(kickback_pic * 128., -12);
|
||||
gun_pos -= BobVal(kickback_pic * 128.) * 4;
|
||||
}
|
||||
|
||||
if (*kb > 0 && p->GetActor()->spr.pal != 1)
|
||||
|
@ -528,7 +528,7 @@ void displayweapon_d(int snum, double interpfrac)
|
|||
auto displaychaingun_ww = [&]()
|
||||
{
|
||||
if (*kb > 0)
|
||||
gun_pos -= bsinf(kickback_pic * 128., -12);
|
||||
gun_pos -= BobVal(kickback_pic * 128.) * 4;
|
||||
|
||||
if (*kb > 0 && p->GetActor()->spr.pal != 1) weapon_xoffset += 1 - (rand() & 3);
|
||||
|
||||
|
@ -627,7 +627,7 @@ void displayweapon_d(int snum, double interpfrac)
|
|||
auto displaychaingun = [&]
|
||||
{
|
||||
if (*kb > 0)
|
||||
gun_pos -= bsinf(kickback_pic * 128., -12);
|
||||
gun_pos -= BobVal(kickback_pic * 128.) * 4;
|
||||
|
||||
if (*kb > 0 && p->GetActor()->spr.pal != 1) weapon_xoffset += 1 - (rand() & 3);
|
||||
|
||||
|
@ -930,7 +930,7 @@ void displayweapon_d(int snum, double interpfrac)
|
|||
|
||||
hud_drawpal(weapon_xoffset + 184 - look_anghalf,
|
||||
looking_arc + 240 - gun_pos, SHRINKER + 2,
|
||||
16 - int(bsinf(random_club_frame, -10)),
|
||||
16 - int(BobVal(random_club_frame) * 16),
|
||||
o, 0);
|
||||
|
||||
hud_drawpal(weapon_xoffset + 188 - look_anghalf,
|
||||
|
@ -1082,7 +1082,7 @@ void displayweapon_d(int snum, double interpfrac)
|
|||
{
|
||||
hud_drawpal(weapon_xoffset + 184 - look_anghalf,
|
||||
looking_arc + 240 - gun_pos, SHRINKER + 2,
|
||||
16 - int(bsinf(random_club_frame, -10)),
|
||||
16 - int(BobVal(random_club_frame) * 16),
|
||||
o, 2);
|
||||
|
||||
hud_drawpal(weapon_xoffset + 188 - look_anghalf,
|
||||
|
@ -1092,7 +1092,7 @@ void displayweapon_d(int snum, double interpfrac)
|
|||
{
|
||||
hud_drawpal(weapon_xoffset + 184 - look_anghalf,
|
||||
looking_arc + 240 - gun_pos, SHRINKER + 2,
|
||||
16 - int(bsinf(random_club_frame, -10)),
|
||||
16 - int(BobVal(random_club_frame) * 16),
|
||||
o, 0);
|
||||
|
||||
hud_drawpal(weapon_xoffset + 188 - look_anghalf,
|
||||
|
|
|
@ -73,7 +73,7 @@ void displaymasks_r(int snum, int p, double interpfrac)
|
|||
// to get the proper clock value with regards to interpolation we have add a interpfrac based offset to the value.
|
||||
double interpclock = PlayClock + TICSPERFRAME * interpfrac;
|
||||
int pin = RS_STRETCH;
|
||||
hud_drawsprite((320 - (tileWidth(SCUBAMASK) >> 1) - 15), (200 - (tileHeight(SCUBAMASK) >> 1) + bsinf(interpclock, -10)), 49152, 0, SCUBAMASK, 0, p, 2 + 16 + pin);
|
||||
hud_drawsprite((320 - (tileWidth(SCUBAMASK) >> 1) - 15), (200 - (tileHeight(SCUBAMASK) >> 1) + BobVal(interpclock) * 16), 49152, 0, SCUBAMASK, 0, p, 2 + 16 + pin);
|
||||
hud_drawsprite((320 - tileWidth(SCUBAMASK + 4)), (200 - tileHeight(SCUBAMASK + 4)), 65536, 0, SCUBAMASK + 4, 0, p, 2 + 16 + pin);
|
||||
hud_drawsprite(tileWidth(SCUBAMASK + 4), (200 - tileHeight(SCUBAMASK + 4)), 65536, 0, SCUBAMASK + 4, 0, p, 2 + 4 + 16 + pin);
|
||||
hud_drawsprite(35, (-1), 65536, 0, SCUBAMASK + 3, 0, p, 2 + 16 + pin);
|
||||
|
@ -137,11 +137,11 @@ void displayweapon_r(int snum, double interpfrac)
|
|||
looking_arc = p->angle.looking_arc(interpfrac);
|
||||
hard_landing *= 8.;
|
||||
|
||||
gun_pos -= fabs(p->GetActor()->spr.xrepeat < 8 ? bsinf(weapon_sway * 4., -9) : bsinf(weapon_sway * 0.5, -10));
|
||||
gun_pos -= fabs(p->GetActor()->spr.xrepeat < 8 ? BobVal(weapon_sway * 4.) * 32 : BobVal(weapon_sway * 0.5) * 16);
|
||||
gun_pos -= hard_landing;
|
||||
|
||||
weapon_xoffset = (160)-90;
|
||||
weapon_xoffset -= bcosf(weapon_sway * 0.5) * (1. / 1536.);
|
||||
weapon_xoffset -= BobVal(512 + weapon_sway * 0.5) * (16384. / 1536.);
|
||||
weapon_xoffset -= 58 + p->weapon_ang;
|
||||
|
||||
if (p->insector() && p->cursector->shadedsector == 1)
|
||||
|
@ -585,7 +585,7 @@ void displayweapon_r(int snum, double interpfrac)
|
|||
auto displayrifle = [&]
|
||||
{
|
||||
if (*kb > 0)
|
||||
gun_pos -= bsinf((*kb) << 7, -12);
|
||||
gun_pos -= BobVal((*kb) << 7) * 4;
|
||||
|
||||
if (*kb > 0 && p->GetActor()->spr.pal != 1) weapon_xoffset += 1 - (rand() & 3);
|
||||
|
||||
|
|
|
@ -2979,7 +2979,7 @@ void processinput_d(int snum)
|
|||
{
|
||||
p->crack_time = CRACK_TIME;
|
||||
|
||||
k = bsin(p->bobcounter, -12);
|
||||
k = int(BobVal(p->bobcounter) * 4);
|
||||
|
||||
if (truefdist < gs.playerheight + 8 && (k == 1 || k == 3))
|
||||
{
|
||||
|
|
|
@ -3656,7 +3656,7 @@ void processinput_r(int snum)
|
|||
{
|
||||
p->crack_time = CRACK_TIME;
|
||||
|
||||
k = bsin(p->bobcounter, -12);
|
||||
k = int(BobVal(p->bobcounter) * 4);
|
||||
|
||||
if (isRRRA() && p->spritebridge == 0 && p->on_ground)
|
||||
{
|
||||
|
|
|
@ -146,8 +146,8 @@ void fakedomovethings(void)
|
|||
|
||||
if( p->aim_mode == 0 && myonground && psectlotag != 2 && (psect->floorstat&2) )
|
||||
{
|
||||
x = myx + bcos(myang, -5);
|
||||
y = myy + bsin(myang, -5);
|
||||
x = myx + b cos(myang, -5);
|
||||
y = myy + b sin(myang, -5);
|
||||
tempsect = psect;
|
||||
updatesector(x,y,&tempsect);
|
||||
if (tempsect >= 0)
|
||||
|
@ -181,8 +181,8 @@ void fakedomovethings(void)
|
|||
if(badguy(chz.actor) && chz.actor()->s.xrepeat > 24 && abs(p->GetActor()->s.z- chz.actor()->s.z) < (84<<8) )
|
||||
{
|
||||
j = g etangle(chz.actor()->s.x-myx, chz.actor()->s.y-myy);
|
||||
myxvel -= bcos(j, 4);
|
||||
myyvel -= bsin(j, 4);
|
||||
myxvel -= b cos(j, 4);
|
||||
myyvel -= b sin(j, 4);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -366,7 +366,7 @@ void fakedomovethings(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
myzvel -= bsin(128 + myjumpingcounter) / 12;
|
||||
myzvel -= b sin(128 + myjumpingcounter) / 12;
|
||||
myjumpingcounter += 180;
|
||||
|
||||
myonground = 0;
|
||||
|
|
Loading…
Reference in a new issue