Counter Strike : Global Offensive Source Code
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.

77 lines
2.2 KiB

  1. //====== Copyright � 1996-2005, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef DMESHEETSEQUENCE_H
  7. #define DMESHEETSEQUENCE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "materialobjects/amalgtexturevars.h"
  12. #include "bitmap/floatbitmap.h"
  13. #include "datamodel/dmelement.h"
  14. #include "datamodel/dmattributevar.h"
  15. class CDmeSheetSequence;
  16. class CDmeSheetImage : public CDmElement
  17. {
  18. DEFINE_ELEMENT( CDmeSheetImage, CDmElement );
  19. public:
  20. // Called when attributes change
  21. virtual void OnAttributeChanged( CDmAttribute *pAttribute ) {}
  22. virtual void OnAttributeArrayElementAdded( CDmAttribute *pAttribute, int nFirstElem, int nLastElem ) {}
  23. virtual void OnAttributeArrayElementRemoved( CDmAttribute *pAttribute, int nFirstElem, int nLastElem ) {}
  24. CDmeSheetSequence *FindSequence( int index );
  25. FloatBitMap_t *m_pImage;
  26. // where it ended up packed
  27. CDmaVar< int > m_XCoord;
  28. CDmaVar< int > m_YCoord;
  29. CDmaElementArray< CDmeSheetSequence > m_mapSequences;
  30. };
  31. class CDmeSheetSequenceFrame : public CDmElement
  32. {
  33. DEFINE_ELEMENT( CDmeSheetSequenceFrame, CDmElement );
  34. public:
  35. // Called when attributes change
  36. virtual void OnAttributeChanged( CDmAttribute *pAttribute ) {}
  37. virtual void OnAttributeArrayElementAdded( CDmAttribute *pAttribute, int nFirstElem, int nLastElem ) {}
  38. virtual void OnAttributeArrayElementRemoved( CDmAttribute *pAttribute, int nFirstElem, int nLastElem ) {}
  39. // Up to 4 images can be used in a frame
  40. CDmaElementArray< CDmeSheetImage > m_pSheetImages;
  41. CDmaVar< float > m_fDisplayTime;
  42. };
  43. class CDmeSheetSequence : public CDmElement
  44. {
  45. DEFINE_ELEMENT( CDmeSheetSequence, CDmElement );
  46. public:
  47. // Called when attributes change
  48. virtual void OnAttributeChanged( CDmAttribute *pAttribute ) {}
  49. virtual void OnAttributeArrayElementAdded( CDmAttribute *pAttribute, int nFirstElem, int nLastElem ) {}
  50. virtual void OnAttributeArrayElementRemoved( CDmAttribute *pAttribute, int nFirstElem, int nLastElem ) {}
  51. CDmaVar< int > m_nSequenceNumber;
  52. CDmaVar< bool > m_Clamp; // as opposed to loop
  53. CDmaVar< int > m_eMode;
  54. CDmaElementArray< CDmeSheetSequenceFrame > m_Frames;
  55. };
  56. #endif // DMESHEETSEQUENCE_H