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/public/tier3 | |
| 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/public/tier3')
| -rw-r--r-- | sp/src/public/tier3/choreoutils.h | 78 | ||||
| -rw-r--r-- | sp/src/public/tier3/mdlutils.h | 194 | ||||
| -rw-r--r-- | sp/src/public/tier3/scenetokenprocessor.h | 36 | ||||
| -rw-r--r-- | sp/src/public/tier3/tier3.h | 228 | ||||
| -rw-r--r-- | sp/src/public/tier3/tier3dm.h | 110 |
5 files changed, 323 insertions, 323 deletions
diff --git a/sp/src/public/tier3/choreoutils.h b/sp/src/public/tier3/choreoutils.h index ace2be6b..b531737c 100644 --- a/sp/src/public/tier3/choreoutils.h +++ b/sp/src/public/tier3/choreoutils.h @@ -1,39 +1,39 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose: Helper methods + classes for choreo
-//
-//===========================================================================//
-
-#ifndef CHOREOUTILS_H
-#define CHOREOUTILS_H
-
-#if defined( _WIN32 )
-#pragma once
-#endif
-
-
-//-----------------------------------------------------------------------------
-// Forward declarations
-//-----------------------------------------------------------------------------
-class CChoreoScene;
-class CChoreoEvent;
-class CStudioHdr;
-
-
-//-----------------------------------------------------------------------------
-// Finds sound files associated with events
-//-----------------------------------------------------------------------------
-const char *GetSoundForEvent( CChoreoEvent *pEvent, CStudioHdr *pStudioHdr );
-
-
-//-----------------------------------------------------------------------------
-// Fixes up the duration of a choreo scene based on wav files + animations
-// Returns true if a change needed to be made
-//-----------------------------------------------------------------------------
-bool AutoAddGestureKeys( CChoreoEvent *e, CStudioHdr *pStudioHdr, float *pPoseParameters, bool bCheckOnly );
-bool UpdateGestureLength( CChoreoEvent *e, CStudioHdr *pStudioHdr, float *pPoseParameters, bool bCheckOnly );
-bool UpdateSequenceLength( CChoreoEvent *e, CStudioHdr *pStudioHdr, float *pPoseParameters, bool bCheckOnly, bool bVerbose );
-
-
-#endif // CHOREOUTILS_H
-
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: Helper methods + classes for choreo +// +//===========================================================================// + +#ifndef CHOREOUTILS_H +#define CHOREOUTILS_H + +#if defined( _WIN32 ) +#pragma once +#endif + + +//----------------------------------------------------------------------------- +// Forward declarations +//----------------------------------------------------------------------------- +class CChoreoScene; +class CChoreoEvent; +class CStudioHdr; + + +//----------------------------------------------------------------------------- +// Finds sound files associated with events +//----------------------------------------------------------------------------- +const char *GetSoundForEvent( CChoreoEvent *pEvent, CStudioHdr *pStudioHdr ); + + +//----------------------------------------------------------------------------- +// Fixes up the duration of a choreo scene based on wav files + animations +// Returns true if a change needed to be made +//----------------------------------------------------------------------------- +bool AutoAddGestureKeys( CChoreoEvent *e, CStudioHdr *pStudioHdr, float *pPoseParameters, bool bCheckOnly ); +bool UpdateGestureLength( CChoreoEvent *e, CStudioHdr *pStudioHdr, float *pPoseParameters, bool bCheckOnly ); +bool UpdateSequenceLength( CChoreoEvent *e, CStudioHdr *pStudioHdr, float *pPoseParameters, bool bCheckOnly, bool bVerbose ); + + +#endif // CHOREOUTILS_H + diff --git a/sp/src/public/tier3/mdlutils.h b/sp/src/public/tier3/mdlutils.h index e675d555..1e04abd0 100644 --- a/sp/src/public/tier3/mdlutils.h +++ b/sp/src/public/tier3/mdlutils.h @@ -1,97 +1,97 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose: A higher level link library for general use in the game and tools.
-//
-//===========================================================================//
-
-
-#ifndef MDLUTILS_H
-#define MDLUTILS_H
-
-#if defined( _WIN32 )
-#pragma once
-#endif
-
-#include "datacache/imdlcache.h"
-#include "mathlib/vector.h"
-#include "Color.h"
-#include "studio.h"
-
-
-//-----------------------------------------------------------------------------
-// Forward declarations
-//-----------------------------------------------------------------------------
-struct matrix3x4_t;
-
-struct MDLSquenceLayer_t
-{
- int m_nSequenceIndex;
- float m_flWeight;
- bool m_bNoLoop;
- float m_flCycleBeganAt;
-};
-
-//-----------------------------------------------------------------------------
-// Class containing simplistic MDL state for use in rendering
-//-----------------------------------------------------------------------------
-class CMDL
-{
-public:
- CMDL();
- ~CMDL();
-
- void SetMDL( MDLHandle_t h );
- MDLHandle_t GetMDL() const;
-
- // Simple version of drawing; sets up bones for you
- void Draw( const matrix3x4_t& rootToWorld );
-
- // NOTE: This version of draw assumes you've filled in the bone to world
- // matrix yourself by calling IStudioRender::LockBoneMatrices. The pointer
- // returned by that method needs to be passed into here
- void Draw( const matrix3x4_t& rootToWorld, const matrix3x4_t *pBoneToWorld );
-
-
- void SetUpBones( const matrix3x4_t& shapeToWorld, int nMaxBoneCount, matrix3x4_t *pOutputMatrices, const float *pPoseParameters = NULL, MDLSquenceLayer_t *pSequenceLayers = NULL, int nNumSequenceLayers = 0 );
- void SetupBonesWithBoneMerge( const CStudioHdr *pMergeHdr, matrix3x4_t *pMergeBoneToWorld,
- const CStudioHdr *pFollow, const matrix3x4_t *pFollowBoneToWorld, const matrix3x4_t &matModelToWorld );
-
- studiohdr_t *GetStudioHdr();
-
-private:
- void UnreferenceMDL();
-
-public:
- MDLHandle_t m_MDLHandle;
- Color m_Color;
- int m_nSkin;
- int m_nBody;
- int m_nSequence;
- int m_nLOD;
- float m_flPlaybackRate;
- float m_flTime;
- float m_pFlexControls[ MAXSTUDIOFLEXCTRL * 4 ];
- Vector m_vecViewTarget;
- bool m_bWorldSpaceViewTarget;
- void *m_pProxyData;
-};
-
-
-//-----------------------------------------------------------------------------
-// Returns the bounding box for the model
-//-----------------------------------------------------------------------------
-void GetMDLBoundingBox( Vector *pMins, Vector *pMaxs, MDLHandle_t h, int nSequence );
-
-//-----------------------------------------------------------------------------
-// Returns the radius of the model as measured from the origin
-//-----------------------------------------------------------------------------
-float GetMDLRadius( MDLHandle_t h, int nSequence );
-
-//-----------------------------------------------------------------------------
-// Returns a more accurate bounding sphere
-//-----------------------------------------------------------------------------
-void GetMDLBoundingSphere( Vector *pVecCenter, float *pRadius, MDLHandle_t h, int nSequence );
-
-
-#endif // MDLUTILS_H
-
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: A higher level link library for general use in the game and tools. +// +//===========================================================================// + + +#ifndef MDLUTILS_H +#define MDLUTILS_H + +#if defined( _WIN32 ) +#pragma once +#endif + +#include "datacache/imdlcache.h" +#include "mathlib/vector.h" +#include "Color.h" +#include "studio.h" + + +//----------------------------------------------------------------------------- +// Forward declarations +//----------------------------------------------------------------------------- +struct matrix3x4_t; + +struct MDLSquenceLayer_t +{ + int m_nSequenceIndex; + float m_flWeight; + bool m_bNoLoop; + float m_flCycleBeganAt; +}; + +//----------------------------------------------------------------------------- +// Class containing simplistic MDL state for use in rendering +//----------------------------------------------------------------------------- +class CMDL +{ +public: + CMDL(); + ~CMDL(); + + void SetMDL( MDLHandle_t h ); + MDLHandle_t GetMDL() const; + + // Simple version of drawing; sets up bones for you + void Draw( const matrix3x4_t& rootToWorld ); + + // NOTE: This version of draw assumes you've filled in the bone to world + // matrix yourself by calling IStudioRender::LockBoneMatrices. The pointer + // returned by that method needs to be passed into here + void Draw( const matrix3x4_t& rootToWorld, const matrix3x4_t *pBoneToWorld ); + + + void SetUpBones( const matrix3x4_t& shapeToWorld, int nMaxBoneCount, matrix3x4_t *pOutputMatrices, const float *pPoseParameters = NULL, MDLSquenceLayer_t *pSequenceLayers = NULL, int nNumSequenceLayers = 0 ); + void SetupBonesWithBoneMerge( const CStudioHdr *pMergeHdr, matrix3x4_t *pMergeBoneToWorld, + const CStudioHdr *pFollow, const matrix3x4_t *pFollowBoneToWorld, const matrix3x4_t &matModelToWorld ); + + studiohdr_t *GetStudioHdr(); + +private: + void UnreferenceMDL(); + +public: + MDLHandle_t m_MDLHandle; + Color m_Color; + int m_nSkin; + int m_nBody; + int m_nSequence; + int m_nLOD; + float m_flPlaybackRate; + float m_flTime; + float m_pFlexControls[ MAXSTUDIOFLEXCTRL * 4 ]; + Vector m_vecViewTarget; + bool m_bWorldSpaceViewTarget; + void *m_pProxyData; +}; + + +//----------------------------------------------------------------------------- +// Returns the bounding box for the model +//----------------------------------------------------------------------------- +void GetMDLBoundingBox( Vector *pMins, Vector *pMaxs, MDLHandle_t h, int nSequence ); + +//----------------------------------------------------------------------------- +// Returns the radius of the model as measured from the origin +//----------------------------------------------------------------------------- +float GetMDLRadius( MDLHandle_t h, int nSequence ); + +//----------------------------------------------------------------------------- +// Returns a more accurate bounding sphere +//----------------------------------------------------------------------------- +void GetMDLBoundingSphere( Vector *pVecCenter, float *pRadius, MDLHandle_t h, int nSequence ); + + +#endif // MDLUTILS_H + diff --git a/sp/src/public/tier3/scenetokenprocessor.h b/sp/src/public/tier3/scenetokenprocessor.h index 35b2aca4..d614b75d 100644 --- a/sp/src/public/tier3/scenetokenprocessor.h +++ b/sp/src/public/tier3/scenetokenprocessor.h @@ -1,18 +1,18 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-//=============================================================================
-
-#ifndef SCENETOKENPROCESSOR_H
-#define SCENETOKENPROCESSOR_H
-#ifdef _WIN32
-#pragma once
-#endif
-
-class ISceneTokenProcessor;
-
-ISceneTokenProcessor *GetTokenProcessor();
-void SetTokenProcessorBuffer( const char *buf );
-
-#endif // SCENETOKENPROCESSOR_H
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//============================================================================= + +#ifndef SCENETOKENPROCESSOR_H +#define SCENETOKENPROCESSOR_H +#ifdef _WIN32 +#pragma once +#endif + +class ISceneTokenProcessor; + +ISceneTokenProcessor *GetTokenProcessor(); +void SetTokenProcessorBuffer( const char *buf ); + +#endif // SCENETOKENPROCESSOR_H diff --git a/sp/src/public/tier3/tier3.h b/sp/src/public/tier3/tier3.h index 537e617d..7f533531 100644 --- a/sp/src/public/tier3/tier3.h +++ b/sp/src/public/tier3/tier3.h @@ -1,114 +1,114 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose: A higher level link library for general use in the game and tools.
-//
-//===========================================================================//
-
-
-#ifndef TIER3_H
-#define TIER3_H
-
-#if defined( _WIN32 )
-#pragma once
-#endif
-
-#include "tier2/tier2.h"
-
-
-//-----------------------------------------------------------------------------
-// Forward declarations
-//-----------------------------------------------------------------------------
-class IStudioRender;
-class IMatSystemSurface;
-class IDataCache;
-class IMDLCache;
-class IVideoServices;
-class IDmeMakefileUtils;
-class IPhysicsCollision;
-class ISoundEmitterSystemBase;
-class IVTex;
-
-namespace vgui
-{
- class ISurface;
- class IVGui;
- class IInput;
- class IPanel;
- class ILocalize;
- class ISchemeManager;
- class ISystem;
-}
-
-
-//-----------------------------------------------------------------------------
-// These tier3 libraries must be set by any users of this library.
-// They can be set by calling ConnectTier3Libraries.
-// It is hoped that setting this, and using this library will be the common mechanism for
-// allowing link libraries to access tier3 library interfaces
-//-----------------------------------------------------------------------------
-extern IStudioRender *g_pStudioRender;
-extern IStudioRender *studiorender;
-extern IMatSystemSurface *g_pMatSystemSurface;
-extern vgui::ISurface *g_pVGuiSurface;
-extern vgui::IInput *g_pVGuiInput;
-extern vgui::IVGui *g_pVGui;
-extern vgui::IPanel *g_pVGuiPanel;
-extern vgui::ILocalize *g_pVGuiLocalize;
-extern vgui::ISchemeManager *g_pVGuiSchemeManager;
-extern vgui::ISystem *g_pVGuiSystem;
-extern IDataCache *g_pDataCache; // FIXME: Should IDataCache be in tier2?
-extern IMDLCache *g_pMDLCache;
-extern IMDLCache *mdlcache;
-extern IVideoServices *g_pVideo;
-extern IDmeMakefileUtils *g_pDmeMakefileUtils;
-extern IPhysicsCollision *g_pPhysicsCollision;
-extern ISoundEmitterSystemBase *g_pSoundEmitterSystem;
-extern IVTex *g_pVTex;
-
-
-//-----------------------------------------------------------------------------
-// Call this to connect to/disconnect from all tier 3 libraries.
-// It's up to the caller to check the globals it cares about to see if ones are missing
-//-----------------------------------------------------------------------------
-void ConnectTier3Libraries( CreateInterfaceFn *pFactoryList, int nFactoryCount );
-void DisconnectTier3Libraries();
-
-
-//-----------------------------------------------------------------------------
-// Helper empty implementation of an IAppSystem for tier2 libraries
-//-----------------------------------------------------------------------------
-template< class IInterface, int ConVarFlag = 0 >
-class CTier3AppSystem : public CTier2AppSystem< IInterface, ConVarFlag >
-{
- typedef CTier2AppSystem< IInterface, ConVarFlag > BaseClass;
-
-public:
- CTier3AppSystem( bool bIsPrimaryAppSystem = true ) : BaseClass( bIsPrimaryAppSystem )
- {
- }
-
- virtual bool Connect( CreateInterfaceFn factory )
- {
- if ( !BaseClass::Connect( factory ) )
- return false;
-
- if ( BaseClass::IsPrimaryAppSystem() )
- {
- ConnectTier3Libraries( &factory, 1 );
- }
- return true;
- }
-
- virtual void Disconnect()
- {
- if ( BaseClass::IsPrimaryAppSystem() )
- {
- DisconnectTier3Libraries();
- }
- BaseClass::Disconnect();
- }
-};
-
-
-#endif // TIER3_H
-
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: A higher level link library for general use in the game and tools. +// +//===========================================================================// + + +#ifndef TIER3_H +#define TIER3_H + +#if defined( _WIN32 ) +#pragma once +#endif + +#include "tier2/tier2.h" + + +//----------------------------------------------------------------------------- +// Forward declarations +//----------------------------------------------------------------------------- +class IStudioRender; +class IMatSystemSurface; +class IDataCache; +class IMDLCache; +class IVideoServices; +class IDmeMakefileUtils; +class IPhysicsCollision; +class ISoundEmitterSystemBase; +class IVTex; + +namespace vgui +{ + class ISurface; + class IVGui; + class IInput; + class IPanel; + class ILocalize; + class ISchemeManager; + class ISystem; +} + + +//----------------------------------------------------------------------------- +// These tier3 libraries must be set by any users of this library. +// They can be set by calling ConnectTier3Libraries. +// It is hoped that setting this, and using this library will be the common mechanism for +// allowing link libraries to access tier3 library interfaces +//----------------------------------------------------------------------------- +extern IStudioRender *g_pStudioRender; +extern IStudioRender *studiorender; +extern IMatSystemSurface *g_pMatSystemSurface; +extern vgui::ISurface *g_pVGuiSurface; +extern vgui::IInput *g_pVGuiInput; +extern vgui::IVGui *g_pVGui; +extern vgui::IPanel *g_pVGuiPanel; +extern vgui::ILocalize *g_pVGuiLocalize; +extern vgui::ISchemeManager *g_pVGuiSchemeManager; +extern vgui::ISystem *g_pVGuiSystem; +extern IDataCache *g_pDataCache; // FIXME: Should IDataCache be in tier2? +extern IMDLCache *g_pMDLCache; +extern IMDLCache *mdlcache; +extern IVideoServices *g_pVideo; +extern IDmeMakefileUtils *g_pDmeMakefileUtils; +extern IPhysicsCollision *g_pPhysicsCollision; +extern ISoundEmitterSystemBase *g_pSoundEmitterSystem; +extern IVTex *g_pVTex; + + +//----------------------------------------------------------------------------- +// Call this to connect to/disconnect from all tier 3 libraries. +// It's up to the caller to check the globals it cares about to see if ones are missing +//----------------------------------------------------------------------------- +void ConnectTier3Libraries( CreateInterfaceFn *pFactoryList, int nFactoryCount ); +void DisconnectTier3Libraries(); + + +//----------------------------------------------------------------------------- +// Helper empty implementation of an IAppSystem for tier2 libraries +//----------------------------------------------------------------------------- +template< class IInterface, int ConVarFlag = 0 > +class CTier3AppSystem : public CTier2AppSystem< IInterface, ConVarFlag > +{ + typedef CTier2AppSystem< IInterface, ConVarFlag > BaseClass; + +public: + CTier3AppSystem( bool bIsPrimaryAppSystem = true ) : BaseClass( bIsPrimaryAppSystem ) + { + } + + virtual bool Connect( CreateInterfaceFn factory ) + { + if ( !BaseClass::Connect( factory ) ) + return false; + + if ( BaseClass::IsPrimaryAppSystem() ) + { + ConnectTier3Libraries( &factory, 1 ); + } + return true; + } + + virtual void Disconnect() + { + if ( BaseClass::IsPrimaryAppSystem() ) + { + DisconnectTier3Libraries(); + } + BaseClass::Disconnect(); + } +}; + + +#endif // TIER3_H + diff --git a/sp/src/public/tier3/tier3dm.h b/sp/src/public/tier3/tier3dm.h index 78424ad9..5ac60281 100644 --- a/sp/src/public/tier3/tier3dm.h +++ b/sp/src/public/tier3/tier3dm.h @@ -1,55 +1,55 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose: A higher level link library for general use in the game and tools.
-//
-//===========================================================================//
-
-
-#ifndef TIER3DM_H
-#define TIER3DM_H
-
-#if defined( _WIN32 )
-#pragma once
-#endif
-
-#include "tier3/tier3.h"
-#include "tier2/tier2dm.h"
-
-//-----------------------------------------------------------------------------
-// Helper empty implementation of an IAppSystem for tier2 libraries
-//-----------------------------------------------------------------------------
-template< class IInterface, int ConVarFlag = 0 >
-class CTier3DmAppSystem : public CTier2DmAppSystem< IInterface, ConVarFlag >
-{
- typedef CTier2DmAppSystem< IInterface, ConVarFlag > BaseClass;
-
-public:
- CTier3DmAppSystem( bool bIsPrimaryAppSystem = true ) : BaseClass( bIsPrimaryAppSystem )
- {
- }
-
- virtual bool Connect( CreateInterfaceFn factory )
- {
- if ( !BaseClass::Connect( factory ) )
- return false;
-
- if ( IsPrimaryAppSystem() )
- {
- ConnectTier3Libraries( &factory, 1 );
- }
- return true;
- }
-
- virtual void Disconnect()
- {
- if ( IsPrimaryAppSystem() )
- {
- DisconnectTier3Libraries();
- }
- BaseClass::Disconnect();
- }
-};
-
-
-#endif // TIER3DM_H
-
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: A higher level link library for general use in the game and tools. +// +//===========================================================================// + + +#ifndef TIER3DM_H +#define TIER3DM_H + +#if defined( _WIN32 ) +#pragma once +#endif + +#include "tier3/tier3.h" +#include "tier2/tier2dm.h" + +//----------------------------------------------------------------------------- +// Helper empty implementation of an IAppSystem for tier2 libraries +//----------------------------------------------------------------------------- +template< class IInterface, int ConVarFlag = 0 > +class CTier3DmAppSystem : public CTier2DmAppSystem< IInterface, ConVarFlag > +{ + typedef CTier2DmAppSystem< IInterface, ConVarFlag > BaseClass; + +public: + CTier3DmAppSystem( bool bIsPrimaryAppSystem = true ) : BaseClass( bIsPrimaryAppSystem ) + { + } + + virtual bool Connect( CreateInterfaceFn factory ) + { + if ( !BaseClass::Connect( factory ) ) + return false; + + if ( IsPrimaryAppSystem() ) + { + ConnectTier3Libraries( &factory, 1 ); + } + return true; + } + + virtual void Disconnect() + { + if ( IsPrimaryAppSystem() ) + { + DisconnectTier3Libraries(); + } + BaseClass::Disconnect(); + } +}; + + +#endif // TIER3DM_H + |