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.

59 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef DMEMATERIALOVERLAYFXCLIP_H
  7. #define DMEMATERIALOVERLAYFXCLIP_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "movieobjects/dmeclip.h"
  12. #include "materialsystem/MaterialSystemUtil.h"
  13. #include "datamodel/dmelementfactoryhelper.h"
  14. //-----------------------------------------------------------------------------
  15. // An effect clip
  16. //-----------------------------------------------------------------------------
  17. class CDmeMaterialOverlayFXClip : public CDmeFXClip
  18. {
  19. DEFINE_ELEMENT( CDmeMaterialOverlayFXClip, CDmeFXClip );
  20. public:
  21. // All effects must be able to apply their effect
  22. virtual void ApplyEffect( DmeTime_t time, Rect_t &currentRect, Rect_t &totalRect, ITexture *pTextures[MAX_FX_INPUT_TEXTURES] );
  23. // Resolves changes
  24. virtual void Resolve();
  25. // Sets the overlay material
  26. void SetOverlayEffect( const char *pMaterialName );
  27. void SetAlpha( float flAlpha );
  28. bool HasOpaqueOverlay();
  29. IMaterial *GetMaterial();
  30. float GetAlpha();
  31. private:
  32. CDmaString m_Material;
  33. CDmaColor m_Color;
  34. CDmaVar<int> m_nLeft;
  35. CDmaVar<int> m_nTop;
  36. CDmaVar<int> m_nWidth;
  37. CDmaVar<int> m_nHeight;
  38. CDmaVar<bool> m_bFullScreen;
  39. CDmaVar<bool> m_bUseSubRect;
  40. CDmaVar<int> m_nSubRectLeft;
  41. CDmaVar<int> m_nSubRectTop;
  42. CDmaVar<int> m_nSubRectWidth;
  43. CDmaVar<int> m_nSubRectHeight;
  44. CDmaVar<float> m_flMovementAngle;
  45. CDmaVar<float> m_flMovementSpeed;
  46. CMaterialReference m_OverlayMaterial;
  47. };
  48. #endif // DMEMATERIALOVERLAYFXCLIP_H