summaryrefslogtreecommitdiffstats
path: root/src/animation/AnimManager.cpp
diff options
context:
space:
mode:
authorerorcun <erayorcunus@gmail.com>2020-08-01 16:58:54 +0200
committerGitHub <noreply@github.com>2020-08-01 16:58:54 +0200
commitbda383c9cd8e1fafda3878801dbfacbf62949430 (patch)
treef71aaea5e1ffad4cb1584f6858e633d07373a651 /src/animation/AnimManager.cpp
parentFix Win32 OAL build (diff)
parentnew opcodes, buyable properties, minor fixes (diff)
downloadre3-bda383c9cd8e1fafda3878801dbfacbf62949430.tar
re3-bda383c9cd8e1fafda3878801dbfacbf62949430.tar.gz
re3-bda383c9cd8e1fafda3878801dbfacbf62949430.tar.bz2
re3-bda383c9cd8e1fafda3878801dbfacbf62949430.tar.lz
re3-bda383c9cd8e1fafda3878801dbfacbf62949430.tar.xz
re3-bda383c9cd8e1fafda3878801dbfacbf62949430.tar.zst
re3-bda383c9cd8e1fafda3878801dbfacbf62949430.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];