void InitFramePlayer ( struct PLAYER_FRAME * p ) { p -> m_bFristFrame = true ; p -> m_bSecondFrame = false ; p -> m_bThirdFrame = false ; p -> m_fFrameTime = 0.0f ; } void PlayerFrameSetup ( struct PLAYER_FRAME * p ) { p -> m_bFristFrame = true ; p -> m_bSecondFrame = false ; p -> m_bThirdFrame = false ; } void PlayerFrameMove ( struct PLAYER_FRAME * p , float _dt ) { p -> m_fFrameTime += _dt ; if ( p -> m_fFrameTime > 0.0f && p -> m_fFrameTime < 0.4f ) { p -> m_bFristFrame = false ; p -> m_bSecondFrame = true ; p -> m_bThirdFrame = false ; //cout << p->m_fFrameTime << endl; } else if ( p -> m_fFrameTime >= 0.4f && p -> m_fFrameTime < 0.8f ) { p -> m_bFristFrame = false ; p -> m_bSecondFrame = false ; p -> m_bThirdFrame = true ; //cout << p->m_fFrameTime << endl; } else { p -> m_fFrameTime = 0.0f ; //cout << p->m_fFrameTime << endl; } } void InitFrameBoom ( struct BOOM_FRAME * p ) { p -> m_fFrameTime = 0.0f ; p -> m_nCurrentFrame = 0 ; } void BoomFrameSetup ( struct BOOM_FRAME * p ) { p -> m_fFrameTime = 0.0f ; p -> m_nCurrentFrame = 0 ; } void BoomFrameMove ( struct BOOM_FRAME * p , float _dt ) { p -> m_fFrameTime += _dt * 4.0f ; if ( p -> m_fFrameTime > 0.0f && p -> m_fFrameTime < 0.2f ) { p -> m_nCurrentFrame = 1 ; } else if ( p -> m_fFrameTime >= 0.2f && p -> m_fFrameTime < 0.4f ) { p -> m_nCurrentFrame = 2 ; } else if ( p -> m_fFrameTime >= 0.4f && p -> m_fFrameTime < 0.6f ) { p -> m_nCurrentFrame = 3 ; } else if ( p -> m_fFrameTime >= 0.6f && p -> m_fFrameTime < 0.8f ) { p -> m_nCurrentFrame = 4 ; } else if ( p -> m_fFrameTime >= 0.8f && p -> m_fFrameTime < 1.0f ) { p -> m_nCurrentFrame = 5 ; } else if ( p -> m_fFrameTime >= 1.0f && p -> m_fFrameTime < 1.2f ) { p -> m_nCurrentFrame = 6 ; } else if ( p -> m_fFrameTime >= 1.2f && p -> m_fFrameTime < 1.4f ) { p -> m_nCurrentFrame = 7 ; } else if ( p -> m_fFrameTime >= 1.4f && p -> m_fFrameTime < 1.6f ) { p -> m_nCurrentFrame = 8 ; } else if ( p -> m_fFrameTime >= 1.6f && p -> m_fFrameTime < 1.8f ) { p -> m_nCurrentFrame = 9 ; } else if ( p -> m_fFrameTime >= 1.8f && p -> m_fFrameTime < 2.0f ) { p -> m_nCurrentFrame = 10 ; } else if ( p -> m_fFrameTime >= 2.0f && p -> m_fFrameTime < 2.2f ) { p -> m_nCurrentFrame = 11 ; } else if ( p -> m_fFrameTime >= 2.2f && p -> m_fFrameTime < 2.4f ) { p -> m_nCurrentFrame = 12 ; } else if ( p -> m_fFrameTime >= 2.4f && p -> m_fFrameTime < 2.6f ) { p -> m_nCurrentFrame = 13 ; } else if ( p -> m_fFrameTime >= 2.6f && p -> m_fFrameTime < 2.8f ) { p -> m_nCurrentFrame = 14 ; } else if ( p -> m_fFrameTime >= 2.8f && p -> m_fFrameTime < 3.0f ) { p -> m_nCurrentFrame = 15 ; } else if ( p -> m_fFrameTime >= 3.0f && p -> m_fFrameTime < 3.2f ) { p -> m_nCurrentFrame = 16 ; } else if ( p -> m_fFrameTime >= 3.2f && p -> m_fFrameTime < 3.4f ) { p -> m_nCurrentFrame = 17 ; } else if ( p -> m_fFrameTime >= 3.4f && p -> m_fFrameTime < 3.6f ) { p -> m_nCurrentFrame = 18 ; } else if ( p -> m_fFrameTime >= 3.6f && p -> m_fFrameTime < 3.8f ) { p -> m_nCurrentFrame = 19 ; } else if ( p -> m_fFrameTime >= 3.8f && p -> m_fFrameTime < 4.0f ) { p -> m_nCurrentFrame = 20 ; } else if ( p -> m_fFrameTime >= 4.0f && p -> m_fFrameTime < 4.2f ) { p -> m_nCurrentFrame = 21 ; } else if ( p -> m_fFrameTime >= 4.2f && p -> m_fFrameTime < 4.4f ) { p -> m_nCurrentFrame = 22 ; } else if ( p -> m_fFrameTime >= 4.4f && p -> m_fFrameTime < 4.6f ) { p -> m_nCurrentFrame = 23 ; } else if ( p -> m_fFrameTime >= 4.6f && p -> m_fFrameTime < 4.8f ) { p -> m_nCurrentFrame = 24 ; } else if ( p -> m_fFrameTime >= 4.8f && p -> m_fFrameTime < 5.0f ) { p -> m_nCurrentFrame = 25 ; } else if ( p -> m_fFrameTime >= 5.0f && p -> m_fFrameTime < 5.2f ) { p -> m_nCurrentFrame = 26 ; } else if ( p -> m_fFrameTime >= 5.2f && p -> m_fFrameTime < 5.4f ) { p -> m_nCurrentFrame = 27 ; } else if ( p -> m_fFrameTime >= 5.4f && p -> m_fFrameTime < 5.6f ) { p -> m_nCurrentFrame = 28 ; } else if ( p -> m_fFrameTime >= 5.6f && p -> m_fFrameTime < 5.8f ) { p -> m_nCurrentFrame = 29 ; } else if ( p -> m_fFrameTime >= 5.8f && p -> m_fFrameTime < 6.0f ) { p -> m_nCurrentFrame = 30 ; } else if ( p -> m_fFrameTime >= 6.0f && p -> m_fFrameTime < 6.2f ) { p -> m_nCurrentFrame = 31 ; } else if ( p -> m_fFrameTime >= 6.2f && p -> m_fFrameTime < 6.4f ) { p -> m_nCurrentFrame = 32 ; } else if ( p -> m_fFrameTime >= 6.4f && p -> m_fFrameTime < 6.6f ) { p -> m_nCurrentFrame = 33 ; } else if ( p -> m_fFrameTime >= 6.6f && p -> m_fFrameTime < 6.8f ) { p -> m_nCurrentFrame = 34 ; } else if ( p -> m_fFrameTime >= 6.8f && p -> m_fFrameTime < 7.0f ) { p -> m_nCurrentFrame = 35 ; } else if ( p -> m_fFrameTime >= 7.0f && p -> m_fFrameTime < 7.2f ) { p -> m_nCurrentFrame = 36 ; } else if ( p -> m_fFrameTime >= 7.2f && p -> m_fFrameTime < 7.4f ) { p -> m_nCurrentFrame = 37 ; } else if ( p -> m_fFrameTime >= 7.4f && p -> m_fFrameTime < 7.6f ) { p -> m_nCurrentFrame = 38 ; } else if ( p -> m_fFrameTime >= 7.6f && p -> m_fFrameTime < 7.8f ) { p -> m_nCurrentFrame = 39 ; } else if ( p -> m_fFrameTime >= 7.8f && p -> m_fFrameTime < 8.0f ) { p -> m_nCurrentFrame = 40 ; } else p -> m_nCurrentFrame = 41 ; }