ui_playerinfo.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #ifndef __UI_PLAYERINFO_H__
  2. #define __UI_PLAYERINFO_H__
  3. #include "../game/bg_public.h"
  4. #include "../game/anims.h"
  5. //FIXME ripped from cg_local.h
  6. typedef struct {
  7. int oldFrame;
  8. int oldFrameTime; // time when ->oldFrame was exactly on
  9. int frame;
  10. int frameTime; // time when ->frame will be exactly on
  11. float backlerp;
  12. float yawAngle;
  13. qboolean yawing;
  14. float pitchAngle;
  15. qboolean pitching;
  16. int animationNumber; //
  17. animation_t *animation;
  18. int animationTime; // time when the first frame of the animation will be exact
  19. } lerpFrame_t;
  20. typedef struct {
  21. // model info
  22. qhandle_t legsModel;
  23. qhandle_t legsSkin;
  24. lerpFrame_t legs;
  25. qhandle_t torsoModel;
  26. qhandle_t torsoSkin;
  27. lerpFrame_t torso;
  28. qhandle_t headModel;
  29. qhandle_t headSkin;
  30. animation_t animations[MAX_ANIMATIONS];
  31. qhandle_t weaponModel;
  32. vec3_t flashDlightColor;
  33. int muzzleFlashTime;
  34. // currently in use drawing parms
  35. vec3_t viewAngles;
  36. vec3_t moveAngles;
  37. weapon_t currentWeapon;
  38. int legsAnim;
  39. int torsoAnim;
  40. // animation vars
  41. weapon_t weapon;
  42. weapon_t lastWeapon;
  43. weapon_t pendingWeapon;
  44. int weaponTimer;
  45. int pendingLegsAnim;
  46. int torsoAnimationTimer;
  47. int pendingTorsoAnim;
  48. int legsAnimationTimer;
  49. qboolean chat;
  50. qboolean looking;
  51. } playerInfo_t;
  52. void UI_DrawPlayer( float x, float y, float w, float h, playerInfo_t *pi, int time );
  53. void UI_PlayerInfo_SetModel( playerInfo_t *pi, const char *model, const char* headmodel );
  54. void UI_PlayerInfo_SetInfo( playerInfo_t *pi, int legsAnim, int torsoAnim, vec3_t viewAngles, vec3_t moveAngles, weapon_t weaponNum, qboolean chat );
  55. qboolean UI_RegisterClientModelname( playerInfo_t *pi, const char *modelSkinName );
  56. #endif //__UI_PLAYERINFO_H__