mirror of
https://github.com/halpz/re3.git
synced 2025-07-06 20:58:54 +00:00
Merge branch 'miami' of github.com:GTAmodding/re3 into miami
This commit is contained in:
@ -118,3 +118,14 @@ CAnimBlendHierarchy::RemoveUncompressedData(void)
|
||||
#endif
|
||||
compressed = 1;
|
||||
}
|
||||
|
||||
#ifdef USE_CUSTOM_ALLOCATOR
|
||||
void
|
||||
CAnimBlendHierarchy::MoveMemory(bool onlyone)
|
||||
{
|
||||
int i;
|
||||
for(i = 0; i < numSequences; i++)
|
||||
if(sequences[i].MoveMemory() && onlyone)
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
@ -2,6 +2,10 @@
|
||||
|
||||
#include "templates.h"
|
||||
|
||||
#ifdef MoveMemory
|
||||
#undef MoveMemory // windows shit
|
||||
#endif
|
||||
|
||||
class CAnimBlendSequence;
|
||||
|
||||
// A collection of sequences
|
||||
@ -25,6 +29,7 @@ public:
|
||||
void RemoveAnimSequences(void);
|
||||
void Uncompress(void);
|
||||
void RemoveUncompressedData(void);
|
||||
void MoveMemory(bool onlyone = false);
|
||||
bool IsCompressed() { return !!compressed; };
|
||||
};
|
||||
|
||||
|
@ -179,3 +179,24 @@ CAnimBlendSequence::RemoveUncompressedData(void)
|
||||
RwFree(keyFrames);
|
||||
keyFrames = nil;
|
||||
}
|
||||
|
||||
#ifdef USE_CUSTOM_ALLOCATOR
|
||||
bool
|
||||
CAnimBlendSequence::MoveMemory(void)
|
||||
{
|
||||
if(keyFrames){
|
||||
void *newaddr = gMainHeap.MoveMemory(keyFrames);
|
||||
if(newaddr != keyFrames){
|
||||
keyFrames = newaddr;
|
||||
return true;
|
||||
}
|
||||
}else if(keyFramesCompressed){
|
||||
void *newaddr = gMainHeap.MoveMemory(keyFramesCompressed);
|
||||
if(newaddr != keyFramesCompressed){
|
||||
keyFramesCompressed = newaddr;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
@ -2,6 +2,10 @@
|
||||
|
||||
#include "Quaternion.h"
|
||||
|
||||
#ifdef MoveMemory
|
||||
#undef MoveMemory // windows shit
|
||||
#endif
|
||||
|
||||
// TODO: put them somewhere else?
|
||||
struct KeyFrame {
|
||||
CQuaternion rotation;
|
||||
@ -84,6 +88,7 @@ public:
|
||||
void Uncompress(void);
|
||||
void CompressKeyframes(void);
|
||||
void RemoveUncompressedData(void);
|
||||
bool MoveMemory(void);
|
||||
|
||||
void SetBoneTag(int tag) { boneTag = tag; }
|
||||
};
|
||||
|
Reference in New Issue
Block a user