|
|
@ -6,43 +6,62 @@ INCLUDE_game |
|
|
|
INCLUDE_ANIMATION_DATA |
|
|
|
INCLUDE_ANIMATION_DATA |
|
|
|
|
|
|
|
|
|
|
|
void sig::Animation::InitializeAnimations(){ |
|
|
|
void sig::Animation::InitializeAnimations(){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
auto CreateStillAnimation=[&](Renderable&img,vf2d size,AnimationState state,AnimationData data={}){ |
|
|
|
|
|
|
|
Animate2D::FrameSequence anim(data.frameDuration,data.style); |
|
|
|
|
|
|
|
anim.AddFrame({&img,{{0,0},size}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[state]=anim; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
auto CreateHorizontalAnimationSequence=[&](Renderable&img,int frameCount,vf2d size,AnimationState state,AnimationData data={}){ |
|
|
|
|
|
|
|
Animate2D::FrameSequence anim(data.frameDuration,data.style); |
|
|
|
|
|
|
|
for(int i=0;i<frameCount;i++){ |
|
|
|
|
|
|
|
anim.AddFrame({&img,{{int(i*size.x),0},size}}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
ANIMATION_DATA[state]=anim; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
auto SetupClassWalkIdleAnimations=[&](Renderable&sheet,AnimationState WALK_S_ANIMATION){ |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_walk_s{0.2}; |
|
|
|
|
|
|
|
pl_walk_s.AddFrame({&sheet,{vi2d{0,0}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_walk_s.AddFrame({&sheet,{vi2d{1,0}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_walk_s.AddFrame({&sheet,{vi2d{0,0}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_walk_s.AddFrame({&sheet,{vi2d{2,0}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState(WALK_S_ANIMATION+0)]=pl_walk_s; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_walk_e{0.2}; |
|
|
|
|
|
|
|
pl_walk_e.AddFrame({&sheet,{vi2d{0,3}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_walk_e.AddFrame({&sheet,{vi2d{1,3}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_walk_e.AddFrame({&sheet,{vi2d{0,3}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_walk_e.AddFrame({&sheet,{vi2d{2,3}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState(WALK_S_ANIMATION+1)]=pl_walk_e; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_walk_w{0.2}; |
|
|
|
|
|
|
|
pl_walk_w.AddFrame({&sheet,{vi2d{0,2}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_walk_w.AddFrame({&sheet,{vi2d{1,2}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_walk_w.AddFrame({&sheet,{vi2d{0,2}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_walk_w.AddFrame({&sheet,{vi2d{2,2}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState(WALK_S_ANIMATION+3)]=pl_walk_w; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_walk_n{0.2}; |
|
|
|
|
|
|
|
pl_walk_n.AddFrame({&sheet,{vi2d{0,1}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_walk_n.AddFrame({&sheet,{vi2d{1,1}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_walk_n.AddFrame({&sheet,{vi2d{0,1}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_walk_n.AddFrame({&sheet,{vi2d{2,1}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState(WALK_S_ANIMATION+2)]=pl_walk_n; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_idle_s; |
|
|
|
|
|
|
|
pl_idle_s.AddFrame({&sheet,{vi2d{0,0}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState(WALK_S_ANIMATION+4)]=pl_idle_s; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_idle_e; |
|
|
|
|
|
|
|
pl_idle_e.AddFrame({&sheet,{vi2d{0,3}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState(WALK_S_ANIMATION+5)]=pl_idle_e; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_idle_w; |
|
|
|
|
|
|
|
pl_idle_w.AddFrame({&sheet,{vi2d{0,2}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState(WALK_S_ANIMATION+7)]=pl_idle_w; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_idle_n; |
|
|
|
|
|
|
|
pl_idle_n.AddFrame({&sheet,{vi2d{0,1}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState(WALK_S_ANIMATION+6)]=pl_idle_n; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
//Warrior animations.
|
|
|
|
//Warrior animations.
|
|
|
|
Animate2D::FrameSequence pl_warrior_walk_s{0.2}; |
|
|
|
SetupClassWalkIdleAnimations(game->GFX_Warrior_Sheet,AnimationState::WARRIOR_WALK_S); |
|
|
|
pl_warrior_walk_s.AddFrame({&game->GFX_Warrior_Sheet,{vi2d{0,0}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_warrior_walk_s.AddFrame({&game->GFX_Warrior_Sheet,{vi2d{1,0}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_warrior_walk_s.AddFrame({&game->GFX_Warrior_Sheet,{vi2d{0,0}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_warrior_walk_s.AddFrame({&game->GFX_Warrior_Sheet,{vi2d{2,0}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::WARRIOR_WALK_S]=pl_warrior_walk_s; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_warrior_walk_e{0.2}; |
|
|
|
|
|
|
|
pl_warrior_walk_e.AddFrame({&game->GFX_Warrior_Sheet,{vi2d{0,3}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_warrior_walk_e.AddFrame({&game->GFX_Warrior_Sheet,{vi2d{1,3}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_warrior_walk_e.AddFrame({&game->GFX_Warrior_Sheet,{vi2d{0,3}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_warrior_walk_e.AddFrame({&game->GFX_Warrior_Sheet,{vi2d{2,3}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::WARRIOR_WALK_E]=pl_warrior_walk_e; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_warrior_walk_w{0.2}; |
|
|
|
|
|
|
|
pl_warrior_walk_w.AddFrame({&game->GFX_Warrior_Sheet,{vi2d{0,2}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_warrior_walk_w.AddFrame({&game->GFX_Warrior_Sheet,{vi2d{1,2}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_warrior_walk_w.AddFrame({&game->GFX_Warrior_Sheet,{vi2d{0,2}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_warrior_walk_w.AddFrame({&game->GFX_Warrior_Sheet,{vi2d{2,2}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::WARRIOR_WALK_W]=pl_warrior_walk_w; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_warrior_walk_n{0.2}; |
|
|
|
|
|
|
|
pl_warrior_walk_n.AddFrame({&game->GFX_Warrior_Sheet,{vi2d{0,1}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_warrior_walk_n.AddFrame({&game->GFX_Warrior_Sheet,{vi2d{1,1}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_warrior_walk_n.AddFrame({&game->GFX_Warrior_Sheet,{vi2d{0,1}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_warrior_walk_n.AddFrame({&game->GFX_Warrior_Sheet,{vi2d{2,1}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::WARRIOR_WALK_N]=pl_warrior_walk_n; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_warrior_idle_s; |
|
|
|
|
|
|
|
pl_warrior_idle_s.AddFrame({&game->GFX_Warrior_Sheet,{vi2d{0,0}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::WARRIOR_IDLE_S]=pl_warrior_idle_s; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_warrior_idle_e; |
|
|
|
|
|
|
|
pl_warrior_idle_e.AddFrame({&game->GFX_Warrior_Sheet,{vi2d{0,3}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::WARRIOR_IDLE_E]=pl_warrior_idle_e; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_warrior_idle_w; |
|
|
|
|
|
|
|
pl_warrior_idle_w.AddFrame({&game->GFX_Warrior_Sheet,{vi2d{0,2}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::WARRIOR_IDLE_W]=pl_warrior_idle_w; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_warrior_idle_n; |
|
|
|
|
|
|
|
pl_warrior_idle_n.AddFrame({&game->GFX_Warrior_Sheet,{vi2d{0,1}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::WARRIOR_IDLE_N]=pl_warrior_idle_n; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_warrior_swing_s(0.05),pl_warrior_swing_n(0.05),pl_warrior_swing_e(0.05),pl_warrior_swing_w(0.05); |
|
|
|
Animate2D::FrameSequence pl_warrior_swing_s(0.05),pl_warrior_swing_n(0.05),pl_warrior_swing_e(0.05),pl_warrior_swing_w(0.05); |
|
|
|
Animate2D::FrameSequence pl_warrior_sonic_swing_s(0.1,Animate2D::Style::OneShot),pl_warrior_sonic_swing_n(0.1,Animate2D::Style::OneShot),pl_warrior_sonic_swing_e(0.1,Animate2D::Style::OneShot),pl_warrior_sonic_swing_w(0.1,Animate2D::Style::OneShot); |
|
|
|
Animate2D::FrameSequence pl_warrior_sonic_swing_s(0.1,Animate2D::Style::OneShot),pl_warrior_sonic_swing_n(0.1,Animate2D::Style::OneShot),pl_warrior_sonic_swing_e(0.1,Animate2D::Style::OneShot),pl_warrior_sonic_swing_w(0.1,Animate2D::Style::OneShot); |
|
|
|
for (int i=0;i<4;i++){ |
|
|
|
for (int i=0;i<4;i++){ |
|
|
@ -71,80 +90,10 @@ void sig::Animation::InitializeAnimations(){ |
|
|
|
ANIMATION_DATA[AnimationState::WARRIOR_SWINGSONICSWORD_W]=pl_warrior_sonic_swing_w; |
|
|
|
ANIMATION_DATA[AnimationState::WARRIOR_SWINGSONICSWORD_W]=pl_warrior_sonic_swing_w; |
|
|
|
|
|
|
|
|
|
|
|
//Ranger animations
|
|
|
|
//Ranger animations
|
|
|
|
Animate2D::FrameSequence pl_ranger_walk_s{0.2}; |
|
|
|
SetupClassWalkIdleAnimations(game->GFX_Ranger_Sheet,AnimationState::RANGER_WALK_S); |
|
|
|
pl_ranger_walk_s.AddFrame({&game->GFX_Ranger_Sheet,{vi2d{0,0}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_ranger_walk_s.AddFrame({&game->GFX_Ranger_Sheet,{vi2d{1,0}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_ranger_walk_s.AddFrame({&game->GFX_Ranger_Sheet,{vi2d{0,0}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_ranger_walk_s.AddFrame({&game->GFX_Ranger_Sheet,{vi2d{2,0}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::RANGER_WALK_S]=pl_ranger_walk_s; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_ranger_walk_e{0.2}; |
|
|
|
|
|
|
|
pl_ranger_walk_e.AddFrame({&game->GFX_Ranger_Sheet,{vi2d{0,3}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_ranger_walk_e.AddFrame({&game->GFX_Ranger_Sheet,{vi2d{1,3}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_ranger_walk_e.AddFrame({&game->GFX_Ranger_Sheet,{vi2d{0,3}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_ranger_walk_e.AddFrame({&game->GFX_Ranger_Sheet,{vi2d{2,3}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::RANGER_WALK_E]=pl_ranger_walk_e; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_ranger_walk_w{0.2}; |
|
|
|
|
|
|
|
pl_ranger_walk_w.AddFrame({&game->GFX_Ranger_Sheet,{vi2d{0,2}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_ranger_walk_w.AddFrame({&game->GFX_Ranger_Sheet,{vi2d{1,2}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_ranger_walk_w.AddFrame({&game->GFX_Ranger_Sheet,{vi2d{0,2}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_ranger_walk_w.AddFrame({&game->GFX_Ranger_Sheet,{vi2d{2,2}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::RANGER_WALK_W]=pl_ranger_walk_w; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_ranger_walk_n{0.2}; |
|
|
|
|
|
|
|
pl_ranger_walk_n.AddFrame({&game->GFX_Ranger_Sheet,{vi2d{0,1}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_ranger_walk_n.AddFrame({&game->GFX_Ranger_Sheet,{vi2d{1,1}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_ranger_walk_n.AddFrame({&game->GFX_Ranger_Sheet,{vi2d{0,1}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_ranger_walk_n.AddFrame({&game->GFX_Ranger_Sheet,{vi2d{2,1}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::RANGER_WALK_N]=pl_ranger_walk_n; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_ranger_idle_s; |
|
|
|
|
|
|
|
pl_ranger_idle_s.AddFrame({&game->GFX_Ranger_Sheet,{vi2d{0,0}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::RANGER_IDLE_S]=pl_ranger_idle_s; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_ranger_idle_e; |
|
|
|
|
|
|
|
pl_ranger_idle_e.AddFrame({&game->GFX_Ranger_Sheet,{vi2d{0,3}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::RANGER_IDLE_E]=pl_ranger_idle_e; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_ranger_idle_w; |
|
|
|
|
|
|
|
pl_ranger_idle_w.AddFrame({&game->GFX_Ranger_Sheet,{vi2d{0,2}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::RANGER_IDLE_W]=pl_ranger_idle_w; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_ranger_idle_n; |
|
|
|
|
|
|
|
pl_ranger_idle_n.AddFrame({&game->GFX_Ranger_Sheet,{vi2d{0,1}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::RANGER_IDLE_N]=pl_ranger_idle_n; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Wizard animations
|
|
|
|
//Wizard animations
|
|
|
|
Animate2D::FrameSequence pl_wizard_walk_s{0.2}; |
|
|
|
SetupClassWalkIdleAnimations(game->GFX_Wizard_Sheet,AnimationState::WIZARD_WALK_S); |
|
|
|
pl_wizard_walk_s.AddFrame({&game->GFX_Wizard_Sheet,{vi2d{0,0}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_wizard_walk_s.AddFrame({&game->GFX_Wizard_Sheet,{vi2d{1,0}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_wizard_walk_s.AddFrame({&game->GFX_Wizard_Sheet,{vi2d{0,0}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_wizard_walk_s.AddFrame({&game->GFX_Wizard_Sheet,{vi2d{2,0}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::WIZARD_WALK_S]=pl_wizard_walk_s; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_wizard_walk_e{0.2}; |
|
|
|
|
|
|
|
pl_wizard_walk_e.AddFrame({&game->GFX_Wizard_Sheet,{vi2d{0,3}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_wizard_walk_e.AddFrame({&game->GFX_Wizard_Sheet,{vi2d{1,3}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_wizard_walk_e.AddFrame({&game->GFX_Wizard_Sheet,{vi2d{0,3}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_wizard_walk_e.AddFrame({&game->GFX_Wizard_Sheet,{vi2d{2,3}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::WIZARD_WALK_E]=pl_wizard_walk_e; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_wizard_walk_w{0.2}; |
|
|
|
|
|
|
|
pl_wizard_walk_w.AddFrame({&game->GFX_Wizard_Sheet,{vi2d{0,2}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_wizard_walk_w.AddFrame({&game->GFX_Wizard_Sheet,{vi2d{1,2}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_wizard_walk_w.AddFrame({&game->GFX_Wizard_Sheet,{vi2d{0,2}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_wizard_walk_w.AddFrame({&game->GFX_Wizard_Sheet,{vi2d{2,2}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::WIZARD_WALK_W]=pl_wizard_walk_w; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_wizard_walk_n{0.2}; |
|
|
|
|
|
|
|
pl_wizard_walk_n.AddFrame({&game->GFX_Wizard_Sheet,{vi2d{0,1}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_wizard_walk_n.AddFrame({&game->GFX_Wizard_Sheet,{vi2d{1,1}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_wizard_walk_n.AddFrame({&game->GFX_Wizard_Sheet,{vi2d{0,1}*24,{24,24}}}); |
|
|
|
|
|
|
|
pl_wizard_walk_n.AddFrame({&game->GFX_Wizard_Sheet,{vi2d{2,1}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::WIZARD_WALK_N]=pl_wizard_walk_n; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_wizard_idle_s; |
|
|
|
|
|
|
|
pl_wizard_idle_s.AddFrame({&game->GFX_Wizard_Sheet,{vi2d{0,0}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::WIZARD_IDLE_S]=pl_wizard_idle_s; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_wizard_idle_e; |
|
|
|
|
|
|
|
pl_wizard_idle_e.AddFrame({&game->GFX_Wizard_Sheet,{vi2d{0,3}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::WIZARD_IDLE_E]=pl_wizard_idle_e; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_wizard_idle_w; |
|
|
|
|
|
|
|
pl_wizard_idle_w.AddFrame({&game->GFX_Wizard_Sheet,{vi2d{0,2}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::WIZARD_IDLE_W]=pl_wizard_idle_w; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_wizard_idle_n; |
|
|
|
|
|
|
|
pl_wizard_idle_n.AddFrame({&game->GFX_Wizard_Sheet,{vi2d{0,1}*24,{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::WIZARD_IDLE_N]=pl_wizard_idle_n; |
|
|
|
|
|
|
|
Animate2D::FrameSequence pl_wizard_idle_attack_s; |
|
|
|
Animate2D::FrameSequence pl_wizard_idle_attack_s; |
|
|
|
pl_wizard_idle_attack_s.AddFrame({&game->GFX_Wizard_Sheet,{vi2d{4,0}*24,{24,24}}}); |
|
|
|
pl_wizard_idle_attack_s.AddFrame({&game->GFX_Wizard_Sheet,{vi2d{4,0}*24,{24,24}}}); |
|
|
|
ANIMATION_DATA[AnimationState::WIZARD_IDLE_ATTACK_S]=pl_wizard_idle_attack_s; |
|
|
|
ANIMATION_DATA[AnimationState::WIZARD_IDLE_ATTACK_S]=pl_wizard_idle_attack_s; |
|
|
@ -226,81 +175,38 @@ void sig::Animation::InitializeAnimations(){ |
|
|
|
ANIMATION_DATA[AnimationState(AnimationState::GREEN_SLIME_IDLE+state+slime*5)]=anim; |
|
|
|
ANIMATION_DATA[AnimationState(AnimationState::GREEN_SLIME_IDLE+state+slime*5)]=anim; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
Animate2D::FrameSequence effect_groundslam_back(0.02f,Animate2D::Style::OneShot),effect_groundslam_front(0.02f,Animate2D::Style::OneShot); |
|
|
|
CreateHorizontalAnimationSequence(game->GFX_Effect_GroundSlam_Back,5,{64,64},AnimationState::GROUND_SLAM_ATTACK_BACK,{0.02,Animate2D::Style::OneShot}); |
|
|
|
for(int i=0;i<5;i++){ |
|
|
|
CreateHorizontalAnimationSequence(game->GFX_Effect_GroundSlam_Front,5,{64,64},AnimationState::GROUND_SLAM_ATTACK_FRONT,{0.02,Animate2D::Style::OneShot}); |
|
|
|
effect_groundslam_back.AddFrame({&game->GFX_Effect_GroundSlam_Back,{{i*64,0},{64,64}}}); |
|
|
|
CreateHorizontalAnimationSequence(game->GFX_Battlecry_Effect,5,{84,84},AnimationState::BATTLECRY_EFFECT,{0.02,Animate2D::Style::OneShot}); |
|
|
|
effect_groundslam_front.AddFrame({&game->GFX_Effect_GroundSlam_Front,{{i*64,0},{64,64}}}); |
|
|
|
CreateHorizontalAnimationSequence(game->GFX_SonicSlash,4,{60,60},AnimationState::SONICSLASH,{0.04,Animate2D::Style::OneShot}); |
|
|
|
} |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::GROUND_SLAM_ATTACK_BACK]=effect_groundslam_back; |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::GROUND_SLAM_ATTACK_FRONT]=effect_groundslam_front; |
|
|
|
|
|
|
|
Animate2D::FrameSequence battlecry_effect(0.02f,Animate2D::Style::OneShot); |
|
|
|
|
|
|
|
for(int i=0;i<5;i++){ |
|
|
|
|
|
|
|
battlecry_effect.AddFrame({&game->GFX_Battlecry_Effect,{{i*84,0},{84,84}}}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::BATTLECRY_EFFECT]=battlecry_effect; |
|
|
|
|
|
|
|
Animate2D::FrameSequence sonicslash_effect(0.04f,Animate2D::Style::OneShot); |
|
|
|
|
|
|
|
for(int i=0;i<4;i++){ |
|
|
|
|
|
|
|
sonicslash_effect.AddFrame({&game->GFX_SonicSlash,{{i*60,0},{60,60}}}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::SONICSLASH]=sonicslash_effect; |
|
|
|
|
|
|
|
Animate2D::FrameSequence energy_bolt; |
|
|
|
|
|
|
|
energy_bolt.AddFrame({&game->GFX_EnergyBolt,{{0,0},{24,24}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::ENERGY_BOLT]=energy_bolt; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Animate2D::FrameSequence energy_particle; |
|
|
|
CreateStillAnimation(game->GFX_EnergyBolt,{24,24},AnimationState::ENERGY_BOLT); |
|
|
|
for(int i=0;i<3;i++){ |
|
|
|
|
|
|
|
energy_particle.AddFrame({&game->GFX_EnergyParticle,{{i*3,0},{3,3}}}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::ENERGY_PARTICLE]=energy_particle; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Animate2D::FrameSequence splash_animation(0.05); |
|
|
|
CreateHorizontalAnimationSequence(game->GFX_EnergyParticle,3,{3,3},AnimationState::ENERGY_PARTICLE); |
|
|
|
for(int i=0;i<5;i++){ |
|
|
|
|
|
|
|
splash_animation.AddFrame({&game->GFX_Splash_Effect,{{i*24,0},{24,24}}}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::SPLASH_EFFECT]=splash_animation; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Animate2D::FrameSequence dot_particle; |
|
|
|
CreateHorizontalAnimationSequence(game->GFX_Splash_Effect,5,{24,24},AnimationState::LIGHTNING_BOLT,{0.05}); |
|
|
|
dot_particle.AddFrame({&game->GFX_BulletCircle,{{0,0},{3,3}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::DOT_PARTICLE]=dot_particle; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Animate2D::FrameSequence lightningbolt(0.03,Animate2D::Style::PingPong); |
|
|
|
CreateStillAnimation(game->GFX_BulletCircle,{3,3},AnimationState::DOT_PARTICLE); |
|
|
|
for(int i=0;i<5;i++){ |
|
|
|
|
|
|
|
lightningbolt.AddFrame({&game->GFX_LightningBolt,{{i*24,0},{24,24}}}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::LIGHTNING_BOLT]=lightningbolt; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Animate2D::FrameSequence lightningboltpart1; |
|
|
|
CreateHorizontalAnimationSequence(game->GFX_LightningBolt,5,{24,24},AnimationState::LIGHTNING_BOLT,{0.03,Animate2D::Style::PingPong}); |
|
|
|
lightningboltpart1.AddFrame({&game->GFX_LightningBoltParticle1,{{0,0},{5,5}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::LIGHTNING_BOLT_PARTICLE1]=lightningboltpart1; |
|
|
|
|
|
|
|
Animate2D::FrameSequence lightningboltpart2; |
|
|
|
|
|
|
|
lightningboltpart2.AddFrame({&game->GFX_LightningBoltParticle2,{{0,0},{5,5}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::LIGHTNING_BOLT_PARTICLE2]=lightningboltpart2; |
|
|
|
|
|
|
|
Animate2D::FrameSequence lightningboltpart3; |
|
|
|
|
|
|
|
lightningboltpart3.AddFrame({&game->GFX_LightningBoltParticle3,{{0,0},{5,5}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::LIGHTNING_BOLT_PARTICLE3]=lightningboltpart3; |
|
|
|
|
|
|
|
Animate2D::FrameSequence lightningboltpart4; |
|
|
|
|
|
|
|
lightningboltpart4.AddFrame({&game->GFX_LightningBoltParticle4,{{0,0},{5,5}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::LIGHTNING_BOLT_PARTICLE4]=lightningboltpart4; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Animate2D::FrameSequence chainlightning; |
|
|
|
CreateStillAnimation(game->GFX_LightningBoltParticle1,{5,5},AnimationState::LIGHTNING_BOLT_PARTICLE1); |
|
|
|
chainlightning.AddFrame({&game->GFX_ChainLightning,{{0,0},{1,9}}}); |
|
|
|
CreateStillAnimation(game->GFX_LightningBoltParticle2,{5,5},AnimationState::LIGHTNING_BOLT_PARTICLE2); |
|
|
|
ANIMATION_DATA[AnimationState::CHAIN_LIGHTNING]=chainlightning; |
|
|
|
CreateStillAnimation(game->GFX_LightningBoltParticle3,{5,5},AnimationState::LIGHTNING_BOLT_PARTICLE3); |
|
|
|
|
|
|
|
CreateStillAnimation(game->GFX_LightningBoltParticle4,{5,5},AnimationState::LIGHTNING_BOLT_PARTICLE4); |
|
|
|
|
|
|
|
|
|
|
|
Animate2D::FrameSequence lightningsplash; |
|
|
|
CreateStillAnimation(game->GFX_ChainLightning,{1,9},AnimationState::CHAIN_LIGHTNING); |
|
|
|
for(int i=0;i<5;i++){ |
|
|
|
|
|
|
|
lightningsplash.AddFrame({&game->GFX_LightningSplash,{{i*24,0},{24,24}}}); |
|
|
|
CreateHorizontalAnimationSequence(game->GFX_LightningSplash,5,{24,24},AnimationState::LIGHTNING_SPLASH); |
|
|
|
} |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::LIGHTNING_SPLASH]=lightningsplash; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Animate2D::FrameSequence meteor; |
|
|
|
CreateStillAnimation(game->GFX_Meteor,{192,192},AnimationState::METEOR); |
|
|
|
meteor.AddFrame({&game->GFX_Meteor,{{0,0},{192,192}}}); |
|
|
|
|
|
|
|
ANIMATION_DATA[AnimationState::METEOR]=meteor; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(int i=0;i<5;i++){ |
|
|
|
for(int i=0;i<5;i++){ |
|
|
|
Animate2D::FrameSequence firering; |
|
|
|
Animate2D::FrameSequence firering; |
|
|
|
firering.AddFrame({&game->GFX_LightningSplash,{{i*24,0},{24,24}}}); |
|
|
|
firering.AddFrame({&game->GFX_LightningSplash,{{i*24,0},{24,24}}}); |
|
|
|
ANIMATION_DATA[AnimationState(AnimationState::FIRE_RING1+i)]=firering; |
|
|
|
ANIMATION_DATA[AnimationState(AnimationState::FIRE_RING1+i)]=firering; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
CreateStillAnimation(game->GFX_Arrow,{24,24},AnimationState::ARROW); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void sig::Animation::SetupPlayerAnimations(){ |
|
|
|
void sig::Animation::SetupPlayerAnimations(){ |
|
|
|