summaryrefslogtreecommitdiff
path: root/public/tools/bonelist.cpp
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /public/tools/bonelist.cpp
downloadarchived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.tar.xz
archived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.zip
Diffstat (limited to 'public/tools/bonelist.cpp')
-rw-r--r--public/tools/bonelist.cpp72
1 files changed, 72 insertions, 0 deletions
diff --git a/public/tools/bonelist.cpp b/public/tools/bonelist.cpp
new file mode 100644
index 0000000..be772a9
--- /dev/null
+++ b/public/tools/bonelist.cpp
@@ -0,0 +1,72 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================
+
+#include "cbase.h"
+#include "bonelist.h"
+
+// memdbgon must be the last include file in a .cpp file!!!
+#include "tier0/memdbgon.h"
+
+CBoneList::CBoneList()
+{
+ m_bShouldDelete = false;
+ m_nBones = 0;
+ Q_memset( m_vecPos, 0, sizeof( m_vecPos ) );
+ Q_memset( m_quatRot, 0, sizeof( m_quatRot ) );
+}
+
+void CBoneList::Release()
+{
+ if (m_bShouldDelete )
+ {
+ delete this;
+ }
+ else
+ {
+ Warning( "Called Release() on CBoneList not allocated via Alloc() method\n" );
+ }
+}
+
+CBoneList *CBoneList::Alloc()
+{
+ CBoneList *newList = new CBoneList;
+ Assert( newList );
+ if ( newList )
+ {
+ newList->m_bShouldDelete = true;
+ }
+ return newList;
+}
+
+CFlexList::CFlexList()
+{
+ m_bShouldDelete = false;
+ m_nNumFlexes = 0;
+ Q_memset( m_flexWeights, 0, sizeof( m_flexWeights ) );
+}
+
+void CFlexList::Release()
+{
+ if (m_bShouldDelete )
+ {
+ delete this;
+ }
+ else
+ {
+ Warning( "Called Release() on CFlexList not allocated via Alloc() method\n" );
+ }
+}
+
+CFlexList *CFlexList::Alloc()
+{
+ CFlexList *newList = new CFlexList;
+ Assert( newList );
+ if ( newList )
+ {
+ newList->m_bShouldDelete = true;
+ }
+ return newList;
+} \ No newline at end of file