summaryrefslogtreecommitdiffstats
path: root/src/animation/RpAnimBlend.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-12-18 23:46:51 +0100
committeraap <aap@papnet.eu>2020-12-18 23:46:51 +0100
commit9982f1f21bca3bb51ac7d31cede606beef5c0f67 (patch)
tree853255a2c6fb8765f8ec6f83cccf872b35d43a05 /src/animation/RpAnimBlend.cpp
parentsilly mistake (diff)
downloadre3-9982f1f21bca3bb51ac7d31cede606beef5c0f67.tar
re3-9982f1f21bca3bb51ac7d31cede606beef5c0f67.tar.gz
re3-9982f1f21bca3bb51ac7d31cede606beef5c0f67.tar.bz2
re3-9982f1f21bca3bb51ac7d31cede606beef5c0f67.tar.lz
re3-9982f1f21bca3bb51ac7d31cede606beef5c0f67.tar.xz
re3-9982f1f21bca3bb51ac7d31cede606beef5c0f67.tar.zst
re3-9982f1f21bca3bb51ac7d31cede606beef5c0f67.zip
Diffstat (limited to '')
-rw-r--r--src/animation/RpAnimBlend.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/animation/RpAnimBlend.cpp b/src/animation/RpAnimBlend.cpp
index e93615b7..c4103dbf 100644
--- a/src/animation/RpAnimBlend.cpp
+++ b/src/animation/RpAnimBlend.cpp
@@ -8,6 +8,7 @@
#include "AnimBlendClumpData.h"
#include "AnimBlendHierarchy.h"
#include "AnimBlendAssociation.h"
+#include "AnimManager.h"
#include "RpAnimBlend.h"
#include "PedModelInfo.h"
@@ -443,6 +444,9 @@ RpAnimBlendNodeUpdateKeyframes(AnimBlendFrameData *frames, AnimBlendFrameUpdateD
}
}
+// TODO:
+// CAnimBlendClumpData::LoadFramesIntoSPR
+// CAnimBlendClumpData::ForAllFramesInSPR
void
RpAnimBlendClumpUpdateAnimations(RpClump *clump, float timeDelta, bool doRender)
{
@@ -466,7 +470,7 @@ RpAnimBlendClumpUpdateAnimations(RpClump *clump, float timeDelta, bool doRender)
assoc = CAnimBlendAssociation::FromLink(link);
if(assoc->UpdateBlend(timeDelta)){
if(assoc->hierarchy->sequences){
- //CAnimManager::UncompressAnimation(v6->hierarchy)
+ CAnimManager::UncompressAnimation(assoc->hierarchy);
if(i < 11)
updateData.nodes[i++] = assoc->GetNode(0);
if(assoc->flags & ASSOC_MOVEMENT){
@@ -486,6 +490,14 @@ RpAnimBlendClumpUpdateAnimations(RpClump *clump, float timeDelta, bool doRender)
updateData.nodes[i] = nil;
+#ifdef ANIM_COMPRESSION
+ if(clumpData->frames[0].flag & AnimBlendFrameData::COMPRESSED){
+ if(IsClumpSkinned(clump))
+ clumpData->ForAllFrames(FrameUpdateCallBackSkinnedCompressed, &updateData);
+ else
+ clumpData->ForAllFrames(FrameUpdateCallBackNonSkinnedCompressed, &updateData);
+ }else
+#endif
if(doRender){
if(clumpData->frames[0].flag & AnimBlendFrameData::UPDATE_KEYFRAMES)
RpAnimBlendNodeUpdateKeyframes(clumpData->frames, &updateData, clumpData->numFrames);