|
|
|
|
@ -552,14 +552,14 @@ void FreePlayerGFX(int pnum)
|
|
|
|
|
plr[pnum]._pGFXLoad = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void NewPlrAnim(int pnum, BYTE *pData, int numberOfFrames, int delayLen, int width, AnimationDistributionParams params /*= AnimationDistributionParams::None*/, int numSkippedFrames /*= 0*/, int distributeFramesBeforeFrame /*= 0*/) |
|
|
|
|
void NewPlrAnim(int pnum, BYTE *pData, int numberOfFrames, int delayLen, int width, AnimationDistributionFlags flags /*= AnimationDistributionFlags::None*/, int numSkippedFrames /*= 0*/, int distributeFramesBeforeFrame /*= 0*/) |
|
|
|
|
{ |
|
|
|
|
if ((DWORD)pnum >= MAX_PLRS) { |
|
|
|
|
app_fatal("NewPlrAnim: illegal player %d", pnum); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
plr[pnum]._pAnimWidth = width; |
|
|
|
|
plr[pnum].AnimInfo.SetNewAnimation(pData, numberOfFrames, delayLen, params, numSkippedFrames, distributeFramesBeforeFrame); |
|
|
|
|
plr[pnum].AnimInfo.SetNewAnimation(pData, numberOfFrames, delayLen, flags, numSkippedFrames, distributeFramesBeforeFrame); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void ClearPlrPVars(int pnum) |
|
|
|
|
@ -1489,7 +1489,7 @@ void StartAttack(int pnum, direction d)
|
|
|
|
|
skippedAnimationFrames = 2; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
NewPlrAnim(pnum, plr[pnum]._pAAnim[d], plr[pnum]._pAFrames, 0, plr[pnum]._pAWidth, AnimationDistributionParams::ProcessAnimationPending, skippedAnimationFrames, plr[pnum]._pAFNum); |
|
|
|
|
NewPlrAnim(pnum, plr[pnum]._pAAnim[d], plr[pnum]._pAFrames, 0, plr[pnum]._pAWidth, AnimationDistributionFlags::ProcessAnimationPending, skippedAnimationFrames, plr[pnum]._pAFNum); |
|
|
|
|
plr[pnum]._pmode = PM_ATTACK; |
|
|
|
|
FixPlayerLocation(pnum, d); |
|
|
|
|
SetPlayerOld(pnum); |
|
|
|
|
@ -1517,7 +1517,7 @@ void StartRangeAttack(int pnum, direction d, int cx, int cy)
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
NewPlrAnim(pnum, plr[pnum]._pAAnim[d], plr[pnum]._pAFrames, 0, plr[pnum]._pAWidth, AnimationDistributionParams::ProcessAnimationPending, skippedAnimationFrames, plr[pnum]._pAFNum); |
|
|
|
|
NewPlrAnim(pnum, plr[pnum]._pAAnim[d], plr[pnum]._pAFrames, 0, plr[pnum]._pAWidth, AnimationDistributionFlags::ProcessAnimationPending, skippedAnimationFrames, plr[pnum]._pAFNum); |
|
|
|
|
|
|
|
|
|
plr[pnum]._pmode = PM_RATTACK; |
|
|
|
|
FixPlayerLocation(pnum, d); |
|
|
|
|
@ -1547,7 +1547,7 @@ void StartPlrBlock(int pnum, direction dir)
|
|
|
|
|
skippedAnimationFrames = (plr[pnum]._pBFrames - 2); // ISPL_FASTBLOCK means we cancel the animation if frame 2 was shown
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
NewPlrAnim(pnum, plr[pnum]._pBAnim[dir], plr[pnum]._pBFrames, 2, plr[pnum]._pBWidth, AnimationDistributionParams::SkipsDelayOfLastFrame, skippedAnimationFrames); |
|
|
|
|
NewPlrAnim(pnum, plr[pnum]._pBAnim[dir], plr[pnum]._pBFrames, 2, plr[pnum]._pBWidth, AnimationDistributionFlags::SkipsDelayOfLastFrame, skippedAnimationFrames); |
|
|
|
|
|
|
|
|
|
plr[pnum]._pmode = PM_BLOCK; |
|
|
|
|
FixPlayerLocation(pnum, dir); |
|
|
|
|
@ -1570,19 +1570,19 @@ void StartSpell(int pnum, direction d, int cx, int cy)
|
|
|
|
|
if ((plr[pnum]._pGFXLoad & PFILE_FIRE) == 0) { |
|
|
|
|
LoadPlrGFX(pnum, PFILE_FIRE); |
|
|
|
|
} |
|
|
|
|
NewPlrAnim(pnum, plr[pnum]._pFAnim[d], plr[pnum]._pSFrames, 0, plr[pnum]._pSWidth, AnimationDistributionParams::ProcessAnimationPending, 0, plr[pnum]._pSFNum); |
|
|
|
|
NewPlrAnim(pnum, plr[pnum]._pFAnim[d], plr[pnum]._pSFrames, 0, plr[pnum]._pSWidth, AnimationDistributionFlags::ProcessAnimationPending, 0, plr[pnum]._pSFNum); |
|
|
|
|
break; |
|
|
|
|
case STYPE_LIGHTNING: |
|
|
|
|
if ((plr[pnum]._pGFXLoad & PFILE_LIGHTNING) == 0) { |
|
|
|
|
LoadPlrGFX(pnum, PFILE_LIGHTNING); |
|
|
|
|
} |
|
|
|
|
NewPlrAnim(pnum, plr[pnum]._pLAnim[d], plr[pnum]._pSFrames, 0, plr[pnum]._pSWidth, AnimationDistributionParams::ProcessAnimationPending, 0, plr[pnum]._pSFNum); |
|
|
|
|
NewPlrAnim(pnum, plr[pnum]._pLAnim[d], plr[pnum]._pSFrames, 0, plr[pnum]._pSWidth, AnimationDistributionFlags::ProcessAnimationPending, 0, plr[pnum]._pSFNum); |
|
|
|
|
break; |
|
|
|
|
case STYPE_MAGIC: |
|
|
|
|
if ((plr[pnum]._pGFXLoad & PFILE_MAGIC) == 0) { |
|
|
|
|
LoadPlrGFX(pnum, PFILE_MAGIC); |
|
|
|
|
} |
|
|
|
|
NewPlrAnim(pnum, plr[pnum]._pTAnim[d], plr[pnum]._pSFrames, 0, plr[pnum]._pSWidth, AnimationDistributionParams::ProcessAnimationPending, 0, plr[pnum]._pSFNum); |
|
|
|
|
NewPlrAnim(pnum, plr[pnum]._pTAnim[d], plr[pnum]._pSFrames, 0, plr[pnum]._pSWidth, AnimationDistributionFlags::ProcessAnimationPending, 0, plr[pnum]._pSFNum); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@ -1693,7 +1693,7 @@ void StartPlrHit(int pnum, int dam, bool forcehit)
|
|
|
|
|
skippedAnimationFrames = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
NewPlrAnim(pnum, plr[pnum]._pHAnim[pd], plr[pnum]._pHFrames, 0, plr[pnum]._pHWidth, AnimationDistributionParams::None, skippedAnimationFrames); |
|
|
|
|
NewPlrAnim(pnum, plr[pnum]._pHAnim[pd], plr[pnum]._pHFrames, 0, plr[pnum]._pHWidth, AnimationDistributionFlags::None, skippedAnimationFrames); |
|
|
|
|
|
|
|
|
|
plr[pnum]._pmode = PM_GOTHIT; |
|
|
|
|
FixPlayerLocation(pnum, pd); |
|
|
|
|
|