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.

46 lines
1.2 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef BASEANIMATEDTEXTUREPROXY
  8. #define BASEANIMATEDTEXTUREPROXY
  9. #include "materialsystem/imaterialproxy.h"
  10. class IMaterial;
  11. class IMaterialVar;
  12. #pragma warning (disable : 4100)
  13. class CBaseAnimatedTextureProxy : public IMaterialProxy
  14. {
  15. public:
  16. CBaseAnimatedTextureProxy();
  17. virtual ~CBaseAnimatedTextureProxy();
  18. virtual bool Init( IMaterial *pMaterial, KeyValues *pKeyValues );
  19. virtual void OnBind( void *pC_BaseEntity );
  20. virtual void Release( void ) { delete this; }
  21. virtual IMaterial *GetMaterial();
  22. protected:
  23. // derived classes must implement this; it returns the time
  24. // that the animation began
  25. virtual float GetAnimationStartTime( void* pBaseEntity ) = 0;
  26. // Derived classes may implement this if they choose;
  27. // this method is called whenever the animation wraps...
  28. virtual void AnimationWrapped( void* pBaseEntity ) {}
  29. protected:
  30. void Cleanup();
  31. IMaterialVar *m_AnimatedTextureVar;
  32. IMaterialVar *m_AnimatedTextureFrameNumVar;
  33. float m_FrameRate;
  34. bool m_WrapAnimation;
  35. };
  36. #endif // BASEANIMATEDTEXTUREPROXY