summaryrefslogtreecommitdiffstats
path: root/src/animation/AnimManager.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-07-30 14:11:06 +0200
committereray orçunus <erayorcunus@gmail.com>2020-07-30 14:32:34 +0200
commiteafa9cc10797db529e74b0480f51d7b8ade12cfe (patch)
treef71aaea5e1ffad4cb1584f6858e633d07373a651 /src/animation/AnimManager.cpp
parentFix Win32 OAL build (diff)
downloadre3-eafa9cc10797db529e74b0480f51d7b8ade12cfe.tar
re3-eafa9cc10797db529e74b0480f51d7b8ade12cfe.tar.gz
re3-eafa9cc10797db529e74b0480f51d7b8ade12cfe.tar.bz2
re3-eafa9cc10797db529e74b0480f51d7b8ade12cfe.tar.lz
re3-eafa9cc10797db529e74b0480f51d7b8ade12cfe.tar.xz
re3-eafa9cc10797db529e74b0480f51d7b8ade12cfe.tar.zst
re3-eafa9cc10797db529e74b0480f51d7b8ade12cfe.zip
Diffstat (limited to 'src/animation/AnimManager.cpp')
-rw-r--r--src/animation/AnimManager.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/animation/AnimManager.cpp b/src/animation/AnimManager.cpp
index f682964f..a85149e6 100644
--- a/src/animation/AnimManager.cpp
+++ b/src/animation/AnimManager.cpp
@@ -12,7 +12,7 @@
#include "AnimManager.h"
#include "Streaming.h"
-//--MIAMI: code done (except for pointless TODO)
+//--MIAMI: file done
CAnimBlock CAnimManager::ms_aAnimBlocks[NUMANIMBLOCKS];
CAnimBlendHierarchy CAnimManager::ms_aAnimations[NUMANIMATIONS];
@@ -1276,7 +1276,7 @@ CAnimManager::LoadAnimFile(const char *filename)
RwStreamClose(stream, nil);
}
-//--MIAMI: done (except maybe implement some unimplemented compression?)
+//--MIAMI: done
void
CAnimManager::LoadAnimFile(RwStream *stream, bool compress, char (*somename)[32])
{
@@ -1323,7 +1323,14 @@ CAnimManager::LoadAnimFile(RwStream *stream, bool compress, char (*somename)[32]
RwStreamRead(stream, buf, name.size);
hier->SetName(buf);
- // TODO(MIAMI)? some unused crap here
+ // Unimplemented uncompressed anim thing
+ if (somename) {
+ for (int i = 0; somename[i][0]; i++) {
+ if (!CGeneral::faststricmp(somename[i], hier->name))
+ debug("Loading %s uncompressed\n", hier->name);
+ }
+ }
+
hier->compressed = false;
hier->compressed2 = false;
@@ -1357,6 +1364,9 @@ CAnimManager::LoadAnimFile(RwStream *stream, bool compress, char (*somename)[32]
if(strncmp(info.ident, "KR00", 4) == 0){
seq->SetNumFrames(numFrames, false, false);
KeyFrame *kf = seq->GetKeyFrame(0);
+ if (strstr(seq->name, "L Toe"))
+ debug("anim %s has toe keyframes\n", hier->name); // , seq->name);
+
for(l = 0; l < numFrames; l++, kf++){
RwStreamRead(stream, buf, 0x14);
kf->rotation.x = -fbuf[0];
@@ -1368,6 +1378,9 @@ CAnimManager::LoadAnimFile(RwStream *stream, bool compress, char (*somename)[32]
}else if(strncmp(info.ident, "KRT0", 4) == 0){
seq->SetNumFrames(numFrames, true, false);
KeyFrameTrans *kf = (KeyFrameTrans*)seq->GetKeyFrame(0);
+ if (strstr(seq->name, "L Toe"))
+ debug("anim %s has toe keyframes\n", hier->name); // , seq->name);
+
for(l = 0; l < numFrames; l++, kf++){
RwStreamRead(stream, buf, 0x20);
kf->rotation.x = -fbuf[0];
@@ -1382,6 +1395,9 @@ CAnimManager::LoadAnimFile(RwStream *stream, bool compress, char (*somename)[32]
}else if(strncmp(info.ident, "KRTS", 4) == 0){
seq->SetNumFrames(numFrames, true, false);
KeyFrameTrans *kf = (KeyFrameTrans*)seq->GetKeyFrame(0);
+ if (strstr(seq->name, "L Toe"))
+ debug("anim %s has toe keyframes\n", hier->name); // , seq->name);
+
for(l = 0; l < numFrames; l++, kf++){
RwStreamRead(stream, buf, 0x2C);
kf->rotation.x = -fbuf[0];