diff options
Diffstat (limited to 'game/client/ivieweffects.h')
| -rw-r--r-- | game/client/ivieweffects.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/game/client/ivieweffects.h b/game/client/ivieweffects.h new file mode 100644 index 0000000..77b772e --- /dev/null +++ b/game/client/ivieweffects.h @@ -0,0 +1,54 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $Workfile: $ +// $Date: $ +// +//----------------------------------------------------------------------------- +// $Log: $ +// +// $NoKeywords: $ +//=============================================================================// +#if !defined( IVIEWEFFECTS_H ) +#define IVIEWEFFECTS_H +#ifdef _WIN32 +#pragma once +#endif + +class Vector; +class QAngle; +class bf_read; + +//----------------------------------------------------------------------------- +// Purpose: Apply effects to view origin/angles, etc. Screen fade and shake +//----------------------------------------------------------------------------- +abstract_class IViewEffects +{ +public: + // Initialize subsystem + virtual void Init( void ) = 0; + // Initialize after each level change + virtual void LevelInit( void ) = 0; + // Called each frame to determine the current view fade parameters ( color and alpha ) + virtual void GetFadeParams( unsigned char *r, unsigned char *g, unsigned char *b, unsigned char *a, bool *blend ) = 0; + // Apply directscreen shake + virtual void Shake( ScreenShake_t &data ) = 0; + // Apply direct screen fade + virtual void Fade( ScreenFade_t &data ) = 0; + // Clear all permanent fades in our fade list + virtual void ClearPermanentFades( void ) = 0; + // Clear all fades in our fade list + virtual void ClearAllFades( void ) = 0; + // Compute screen shake values for this frame + virtual void CalcShake( void ) = 0; + // Apply those values to the passed in vector(s). + virtual void ApplyShake( Vector& origin, QAngle& angles, float factor ) = 0; + // Save / Restore + virtual void Save( ISave *pSave ) = 0; + virtual void Restore( IRestore *pRestore, bool ) = 0; +}; + +extern IViewEffects *vieweffects; + +#endif // IVIEWEFFECTS_H
\ No newline at end of file |