mirror of
https://github.com/halpz/re3.git
synced 2025-12-16 07:12:57 +00:00
some more GTA_VERSIONs and CGame tidy-up (not much actual memory moving yet)
This commit is contained in:
@@ -82,3 +82,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
|
||||
@@ -23,6 +27,7 @@ public:
|
||||
void RemoveAnimSequences(void);
|
||||
void Uncompress(void);
|
||||
void RemoveUncompressedData(void);
|
||||
void MoveMemory(bool onlyone = false);
|
||||
};
|
||||
|
||||
VALIDATE_SIZE(CAnimBlendHierarchy, 0x28);
|
||||
@@ -176,3 +176,24 @@ CAnimBlendSequence::RemoveUncompressedData(void)
|
||||
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;
|
||||
@@ -53,6 +57,7 @@ public:
|
||||
void Uncompress(void);
|
||||
void CompressKeyframes(void);
|
||||
void RemoveUncompressedData(void);
|
||||
bool MoveMemory(void);
|
||||
|
||||
#ifdef PED_SKIN
|
||||
void SetBoneTag(int tag) { boneTag = tag; }
|
||||
|
||||
Reference in New Issue
Block a user