mirror of
https://github.com/halpz/re3.git
synced 2025-07-06 20:48:53 +00:00
merge attempt
This commit is contained in:
@ -107,3 +107,14 @@ CAnimBlendHierarchy::RemoveUncompressedData(void)
|
||||
// useless
|
||||
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; };
|
||||
};
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "common.h"
|
||||
|
||||
#include "AnimBlendSequence.h"
|
||||
#include "MemoryHeap.h"
|
||||
|
||||
//--MIAMI: file done
|
||||
|
||||
@ -65,3 +66,25 @@ CAnimBlendSequence::RemoveQuaternionFlips(void)
|
||||
last = frame->rotation;
|
||||
}
|
||||
}
|
||||
|
||||
#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;
|
||||
@ -44,10 +48,7 @@ public:
|
||||
&((KeyFrame*)keyFramesCompressed)[n];
|
||||
}
|
||||
bool HasTranslation(void) { return !!(type & KF_TRANS); }
|
||||
// TODO? these are unused
|
||||
// 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