codemp/game/bg_panimate.c File Reference

#include "q_shared.h"
#include "bg_public.h"
#include "bg_strap.h"
#include "bg_local.h"
#include "anims.h"
#include "../cgame/animtable.h"
#include "../namespace_begin.h"
#include "../namespace_end.h"

Go to the source code of this file.

Functions

saberInfo_tBG_MySaber (int clientNum, int saberNum)
qboolean BG_SaberStanceAnim (int anim)
qboolean BG_CrouchAnim (int anim)
qboolean BG_InSpecialJump (int anim)
qboolean BG_InSaberStandAnim (int anim)
qboolean BG_InReboundJump (int anim)
qboolean BG_InReboundHold (int anim)
qboolean BG_InReboundRelease (int anim)
qboolean BG_InBackFlip (int anim)
qboolean BG_DirectFlippingAnim (int anim)
qboolean BG_SaberInAttackPure (int move)
qboolean BG_SaberInAttack (int move)
qboolean BG_SaberInKata (int saberMove)
qboolean BG_InKataAnim (int anim)
qboolean BG_SaberInSpecial (int move)
qboolean BG_KickMove (int move)
qboolean BG_SaberInIdle (int move)
qboolean BG_InExtraDefenseSaberMove (int move)
qboolean BG_FlippingAnim (int anim)
qboolean BG_SpinningSaberAnim (int anim)
qboolean BG_SaberInSpecialAttack (int anim)
qboolean BG_KickingAnim (int anim)
int BG_InGrappleMove (int anim)
int BG_BrokenParryForAttack (int move)
int BG_BrokenParryForParry (int move)
int BG_KnockawayForParry (int move)
qboolean BG_InRoll (playerState_t *ps, int anim)
qboolean BG_InSpecialDeathAnim (int anim)
qboolean BG_InDeathAnim (int anim)
qboolean BG_InKnockDownOnly (int anim)
qboolean BG_InSaberLockOld (int anim)
qboolean BG_InSaberLock (int anim)
qboolean PM_InCartwheel (int anim)
qboolean BG_InKnockDownOnGround (playerState_t *ps)
qboolean BG_StabDownAnim (int anim)
int PM_SaberBounceForAttack (int move)
int PM_SaberDeflectionForQuad (int quad)
qboolean PM_SaberInDeflect (int move)
qboolean PM_SaberInParry (int move)
qboolean PM_SaberInKnockaway (int move)
qboolean PM_SaberInReflect (int move)
qboolean PM_SaberInStart (int move)
qboolean PM_SaberInReturn (int move)
qboolean BG_SaberInReturn (int move)
qboolean PM_InSaberAnim (int anim)
qboolean PM_InKnockDown (playerState_t *ps)
qboolean PM_PainAnim (int anim)
qboolean PM_JumpingAnim (int anim)
qboolean PM_LandingAnim (int anim)
qboolean PM_SpinningAnim (int anim)
qboolean PM_InOnGroundAnim (int anim)
qboolean PM_InRollComplete (playerState_t *ps, int anim)
qboolean PM_CanRollFromSoulCal (playerState_t *ps)
qboolean BG_SuperBreakLoseAnim (int anim)
qboolean BG_SuperBreakWinAnim (int anim)
qboolean BG_SaberLockBreakAnim (int anim)
qboolean BG_FullBodyTauntAnim (int anim)
int BG_AnimLength (int index, animNumber_t anim)
int PM_AnimLength (int index, animNumber_t anim)
void PM_DebugLegsAnim (int anim)
qboolean PM_SaberInTransition (int move)
qboolean BG_SaberInTransitionAny (int move)
void BG_FlipPart (playerState_t *ps, int part)
void BG_InitAnimsets (void)
void BG_ClearAnimsets (void)
animation_tBG_AnimsetAlloc (void)
void BG_AnimsetFree (animation_t *animset)
int CheckAnimFrameForEventType (animevent_t *animEvents, int keyFrame, animEventType_t eventType)
void ParseAnimationEvtBlock (const char *aeb_filename, animevent_t *animEvents, animation_t *animations, int *i, const char **text_p)
int BG_ParseAnimationEvtFile (const char *as_filename, int animFileIndex, int eventFileIndex)
int BG_ParseAnimationFile (const char *filename, animation_t *animset, qboolean isHumanoid)
void PM_ContinueLegsAnim (int anim)
void PM_ForceLegsAnim (int anim)
void BG_StartTorsoAnim (playerState_t *ps, int anim)
void PM_StartTorsoAnim (int anim)
void BG_SetLegsAnimTimer (playerState_t *ps, int time)
void PM_SetLegsAnimTimer (int time)
void BG_SetTorsoAnimTimer (playerState_t *ps, int time)
void PM_SetTorsoAnimTimer (int time)
void BG_SaberStartTransAnim (int clientNum, int saberAnimLevel, int weapon, int anim, float *animSpeed, int broken)
qboolean PM_RunningAnim (int anim)
qboolean PM_WalkingAnim (int anim)
void BG_SetAnimFinal (playerState_t *ps, animation_t *animations, int setAnimParts, int anim, int setAnimFlags, int blendTime)
void PM_SetAnimFinal (int setAnimParts, int anim, int setAnimFlags, int blendTime)
qboolean BG_HasAnimation (int animIndex, int animation)
int BG_PickAnim (int animIndex, int minAnim, int maxAnim)
void BG_SetAnim (playerState_t *ps, animation_t *animations, int setAnimParts, int anim, int setAnimFlags, int blendTime)
void PM_SetAnim (int setAnimParts, int anim, int setAnimFlags, int blendTime)

Variables

qboolean BGPAFtextLoaded = qfalse
animation_t bgHumanoidAnimations [MAX_TOTALANIMATIONS]
bgLoadedAnim_t bgAllAnims [MAX_ANIM_FILES]
int bgNumAllAnims = 2
stringID_table_t animEventTypeTable [MAX_ANIM_EVENTS+1]
stringID_table_t footstepTypeTable [NUM_FOOTSTEP_TYPES+1]
bgLoadedEvents_t bgAllEvents [MAX_ANIM_FILES]
int bgNumAnimEvents = 1


Function Documentation

int BG_AnimLength int  index,
animNumber_t  anim
 

Definition at line 1573 of file bg_panimate.c.

References bgLoadedAnim_t::anims, bgAllAnims, fabs(), MAX_ANIMATIONS, and animation_s::numFrames.

Referenced by AnimateRiders(), BG_InKnockDownOnGround(), G_SetTauntAnim(), and Jedi_CheckFlipEvasions().

01574 {
01575         if (anim >= MAX_ANIMATIONS)
01576         {
01577                 return -1;
01578         }
01579         
01580         return bgAllAnims[index].anims[anim].numFrames * fabs((float)(bgAllAnims[index].anims[anim].frameLerp));
01581 }

animation_t* BG_AnimsetAlloc void   ) 
 

Definition at line 1729 of file bg_panimate.c.

References animation_t, BG_Alloc(), bgAllAnims, bgNumAllAnims, MAX_ANIM_FILES, and MAX_TOTALANIMATIONS.

Referenced by BG_ParseAnimationFile().

01730 {
01731         assert (bgNumAllAnims < MAX_ANIM_FILES);
01732         bgAllAnims[bgNumAllAnims].anims = (animation_t *) BG_Alloc(sizeof(animation_t)*MAX_TOTALANIMATIONS);
01733 
01734         return bgAllAnims[bgNumAllAnims].anims;
01735 }

void BG_AnimsetFree animation_t animset  ) 
 

Definition at line 1737 of file bg_panimate.c.

References animation_t.

Referenced by BG_ParseAnimationFile().

01738 {
01739         /*
01740         if (!animset)
01741         {
01742                 return;
01743         }
01744 
01745         strap_TrueFree((void **)&animset);
01746 
01747 #ifdef _DEBUG
01748         if (animset)
01749         {
01750                 assert(!"Failed to free anim set");
01751         }
01752 #endif
01753         */
01754 }

int BG_BrokenParryForAttack int  move  ) 
 

Definition at line 692 of file bg_panimate.c.

References LS_NONE, LS_V1__L, LS_V1__R, LS_V1_B_, LS_V1_BL, LS_V1_BR, LS_V1_T_, LS_V1_TL, LS_V1_TR, Q_B, Q_BL, Q_BR, Q_L, Q_R, Q_T, Q_TL, Q_TR, saberMoveData, and saberMoveData_t::startQuad.

00693 {
00694         //Our attack was knocked away by a knockaway parry
00695         //FIXME: need actual anims for this
00696         //FIXME: need to know which side of the saber was hit!  For now, we presume the saber gets knocked away from the center
00697         switch ( saberMoveData[move].startQuad )
00698         {
00699         case Q_B:
00700                 return LS_V1_B_;
00701                 break;
00702         case Q_BR:
00703                 return LS_V1_BR;
00704                 break;
00705         case Q_R:
00706                 return LS_V1__R;
00707                 break;
00708         case Q_TR:
00709                 return LS_V1_TR;
00710                 break;
00711         case Q_T:
00712                 return LS_V1_T_;
00713                 break;
00714         case Q_TL:
00715                 return LS_V1_TL;
00716                 break;
00717         case Q_L:
00718                 return LS_V1__L;
00719                 break;
00720         case Q_BL:
00721                 return LS_V1_BL;
00722                 break;
00723         }
00724         return LS_NONE;
00725 }

int BG_BrokenParryForParry int  move  ) 
 

Definition at line 727 of file bg_panimate.c.

References LS_H1_B_, LS_H1_BL, LS_H1_BR, LS_H1_T_, LS_H1_TL, LS_H1_TR, LS_NONE, LS_PARRY_LL, LS_PARRY_LR, LS_PARRY_UL, LS_PARRY_UP, LS_PARRY_UR, LS_READY, and Q_irand().

00728 {
00729         //FIXME: need actual anims for this
00730         //FIXME: need to know which side of the saber was hit!  For now, we presume the saber gets knocked away from the center
00731         switch ( move )
00732         {
00733         case LS_PARRY_UP:
00734                 //Hmm... since we don't know what dir the hit came from, randomly pick knock down or knock back
00735                 if ( Q_irand( 0, 1 ) )
00736                 {
00737                         return LS_H1_B_;
00738                 }
00739                 else
00740                 {
00741                         return LS_H1_T_;
00742                 }
00743                 break;
00744         case LS_PARRY_UR:
00745                 return LS_H1_TR;
00746                 break;
00747         case LS_PARRY_UL:
00748                 return LS_H1_TL;
00749                 break;
00750         case LS_PARRY_LR:
00751                 return LS_H1_BR;
00752                 break;
00753         case LS_PARRY_LL:
00754                 return LS_H1_BL;
00755                 break;
00756         case LS_READY:
00757                 return LS_H1_B_;//???
00758                 break;
00759         }
00760         return LS_NONE;
00761 }

void BG_ClearAnimsets void   ) 
 

Definition at line 1713 of file bg_panimate.c.

Referenced by CG_Shutdown(), and G_ShutdownGame().

01714 {
01715         /*
01716         int i = 1;
01717 
01718         while (i < bgNumAllAnims)
01719         {
01720                 if (bgAllAnims[i].anims)
01721                 {
01722                         strap_TrueFree((void **)&bgAllAnims[i].anims);
01723                 }
01724                 i++;
01725         }
01726         */
01727 }

qboolean BG_CrouchAnim int  anim  ) 
 

Definition at line 49 of file bg_panimate.c.

References BOTH_CROUCH1, BOTH_CROUCH1IDLE, BOTH_CROUCH1WALK, BOTH_CROUCH1WALKBACK, BOTH_CROUCH2TOSTAND1, BOTH_CROUCH3, BOTH_CROUCHATTACKBACK1, BOTH_KNEES1, BOTH_ROLL_STAB, BOTH_SIT1, BOTH_SIT2, BOTH_SIT3, qboolean, qfalse, and qtrue.

Referenced by NPC_BSGM_Attack(), NPC_ChoosePainAnimation(), and WP_ResistForcePush().

00050 {
00051         switch ( anim )
00052         {
00053         case BOTH_SIT1:                         //# Normal chair sit.
00054         case BOTH_SIT2:                         //# Lotus position.
00055         case BOTH_SIT3:                         //# Sitting in tired position: elbows on knees
00056         case BOTH_CROUCH1:                      //# Transition from standing to crouch
00057         case BOTH_CROUCH1IDLE:          //# Crouching idle
00058         case BOTH_CROUCH1WALK:          //# Walking while crouched
00059         case BOTH_CROUCH1WALKBACK:      //# Walking while crouched
00060         case BOTH_CROUCH2TOSTAND1:      //# going from crouch2 to stand1
00061         case BOTH_CROUCH3:                      //# Desann crouching down to Kyle (cin 9)
00062         case BOTH_KNEES1:                       //# Tavion on her knees
00063         case BOTH_CROUCHATTACKBACK1://FIXME: not if in middle of anim?
00064         case BOTH_ROLL_STAB:
00065                 return qtrue;
00066                 break;
00067         }
00068         return qfalse;
00069 }

qboolean BG_DirectFlippingAnim int  anim  ) 
 

Definition at line 204 of file bg_panimate.c.

References BOTH_FLIP_B, BOTH_FLIP_F, BOTH_FLIP_L, BOTH_FLIP_R, qboolean, qfalse, and qtrue.

00205 {
00206         switch ( (anim) )
00207         {
00208         case BOTH_FLIP_F:                       //# Flip forward
00209         case BOTH_FLIP_B:                       //# Flip backwards
00210         case BOTH_FLIP_L:                       //# Flip left
00211         case BOTH_FLIP_R:                       //# Flip right
00212                 return qtrue;
00213                 break;
00214         }
00215 
00216         return qfalse;
00217 }

void BG_FlipPart playerState_t ps,
int  part
 

Definition at line 1642 of file bg_panimate.c.

References playerState_s::legsFlip, playerState_t, qfalse, qtrue, SETANIM_LEGS, SETANIM_TORSO, and playerState_s::torsoFlip.

Referenced by BG_StartTorsoAnim().

01643 {
01644         if (part == SETANIM_TORSO)
01645         {
01646                 if (ps->torsoFlip)
01647                 {
01648                         ps->torsoFlip = qfalse;
01649                 }
01650                 else
01651                 {
01652                         ps->torsoFlip = qtrue;
01653                 }
01654         }
01655         else if (part == SETANIM_LEGS)
01656         {
01657                 if (ps->legsFlip)
01658                 {
01659                         ps->legsFlip = qfalse;
01660                 }
01661                 else
01662                 {
01663                         ps->legsFlip = qtrue;
01664                 }
01665         }
01666 }

qboolean BG_FlippingAnim int  anim  ) 
 

Definition at line 433 of file bg_panimate.c.

References BOTH_A7_SOULCAL, BOTH_ARIAL_F1, BOTH_ARIAL_LEFT, BOTH_ARIAL_RIGHT, BOTH_BUTTERFLY_FL1, BOTH_BUTTERFLY_FR1, BOTH_BUTTERFLY_LEFT, BOTH_BUTTERFLY_RIGHT, BOTH_CARTWHEEL_LEFT, BOTH_CARTWHEEL_RIGHT, BOTH_FLIP_ATTACK7, BOTH_FLIP_B, BOTH_FLIP_BACK1, BOTH_FLIP_BACK2, BOTH_FLIP_BACK3, BOTH_FLIP_F, BOTH_FLIP_L, BOTH_FLIP_R, BOTH_FORCEWALLRUNFLIP_ALT, BOTH_FORCEWALLRUNFLIP_END, BOTH_JUMPATTACK6, BOTH_JUMPATTACK7, BOTH_JUMPFLIPSLASHDOWN1, BOTH_JUMPFLIPSTABDOWN, BOTH_WALL_FLIP_BACK1, BOTH_WALL_FLIP_LEFT, BOTH_WALL_FLIP_RIGHT, BOTH_WALL_RUN_LEFT, BOTH_WALL_RUN_LEFT_FLIP, BOTH_WALL_RUN_LEFT_STOP, BOTH_WALL_RUN_RIGHT, BOTH_WALL_RUN_RIGHT_FLIP, BOTH_WALL_RUN_RIGHT_STOP, qboolean, qfalse, and qtrue.

Referenced by Boba_FireDecide(), Jedi_SaberBusy(), NPC_ChoosePainAnimation(), PM_CheckAltKickAttack(), PM_SetSaberMove(), PM_WeaponLightsaber(), and WP_ResistForcePush().

00434 {
00435         switch ( anim )
00436         {
00437         case BOTH_FLIP_F:                       //# Flip forward
00438         case BOTH_FLIP_B:                       //# Flip backwards
00439         case BOTH_FLIP_L:                       //# Flip left
00440         case BOTH_FLIP_R:                       //# Flip right
00441         case BOTH_WALL_RUN_RIGHT_FLIP:
00442         case BOTH_WALL_RUN_LEFT_FLIP:
00443         case BOTH_WALL_FLIP_RIGHT:
00444         case BOTH_WALL_FLIP_LEFT:
00445         case BOTH_FLIP_BACK1:
00446         case BOTH_FLIP_BACK2:
00447         case BOTH_FLIP_BACK3:
00448         case BOTH_WALL_FLIP_BACK1:
00449         //Not really flips, but...
00450         case BOTH_WALL_RUN_RIGHT:
00451         case BOTH_WALL_RUN_LEFT:
00452         case BOTH_WALL_RUN_RIGHT_STOP:
00453         case BOTH_WALL_RUN_LEFT_STOP:
00454         case BOTH_BUTTERFLY_LEFT:
00455         case BOTH_BUTTERFLY_RIGHT:
00456         case BOTH_BUTTERFLY_FL1:
00457         case BOTH_BUTTERFLY_FR1:
00458         //
00459         case BOTH_ARIAL_LEFT:
00460         case BOTH_ARIAL_RIGHT:
00461         case BOTH_ARIAL_F1:
00462         case BOTH_CARTWHEEL_LEFT:
00463         case BOTH_CARTWHEEL_RIGHT:
00464         case BOTH_JUMPFLIPSLASHDOWN1:
00465         case BOTH_JUMPFLIPSTABDOWN:
00466         case BOTH_JUMPATTACK6:
00467         case BOTH_JUMPATTACK7:
00468         //JKA
00469         case BOTH_FORCEWALLRUNFLIP_END:
00470         case BOTH_FORCEWALLRUNFLIP_ALT:
00471         case BOTH_FLIP_ATTACK7:
00472         case BOTH_A7_SOULCAL:
00473                 return qtrue;
00474                 break;
00475         }
00476         return qfalse;
00477 }

qboolean BG_FullBodyTauntAnim int  anim  ) 
 

Definition at line 1538 of file bg_panimate.c.

References BOTH_BOW, BOTH_DUAL_TAUNT, BOTH_GESTURE1, BOTH_MEDITATE, BOTH_SHOWOFF_DUAL, BOTH_SHOWOFF_FAST, BOTH_SHOWOFF_MEDIUM, BOTH_SHOWOFF_STAFF, BOTH_SHOWOFF_STRONG, BOTH_STAFF_TAUNT, BOTH_VICTORY_DUAL, BOTH_VICTORY_FAST, BOTH_VICTORY_MEDIUM, BOTH_VICTORY_STAFF, BOTH_VICTORY_STRONG, qboolean, qfalse, and qtrue.

Referenced by PmoveSingle(), and WP_ForcePowerStart().

01539 {
01540         switch ( anim )
01541         {
01542         case BOTH_GESTURE1:
01543         case BOTH_DUAL_TAUNT:
01544         case BOTH_STAFF_TAUNT:
01545         case BOTH_BOW:
01546         case BOTH_MEDITATE:
01547         case BOTH_SHOWOFF_FAST:
01548         case BOTH_SHOWOFF_MEDIUM:
01549         case BOTH_SHOWOFF_STRONG:
01550         case BOTH_SHOWOFF_DUAL:
01551         case BOTH_SHOWOFF_STAFF:
01552         case BOTH_VICTORY_FAST:
01553         case BOTH_VICTORY_MEDIUM:
01554         case BOTH_VICTORY_STRONG:
01555         case BOTH_VICTORY_DUAL:
01556         case BOTH_VICTORY_STAFF:
01557                 return qtrue;
01558                 break;
01559         }
01560         return qfalse;
01561 }

qboolean BG_HasAnimation int  animIndex,
int  animation
 

Definition at line 2928 of file bg_panimate.c.

References animation_t, bgLoadedAnim_t::anims, bgAllAnims, bgNumAllAnims, MAX_ANIMATIONS, animation_s::numFrames, qboolean, qfalse, and qtrue.

Referenced by BG_PickAnim(), and G_PickDeathAnim().

02929 {
02930         animation_t *animations;
02931 
02932         //must be a valid anim number
02933         if ( animation < 0 || animation >= MAX_ANIMATIONS )
02934         {
02935                 return qfalse;
02936         }
02937 
02938         //Must have a file index entry
02939         if( animIndex < 0 || animIndex > bgNumAllAnims )
02940                 return qfalse;
02941 
02942         animations = bgAllAnims[animIndex].anims;
02943 
02944         //No frames, no anim
02945         if ( animations[animation].numFrames == 0 )
02946                 return qfalse;
02947 
02948         //Has the sequence
02949         return qtrue;
02950 }

qboolean BG_InBackFlip int  anim  ) 
 

Definition at line 191 of file bg_panimate.c.

References BOTH_FLIP_BACK1, BOTH_FLIP_BACK2, BOTH_FLIP_BACK3, qboolean, qfalse, and qtrue.

Referenced by BG_InSpecialJump().

00192 {
00193         switch ( anim )
00194         {
00195         case BOTH_FLIP_BACK1:
00196         case BOTH_FLIP_BACK2:
00197         case BOTH_FLIP_BACK3:
00198                 return qtrue;
00199                 break;
00200         }
00201         return qfalse;
00202 }

qboolean BG_InDeathAnim int  anim  ) 
 

Definition at line 836 of file bg_panimate.c.

References BG_InSpecialDeathAnim(), BOTH_DEAD1, BOTH_DEAD10, BOTH_DEAD11, BOTH_DEAD12, BOTH_DEAD13, BOTH_DEAD14, BOTH_DEAD15, BOTH_DEAD16, BOTH_DEAD17, BOTH_DEAD18, BOTH_DEAD19, BOTH_DEAD2, BOTH_DEAD20, BOTH_DEAD21, BOTH_DEAD22, BOTH_DEAD23, BOTH_DEAD24, BOTH_DEAD25, BOTH_DEAD3, BOTH_DEAD4, BOTH_DEAD5, BOTH_DEAD6, BOTH_DEAD7, BOTH_DEAD8, BOTH_DEAD9, BOTH_DEADBACKWARD1, BOTH_DEADBACKWARD2, BOTH_DEADFLOP1, BOTH_DEADFLOP2, BOTH_DEADFORWARD1, BOTH_DEADFORWARD2, BOTH_DEATH1, BOTH_DEATH10, BOTH_DEATH11, BOTH_DEATH12, BOTH_DEATH13, BOTH_DEATH14, BOTH_DEATH14_SITUP, BOTH_DEATH14_UNGRIP, BOTH_DEATH15, BOTH_DEATH16, BOTH_DEATH17, BOTH_DEATH18, BOTH_DEATH19, BOTH_DEATH1IDLE, BOTH_DEATH2, BOTH_DEATH20, BOTH_DEATH21, BOTH_DEATH22, BOTH_DEATH23, BOTH_DEATH24, BOTH_DEATH25, BOTH_DEATH3, BOTH_DEATH4, BOTH_DEATH5, BOTH_DEATH6, BOTH_DEATH7, BOTH_DEATH8, BOTH_DEATH9, BOTH_DEATHBACKWARD1, BOTH_DEATHBACKWARD2, BOTH_DEATHFORWARD1, BOTH_DEATHFORWARD2, BOTH_DEATHFORWARD3, BOTH_DISMEMBER_HEAD1, BOTH_DISMEMBER_LARM, BOTH_DISMEMBER_LLEG, BOTH_DISMEMBER_RARM, BOTH_DISMEMBER_RLEG, BOTH_DISMEMBER_TORSO1, BOTH_FALLDEAD1LAND, BOTH_FALLDEATH1, BOTH_FALLDEATH1INAIR, BOTH_FALLDEATH1LAND, BOTH_LYINGDEAD1, BOTH_LYINGDEATH1, BOTH_STUMBLEDEAD1, BOTH_STUMBLEDEATH1, qboolean, and qtrue.

Referenced by BG_StartTorsoAnim(), and G_Dismember().

00837 {//Purposely does not cover stumbledeath and falldeath...
00838         switch( anim )
00839         {
00840         case BOTH_DEATH1:               //# First Death anim
00841         case BOTH_DEATH2:                       //# Second Death anim
00842         case BOTH_DEATH3:                       //# Third Death anim
00843         case BOTH_DEATH4:                       //# Fourth Death anim
00844         case BOTH_DEATH5:                       //# Fifth Death anim
00845         case BOTH_DEATH6:                       //# Sixth Death anim
00846         case BOTH_DEATH7:                       //# Seventh Death anim
00847         case BOTH_DEATH8:                       //# 
00848         case BOTH_DEATH9:                       //# 
00849         case BOTH_DEATH10:                      //# 
00850         case BOTH_DEATH11:                      //#
00851         case BOTH_DEATH12:                      //# 
00852         case BOTH_DEATH13:                      //# 
00853         case BOTH_DEATH14:                      //# 
00854         case BOTH_DEATH14_UNGRIP:       //# Desann's end death (cin #35)
00855         case BOTH_DEATH14_SITUP:                //# Tavion sitting up after having been thrown (cin #23)
00856         case BOTH_DEATH15:                      //# 
00857         case BOTH_DEATH16:                      //# 
00858         case BOTH_DEATH17:                      //# 
00859         case BOTH_DEATH18:                      //# 
00860         case BOTH_DEATH19:                      //# 
00861         case BOTH_DEATH20:                      //# 
00862         case BOTH_DEATH21:                      //# 
00863         case BOTH_DEATH22:                      //# 
00864         case BOTH_DEATH23:                      //# 
00865         case BOTH_DEATH24:                      //# 
00866         case BOTH_DEATH25:                      //# 
00867 
00868         case BOTH_DEATHFORWARD1:                //# First Death in which they get thrown forward
00869         case BOTH_DEATHFORWARD2:                //# Second Death in which they get thrown forward
00870         case BOTH_DEATHFORWARD3:                //# Tavion's falling in cin# 23
00871         case BOTH_DEATHBACKWARD1:       //# First Death in which they get thrown backward
00872         case BOTH_DEATHBACKWARD2:       //# Second Death in which they get thrown backward
00873 
00874         case BOTH_DEATH1IDLE:           //# Idle while close to death
00875         case BOTH_LYINGDEATH1:          //# Death to play when killed lying down
00876         case BOTH_STUMBLEDEATH1:                //# Stumble forward and fall face first death
00877         case BOTH_FALLDEATH1:           //# Fall forward off a high cliff and splat death - start
00878         case BOTH_FALLDEATH1INAIR:      //# Fall forward off a high cliff and splat death - loop
00879         case BOTH_FALLDEATH1LAND:       //# Fall forward off a high cliff and splat death - hit bottom
00880         //# #sep case BOTH_ DEAD POSES # Should be last frame of corresponding previous anims
00881         case BOTH_DEAD1:                                //# First Death finished pose
00882         case BOTH_DEAD2:                                //# Second Death finished pose
00883         case BOTH_DEAD3:                                //# Third Death finished pose
00884         case BOTH_DEAD4:                                //# Fourth Death finished pose
00885         case BOTH_DEAD5:                                //# Fifth Death finished pose
00886         case BOTH_DEAD6:                                //# Sixth Death finished pose
00887         case BOTH_DEAD7:                                //# Seventh Death finished pose
00888         case BOTH_DEAD8:                                //# 
00889         case BOTH_DEAD9:                                //# 
00890         case BOTH_DEAD10:                       //# 
00891         case BOTH_DEAD11:                       //#
00892         case BOTH_DEAD12:                       //# 
00893         case BOTH_DEAD13:                       //# 
00894         case BOTH_DEAD14:                       //# 
00895         case BOTH_DEAD15:                       //# 
00896         case BOTH_DEAD16:                       //# 
00897         case BOTH_DEAD17:                       //# 
00898         case BOTH_DEAD18:                       //# 
00899         case BOTH_DEAD19:                       //# 
00900         case BOTH_DEAD20:                       //# 
00901         case BOTH_DEAD21:                       //# 
00902         case BOTH_DEAD22:                       //# 
00903         case BOTH_DEAD23:                       //# 
00904         case BOTH_DEAD24:                       //# 
00905         case BOTH_DEAD25:                       //# 
00906         case BOTH_DEADFORWARD1:         //# First thrown forward death finished pose
00907         case BOTH_DEADFORWARD2:         //# Second thrown forward death finished pose
00908         case BOTH_DEADBACKWARD1:                //# First thrown backward death finished pose
00909         case BOTH_DEADBACKWARD2:                //# Second thrown backward death finished pose
00910         case BOTH_LYINGDEAD1:           //# Killed lying down death finished pose
00911         case BOTH_STUMBLEDEAD1:         //# Stumble forward death finished pose
00912         case BOTH_FALLDEAD1LAND:                //# Fall forward and splat death finished pose
00913         //# #sep case BOTH_ DEAD TWITCH/FLOP # React to being shot from death poses
00914         case BOTH_DEADFLOP1:            //# React to being shot from First Death finished pose
00915         case BOTH_DEADFLOP2:            //# React to being shot from Second Death finished pose
00916         case BOTH_DISMEMBER_HEAD1:      //#
00917         case BOTH_DISMEMBER_TORSO1:     //#
00918         case BOTH_DISMEMBER_LLEG:       //#
00919         case BOTH_DISMEMBER_RLEG:       //#
00920         case BOTH_DISMEMBER_RARM:       //#
00921         case BOTH_DISMEMBER_LARM:       //#
00922                 return qtrue;
00923                 break;
00924         default:
00925                 return BG_InSpecialDeathAnim( anim );
00926                 break;
00927         }
00928 }

qboolean BG_InExtraDefenseSaberMove int  move  ) 
 

Definition at line 415 of file bg_panimate.c.

References LS_A1_SPECIAL, LS_A2_SPECIAL, LS_A3_SPECIAL, LS_DUAL_SPIN_PROTECT, LS_JUMPATTACK_DUAL, LS_SPINATTACK, LS_SPINATTACK_DUAL, LS_STAFF_SOULCAL, qboolean, qfalse, and qtrue.

Referenced by saberCheckKnockdown_Smashed().

00416 {
00417         switch ( move )
00418         {
00419         case LS_SPINATTACK_DUAL:
00420         case LS_SPINATTACK:
00421         case LS_DUAL_SPIN_PROTECT:
00422         case LS_STAFF_SOULCAL:
00423         case LS_A1_SPECIAL:
00424         case LS_A2_SPECIAL:
00425         case LS_A3_SPECIAL:
00426         case LS_JUMPATTACK_DUAL:
00427                 return qtrue;
00428                 break;
00429         }
00430         return qfalse;
00431 }

int BG_InGrappleMove int  anim  ) 
 

Definition at line 672 of file bg_panimate.c.

References BOTH_KYLE_GRAB, BOTH_KYLE_MISS, BOTH_KYLE_PA_1, BOTH_KYLE_PA_2, BOTH_PLAYER_PA_1, BOTH_PLAYER_PA_2, and BOTH_PLAYER_PA_FLY.

Referenced by CG_DrawActiveFrame(), PmoveSingle(), and WP_SaberPositionUpdate().

00673 {
00674         switch (anim)
00675         {
00676         case BOTH_KYLE_GRAB:
00677         case BOTH_KYLE_MISS:
00678                 return 1; //grabbing at someone
00679         case BOTH_KYLE_PA_1:
00680         case BOTH_KYLE_PA_2:
00681                 return 2; //beating the shit out of someone
00682         case BOTH_PLAYER_PA_1:
00683         case BOTH_PLAYER_PA_2:
00684         case BOTH_PLAYER_PA_FLY:
00685                 return 3; //getting the shit beaten out of you
00686                 break;
00687         }
00688 
00689         return 0;
00690 }

void BG_InitAnimsets void   ) 
 

Definition at line 1706 of file bg_panimate.c.

References bgAllAnims, BGPAFtextLoaded, memset(), and qfalse.

Referenced by CG_Init(), and G_InitGame().

01707 {
01708         memset(&bgAllAnims, 0, sizeof(bgAllAnims));
01709         BGPAFtextLoaded = qfalse;       // VVFIXME - The PC doesn't seem to need this, but why?
01710 }

qboolean BG_InKataAnim int  anim  ) 
 

Definition at line 306 of file bg_panimate.c.

References BOTH_A1_SPECIAL, BOTH_A2_SPECIAL, BOTH_A3_SPECIAL, BOTH_A6_SABERPROTECT, BOTH_A7_SOULCAL, qboolean, qfalse, and qtrue.

Referenced by PM_CanDoKata(), and PmoveSingle().

00307 {
00308         switch (anim)
00309         {
00310         case BOTH_A6_SABERPROTECT:
00311         case BOTH_A7_SOULCAL:
00312         case BOTH_A1_SPECIAL:
00313         case BOTH_A2_SPECIAL:
00314         case BOTH_A3_SPECIAL:
00315                 return qtrue;
00316         }
00317         return qfalse;
00318 }

qboolean BG_InKnockDownOnGround playerState_t ps  ) 
 

Definition at line 1010 of file bg_panimate.c.

References animNumber_t, BG_AnimLength(), BOTH_FORCE_GETUP_B1, BOTH_FORCE_GETUP_B2, BOTH_FORCE_GETUP_B3, BOTH_FORCE_GETUP_B4, BOTH_FORCE_GETUP_B5, BOTH_FORCE_GETUP_B6, BOTH_FORCE_GETUP_F1, BOTH_FORCE_GETUP_F2, BOTH_GETUP1, BOTH_GETUP2, BOTH_GETUP3, BOTH_GETUP4, BOTH_GETUP5, BOTH_GETUP_BROLL_B, BOTH_GETUP_BROLL_F, BOTH_GETUP_BROLL_L, BOTH_GETUP_BROLL_R, BOTH_GETUP_CROUCH_B1, BOTH_GETUP_CROUCH_F1, BOTH_GETUP_FROLL_B, BOTH_GETUP_FROLL_F, BOTH_GETUP_FROLL_L, BOTH_GETUP_FROLL_R, BOTH_KNOCKDOWN1, BOTH_KNOCKDOWN2, BOTH_KNOCKDOWN3, BOTH_KNOCKDOWN4, BOTH_KNOCKDOWN5, BOTH_LK_DL_ST_T_SB_1_L, BOTH_PLAYER_PA_3_FLY, BOTH_RELEASED, playerState_s::legsAnim, playerState_s::legsTimer, playerState_t, qboolean, qfalse, and qtrue.

01011 {
01012         switch ( ps->legsAnim )
01013         {
01014         case BOTH_KNOCKDOWN1:
01015         case BOTH_KNOCKDOWN2:
01016         case BOTH_KNOCKDOWN3:
01017         case BOTH_KNOCKDOWN4:
01018         case BOTH_KNOCKDOWN5:
01019         case BOTH_RELEASED:
01020                 //if ( PM_AnimLength( g_entities[ps->clientNum].client->clientInfo.animFileIndex, (animNumber_t)ps->legsAnim ) - ps->legsAnimTimer > 300 )
01021                 {//at end of fall down anim
01022                         return qtrue;
01023                 }
01024                 break;
01025         case BOTH_GETUP1:
01026         case BOTH_GETUP2:
01027         case BOTH_GETUP3:
01028         case BOTH_GETUP4:
01029         case BOTH_GETUP5:
01030         case BOTH_GETUP_CROUCH_F1:
01031         case BOTH_GETUP_CROUCH_B1:
01032         case BOTH_FORCE_GETUP_F1:
01033         case BOTH_FORCE_GETUP_F2:
01034         case BOTH_FORCE_GETUP_B1:
01035         case BOTH_FORCE_GETUP_B2:
01036         case BOTH_FORCE_GETUP_B3:
01037         case BOTH_FORCE_GETUP_B4:
01038         case BOTH_FORCE_GETUP_B5:
01039         case BOTH_FORCE_GETUP_B6:
01040                 if ( BG_AnimLength( 0, (animNumber_t)ps->legsAnim ) - ps->legsTimer < 500 )
01041                 {//at beginning of getup anim
01042                         return qtrue;
01043                 }
01044                 break;
01045         case BOTH_GETUP_BROLL_B:
01046         case BOTH_GETUP_BROLL_F:
01047         case BOTH_GETUP_BROLL_L:
01048         case BOTH_GETUP_BROLL_R:
01049         case BOTH_GETUP_FROLL_B:
01050         case BOTH_GETUP_FROLL_F:
01051         case BOTH_GETUP_FROLL_L:
01052         case BOTH_GETUP_FROLL_R:
01053                 if ( BG_AnimLength( 0, (animNumber_t)ps->legsAnim ) - ps->legsTimer < 500 )
01054                 {//at beginning of getup anim
01055                         return qtrue;
01056                 }
01057                 break;
01058         case BOTH_LK_DL_ST_T_SB_1_L:
01059                 if ( ps->legsTimer < 1000 )
01060                 {
01061                         return qtrue;
01062                 }
01063                 break;
01064         case BOTH_PLAYER_PA_3_FLY:
01065                 if ( ps->legsTimer < 300 )
01066                 {
01067                         return qtrue;
01068                 }
01069                 break;
01070         }
01071         return qfalse;
01072 }

qboolean BG_InKnockDownOnly int  anim  ) 
 

Definition at line 930 of file bg_panimate.c.

References BOTH_KNOCKDOWN1, BOTH_KNOCKDOWN2, BOTH_KNOCKDOWN3, BOTH_KNOCKDOWN4, BOTH_KNOCKDOWN5, qboolean, qfalse, and qtrue.

Referenced by ClientEvents(), and DoFall().

00931 {
00932         switch ( anim )
00933         {
00934         case BOTH_KNOCKDOWN1:
00935         case BOTH_KNOCKDOWN2:
00936         case BOTH_KNOCKDOWN3:
00937         case BOTH_KNOCKDOWN4:
00938         case BOTH_KNOCKDOWN5:
00939                 return qtrue;
00940         }
00941         return qfalse;
00942 }

qboolean BG_InReboundHold int  anim  ) 
 

Definition at line 163 of file bg_panimate.c.

References BOTH_FORCEWALLHOLD_BACK, BOTH_FORCEWALLHOLD_FORWARD, BOTH_FORCEWALLHOLD_LEFT, BOTH_FORCEWALLHOLD_RIGHT, qboolean, qfalse, and qtrue.

Referenced by BG_InSpecialJump(), G_LetGoOfWall(), PM_AdjustAngleForWallJump(), and PM_StepSlideMove().

00164 {
00165         switch ( anim )
00166         {
00167         case BOTH_FORCEWALLHOLD_FORWARD:
00168         case BOTH_FORCEWALLHOLD_LEFT:
00169         case BOTH_FORCEWALLHOLD_BACK:
00170         case BOTH_FORCEWALLHOLD_RIGHT:
00171                 return qtrue;
00172                 break;
00173         }
00174         return qfalse;
00175 }

qboolean BG_InReboundJump int  anim  ) 
 

Definition at line 149 of file bg_panimate.c.

References BOTH_FORCEWALLREBOUND_BACK, BOTH_FORCEWALLREBOUND_FORWARD, BOTH_FORCEWALLREBOUND_LEFT, BOTH_FORCEWALLREBOUND_RIGHT, qboolean, qfalse, and qtrue.

Referenced by BG_InSpecialJump(), G_LetGoOfWall(), PM_AdjustAngleForWallJump(), and PM_GroundSlideOkay().

00150 {
00151         switch ( anim )
00152         {
00153         case BOTH_FORCEWALLREBOUND_FORWARD:
00154         case BOTH_FORCEWALLREBOUND_LEFT:
00155         case BOTH_FORCEWALLREBOUND_BACK:
00156         case BOTH_FORCEWALLREBOUND_RIGHT:
00157                 return qtrue;
00158                 break;
00159         }
00160         return qfalse;
00161 }

qboolean BG_InReboundRelease int  anim  ) 
 

Definition at line 177 of file bg_panimate.c.

References BOTH_FORCEWALLRELEASE_BACK, BOTH_FORCEWALLRELEASE_FORWARD, BOTH_FORCEWALLRELEASE_LEFT, BOTH_FORCEWALLRELEASE_RIGHT, qboolean, qfalse, and qtrue.

Referenced by BG_InSpecialJump().

00178 {
00179         switch ( anim )
00180         {
00181         case BOTH_FORCEWALLRELEASE_FORWARD:
00182         case BOTH_FORCEWALLRELEASE_LEFT:
00183         case BOTH_FORCEWALLRELEASE_BACK:
00184         case BOTH_FORCEWALLRELEASE_RIGHT:
00185                 return qtrue;
00186                 break;
00187         }
00188         return qfalse;
00189 }

qboolean