summaryrefslogtreecommitdiffstats
path: root/src/animation/AnimBlendSequence.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-08 16:06:25 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-08 16:06:25 +0200
commit756e4dd068e27b25c651e85781871295131b7ada (patch)
treef2975fd92f2bf57b07f924ff244b5a9ffd6cd4b2 /src/animation/AnimBlendSequence.cpp
parentfix (diff)
parentmost of animation system done; little stuff here and there (diff)
downloadre3-756e4dd068e27b25c651e85781871295131b7ada.tar
re3-756e4dd068e27b25c651e85781871295131b7ada.tar.gz
re3-756e4dd068e27b25c651e85781871295131b7ada.tar.bz2
re3-756e4dd068e27b25c651e85781871295131b7ada.tar.lz
re3-756e4dd068e27b25c651e85781871295131b7ada.tar.xz
re3-756e4dd068e27b25c651e85781871295131b7ada.tar.zst
re3-756e4dd068e27b25c651e85781871295131b7ada.zip
Diffstat (limited to 'src/animation/AnimBlendSequence.cpp')
-rw-r--r--src/animation/AnimBlendSequence.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/animation/AnimBlendSequence.cpp b/src/animation/AnimBlendSequence.cpp
index 4578ec50..b04d6b41 100644
--- a/src/animation/AnimBlendSequence.cpp
+++ b/src/animation/AnimBlendSequence.cpp
@@ -2,6 +2,8 @@
#include "AnimBlendSequence.h"
+//--MIAMI: file done
+
CAnimBlendSequence::CAnimBlendSequence(void)
{
type = 0;
@@ -17,6 +19,8 @@ CAnimBlendSequence::~CAnimBlendSequence(void)
{
if(keyFrames)
RwFree(keyFrames);
+ if(keyFramesCompressed)
+ RwFree(keyFramesCompressed);
}
void
@@ -26,18 +30,21 @@ CAnimBlendSequence::SetName(char *name)
}
void
-CAnimBlendSequence::SetNumFrames(int numFrames, bool translation)
+CAnimBlendSequence::SetNumFrames(int numFrames, bool translation, bool compressed)
{
- int sz;
-
if(translation){
- sz = sizeof(KeyFrameTrans);
type |= KF_ROT | KF_TRANS;
+ if(compressed)
+ keyFramesCompressed = RwMalloc(sizeof(KeyFrameTrans) * numFrames);
+ else
+ keyFrames = RwMalloc(sizeof(KeyFrameTrans) * numFrames);
}else{
- sz = sizeof(KeyFrame);
type |= KF_ROT;
+ if(compressed)
+ keyFramesCompressed = RwMalloc(sizeof(KeyFrame) * numFrames);
+ else
+ keyFrames = RwMalloc(sizeof(KeyFrame) * numFrames);
}
- keyFrames = RwMalloc(sz * numFrames);
this->numFrames = numFrames;
}