|
|
|
@ -16,7 +16,7 @@ struct TestData { |
|
|
|
* @brief Represents a call to SetNewAnimation |
|
|
|
* @brief Represents a call to SetNewAnimation |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
struct SetNewAnimationData : TestData { |
|
|
|
struct SetNewAnimationData : TestData { |
|
|
|
SetNewAnimationData(int numberOfFrames, int delayLen, AnimationDistributionParams params = AnimationDistributionParams::None, int numSkippedFrames = 0, int distributeFramesBeforeFrame = 0) |
|
|
|
SetNewAnimationData(int numberOfFrames, int delayLen, AnimationDistributionFlags params = AnimationDistributionFlags::None, int numSkippedFrames = 0, int distributeFramesBeforeFrame = 0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
_NumberOfFrames = numberOfFrames; |
|
|
|
_NumberOfFrames = numberOfFrames; |
|
|
|
_DelayLen = delayLen; |
|
|
|
_DelayLen = delayLen; |
|
|
|
@ -26,7 +26,7 @@ struct SetNewAnimationData : TestData { |
|
|
|
} |
|
|
|
} |
|
|
|
int _NumberOfFrames; |
|
|
|
int _NumberOfFrames; |
|
|
|
int _DelayLen; |
|
|
|
int _DelayLen; |
|
|
|
AnimationDistributionParams _Params; |
|
|
|
AnimationDistributionFlags _Params; |
|
|
|
int _NumSkippedFrames; |
|
|
|
int _NumSkippedFrames; |
|
|
|
int _DistributeFramesBeforeFrame; |
|
|
|
int _DistributeFramesBeforeFrame; |
|
|
|
}; |
|
|
|
}; |
|
|
|
@ -111,7 +111,7 @@ TEST(AnimationInfo, AttackSwordWarrior) // ProcessAnimationPending should be con |
|
|
|
{ |
|
|
|
{ |
|
|
|
RunAnimationTest( |
|
|
|
RunAnimationTest( |
|
|
|
{ |
|
|
|
{ |
|
|
|
new SetNewAnimationData(16, 0, AnimationDistributionParams::ProcessAnimationPending, 0, 9), |
|
|
|
new SetNewAnimationData(16, 0, AnimationDistributionFlags::ProcessAnimationPending, 0, 9), |
|
|
|
// ProcessAnimation directly after StartAttack (in same GameTick). So we don't see any rendering before.
|
|
|
|
// ProcessAnimation directly after StartAttack (in same GameTick). So we don't see any rendering before.
|
|
|
|
new GameTickData(2, 0), |
|
|
|
new GameTickData(2, 0), |
|
|
|
new RenderingData(0.0f, 1), |
|
|
|
new RenderingData(0.0f, 1), |
|
|
|
@ -174,7 +174,7 @@ TEST(AnimationInfo, AttackSwordWarriorWithFastestAttack) // Skipped frames and P |
|
|
|
{ |
|
|
|
{ |
|
|
|
RunAnimationTest( |
|
|
|
RunAnimationTest( |
|
|
|
{ |
|
|
|
{ |
|
|
|
new SetNewAnimationData(16, 0, AnimationDistributionParams::ProcessAnimationPending, 2, 9), |
|
|
|
new SetNewAnimationData(16, 0, AnimationDistributionFlags::ProcessAnimationPending, 2, 9), |
|
|
|
// ProcessAnimation directly after StartAttack (in same GameTick). So we don't see any rendering before.
|
|
|
|
// ProcessAnimation directly after StartAttack (in same GameTick). So we don't see any rendering before.
|
|
|
|
new GameTickData(2, 0), |
|
|
|
new GameTickData(2, 0), |
|
|
|
new RenderingData(0.0f, 1), |
|
|
|
new RenderingData(0.0f, 1), |
|
|
|
@ -230,7 +230,7 @@ TEST(AnimationInfo, AttackSwordWarriorRepeated) |
|
|
|
{ |
|
|
|
{ |
|
|
|
RunAnimationTest( |
|
|
|
RunAnimationTest( |
|
|
|
{ |
|
|
|
{ |
|
|
|
new SetNewAnimationData(16, 0, AnimationDistributionParams::ProcessAnimationPending, 0, 9), |
|
|
|
new SetNewAnimationData(16, 0, AnimationDistributionFlags::ProcessAnimationPending, 0, 9), |
|
|
|
// ProcessAnimation directly after StartAttack (in same GameTick). So we don't see any rendering before.
|
|
|
|
// ProcessAnimation directly after StartAttack (in same GameTick). So we don't see any rendering before.
|
|
|
|
new GameTickData(2, 0), |
|
|
|
new GameTickData(2, 0), |
|
|
|
new RenderingData(0.0f, 1), |
|
|
|
new RenderingData(0.0f, 1), |
|
|
|
@ -275,7 +275,7 @@ TEST(AnimationInfo, AttackSwordWarriorRepeated) |
|
|
|
new RenderingData(0.3f, 10), |
|
|
|
new RenderingData(0.3f, 10), |
|
|
|
|
|
|
|
|
|
|
|
// Start of repeated attack, cause plr[pnum].AnimInfo.CurrentFrame > plr[myplr]._pAFNum
|
|
|
|
// Start of repeated attack, cause plr[pnum].AnimInfo.CurrentFrame > plr[myplr]._pAFNum
|
|
|
|
new SetNewAnimationData(16, 0, AnimationDistributionParams::ProcessAnimationPending, 0, 9), |
|
|
|
new SetNewAnimationData(16, 0, AnimationDistributionFlags::ProcessAnimationPending, 0, 9), |
|
|
|
// ProcessAnimation directly after StartAttack (in same GameTick). So we don't see any rendering before.
|
|
|
|
// ProcessAnimation directly after StartAttack (in same GameTick). So we don't see any rendering before.
|
|
|
|
new GameTickData(2, 0), |
|
|
|
new GameTickData(2, 0), |
|
|
|
new RenderingData(0.0f, 11), |
|
|
|
new RenderingData(0.0f, 11), |
|
|
|
@ -338,7 +338,7 @@ TEST(AnimationInfo, BlockingWarriorNormal) // Ignored delay for last Frame shoul |
|
|
|
{ |
|
|
|
{ |
|
|
|
RunAnimationTest( |
|
|
|
RunAnimationTest( |
|
|
|
{ |
|
|
|
{ |
|
|
|
new SetNewAnimationData(2, 2, AnimationDistributionParams::SkipsDelayOfLastFrame), |
|
|
|
new SetNewAnimationData(2, 2, AnimationDistributionFlags::SkipsDelayOfLastFrame), |
|
|
|
new RenderingData(0.0f, 1), |
|
|
|
new RenderingData(0.0f, 1), |
|
|
|
new RenderingData(0.3f, 1), |
|
|
|
new RenderingData(0.3f, 1), |
|
|
|
new RenderingData(0.6f, 1), |
|
|
|
new RenderingData(0.6f, 1), |
|
|
|
@ -366,7 +366,7 @@ TEST(AnimationInfo, BlockingSorcererWithFastBlock) // Skipped frames and ignored |
|
|
|
{ |
|
|
|
{ |
|
|
|
RunAnimationTest( |
|
|
|
RunAnimationTest( |
|
|
|
{ |
|
|
|
{ |
|
|
|
new SetNewAnimationData(6, 2, AnimationDistributionParams::SkipsDelayOfLastFrame, 4), |
|
|
|
new SetNewAnimationData(6, 2, AnimationDistributionFlags::SkipsDelayOfLastFrame, 4), |
|
|
|
new RenderingData(0.0f, 1), |
|
|
|
new RenderingData(0.0f, 1), |
|
|
|
new RenderingData(0.3f, 1), |
|
|
|
new RenderingData(0.3f, 1), |
|
|
|
new RenderingData(0.6f, 1), |
|
|
|
new RenderingData(0.6f, 1), |
|
|
|
@ -394,7 +394,7 @@ TEST(AnimationInfo, HitRecoverySorcererZenMode) // Skipped frames and ignored de |
|
|
|
{ |
|
|
|
{ |
|
|
|
RunAnimationTest( |
|
|
|
RunAnimationTest( |
|
|
|
{ |
|
|
|
{ |
|
|
|
new SetNewAnimationData(8, 0, AnimationDistributionParams::None, 4), |
|
|
|
new SetNewAnimationData(8, 0, AnimationDistributionFlags::None, 4), |
|
|
|
new RenderingData(0.0f, 1), |
|
|
|
new RenderingData(0.0f, 1), |
|
|
|
new RenderingData(0.3f, 1), |
|
|
|
new RenderingData(0.3f, 1), |
|
|
|
new RenderingData(0.6f, 2), |
|
|
|
new RenderingData(0.6f, 2), |
|
|
|
|