summaryrefslogtreecommitdiffstats
path: root/src/animation/AnimBlendSequence.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-12-19 17:27:01 +0100
committeraap <aap@papnet.eu>2020-12-19 17:27:01 +0100
commit2a51e1da0456e9b7397562102d3241e5c3ddbd6e (patch)
tree308cfd8f4e23e713fec89e041d92ecc96ba462c5 /src/animation/AnimBlendSequence.cpp
parentanim compression (diff)
parentMerge pull request #891 from Nick007J/miami (diff)
downloadre3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.tar
re3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.tar.gz
re3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.tar.bz2
re3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.tar.lz
re3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.tar.xz
re3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.tar.zst
re3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.zip
Diffstat (limited to 'src/animation/AnimBlendSequence.cpp')
-rw-r--r--src/animation/AnimBlendSequence.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/animation/AnimBlendSequence.cpp b/src/animation/AnimBlendSequence.cpp
index c429ff43..93cce91d 100644
--- a/src/animation/AnimBlendSequence.cpp
+++ b/src/animation/AnimBlendSequence.cpp
@@ -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