mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
- Blood: Leverage new spritetype
methods within Blood.
This commit is contained in:
parent
6721a6aa05
commit
1a86e74c40
3 changed files with 7 additions and 19 deletions
|
@ -419,8 +419,6 @@ static tspritetype *viewAddEffect(int nTSprite, VIEW_EFFECT nViewEffect)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
LOCATION gPrevSpriteLoc[kMaxSprites];
|
||||
|
||||
static void viewApplyDefaultPal(tspritetype *pTSprite, sectortype const *pSector)
|
||||
{
|
||||
int const nXSector = pSector->extra;
|
||||
|
@ -462,12 +460,8 @@ void viewProcessSprites(int32_t cX, int32_t cY, int32_t cZ, int32_t cA, int32_t
|
|||
int nSprite = pTSprite->owner;
|
||||
if (cl_interpolate && gInterpolateSprite[nSprite] && !(pTSprite->flags&512))
|
||||
{
|
||||
LOCATION *pPrevLoc = &gPrevSpriteLoc[nSprite];
|
||||
int iInterpolate = (int)gInterpolate;
|
||||
pTSprite->x = interpolate(pPrevLoc->x, pTSprite->x, iInterpolate);
|
||||
pTSprite->y = interpolate(pPrevLoc->y, pTSprite->y, iInterpolate);
|
||||
pTSprite->z = interpolate(pPrevLoc->z, pTSprite->z, iInterpolate);
|
||||
pTSprite->ang = pPrevLoc->ang+MulScale(((pTSprite->ang-pPrevLoc->ang+1024)&2047)-1024, iInterpolate, 16);
|
||||
pTSprite->pos = pTSprite->interpolatedvec3(gInterpolate);
|
||||
pTSprite->ang = pTSprite->interpolatedang(gInterpolate);
|
||||
}
|
||||
int nAnim = 0;
|
||||
switch (picanm[nTile].extra & 7) {
|
||||
|
|
|
@ -240,11 +240,10 @@ void sub_557C4(int x, int y, int interpolation)
|
|||
pTSprite->owner = pSprite->index;
|
||||
pTSprite->extra = pSprite->extra;
|
||||
pTSprite->flags = pSprite->hitag|0x200;
|
||||
LOCATION *pLocation = &gPrevSpriteLoc[pSprite->index];
|
||||
pTSprite->x = dx+interpolate(pLocation->x, pSprite->x, interpolation);
|
||||
pTSprite->y = dy+interpolate(pLocation->y, pSprite->y, interpolation);
|
||||
pTSprite->z = dz+interpolate(pLocation->z, pSprite->z, interpolation);
|
||||
pTSprite->ang = pLocation->ang+MulScale(((pSprite->ang-pLocation->ang+1024)&2047)-1024,interpolation, 16);
|
||||
pTSprite->x = dx+interpolate(pSprite->ox, pSprite->x, interpolation);
|
||||
pTSprite->y = dy+interpolate(pSprite->oy, pSprite->y, interpolation);
|
||||
pTSprite->z = dz+interpolate(pSprite->oz, pSprite->z, interpolation);
|
||||
pTSprite->ang = pSprite->interpolatedang(interpolation);
|
||||
spritesortcnt++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -131,7 +131,6 @@ extern int deliriumTilt, deliriumTurn, deliriumPitch;
|
|||
extern int gScreenTiltO, deliriumTurnO, deliriumPitchO;
|
||||
extern int gShowFrameRate;
|
||||
extern FixedBitArray<kMaxSprites> gInterpolateSprite;
|
||||
extern LOCATION gPrevSpriteLoc[kMaxSprites];
|
||||
extern int gLastPal;
|
||||
extern double gInterpolate;
|
||||
|
||||
|
@ -174,11 +173,7 @@ inline void viewBackupSpriteLoc(int nSprite, spritetype *pSprite)
|
|||
{
|
||||
if (!gInterpolateSprite[nSprite])
|
||||
{
|
||||
LOCATION *pPrevLoc = &gPrevSpriteLoc[nSprite];
|
||||
pPrevLoc->x = pSprite->x;
|
||||
pPrevLoc->y = pSprite->y;
|
||||
pPrevLoc->z = pSprite->z;
|
||||
pPrevLoc->ang = pSprite->ang;
|
||||
pSprite->backuploc();
|
||||
gInterpolateSprite.Set(nSprite);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue