|
From: SakirSoft <sak...@us...> - 2005-07-09 21:50:27
|
Update of /cvsroot/openmugen/OpenMugen/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1322 Modified Files: SffManager.cpp SffManager.h Log Message: Add PrepareAnim2 function for ChangeAnim2 controller Index: SffManager.cpp =================================================================== RCS file: /cvsroot/openmugen/OpenMugen/src/SffManager.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -p -r1.8 -r1.9 --- SffManager.cpp 6 Jul 2005 18:58:40 -0000 1.8 +++ SffManager.cpp 9 Jul 2005 21:50:19 -0000 1.9 @@ -218,6 +218,23 @@ void CSffManager::PrepareAnim(s32 nAnim, } +void CSffManager::PrepareAnim2(s32 nAnim,ActionElement *Anim2,u16 nCurrElem) +{ + Anim=Anim2; + + if(Anim==0) + return; + + nDuringTime = nTimer + Anim->AnimationElement[0].nDuringTime; + nCurrentImage = nCurrElem-1; + bLooped = false; + nCurrentImageTime = 0; + nCurrTime = 1; + + + +} + //Blit the given animation void CSffManager::BlitAnim(s16 x, s16 y,float x_scale,float y_scale) @@ -231,6 +248,7 @@ void CSffManager::BlitAnim(s16 x, s16 y, x += Anim->AnimationElement[nCurrentImage].x; y += Anim->AnimationElement[nCurrentImage].y; + BlitSprite(Anim->AnimationElement[nCurrentImage].nGroupNumber, Anim->AnimationElement[nCurrentImage].nImageNumber, Index: SffManager.h =================================================================== RCS file: /cvsroot/openmugen/OpenMugen/src/SffManager.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -p -r1.7 -r1.8 --- SffManager.h 2 Jul 2005 17:13:05 -0000 1.7 +++ SffManager.h 9 Jul 2005 21:50:19 -0000 1.8 @@ -156,6 +156,8 @@ public: void BlitAnim(s16 x, s16 y,float x_scale=1.0,float y_scale=1.0); // prepare the animation for the first game tick void PrepareAnim(s32 nAnim,u16 nCurrElem=1); + void PrepareAnim2(s32 nAnim,ActionElement *Anim2,u16 nCurrElem=1); + //change to another anim void SetAnim(s32 nAnim); void ResetManager(); |