Skip to content

Commit 44b516e

Browse files
committed
added SIFPAnimations and removed a member from IFP_Animation
1 parent 8c9535e commit 44b516e

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

Client/mods/deathmatch/logic/IFP/IFPLoader.h

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,7 @@ struct IFP_Animation
136136
{
137137
SString Name;
138138
_CAnimBlendHierarchy Hierarchy;
139-
//std::vector <_CAnimBlendSequence> Sequences;
140139
char * pSequencesMemory;
141-
unsigned char* pFramesMemoryVersion2; // only for IFP version 2;
142140
};
143141

144142
struct Animation
@@ -203,6 +201,24 @@ enum BoneType
203201
R_TOE_0 = 54
204202
};
205203

204+
struct SIFPAnimations
205+
{
206+
// This is set to true when unloadIFP function is called, it means that animations
207+
// can be unloaded when iReferences reaches zero, if this boolean is set to true
208+
bool bUnloadOnZeroReferences;
209+
// incremented when a new CAnimBlendAssociationSAInteface is created and decremented
210+
// when destructor of that animation is called
211+
DWORD iReferences;
212+
std::vector < IFP_Animation > vecAnimations;
213+
214+
SIFPAnimations()
215+
{
216+
bUnloadOnZeroReferences = false;
217+
iReferences = 0;
218+
}
219+
};
220+
221+
206222
typedef void *(__cdecl* hCMemoryMgr_Malloc)
207223
(
208224
size_t TotalBytesToAllocate

0 commit comments

Comments
 (0)