|
UFO: Alien Invasion
|
animation parsing and playing More...

Go to the source code of this file.
Macros | |
| #define | LOOPNEXT(x) |
| #define | R_AnimGetAliasAnim(mod, as) |
Get the mAliasAnim_t for the given animation state. | |
Functions | |
| static void | R_AnimAdd (animState_t *as, const model_t *mod, const mAliasAnim_t *anim) |
| Adds the given animation to the animation state. | |
| static const mAliasAnim_t * | R_AnimGet (const model_t *mod, const char *name) |
| Searches a given animation id in the given model data. | |
| void | R_AnimAppend (animState_t *as, const model_t *mod, const char *name) |
| Appends a new animation to the current running one. | |
| void | R_AnimChange (animState_t *as, const model_t *mod, const char *name) |
| Changes the animation for md2 models. | |
| void | R_AnimRun (animState_t *as, const model_t *mod, int msec) |
| Run the animation of the given model. | |
| const char * | R_AnimGetName (const animState_t *as, const model_t *mod) |
| Get the current running animation for a model. | |
animation parsing and playing
Definition in file r_mesh_anim.cpp.
| #define LOOPNEXT | ( | x | ) |
Definition at line 30 of file r_mesh_anim.cpp.
Referenced by R_AnimAdd(), R_AnimChange(), and R_AnimRun().
| #define R_AnimGetAliasAnim | ( | mod, | |
| as ) |
Get the mAliasAnim_t for the given animation state.
Definition at line 47 of file r_mesh_anim.cpp.
Referenced by R_AnimChange(), R_AnimGetName(), and R_AnimRun().
|
inlinestatic |
Adds the given animation to the animation state.
Definition at line 35 of file r_mesh_anim.cpp.
References model_t::alias, mAliasModel_t::animdata, animState_t::ladd, animState_t::list, and LOOPNEXT.
Referenced by R_AnimAppend(), and R_AnimChange().
| void R_AnimAppend | ( | animState_t * | as, |
| const model_t * | mod, | ||
| const char * | name ) |
Appends a new animation to the current running one.
| [in,out] | as | The animation state to append the new animation to |
| [in] | mod | The model to append the animation for |
| [in] | name | The animation name (from the *.anm file) to append |
Definition at line 84 of file r_mesh_anim.cpp.
References model_t::alias, animState_t::backlerp, animState_t::change, Com_Printf(), animState_t::dt, animState_t::frame, mAliasAnim_t::from, animState_t::ladd, animState_t::lcur, model_t::name, name, mAliasModel_t::num_anims, animState_t::oldframe, R_AnimAdd(), R_AnimGet(), animState_t::time, mAliasAnim_t::time, and mAliasAnim_t::to.
Referenced by CL_ActorDie(), and CL_ActorDoShoot().
| void R_AnimChange | ( | animState_t * | as, |
| const model_t * | mod, | ||
| const char * | name ) |
Changes the animation for md2 models.
| [in,out] | as | Client side animation state of the model |
| [in] | mod | Model structure to change the animation for |
| [in] | name | Animation state name to switch to |
Definition at line 134 of file r_mesh_anim.cpp.
References model_t::alias, animState_t::backlerp, animState_t::change, Com_Printf(), animState_t::dt, animState_t::frame, mAliasAnim_t::from, animState_t::ladd, animState_t::lcur, LOOPNEXT, model_t::name, name, mAliasModel_t::num_anims, animState_t::oldframe, R_AnimAdd(), R_AnimGet(), R_AnimGetAliasAnim, animState_t::time, mAliasAnim_t::time, and mAliasAnim_t::to.
Referenced by CL_ActorDie(), CL_ActorDoShoot(), CL_ActorStartShoot(), CL_CameraAppear(), LET_StartIdle(), LET_StartPathMove(), LM_Register(), SEQ_ExecuteModel(), UI_DrawModelNode(), and UI_DrawModelNodeWithUIModel().
|
static |
Searches a given animation id in the given model data.
| [in] | mod | The model to search the given animation id in |
| [in] | name | The animation name (from the *.anm file) to search |
nullptr if not found, otherwise the animation data Definition at line 59 of file r_mesh_anim.cpp.
References model_t::alias, mAliasModel_t::animdata, i, mAliasAnim_t::name, name, mAliasModel_t::num_anims, and Q_streq.
Referenced by R_AnimAppend(), and R_AnimChange().
| const char * R_AnimGetName | ( | const animState_t * | as, |
| const model_t * | mod ) |
Get the current running animation for a model.
| [in] | as | The animation state to check |
| [in] | mod | The model to check |
nullptr if no animation is set or running or the name of the current running animation otherwise. Definition at line 242 of file r_mesh_anim.cpp.
References model_t::alias, animState_t::ladd, animState_t::lcur, MAX_ANIMLIST, mAliasAnim_t::name, mAliasModel_t::num_anims, and R_AnimGetAliasAnim.
Referenced by HUD_UpdateActorCvar(), UI_DrawModelNode(), and UI_DrawModelNodeWithUIModel().
| void R_AnimRun | ( | animState_t * | as, |
| const model_t * | mod, | ||
| int | msec ) |
Run the animation of the given model.
| [in,out] | as | The animation state to run |
| [in] | mod | The model to run the animation for |
| [in] | msec | The milliseconds since this was called last |
Definition at line 192 of file r_mesh_anim.cpp.
References model_t::alias, animState_t::backlerp, animState_t::change, animState_t::dt, animState_t::frame, mAliasAnim_t::from, animState_t::ladd, animState_t::lcur, LOOPNEXT, MAX_ANIMLIST, mAliasModel_t::num_anims, animState_t::oldframe, R_AnimGetAliasAnim, animState_t::time, mAliasAnim_t::time, and mAliasAnim_t::to.
Referenced by LE_Think(), LM_AddToSceneOrder(), SEQ_Render3D(), UI_DrawModelNode(), and UI_DrawModelNodeWithUIModel().