X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fanim.qh;h=acf6735f37924df3ed97fb5602150d56ffa51831;hb=f099f166c5d50cebd0b7083a31ccf26e3df213b7;hp=c1dee151b63ed02baddb23571a3aa22b6e09b3e1;hpb=9e92e0e5bdad9052ff3463f67f3fb5a2ab812ed2;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/anim.qh b/qcsrc/common/anim.qh index c1dee151b..acf6735f3 100644 --- a/qcsrc/common/anim.qh +++ b/qcsrc/common/anim.qh @@ -1,7 +1,50 @@ #ifndef ANIM_H #define ANIM_H -void setanim(entity e, vector anim, float looping, float override, float restart); -void updateanim(entity e); +// begin engine fields + +/** primary framegroup animation (strength = 1 - lerpfrac - lerpfrac3 - lerpfrac4) */ +.float frame; +/** secondary framegroup animation (strength = lerpfrac) */ +.float frame2; +/** tertiary framegroup animation (strength = lerpfrac3) */ +.float frame3; +/** quaternary framegroup animation (strength = lerpfrac4) */ +.float frame4; + +/** strength of framegroup blend */ +.float lerpfrac; +/** strength of framegroup blend */ +.float lerpfrac3; +/** strength of framegroup blend */ +.float lerpfrac4; + +/** start time of framegroup animation */ +.float frame1time; +/** start time of framegroup animation */ +.float frame2time; +/** start time of framegroup animation */ +.float frame3time; +/** start time of framegroup animation */ +.float frame4time; + +// end engine fields + +// player animation state + +.int animstate_startframe; +.int animstate_numframes; +.float animstate_framerate; +.float animstate_starttime; +.float animstate_endtime; +/** whether to repeat */ +.bool animstate_looping; +/** true for one cycle, then changed to false */ +.bool animstate_override; + +void anim_set(entity e, vector anim, bool looping, bool override, bool restart); +#define setanim(...) anim_set(__VA_ARGS__) +void anim_update(entity e); +#define updateanim(...) anim_update(__VA_ARGS__) #endif