- Fix a few uses of interpolatedvalue() with floating point numbers.

This commit is contained in:
Mitchell Richters 2022-08-29 11:18:54 +10:00 committed by Christoph Oelckers
parent 92b16907d2
commit d133839e2e
4 changed files with 4 additions and 4 deletions

View file

@ -767,7 +767,7 @@ void viewDrawScreen(bool sceneonly)
}
if (!sceneonly) hudDraw(gView, pSector, shakeX, shakeY, zDelta, basepal, gInterpolate);
fixedhoriz deliriumPitchI = q16horiz(interpolatedvalue(IntToFixed(deliriumPitchO), IntToFixed(deliriumPitch), gInterpolate));
fixedhoriz deliriumPitchI = interpolatedhorizon(q16horiz(deliriumPitchO), q16horiz(deliriumPitch), gInterpolate);
auto bakCstat = gView->actor->spr.cstat;
gView->actor->spr.cstat |= (gViewPos == 0) ? CSTAT_SPRITE_INVISIBLE : CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_TRANS_FLIP;
render_drawrooms(gView->actor, { cX, cY, cZ }, sectnum(pSector), cA, cH + deliriumPitchI, rotscrnang, gInterpolate);

View file

@ -169,7 +169,7 @@ void animatesprites_d(tspriteArray& tsprites, int x, int y, int a, int smoothrat
{
t->pos.X -= MulScaleF(MaxSmoothRatio - smoothratio, pp->pos.X - pp->opos.X, 16);
t->pos.Y -= MulScaleF(MaxSmoothRatio - smoothratio, pp->pos.Y - pp->opos.Y, 16);
t->pos.Z = interpolatedvalue(pp->opos.Z, pp->pos.Z, smoothratio) + gs.playerheight;
t->pos.Z = interpolatedvaluef(pp->opos.Z, pp->pos.Z, smoothratio) + gs.playerheight;
}
else if (!actorflag(h, SFLAG_NOINTERPOLATE))
{

View file

@ -149,7 +149,7 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
{
t->pos.X -= MulScaleF(MaxSmoothRatio - smoothratio, pp->pos.X - pp->opos.X, 16);
t->pos.Y -= MulScaleF(MaxSmoothRatio - smoothratio, pp->pos.Y - pp->opos.Y, 16);
t->pos.Z = interpolatedvalue(pp->opos.Z, pp->pos.Z, smoothratio) + gs.playerheight;
t->pos.Z = interpolatedvaluef(pp->opos.Z, pp->pos.Z, smoothratio) + gs.playerheight;
h->spr.xrepeat = 24;
h->spr.yrepeat = 17;
}

View file

@ -225,7 +225,7 @@ inline void hud_draw(double x, double y, int tilenum, int shade, int orientation
inline void animateshrunken(player_struct* p, double weapon_xoffset, double looking_arc, double look_anghalf, int tilenum, int8_t shade, int o, double smoothratio)
{
const double fistsign = bsinf(interpolatedvalue(p->ofistsign, p->fistsign, smoothratio), -10);
const double fistsign = bsinf(interpolatedvaluef(p->ofistsign, p->fistsign, smoothratio), -10);
if (p->jetpack_on == 0) looking_arc += 32 - (p->GetActor()->spr.xvel >> 1);
hud_draw(weapon_xoffset + fistsign + 250 - look_anghalf, looking_arc + 258 - fabs(fistsign * 4), tilenum, shade, o);
hud_draw(weapon_xoffset - fistsign + 40 - look_anghalf, looking_arc + 200 + fabs(fistsign * 4), tilenum, shade, o | 4);