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 /mp/src/game/client/clienteffectprecachesystem.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 'mp/src/game/client/clienteffectprecachesystem.cpp')
| -rw-r--r-- | mp/src/game/client/clienteffectprecachesystem.cpp | 156 |
1 files changed, 78 insertions, 78 deletions
diff --git a/mp/src/game/client/clienteffectprecachesystem.cpp b/mp/src/game/client/clienteffectprecachesystem.cpp index 7ccd4773..c5d4e07b 100644 --- a/mp/src/game/client/clienteffectprecachesystem.cpp +++ b/mp/src/game/client/clienteffectprecachesystem.cpp @@ -1,78 +1,78 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose: Deals with precaching requests from client effects
-//
-// $Revision: $
-// $NoKeywords: $
-//=============================================================================//
-#include "cbase.h"
-#include "fx.h"
-#include "clienteffectprecachesystem.h"
-#include "particles/particles.h"
-
-// memdbgon must be the last include file in a .cpp file!!!
-#include "tier0/memdbgon.h"
-
-//Global singelton accessor
-CClientEffectPrecacheSystem *ClientEffectPrecacheSystem( void )
-{
- static CClientEffectPrecacheSystem s_ClientEffectPrecacheSystem;
- return &s_ClientEffectPrecacheSystem;
-}
-
-//-----------------------------------------------------------------------------
-// Purpose: Precache all the registered effects
-//-----------------------------------------------------------------------------
-void CClientEffectPrecacheSystem::LevelInitPreEntity( void )
-{
- //Precache all known effects
- for ( int i = 0; i < m_Effects.Size(); i++ )
- {
- m_Effects[i]->Cache();
- }
-
- //FIXME: Double check this
- //Finally, force the cache of these materials
- materials->CacheUsedMaterials();
-
- // Now, cache off our material handles
- FX_CacheMaterialHandles();
-}
-
-//-----------------------------------------------------------------------------
-// Purpose: Nothing to do here
-//-----------------------------------------------------------------------------
-void CClientEffectPrecacheSystem::LevelShutdownPreEntity( void )
-{
-}
-
-//-----------------------------------------------------------------------------
-// Purpose: Dereference all the registered effects
-//-----------------------------------------------------------------------------
-void CClientEffectPrecacheSystem::LevelShutdownPostEntity( void )
-{
- // mark all known effects as free
- for ( int i = 0; i < m_Effects.Size(); i++ )
- {
- m_Effects[i]->Cache( false );
- }
-}
-
-//-----------------------------------------------------------------------------
-// Purpose: Purges the effect list
-//-----------------------------------------------------------------------------
-void CClientEffectPrecacheSystem::Shutdown( void )
-{
- //Release all effects
- m_Effects.Purge();
-}
-
-//-----------------------------------------------------------------------------
-// Purpose: Adds the effect to the list to be precached
-// Input : *effect - system to precache
-//-----------------------------------------------------------------------------
-void CClientEffectPrecacheSystem::Register( IClientEffect *effect )
-{
- //Hold onto this effect for precaching later
- m_Effects.AddToTail( effect );
-}
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: Deals with precaching requests from client effects +// +// $Revision: $ +// $NoKeywords: $ +//=============================================================================// +#include "cbase.h" +#include "fx.h" +#include "clienteffectprecachesystem.h" +#include "particles/particles.h" + +// memdbgon must be the last include file in a .cpp file!!! +#include "tier0/memdbgon.h" + +//Global singelton accessor +CClientEffectPrecacheSystem *ClientEffectPrecacheSystem( void ) +{ + static CClientEffectPrecacheSystem s_ClientEffectPrecacheSystem; + return &s_ClientEffectPrecacheSystem; +} + +//----------------------------------------------------------------------------- +// Purpose: Precache all the registered effects +//----------------------------------------------------------------------------- +void CClientEffectPrecacheSystem::LevelInitPreEntity( void ) +{ + //Precache all known effects + for ( int i = 0; i < m_Effects.Size(); i++ ) + { + m_Effects[i]->Cache(); + } + + //FIXME: Double check this + //Finally, force the cache of these materials + materials->CacheUsedMaterials(); + + // Now, cache off our material handles + FX_CacheMaterialHandles(); +} + +//----------------------------------------------------------------------------- +// Purpose: Nothing to do here +//----------------------------------------------------------------------------- +void CClientEffectPrecacheSystem::LevelShutdownPreEntity( void ) +{ +} + +//----------------------------------------------------------------------------- +// Purpose: Dereference all the registered effects +//----------------------------------------------------------------------------- +void CClientEffectPrecacheSystem::LevelShutdownPostEntity( void ) +{ + // mark all known effects as free + for ( int i = 0; i < m_Effects.Size(); i++ ) + { + m_Effects[i]->Cache( false ); + } +} + +//----------------------------------------------------------------------------- +// Purpose: Purges the effect list +//----------------------------------------------------------------------------- +void CClientEffectPrecacheSystem::Shutdown( void ) +{ + //Release all effects + m_Effects.Purge(); +} + +//----------------------------------------------------------------------------- +// Purpose: Adds the effect to the list to be precached +// Input : *effect - system to precache +//----------------------------------------------------------------------------- +void CClientEffectPrecacheSystem::Register( IClientEffect *effect ) +{ + //Hold onto this effect for precaching later + m_Effects.AddToTail( effect ); +} |