Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef ANIMSETATTRIBUTEVALUE_H
  7. #define ANIMSETATTRIBUTEVALUE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "tier1/utldict.h"
  12. //-----------------------------------------------------------------------------
  13. // Forward declarations
  14. //-----------------------------------------------------------------------------
  15. class CDmAttribute;
  16. //-----------------------------------------------------------------------------
  17. // AnimationControlType
  18. //-----------------------------------------------------------------------------
  19. enum AnimationControlType_t
  20. {
  21. ANIM_CONTROL_INVALID = -1,
  22. ANIM_CONTROL_VALUE = 0,
  23. ANIM_CONTROL_BALANCE,
  24. ANIM_CONTROL_MULTILEVEL,
  25. ANIM_CONTROL_COUNT,
  26. };
  27. struct AttributeValue_t
  28. {
  29. AttributeValue_t()
  30. {
  31. // Default values
  32. m_pValue[ANIM_CONTROL_VALUE] = 0.0f;
  33. m_pValue[ANIM_CONTROL_BALANCE] = 0.5f;
  34. m_pValue[ANIM_CONTROL_MULTILEVEL] = 0.5f;
  35. }
  36. float m_pValue[ANIM_CONTROL_COUNT];
  37. };
  38. struct AnimationControlAttributes_t : public AttributeValue_t
  39. {
  40. AnimationControlAttributes_t()
  41. {
  42. // Default values
  43. m_pAttribute[ANIM_CONTROL_VALUE] = 0;
  44. m_pAttribute[ANIM_CONTROL_BALANCE] = 0;
  45. m_pAttribute[ANIM_CONTROL_MULTILEVEL] = 0;
  46. }
  47. CDmAttribute* m_pAttribute[ANIM_CONTROL_COUNT];
  48. };
  49. typedef CUtlDict< AnimationControlAttributes_t, unsigned short > AttributeDict_t;
  50. #endif // ANIMSETATTRIBUTEVALUE_H