From: SakirSoft <sak...@us...> - 2005-07-06 18:59:54
|
Update of /cvsroot/openmugen/OpenMugen/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10687 Modified Files: player.h Log Message: Added Guard handling Collsion detection is better now Index: player.h =================================================================== RCS file: /cvsroot/openmugen/OpenMugen/src/player.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -p -r1.7 -r1.8 --- player.h 2 Jul 2005 17:13:05 -0000 1.7 +++ player.h 6 Jul 2005 18:59:44 -0000 1.8 @@ -74,8 +74,8 @@ s16 nDefence; s16 nFallDefenceUp; s16 nLieDownTime; s16 nAirJuggle; -s16 nSparkNo; -s16 nGuardSparkNr; +s32 nSparkNo; +s32 nGuardSparkNr; bool bKoEcho; s16 nVolume; @@ -170,6 +170,7 @@ struct HitVar int groundtype; int damage; int pauseTime; + int guardPauseTime; int hitcount; int fallcount; int hitshaketime; @@ -198,10 +199,16 @@ struct HitVar float fall_envshake_phase; s32 snd_grp; s32 snd_item; + s32 guard_snd_grp; + s32 guard_snd_item; s32 spark_nr; + s32 guard_spark_no; float spark_x; float spark_y; bool bPlayerSnd; + bool bGuardPlayerSnd; + bool bPlayerSpark; + }; void LoadPlayerDef(const char* strPlayerDef,PlayerDef &playerdef); @@ -235,6 +242,7 @@ float nBodyDistanceX; //dis float nBodyDistanceY; //distance between front float nDistanceX; //distance betweem axis of the player float nDistanceY; //distance betweem axis of the player +float nGuardDist; //is set by HitDef controller aka AttackDist s32 nCurrAnimNumber; s32 nPrevStateNumber; s32 nCurrStateNumber; @@ -392,6 +400,7 @@ enum HitPrior void FaceRight(); void SetCtrl(bool ctrl); void SetHitDef(); + bool IsHitDef(); void SetHitVar(HitVar hitvar); void SetInHitVar(HitVar hitvar); void SetStateType(u8 nType); @@ -404,10 +413,10 @@ enum HitPrior void PushPlayer(float nPushValue); bool IsAnimLooped(); - u16 GetCurrentImageNr(); - u16 GetCurrentImageTime(); - u16 GetCurrentAnimTime(); - u16 GetDuringTime(); + u32 GetCurrentImageNr(); + u32 GetCurrentImageTime(); + u32 GetCurrentAnimTime(); + u32 GetDuringTime(); //Player Controllers void ChangeState(s32 nSateNumber); @@ -417,6 +426,7 @@ enum HitPrior void SetSysIntVar(int index,float value); void SetSysFloatVar(int index,float value); void PlaySnd(s32 nGpr,s32 nItem,bool bLooped=false,u8 nLeftPan=255,u8 nRightPan=255); + void SetAttackDist(float dist); //trigger functions char *GetCommand(); @@ -439,6 +449,9 @@ enum HitPrior float GetVelY(); float GetFront(); float GetBack(); + float GetDistX(); + float GetDistY(); + float GetAttackDist(); bool GetRightFaced(); s16 GetLife(); u8 GetMoveType(); @@ -460,7 +473,10 @@ private: void HandleFSM(); void HandlePushBehavior(CPlayer *opponent); void HandleHitDef(CPlayer *opponent); + void HandleHit(CPlayer *opponent); + void HandleGuard(CPlayer *opponent, bool bP1Hit); void HandleGetHitState(); + void CheckHitCollid(bool &p1Hit,bool p2Hit,CPlayer *opponent); void CheckSpecialState(); void CheckNormalState(); void CheckInternalState(); @@ -471,6 +487,7 @@ private: void AirPhysic(); void StandPhysic(); void ResetFlags(); + void CalculateValues(CPlayer *opponent); }; |