- Blood: Floatify QAV's x/y coordinates.

This commit is contained in:
Mitchell Richters 2022-09-12 21:25:31 +10:00 committed by Christoph Oelckers
parent b127c37939
commit f56cb7de48
4 changed files with 9 additions and 10 deletions

View file

@ -7364,8 +7364,8 @@ void playerQavSceneDraw(PLAYER* pPlayer, int a2, double a3, double a4, int a5)
// draw as weapon // draw as weapon
if (!(actor->spr.flags & kModernTypeFlag1)) if (!(actor->spr.flags & kModernTypeFlag1))
{ {
pQAV->x = int(a3); pQAV->y = int(a4); pQAV->x = a3; pQAV->y = a4;
pQAV->Draw(a3, a4, v4, flags, a2, a5, true, interpfrac); pQAV->Draw(v4, flags, a2, a5, true, interpfrac);
// draw fullscreen (currently 4:3 only) // draw fullscreen (currently 4:3 only)
} }

View file

@ -163,7 +163,7 @@ void DrawFrame(double x, double y, double z, double a, double alpha, int picnum,
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void QAV::Draw(double x, double y, int ticks, int stat, int shade, int palnum, bool to3dview, double const interpfrac) void QAV::Draw(int ticks, int stat, int shade, int palnum, bool to3dview, double const interpfrac)
{ {
assert(ticksPerFrame > 0); assert(ticksPerFrame > 0);

View file

@ -225,12 +225,11 @@ struct QAV
int nFrames; // 8 int nFrames; // 8
int ticksPerFrame; // C int ticksPerFrame; // C
int duration; // 10 int duration; // 10
int x; // 14 double x; // 14
int y; // 18 double y; // 18
uint16_t res_id; uint16_t res_id;
FRAMEINFO frames[1]; // 24 FRAMEINFO frames[1]; // 24
void Draw(double x, double y, int ticks, int stat, int shade, int palnum, bool to3dview, double const interpfrac = 1.); void Draw(int ticks, int stat, int shade, int palnum, bool to3dview, double const interpfrac = 1.);
void Draw(int ticks, int stat, int shade, int palnum, bool to3dview, double const interpfrac = 1.) { Draw(x, y, ticks, stat, shade, palnum, to3dview, interpfrac); }
void Play(int, int, int, PLAYER*); void Play(int, int, int, PLAYER*);
void Precache(int palette = 0); void Precache(int palette = 0);
}; };

View file

@ -322,8 +322,8 @@ void WeaponDraw(PLAYER* pPlayer, int shade, double xpos, double ypos, int palnum
qavProcessTimer(pPlayer, pQAV, &duration, &interpfrac, pPlayer->weaponState == -1, pPlayer->curWeapon == kWeapShotgun && pPlayer->weaponState == 7); qavProcessTimer(pPlayer, pQAV, &duration, &interpfrac, pPlayer->weaponState == -1, pPlayer->curWeapon == kWeapShotgun && pPlayer->weaponState == 7);
pQAV->x = int(xpos); pQAV->x = xpos;
pQAV->y = int(ypos); pQAV->y = ypos;
int flags = 2; int flags = 2;
int nInv = powerupCheck(pPlayer, kPwUpShadowCloak); int nInv = powerupCheck(pPlayer, kPwUpShadowCloak);
if (nInv >= 120 * 8 || (nInv != 0 && (PlayClock & 32))) if (nInv >= 120 * 8 || (nInv != 0 && (PlayClock & 32)))
@ -331,7 +331,7 @@ void WeaponDraw(PLAYER* pPlayer, int shade, double xpos, double ypos, int palnum
shade = -128; shade = -128;
flags |= 1; flags |= 1;
} }
pQAV->Draw(xpos, ypos, duration, flags, shade, palnum, true, interpfrac); pQAV->Draw(duration, flags, shade, palnum, true, interpfrac);
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------