diff options
Diffstat (limited to 'mp/src/game/shared/choreoactor.h')
| -rw-r--r-- | mp/src/game/shared/choreoactor.h | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/mp/src/game/shared/choreoactor.h b/mp/src/game/shared/choreoactor.h new file mode 100644 index 00000000..9417f702 --- /dev/null +++ b/mp/src/game/shared/choreoactor.h @@ -0,0 +1,89 @@ +//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+#ifndef CHOREOACTOR_H
+#define CHOREOACTOR_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "tier1/utlvector.h"
+
+class CChoreoChannel;
+class CChoreoScene;
+class CUtlBuffer;
+class IChoreoStringPool;
+
+//-----------------------------------------------------------------------------
+// Purpose: The actor is the atomic element of a scene
+// A scene can have one or more actors, who have multiple events on one or
+// more channels
+//-----------------------------------------------------------------------------
+class CChoreoActor
+{
+public:
+
+ // Construction
+ CChoreoActor( void );
+ CChoreoActor( const char *name );
+ // Assignment
+ CChoreoActor& operator = ( const CChoreoActor& src );
+
+ // Serialization
+ void SaveToBuffer( CUtlBuffer& buf, CChoreoScene *pScene, IChoreoStringPool *pStringPool );
+ bool RestoreFromBuffer( CUtlBuffer& buf, CChoreoScene *pScene, IChoreoStringPool *pStringPool );
+
+ // Accessors
+ void SetName( const char *name );
+ const char *GetName( void );
+
+ // Iteration
+ int GetNumChannels( void );
+ CChoreoChannel *GetChannel( int channel );
+
+ CChoreoChannel *FindChannel( const char *name );
+
+ // Manipulate children
+ void AddChannel( CChoreoChannel *channel );
+ void RemoveChannel( CChoreoChannel *channel );
+ int FindChannelIndex( CChoreoChannel *channel );
+ void SwapChannels( int c1, int c2 );
+ void RemoveAllChannels();
+
+ void SetFacePoserModelName( const char *name );
+ char const *GetFacePoserModelName( void ) const;
+
+ void SetActive( bool active );
+ bool GetActive( void ) const;
+
+ bool IsMarkedForSave() const { return m_bMarkedForSave; }
+ void SetMarkedForSave( bool mark ) { m_bMarkedForSave = mark; }
+
+ void MarkForSaveAll( bool mark );
+
+private:
+ // Clear structure out
+ void Init( void );
+
+ enum
+ {
+ MAX_ACTOR_NAME = 128,
+ MAX_FACEPOSER_MODEL_NAME = 128
+ };
+
+ char m_szName[ MAX_ACTOR_NAME ];
+ char m_szFacePoserModelName[ MAX_FACEPOSER_MODEL_NAME ];
+
+ // Children
+ CUtlVector < CChoreoChannel * > m_Channels;
+
+ bool m_bActive;
+
+ // Purely for save/load
+ bool m_bMarkedForSave;
+};
+
+#endif // CHOREOACTOR_H
|