diff options
| author | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:31:46 -0800 |
|---|---|---|
| committer | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:46:31 -0800 |
| commit | f56bb35301836e56582a575a75864392a0177875 (patch) | |
| tree | de61ddd39de3e7df52759711950b4c288592f0dc /sp/src/game/client/AnimateSpecificTextureProxy.cpp | |
| parent | Mark some more files as text. (diff) | |
| download | source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip | |
Fix line endings. WHAMMY.
Diffstat (limited to 'sp/src/game/client/AnimateSpecificTextureProxy.cpp')
| -rw-r--r-- | sp/src/game/client/AnimateSpecificTextureProxy.cpp | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/sp/src/game/client/AnimateSpecificTextureProxy.cpp b/sp/src/game/client/AnimateSpecificTextureProxy.cpp index f20f716f..e4fe742f 100644 --- a/sp/src/game/client/AnimateSpecificTextureProxy.cpp +++ b/sp/src/game/client/AnimateSpecificTextureProxy.cpp @@ -1,53 +1,53 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose: Acts exactly like "AnimatedTexture", but ONLY if the texture
-// it's working on matches the desired texture to work on.
-//
-// This assumes that some other proxy will be switching out the textures.
-//
-// $NoKeywords: $
-//=============================================================================//
-#include "cbase.h"
-#include "materialsystem/imaterialproxy.h"
-#include "materialsystem/imaterialvar.h"
-#include "materialsystem/imaterial.h"
-#include "materialsystem/itexture.h"
-#include "baseanimatedtextureproxy.h"
-#include "utlstring.h"
-#include <KeyValues.h>
-
-// memdbgon must be the last include file in a .cpp file!!!
-#include "tier0/memdbgon.h"
-
-class CAnimateSpecificTexture : public CBaseAnimatedTextureProxy
-{
-private:
- CUtlString m_OnlyAnimateOnTexture;
-public:
- virtual float GetAnimationStartTime( void* pBaseEntity ) { return 0; }
- virtual bool Init( IMaterial *pMaterial, KeyValues *pKeyValues );
- virtual void OnBind( void *pC_BaseEntity );
- virtual void Release( void ) { delete this; }
-};
-
-bool CAnimateSpecificTexture::Init( IMaterial *pMaterial, KeyValues *pKeyValues )
-{
- char const* pszAnimateOnTexture = pKeyValues->GetString( "onlyAnimateOnTexture" );
- if( !pszAnimateOnTexture )
- return false;
-
- m_OnlyAnimateOnTexture.Set( pszAnimateOnTexture );
-
- return CBaseAnimatedTextureProxy::Init( pMaterial, pKeyValues );
-}
-
-void CAnimateSpecificTexture::OnBind( void *pC_BaseEntity )
-{
- if( FStrEq( m_AnimatedTextureVar->GetTextureValue()->GetName(), m_OnlyAnimateOnTexture ) )
- {
- CBaseAnimatedTextureProxy::OnBind( pC_BaseEntity );
- }
- //else do nothing
-}
-
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: Acts exactly like "AnimatedTexture", but ONLY if the texture +// it's working on matches the desired texture to work on. +// +// This assumes that some other proxy will be switching out the textures. +// +// $NoKeywords: $ +//=============================================================================// +#include "cbase.h" +#include "materialsystem/imaterialproxy.h" +#include "materialsystem/imaterialvar.h" +#include "materialsystem/imaterial.h" +#include "materialsystem/itexture.h" +#include "baseanimatedtextureproxy.h" +#include "utlstring.h" +#include <KeyValues.h> + +// memdbgon must be the last include file in a .cpp file!!! +#include "tier0/memdbgon.h" + +class CAnimateSpecificTexture : public CBaseAnimatedTextureProxy +{ +private: + CUtlString m_OnlyAnimateOnTexture; +public: + virtual float GetAnimationStartTime( void* pBaseEntity ) { return 0; } + virtual bool Init( IMaterial *pMaterial, KeyValues *pKeyValues ); + virtual void OnBind( void *pC_BaseEntity ); + virtual void Release( void ) { delete this; } +}; + +bool CAnimateSpecificTexture::Init( IMaterial *pMaterial, KeyValues *pKeyValues ) +{ + char const* pszAnimateOnTexture = pKeyValues->GetString( "onlyAnimateOnTexture" ); + if( !pszAnimateOnTexture ) + return false; + + m_OnlyAnimateOnTexture.Set( pszAnimateOnTexture ); + + return CBaseAnimatedTextureProxy::Init( pMaterial, pKeyValues ); +} + +void CAnimateSpecificTexture::OnBind( void *pC_BaseEntity ) +{ + if( FStrEq( m_AnimatedTextureVar->GetTextureValue()->GetName(), m_OnlyAnimateOnTexture ) ) + { + CBaseAnimatedTextureProxy::OnBind( pC_BaseEntity ); + } + //else do nothing +} + EXPOSE_INTERFACE( CAnimateSpecificTexture, IMaterialProxy, "AnimateSpecificTexture" IMATERIAL_PROXY_INTERFACE_VERSION );
\ No newline at end of file |