metaforce/DataSpec/DNAMP3/ANIM.hpp

85 lines
2.2 KiB
C++
Raw Permalink Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2015-09-24 00:59:36 +00:00
#include "DNAMP3.hpp"
2018-06-29 20:21:36 +00:00
#include "DataSpec/DNACommon/ANIM.hpp"
#include "DataSpec/DNACommon/RigInverter.hpp"
2015-09-24 00:59:36 +00:00
#include "CINF.hpp"
2018-10-28 01:22:55 +00:00
#include "DataSpec/DNACommon/ANCS.hpp"
2015-09-24 00:59:36 +00:00
2018-12-08 05:30:43 +00:00
namespace DataSpec::DNAMP3 {
2015-09-24 00:59:36 +00:00
2018-12-08 05:30:43 +00:00
struct ANIM : BigDNA {
AT_DECL_EXPLICIT_DNA
2015-09-24 00:59:36 +00:00
2018-12-08 05:30:43 +00:00
struct IANIM : BigDNAV {
Delete expl;
atUint32 m_version;
IANIM(atUint32 version) : m_version(version) {}
2015-09-24 00:59:36 +00:00
2018-12-08 05:30:43 +00:00
std::vector<std::pair<atUint32, std::tuple<bool, bool, bool>>> bones;
std::vector<atUint32> frames;
std::vector<DNAANIM::Channel> channels;
std::vector<std::vector<DNAANIM::Value>> chanKeys;
float mainInterval = 0.0;
bool looping = false;
2015-09-24 00:59:36 +00:00
2018-12-08 05:30:43 +00:00
void sendANIMToBlender(hecl::blender::PyOutStream&, const DNAANIM::RigInverter<CINF>& rig, bool additive) const;
};
2015-09-24 00:59:36 +00:00
2018-12-08 05:30:43 +00:00
struct ANIM0 : IANIM {
2019-08-11 00:49:41 +00:00
AT_DECL_EXPLICIT_DNAV
2018-12-08 05:30:43 +00:00
ANIM0() : IANIM(0) {}
struct Header : BigDNA {
AT_DECL_DNA
Value<atUint16> unkS;
Value<float> duration;
Value<atUint32> unk0;
Value<float> interval;
Value<atUint32> unk1;
Value<atUint32> keyCount;
Value<atUint32> unk2;
Value<atUint32> boneSlotCount;
2015-09-24 00:59:36 +00:00
};
2018-12-08 05:30:43 +00:00
};
2015-09-24 00:59:36 +00:00
2018-12-08 05:30:43 +00:00
struct ANIM1 : IANIM {
2019-08-11 00:49:41 +00:00
AT_DECL_EXPLICIT_DNAV
2018-12-08 05:30:43 +00:00
ANIM1() : IANIM(1) {}
struct Header : BigDNA {
AT_DECL_DNA
Value<atUint16> unk1;
Value<atUint8> unk2;
Value<atUint32> unk3;
Value<atUint8> unk4[3];
Value<float> translationMult;
Value<float> scaleMult;
Value<atUint32> unk7;
Value<float> unk8;
Value<float> unk9;
Value<float> duration;
Value<atUint16> keyCount;
Value<atUint32> blobSize;
Value<atUint8> unk10;
Value<atUint32> floatsSize;
Value<atUint32> flagsSize;
Value<atUint32> initBlockSize;
Value<atUint32> streamSize;
Value<atUint32> unk11;
Value<atUint32> boneCount;
2015-09-24 00:59:36 +00:00
};
2018-12-08 05:30:43 +00:00
};
2015-09-24 00:59:36 +00:00
2018-12-08 05:30:43 +00:00
std::unique_ptr<IANIM> m_anim;
2018-12-08 05:30:43 +00:00
void sendANIMToBlender(hecl::blender::PyOutStream& os, const DNAANIM::RigInverter<CINF>& rig, bool additive) const {
m_anim->sendANIMToBlender(os, rig, additive);
}
2018-10-28 01:22:55 +00:00
2018-12-08 05:30:43 +00:00
void extractEVNT(const DNAANCS::AnimationResInfo<UniqueID64>& animInfo, const hecl::ProjectPath& outPath,
PAKRouter<PAKBridge>& pakRouter, bool force) const {}
2015-09-24 00:59:36 +00:00
};
2018-12-08 05:30:43 +00:00
} // namespace DataSpec::DNAMP3