Skip to content

Commit dc8ef5c

Browse files
committed
Fix source formatting
1 parent 9a6f6ae commit dc8ef5c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+15351
-15963
lines changed
Lines changed: 41 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
11
/*****************************************************************************
2-
*
3-
* PROJECT: Multi Theft Auto v1.0
4-
* LICENSE: See LICENSE in the top level directory
5-
* FILE: game_sa/CAnimBlendAssocGroupSA.cpp
6-
* PURPOSE: Animation blend association group
7-
* DEVELOPERS: Jax <>
8-
*
9-
* Multi Theft Auto is available from http://www.multitheftauto.com/
10-
*
11-
*****************************************************************************/
2+
*
3+
* PROJECT: Multi Theft Auto v1.0
4+
* LICENSE: See LICENSE in the top level directory
5+
* FILE: game_sa/CAnimBlendAssocGroupSA.cpp
6+
* PURPOSE: Animation blend association group
7+
*
8+
* Multi Theft Auto is available from http://www.multitheftauto.com/
9+
*
10+
*****************************************************************************/
1211

1312
#include "StdInc.h"
1413

15-
CAnimBlendAssocGroupSA::CAnimBlendAssocGroupSA ( CAnimBlendAssocGroupSAInterface * pInterface )
14+
CAnimBlendAssocGroupSA::CAnimBlendAssocGroupSA(CAnimBlendAssocGroupSAInterface* pInterface)
1615
{
1716
m_pInterface = pInterface;
1817
m_pAnimBlock = NULL;
19-
SetupAnimBlock ();
18+
SetupAnimBlock();
2019
}
2120

22-
CAnimBlendAssociationSAInterface * CAnimBlendAssocGroupSA::CopyAnimation ( unsigned int AnimID )
21+
CAnimBlendAssociationSAInterface* CAnimBlendAssocGroupSA::CopyAnimation(unsigned int AnimID)
2322
{
24-
CAnimBlendAssociationSAInterface * pAnimAssociationReturn = nullptr;
25-
26-
DWORD dwThis = ( DWORD ) m_pInterface;
23+
CAnimBlendAssociationSAInterface* pAnimAssociationReturn = nullptr;
24+
25+
DWORD dwThis = (DWORD)m_pInterface;
2726
DWORD dwFunc = FUNC_CAnimBlendAssocGroup_CopyAnimation;
2827
_asm
2928
{
@@ -35,9 +34,9 @@ CAnimBlendAssociationSAInterface * CAnimBlendAssocGroupSA::CopyAnimation ( unsig
3534
return pAnimAssociationReturn;
3635
}
3736

38-
void CAnimBlendAssocGroupSA::InitEmptyAssociations ( RpClump * pClump )
37+
void CAnimBlendAssocGroupSA::InitEmptyAssociations(RpClump* pClump)
3938
{
40-
DWORD dwThis = ( DWORD ) m_pInterface;
39+
DWORD dwThis = (DWORD)m_pInterface;
4140
DWORD dwFunc = FUNC_CAnimBlendAssocGroup_InitEmptyAssociations;
4241
_asm
4342
{
@@ -47,10 +46,10 @@ void CAnimBlendAssocGroupSA::InitEmptyAssociations ( RpClump * pClump )
4746
}
4847
}
4948

50-
bool CAnimBlendAssocGroupSA::IsCreated ( void )
49+
bool CAnimBlendAssocGroupSA::IsCreated(void)
5150
{
52-
bool bReturn;
53-
DWORD dwThis = ( DWORD ) m_pInterface;
51+
bool bReturn;
52+
DWORD dwThis = (DWORD)m_pInterface;
5453
DWORD dwFunc = FUNC_CAnimBlendAssocGroup_IsCreated;
5554
_asm
5655
{
@@ -61,11 +60,10 @@ bool CAnimBlendAssocGroupSA::IsCreated ( void )
6160
return bReturn;
6261
}
6362

64-
65-
int CAnimBlendAssocGroupSA::GetNumAnimations ( void )
63+
int CAnimBlendAssocGroupSA::GetNumAnimations(void)
6664
{
67-
int iReturn;
68-
DWORD dwThis = ( DWORD ) m_pInterface;
65+
int iReturn;
66+
DWORD dwThis = (DWORD)m_pInterface;
6967
DWORD dwFunc = FUNC_CAnimBlendAssocGroup_GetNumAnimations;
7068
_asm
7169
{
@@ -76,23 +74,21 @@ int CAnimBlendAssocGroupSA::GetNumAnimations ( void )
7674
return iReturn;
7775
}
7876

79-
80-
CAnimBlock * CAnimBlendAssocGroupSA::GetAnimBlock ( void )
77+
CAnimBlock* CAnimBlendAssocGroupSA::GetAnimBlock(void)
8178
{
82-
SetupAnimBlock ();
79+
SetupAnimBlock();
8380

8481
return m_pAnimBlock;
8582
}
8683

87-
88-
CAnimBlendStaticAssociation * CAnimBlendAssocGroupSA::GetAnimation ( unsigned int ID )
84+
CAnimBlendStaticAssociation* CAnimBlendAssocGroupSA::GetAnimation(unsigned int ID)
8985
{
9086
// ppAssociations [ ID - this->iIDOffset ] ??
91-
CAnimBlendStaticAssociation * pReturn;
92-
DWORD dwThis = ( DWORD ) m_pInterface;
93-
DWORD dwFunc = FUNC_CAnimBlendAssocGroup_GetAnimation;
87+
CAnimBlendStaticAssociation* pReturn;
88+
DWORD dwThis = (DWORD)m_pInterface;
89+
DWORD dwFunc = FUNC_CAnimBlendAssocGroup_GetAnimation;
9490
_asm
95-
{
91+
{
9692
mov ecx, dwThis
9793
push ID
9894
call dwFunc
@@ -101,20 +97,18 @@ CAnimBlendStaticAssociation * CAnimBlendAssocGroupSA::GetAnimation ( unsigned in
10197
return pReturn;
10298
}
10399

104-
105-
bool CAnimBlendAssocGroupSA::IsLoaded ( void )
100+
bool CAnimBlendAssocGroupSA::IsLoaded(void)
106101
{
107-
if ( m_pInterface->pAnimBlock )
102+
if (m_pInterface->pAnimBlock)
108103
{
109104
return m_pInterface->pAnimBlock->bLoaded;
110105
}
111106
return false;
112107
}
113108

114-
115-
void CAnimBlendAssocGroupSA::CreateAssociations ( const char * szBlockName )
109+
void CAnimBlendAssocGroupSA::CreateAssociations(const char* szBlockName)
116110
{
117-
DWORD dwThis = ( DWORD ) m_pInterface;
111+
DWORD dwThis = (DWORD)m_pInterface;
118112
DWORD dwFunc = FUNC_CAnimBlendAssocGroup_CreateAssociations;
119113
_asm
120114
{
@@ -124,19 +118,19 @@ void CAnimBlendAssocGroupSA::CreateAssociations ( const char * szBlockName )
124118
}
125119
}
126120

127-
128-
void CAnimBlendAssocGroupSA::SetupAnimBlock ( void )
121+
void CAnimBlendAssocGroupSA::SetupAnimBlock(void)
129122
{
130123
// Make sure our AnimBlock matches up with our interface's
131-
CAnimBlockSAInterface * pCurrent = ( m_pAnimBlock ) ? m_pAnimBlock->m_pInterface : NULL;
132-
CAnimBlockSAInterface * pActual = m_pInterface->pAnimBlock;
133-
if ( pCurrent != pActual )
124+
CAnimBlockSAInterface* pCurrent = (m_pAnimBlock) ? m_pAnimBlock->m_pInterface : NULL;
125+
CAnimBlockSAInterface* pActual = m_pInterface->pAnimBlock;
126+
if (pCurrent != pActual)
134127
{
135-
if ( m_pAnimBlock )
128+
if (m_pAnimBlock)
136129
{
137130
delete m_pAnimBlock;
138131
m_pAnimBlock = NULL;
139132
}
140-
if ( pActual ) m_pAnimBlock = new CAnimBlockSA ( pActual );
133+
if (pActual)
134+
m_pAnimBlock = new CAnimBlockSA(pActual);
141135
}
142136
}
Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
/*****************************************************************************
2-
*
3-
* PROJECT: Multi Theft Auto v1.0
4-
* LICENSE: See LICENSE in the top level directory
5-
* FILE: game_sa/CAnimBlendAssocGroupSA.h
6-
* PURPOSE: Header file for animation blend association group class
7-
* DEVELOPERS: Jax <>
8-
*
9-
* Multi Theft Auto is available from http://www.multitheftauto.com/
10-
*
11-
*****************************************************************************/
2+
*
3+
* PROJECT: Multi Theft Auto v1.0
4+
* LICENSE: See LICENSE in the top level directory
5+
* FILE: game_sa/CAnimBlendAssocGroupSA.h
6+
* PURPOSE: Header file for animation blend association group class
7+
*
8+
* Multi Theft Auto is available from http://www.multitheftauto.com/
9+
*
10+
*****************************************************************************/
1211

1312
#ifndef __CAnimBlendAssocGroupSA_H
1413
#define __CAnimBlendAssocGroupSA_H
@@ -39,29 +38,29 @@ class CAnimBlendAssocGroupSAInterface
3938
AssocGroupId groupID;
4039
};
4140

42-
4341
class CAnimBlendAssocGroupSA : public CAnimBlendAssocGroup
4442
{
4543
friend class CAnimManagerSA;
44+
4645
public:
47-
CAnimBlendAssocGroupSA ( CAnimBlendAssocGroupSAInterface * pInterface );
46+
CAnimBlendAssocGroupSA(CAnimBlendAssocGroupSAInterface* pInterface);
4847

49-
CAnimBlendAssociationSAInterface * CopyAnimation ( unsigned int AnimID );
50-
void InitEmptyAssociations ( RpClump * pClump );
51-
bool IsCreated ( void );
52-
int GetNumAnimations ( void );
53-
CAnimBlock * GetAnimBlock ( void );
54-
CAnimBlendStaticAssociation * GetAnimation ( unsigned int ID );
55-
void CreateAssociations ( const char * szBlockName );
48+
CAnimBlendAssociationSAInterface* CopyAnimation(unsigned int AnimID);
49+
void InitEmptyAssociations(RpClump* pClump);
50+
bool IsCreated(void);
51+
int GetNumAnimations(void);
52+
CAnimBlock* GetAnimBlock(void);
53+
CAnimBlendStaticAssociation* GetAnimation(unsigned int ID);
54+
void CreateAssociations(const char* szBlockName);
5655

57-
bool IsLoaded ( void );
58-
void SetIDOffset ( int iOffset ) { m_pInterface->iIDOffset = iOffset; }
56+
bool IsLoaded(void);
57+
void SetIDOffset(int iOffset) { m_pInterface->iIDOffset = iOffset; }
5958

6059
protected:
61-
void SetupAnimBlock ( void );
60+
void SetupAnimBlock(void);
6261

63-
CAnimBlendAssocGroupSAInterface * m_pInterface;
64-
CAnimBlockSA * m_pAnimBlock;
62+
CAnimBlendAssocGroupSAInterface* m_pInterface;
63+
CAnimBlockSA* m_pAnimBlock;
6564
};
6665

6766
#endif
Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
/*****************************************************************************
2-
*
3-
* PROJECT: Multi Theft Auto v1.0
4-
* LICENSE: See LICENSE in the top level directory
5-
* FILE: game_sa/CAnimBlendHierarchySA.cpp
6-
* PURPOSE: Animation blend hierarchy
7-
* DEVELOPERS: Jax <>
8-
*
9-
* Multi Theft Auto is available from http://www.multitheftauto.com/
10-
*
11-
*****************************************************************************/
2+
*
3+
* PROJECT: Multi Theft Auto v1.0
4+
* LICENSE: See LICENSE in the top level directory
5+
* FILE: game_sa/CAnimBlendHierarchySA.cpp
6+
* PURPOSE: Animation blend hierarchy
7+
*
8+
* Multi Theft Auto is available from http://www.multitheftauto.com/
9+
*
10+
*****************************************************************************/
1211

1312
#include "StdInc.h"
1413

1514
// Careful, GetIndex will not work for custom animations
16-
int CAnimBlendHierarchySAInterface::GetIndex ( void )
15+
int CAnimBlendHierarchySAInterface::GetIndex(void)
1716
{
18-
return ( ( ( DWORD ) this - ARRAY_CAnimManager_Animations ) / 24 );
17+
return (((DWORD)this - ARRAY_CAnimManager_Animations) / 24);
1918
}
2019

21-
void CAnimBlendHierarchySA::Initialize ( void )
20+
void CAnimBlendHierarchySA::Initialize(void)
2221
{
2322
m_pInterface->pSequences = 0;
2423
m_pInterface->usNumSequences = 0;
@@ -29,9 +28,9 @@ void CAnimBlendHierarchySA::Initialize ( void )
2928
m_pInterface->pLinkPtr = 0;
3029
}
3130

32-
void CAnimBlendHierarchySA::SetName ( const char * szName )
31+
void CAnimBlendHierarchySA::SetName(const char* szName)
3332
{
34-
DWORD dwThis = ( DWORD ) m_pInterface;
33+
DWORD dwThis = (DWORD)m_pInterface;
3534
DWORD dwFunc = FUNC_CAnimBlendHierarchy_SetName;
3635
_asm
3736
{
@@ -41,9 +40,9 @@ void CAnimBlendHierarchySA::SetName ( const char * szName )
4140
}
4241
}
4342

44-
void CAnimBlendHierarchySA::RemoveAnimSequences ( void )
43+
void CAnimBlendHierarchySA::RemoveAnimSequences(void)
4544
{
46-
DWORD dwThis = ( DWORD ) m_pInterface;
45+
DWORD dwThis = (DWORD)m_pInterface;
4746
DWORD dwFunc = FUNC_CAnimBlendHierarchy_RemoveAnimSequences;
4847
_asm
4948
{
@@ -52,9 +51,9 @@ void CAnimBlendHierarchySA::RemoveAnimSequences ( void )
5251
}
5352
}
5453

55-
void CAnimBlendHierarchySA::RemoveFromUncompressedCache ( void )
54+
void CAnimBlendHierarchySA::RemoveFromUncompressedCache(void)
5655
{
57-
DWORD dwThis = ( DWORD ) m_pInterface;
56+
DWORD dwThis = (DWORD)m_pInterface;
5857
DWORD dwFunc = FUNC_CAnimBlendHierarchy_RemoveFromUncompressedCache;
5958
_asm
6059
{
@@ -63,9 +62,9 @@ void CAnimBlendHierarchySA::RemoveFromUncompressedCache ( void )
6362
}
6463
}
6564

66-
void CAnimBlendHierarchySA::RemoveQuaternionFlips ( void )
65+
void CAnimBlendHierarchySA::RemoveQuaternionFlips(void)
6766
{
68-
DWORD dwThis = ( DWORD ) m_pInterface;
67+
DWORD dwThis = (DWORD)m_pInterface;
6968
DWORD dwFunc = FUNC_CAnimBlendHierarchy_RemoveQuaternionFlips;
7069
_asm
7170
{
@@ -74,9 +73,9 @@ void CAnimBlendHierarchySA::RemoveQuaternionFlips ( void )
7473
}
7574
}
7675

77-
void CAnimBlendHierarchySA::CalculateTotalTime ( void )
76+
void CAnimBlendHierarchySA::CalculateTotalTime(void)
7877
{
79-
DWORD dwThis = ( DWORD ) m_pInterface;
78+
DWORD dwThis = (DWORD)m_pInterface;
8079
DWORD dwFunc = FUNC_CAnimBlendHierarchy_CalculateTotalTime;
8180
_asm
8281
{
@@ -85,8 +84,8 @@ void CAnimBlendHierarchySA::CalculateTotalTime ( void )
8584
}
8685
}
8786

88-
CAnimBlendSequenceSAInterface * CAnimBlendHierarchySA::GetSequence ( DWORD dwIndex )
87+
CAnimBlendSequenceSAInterface* CAnimBlendHierarchySA::GetSequence(DWORD dwIndex)
8988
{
90-
BYTE * pSequences = reinterpret_cast < BYTE * > ( m_pInterface->pSequences );
91-
return reinterpret_cast < CAnimBlendSequenceSAInterface * > ( pSequences + ( sizeof ( CAnimBlendSequenceSAInterface ) * dwIndex ) );
89+
BYTE* pSequences = reinterpret_cast<BYTE*>(m_pInterface->pSequences);
90+
return reinterpret_cast<CAnimBlendSequenceSAInterface*>(pSequences + (sizeof(CAnimBlendSequenceSAInterface) * dwIndex));
9291
}

0 commit comments

Comments
 (0)