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.

74 lines
1.9 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef EXPCLASS_H
  8. #define EXPCLASS_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "utlvector.h"
  13. class CExpression;
  14. //-----------------------------------------------------------------------------
  15. // Purpose:
  16. //-----------------------------------------------------------------------------
  17. class CExpClass
  18. {
  19. public:
  20. CExpClass( const char *classname );
  21. virtual ~CExpClass( void );
  22. void Save( void );
  23. void Export( void );
  24. void CheckBitmapConsistency( void );
  25. void ReloadBitmaps( void );
  26. const char *GetName() const;
  27. const char *GetBaseName() const;
  28. const char *GetFileName() const;
  29. void SetFileName( const char *filename );
  30. CExpression *AddExpression( const char *name, const char *description, float *flexsettings, float *flexweights, bool selectnewitem, bool bDirtyClass );
  31. CExpression *FindExpression( const char *name );
  32. int FindExpressionIndex( CExpression *exp );
  33. void DeleteExpression( const char *name );
  34. int GetNumExpressions( void );
  35. CExpression *GetExpression( int num );
  36. bool GetDirty( void );
  37. void SetDirty( bool dirty );
  38. void SelectExpression( int num, bool deselect = true );
  39. int GetSelectedExpression( void );
  40. void DeselectExpression( void );
  41. void SwapExpressionOrder( int exp1, int exp2 );
  42. // Get index of this class in the global class list
  43. int GetIndex( void );
  44. bool IsPhonemeClass( void ) const;
  45. private:
  46. void BuildValidChecksums( CUtlRBTree< CRC32_t > &tree );
  47. char m_szBaseName[ 128 ]; // name w/out any subdirectory names
  48. char m_szClassName[ 128 ];
  49. char m_szFileName[ 128 ];
  50. bool m_bDirty;
  51. int m_nSelectedExpression;
  52. CUtlVector < CExpression > m_Expressions;
  53. bool m_bIsPhonemeClass;
  54. };
  55. #endif // EXPCLASS_H