@ -39,6 +39,7 @@ All rights reserved.
# include "AdventuresInLestoria.h"
# include "AdventuresInLestoria.h"
# include "DEFINES.h"
# include "DEFINES.h"
# include "safemap.h"
# include "safemap.h"
# include <ranges>
INCLUDE_game
INCLUDE_game
INCLUDE_ANIMATION_DATA
INCLUDE_ANIMATION_DATA
@ -240,6 +241,33 @@ void sig::Animation::InitializeAnimations(){
ANIMATION_DATA [ " THIEF_DEADLYDASH_S " ] = pl_thief_deadlydash_s ;
ANIMATION_DATA [ " THIEF_DEADLYDASH_S " ] = pl_thief_deadlydash_s ;
ANIMATION_DATA [ " THIEF_DEADLYDASH_W " ] = pl_thief_deadlydash_w ;
ANIMATION_DATA [ " THIEF_DEADLYDASH_W " ] = pl_thief_deadlydash_w ;
//Trapper animations
SetupClassWalkIdleAnimations ( GFX [ " nico-trapper.png " ] , " TRAPPER " ) ;
Animate2D : : FrameSequence pl_trapper_shoot_s , pl_trapper_shoot_n , pl_trapper_shoot_e , pl_trapper_shoot_w ;
Animate2D : : FrameSequence pl_trapper_setTrap_s , pl_trapper_setTrap_n , pl_trapper_setTrap_e , pl_trapper_setTrap_w ;
for ( int i = 0 ; i < 3 ; i + + ) {
pl_trapper_shoot_s . AddFrame ( { & GFX [ " nico-trapper.png " ] , { vi2d { 3 + i , 0 } * 24 , { 24 , 24 } } } ) ;
pl_trapper_shoot_n . AddFrame ( { & GFX [ " nico-trapper.png " ] , { vi2d { 3 + i , 1 } * 24 , { 24 , 24 } } } ) ;
pl_trapper_shoot_e . AddFrame ( { & GFX [ " nico-trapper.png " ] , { vi2d { 3 + i , 3 } * 24 , { 24 , 24 } } } ) ;
pl_trapper_shoot_w . AddFrame ( { & GFX [ " nico-trapper.png " ] , { vi2d { 3 + i , 2 } * 24 , { 24 , 24 } } } ) ;
}
for ( int i : std : : ranges : : iota_view ( 0 , 5 ) ) {
pl_trapper_setTrap_s . AddFrame ( { & GFX [ " nico-trapper.png " ] , { vi2d { 1 + i , 4 } * 24 , { 24 , 24 } } } ) ;
pl_trapper_setTrap_n . AddFrame ( { & GFX [ " nico-trapper.png " ] , { vi2d { 1 + i , 5 } * 24 , { 24 , 24 } } } ) ;
int frameInd { i } ;
if ( i = = 4 ) frameInd - - ; //One less frame for East and West facing sprites.
pl_trapper_setTrap_e . AddFrame ( { & GFX [ " nico-trapper.png " ] , { vi2d { 1 + frameInd , 6 } * 24 , { 24 , 24 } } } ) ;
pl_trapper_setTrap_w . AddFrame ( { & GFX [ " nico-trapper.png " ] , { vi2d { 1 + frameInd , 7 } * 24 , { 24 , 24 } } } ) ;
}
ANIMATION_DATA [ " TRAPPER_SHOOT_S " ] = pl_trapper_shoot_s ;
ANIMATION_DATA [ " TRAPPER_SHOOT_N " ] = pl_trapper_shoot_n ;
ANIMATION_DATA [ " TRAPPER_SHOOT_E " ] = pl_trapper_shoot_e ;
ANIMATION_DATA [ " TRAPPER_SHOOT_W " ] = pl_trapper_shoot_w ;
ANIMATION_DATA [ " TRAPPER_SETTRAP_S " ] = pl_trapper_setTrap_s ;
ANIMATION_DATA [ " TRAPPER_SETTRAP_N " ] = pl_trapper_setTrap_n ;
ANIMATION_DATA [ " TRAPPER_SETTRAP_E " ] = pl_trapper_setTrap_e ;
ANIMATION_DATA [ " TRAPPER_SETTRAP_W " ] = pl_trapper_setTrap_w ;
CreateHorizontalAnimationSequence ( " ground-slam-attack-back.png " , 5 , { 64 , 64 } , { 0.02f , Animate2D : : Style : : OneShot } ) ;
CreateHorizontalAnimationSequence ( " ground-slam-attack-back.png " , 5 , { 64 , 64 } , { 0.02f , Animate2D : : Style : : OneShot } ) ;
CreateHorizontalAnimationSequence ( " ground-slam-attack-front.png " , 5 , { 64 , 64 } , { 0.02f , Animate2D : : Style : : OneShot } ) ;
CreateHorizontalAnimationSequence ( " ground-slam-attack-front.png " , 5 , { 64 , 64 } , { 0.02f , Animate2D : : Style : : OneShot } ) ;
CreateHorizontalAnimationSequence ( " battlecry_effect.png " , 5 , { 84 , 84 } , { 0.02f , Animate2D : : Style : : OneShot } ) ;
CreateHorizontalAnimationSequence ( " battlecry_effect.png " , 5 , { 84 , 84 } , { 0.02f , Animate2D : : Style : : OneShot } ) ;