From fc6cb2ec33991d479ba5bb25a6252b540bfbf509 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Sun, 10 Apr 2016 11:22:59 -1000 Subject: [PATCH] ANCS stubs and initial readers --- Editor/ProjectResourceFactoryMP1.cpp | 2 + .../CAnimTreeAnimReaderContainer.cpp | 0 .../CAnimTreeAnimReaderContainer.hpp | 13 ++++ Runtime/Character/CAnimTreeBlend.cpp | 0 Runtime/Character/CAnimTreeBlend.hpp | 13 ++++ Runtime/Character/CAnimTreeDoubleChild.cpp | 0 Runtime/Character/CAnimTreeDoubleChild.hpp | 13 ++++ Runtime/Character/CAnimTreeLoopIn.cpp | 0 Runtime/Character/CAnimTreeLoopIn.hpp | 13 ++++ Runtime/Character/CAnimTreeNode.cpp | 0 Runtime/Character/CAnimTreeNode.hpp | 15 ++++ Runtime/Character/CAnimTreeScale.cpp | 0 Runtime/Character/CAnimTreeScale.hpp | 13 ++++ Runtime/Character/CAnimTreeSequence.cpp | 0 Runtime/Character/CAnimTreeSequence.hpp | 13 ++++ Runtime/Character/CAnimTreeSingleChild.cpp | 0 Runtime/Character/CAnimTreeSingleChild.hpp | 13 ++++ Runtime/Character/CAnimTreeTimeScale.cpp | 0 Runtime/Character/CAnimTreeTimeScale.hpp | 13 ++++ Runtime/Character/CAnimTreeTransition.cpp | 0 Runtime/Character/CAnimTreeTransition.hpp | 13 ++++ Runtime/Character/CAnimTreeTweenBase.cpp | 0 Runtime/Character/CAnimTreeTweenBase.hpp | 13 ++++ Runtime/Character/CAnimation.cpp | 13 ++++ Runtime/Character/CAnimation.hpp | 21 ++++++ Runtime/Character/CAnimationSet.cpp | 55 ++++++++++++++ Runtime/Character/CAnimationSet.hpp | 26 +++++++ Runtime/Character/CCharacterInfo.cpp | 74 ++++++++++++++++++- Runtime/Character/CCharacterInfo.hpp | 21 ++++++ Runtime/Character/CEffectComponent.cpp | 23 ++++++ Runtime/Character/CEffectComponent.hpp | 24 ++++++ Runtime/Character/CHalfTransition.cpp | 13 ++++ Runtime/Character/CHalfTransition.hpp | 20 +++++ Runtime/Character/CMakeLists.txt | 28 +++++++ Runtime/Character/CMetaAnimBlend.cpp | 26 +++++++ Runtime/Character/CMetaAnimBlend.hpp | 25 +++++++ Runtime/Character/CMetaAnimFactory.cpp | 33 +++++++++ Runtime/Character/CMetaAnimFactory.hpp | 18 +++++ Runtime/Character/CMetaAnimPhaseBlend.cpp | 26 +++++++ Runtime/Character/CMetaAnimPhaseBlend.hpp | 25 +++++++ Runtime/Character/CMetaAnimPlay.cpp | 26 +++++++ Runtime/Character/CMetaAnimPlay.hpp | 25 +++++++ Runtime/Character/CMetaAnimRandom.cpp | 26 +++++++ Runtime/Character/CMetaAnimRandom.hpp | 25 +++++++ Runtime/Character/CMetaAnimSequence.cpp | 26 +++++++ Runtime/Character/CMetaAnimSequence.hpp | 25 +++++++ Runtime/Character/CMetaTransFactory.cpp | 30 ++++++++ Runtime/Character/CMetaTransFactory.hpp | 18 +++++ Runtime/Character/CMetaTransMetaAnim.cpp | 17 +++++ Runtime/Character/CMetaTransMetaAnim.hpp | 23 ++++++ Runtime/Character/CMetaTransPhaseTrans.cpp | 17 +++++ Runtime/Character/CMetaTransPhaseTrans.hpp | 23 ++++++ Runtime/Character/CMetaTransSnap.cpp | 17 +++++ Runtime/Character/CMetaTransSnap.hpp | 23 ++++++ Runtime/Character/CMetaTransTrans.cpp | 17 +++++ Runtime/Character/CMetaTransTrans.hpp | 23 ++++++ Runtime/Character/CPrimitive.cpp | 0 Runtime/Character/CPrimitive.hpp | 13 ++++ Runtime/Character/CTransition.cpp | 10 +++ Runtime/Character/CTransition.hpp | 22 ++++++ Runtime/Character/IAnimReader.cpp | 0 Runtime/Character/IAnimReader.hpp | 13 ++++ Runtime/Character/IMetaAnim.hpp | 22 ++++++ Runtime/Character/IMetaTrans.hpp | 16 ++++ 64 files changed, 1073 insertions(+), 2 deletions(-) create mode 100644 Runtime/Character/CAnimTreeAnimReaderContainer.cpp create mode 100644 Runtime/Character/CAnimTreeAnimReaderContainer.hpp create mode 100644 Runtime/Character/CAnimTreeBlend.cpp create mode 100644 Runtime/Character/CAnimTreeBlend.hpp create mode 100644 Runtime/Character/CAnimTreeDoubleChild.cpp create mode 100644 Runtime/Character/CAnimTreeDoubleChild.hpp create mode 100644 Runtime/Character/CAnimTreeLoopIn.cpp create mode 100644 Runtime/Character/CAnimTreeLoopIn.hpp create mode 100644 Runtime/Character/CAnimTreeNode.cpp create mode 100644 Runtime/Character/CAnimTreeNode.hpp create mode 100644 Runtime/Character/CAnimTreeScale.cpp create mode 100644 Runtime/Character/CAnimTreeScale.hpp create mode 100644 Runtime/Character/CAnimTreeSequence.cpp create mode 100644 Runtime/Character/CAnimTreeSequence.hpp create mode 100644 Runtime/Character/CAnimTreeSingleChild.cpp create mode 100644 Runtime/Character/CAnimTreeSingleChild.hpp create mode 100644 Runtime/Character/CAnimTreeTimeScale.cpp create mode 100644 Runtime/Character/CAnimTreeTimeScale.hpp create mode 100644 Runtime/Character/CAnimTreeTransition.cpp create mode 100644 Runtime/Character/CAnimTreeTransition.hpp create mode 100644 Runtime/Character/CAnimTreeTweenBase.cpp create mode 100644 Runtime/Character/CAnimTreeTweenBase.hpp create mode 100644 Runtime/Character/CAnimation.cpp create mode 100644 Runtime/Character/CAnimation.hpp create mode 100644 Runtime/Character/CEffectComponent.cpp create mode 100644 Runtime/Character/CEffectComponent.hpp create mode 100644 Runtime/Character/CHalfTransition.cpp create mode 100644 Runtime/Character/CHalfTransition.hpp create mode 100644 Runtime/Character/CMetaAnimBlend.cpp create mode 100644 Runtime/Character/CMetaAnimBlend.hpp create mode 100644 Runtime/Character/CMetaAnimFactory.cpp create mode 100644 Runtime/Character/CMetaAnimFactory.hpp create mode 100644 Runtime/Character/CMetaAnimPhaseBlend.cpp create mode 100644 Runtime/Character/CMetaAnimPhaseBlend.hpp create mode 100644 Runtime/Character/CMetaAnimPlay.cpp create mode 100644 Runtime/Character/CMetaAnimPlay.hpp create mode 100644 Runtime/Character/CMetaAnimRandom.cpp create mode 100644 Runtime/Character/CMetaAnimRandom.hpp create mode 100644 Runtime/Character/CMetaAnimSequence.cpp create mode 100644 Runtime/Character/CMetaAnimSequence.hpp create mode 100644 Runtime/Character/CMetaTransFactory.cpp create mode 100644 Runtime/Character/CMetaTransFactory.hpp create mode 100644 Runtime/Character/CMetaTransMetaAnim.cpp create mode 100644 Runtime/Character/CMetaTransMetaAnim.hpp create mode 100644 Runtime/Character/CMetaTransPhaseTrans.cpp create mode 100644 Runtime/Character/CMetaTransPhaseTrans.hpp create mode 100644 Runtime/Character/CMetaTransSnap.cpp create mode 100644 Runtime/Character/CMetaTransSnap.hpp create mode 100644 Runtime/Character/CMetaTransTrans.cpp create mode 100644 Runtime/Character/CMetaTransTrans.hpp create mode 100644 Runtime/Character/CPrimitive.cpp create mode 100644 Runtime/Character/CPrimitive.hpp create mode 100644 Runtime/Character/CTransition.cpp create mode 100644 Runtime/Character/CTransition.hpp create mode 100644 Runtime/Character/IAnimReader.cpp create mode 100644 Runtime/Character/IAnimReader.hpp diff --git a/Editor/ProjectResourceFactoryMP1.cpp b/Editor/ProjectResourceFactoryMP1.cpp index e2c697218..680f88cca 100644 --- a/Editor/ProjectResourceFactoryMP1.cpp +++ b/Editor/ProjectResourceFactoryMP1.cpp @@ -10,6 +10,7 @@ #include "Runtime/Graphics/CModel.hpp" #include "Runtime/Graphics/CTexture.hpp" #include "Runtime/Character/CCharLayoutInfo.hpp" +#include "Runtime/Character/CAnimCharacterSet.hpp" #include "DataSpec/DNACommon/TXTR.hpp" @@ -31,6 +32,7 @@ ProjectResourceFactoryMP1::ProjectResourceFactoryMP1(hecl::ClientProcess& client m_factoryMgr.AddFactory(FOURCC('FONT'), FFactoryFunc(FRasterFontFactory)); m_factoryMgr.AddFactory(FOURCC('CMDL'), FMemFactoryFunc(FModelFactory)); m_factoryMgr.AddFactory(FOURCC('CINF'), FFactoryFunc(FCharLayoutInfo)); + m_factoryMgr.AddFactory(FOURCC('ANCS'), FFactoryFunc(FAnimCharacterSet)); } void ProjectResourceFactoryMP1::IndexMP1Resources(hecl::Database::Project& proj) diff --git a/Runtime/Character/CAnimTreeAnimReaderContainer.cpp b/Runtime/Character/CAnimTreeAnimReaderContainer.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/Character/CAnimTreeAnimReaderContainer.hpp b/Runtime/Character/CAnimTreeAnimReaderContainer.hpp new file mode 100644 index 000000000..225d412cd --- /dev/null +++ b/Runtime/Character/CAnimTreeAnimReaderContainer.hpp @@ -0,0 +1,13 @@ +#ifndef __PSHAG_CANIMTREEANIMREADERCONTAINER_HPP__ +#define __PSHAG_CANIMTREEANIMREADERCONTAINER_HPP__ + +namespace urde +{ + +class CAnimTreeAnimReaderContainer +{ +}; + +} + +#endif // __PSHAG_CANIMTREEANIMREADERCONTAINER_HPP__ diff --git a/Runtime/Character/CAnimTreeBlend.cpp b/Runtime/Character/CAnimTreeBlend.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/Character/CAnimTreeBlend.hpp b/Runtime/Character/CAnimTreeBlend.hpp new file mode 100644 index 000000000..030ac2c2c --- /dev/null +++ b/Runtime/Character/CAnimTreeBlend.hpp @@ -0,0 +1,13 @@ +#ifndef __PSHAG_CANIMTREEBLEND_HPP__ +#define __PSHAG_CANIMTREEBLEND_HPP__ + +namespace urde +{ + +class CAnimTreeBlend +{ +}; + +} + +#endif // __PSHAG_CANIMTREEBLEND_HPP__ diff --git a/Runtime/Character/CAnimTreeDoubleChild.cpp b/Runtime/Character/CAnimTreeDoubleChild.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/Character/CAnimTreeDoubleChild.hpp b/Runtime/Character/CAnimTreeDoubleChild.hpp new file mode 100644 index 000000000..031ae6bba --- /dev/null +++ b/Runtime/Character/CAnimTreeDoubleChild.hpp @@ -0,0 +1,13 @@ +#ifndef __PSHAG_CANIMTREEDOUBLECHILD_HPP__ +#define __PSHAG_CANIMTREEDOUBLECHILD_HPP__ + +namespace urde +{ + +class CAnimTreeDoubleChild +{ +}; + +} + +#endif // __PSHAG_CANIMTREEDOUBLECHILD_HPP__ diff --git a/Runtime/Character/CAnimTreeLoopIn.cpp b/Runtime/Character/CAnimTreeLoopIn.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/Character/CAnimTreeLoopIn.hpp b/Runtime/Character/CAnimTreeLoopIn.hpp new file mode 100644 index 000000000..9fcb2b845 --- /dev/null +++ b/Runtime/Character/CAnimTreeLoopIn.hpp @@ -0,0 +1,13 @@ +#ifndef __PSHAG_CANIMTREELOOPIN_HPP__ +#define __PSHAG_CANIMTREELOOPIN_HPP__ + +namespace urde +{ + +class CAnimTreeLoopIn +{ +}; + +} + +#endif // __PSHAG_CANIMTREELOOPIN_HPP__ diff --git a/Runtime/Character/CAnimTreeNode.cpp b/Runtime/Character/CAnimTreeNode.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/Character/CAnimTreeNode.hpp b/Runtime/Character/CAnimTreeNode.hpp new file mode 100644 index 000000000..76240d5c9 --- /dev/null +++ b/Runtime/Character/CAnimTreeNode.hpp @@ -0,0 +1,15 @@ +#ifndef __PSHAG_CANIMTREENODE_HPP__ +#define __PSHAG_CANIMTREENODE_HPP__ + +#include "IAnimReader.hpp" + +namespace urde +{ + +class CAnimTreeNode : public IAnimReader +{ +}; + +} + +#endif // __PSHAG_CANIMTREENODE_HPP__ diff --git a/Runtime/Character/CAnimTreeScale.cpp b/Runtime/Character/CAnimTreeScale.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/Character/CAnimTreeScale.hpp b/Runtime/Character/CAnimTreeScale.hpp new file mode 100644 index 000000000..26a0395a1 --- /dev/null +++ b/Runtime/Character/CAnimTreeScale.hpp @@ -0,0 +1,13 @@ +#ifndef __PSHAG_CANIMTREESCALE_HPP__ +#define __PSHAG_CANIMTREESCALE_HPP__ + +namespace urde +{ + +class CAnimTreeScale +{ +}; + +} + +#endif // __PSHAG_CANIMTREESCALE_HPP__ diff --git a/Runtime/Character/CAnimTreeSequence.cpp b/Runtime/Character/CAnimTreeSequence.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/Character/CAnimTreeSequence.hpp b/Runtime/Character/CAnimTreeSequence.hpp new file mode 100644 index 000000000..a42706cbd --- /dev/null +++ b/Runtime/Character/CAnimTreeSequence.hpp @@ -0,0 +1,13 @@ +#ifndef __PSHAG_CANIMTREESEQUENCE_HPP__ +#define __PSHAG_CANIMTREESEQUENCE_HPP__ + +namespace urde +{ + +class CAnimTreeSequence +{ +}; + +} + +#endif // __PSHAG_CANIMTREESEQUENCE_HPP__ diff --git a/Runtime/Character/CAnimTreeSingleChild.cpp b/Runtime/Character/CAnimTreeSingleChild.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/Character/CAnimTreeSingleChild.hpp b/Runtime/Character/CAnimTreeSingleChild.hpp new file mode 100644 index 000000000..e848b29c2 --- /dev/null +++ b/Runtime/Character/CAnimTreeSingleChild.hpp @@ -0,0 +1,13 @@ +#ifndef __PSHAG_CANIMTREESINGLECHILD_HPP__ +#define __PSHAG_CANIMTREESINGLECHILD_HPP__ + +namespace urde +{ + +class CAnimTreeSingleChild +{ +}; + +} + +#endif // __PSHAG_CANIMTREESINGLECHILD_HPP__ diff --git a/Runtime/Character/CAnimTreeTimeScale.cpp b/Runtime/Character/CAnimTreeTimeScale.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/Character/CAnimTreeTimeScale.hpp b/Runtime/Character/CAnimTreeTimeScale.hpp new file mode 100644 index 000000000..2219985b2 --- /dev/null +++ b/Runtime/Character/CAnimTreeTimeScale.hpp @@ -0,0 +1,13 @@ +#ifndef __PSHAG_CANIMTREETIMESCALE_HPP__ +#define __PSHAG_CANIMTREETIMESCALE_HPP__ + +namespace urde +{ + +class CAnimTreeTimeScale +{ +}; + +} + +#endif // __PSHAG_CANIMTREETIMESCALE_HPP__ diff --git a/Runtime/Character/CAnimTreeTransition.cpp b/Runtime/Character/CAnimTreeTransition.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/Character/CAnimTreeTransition.hpp b/Runtime/Character/CAnimTreeTransition.hpp new file mode 100644 index 000000000..92d857f9b --- /dev/null +++ b/Runtime/Character/CAnimTreeTransition.hpp @@ -0,0 +1,13 @@ +#ifndef __PSHAG_CANIMTREETRANSITION_HPP__ +#define __PSHAG_CANIMTREETRANSITION_HPP__ + +namespace urde +{ + +class CAnimTreeTransition +{ +}; + +} + +#endif // __PSHAG_CANIMTREETRANSITION_HPP__ diff --git a/Runtime/Character/CAnimTreeTweenBase.cpp b/Runtime/Character/CAnimTreeTweenBase.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/Character/CAnimTreeTweenBase.hpp b/Runtime/Character/CAnimTreeTweenBase.hpp new file mode 100644 index 000000000..41c6ba24f --- /dev/null +++ b/Runtime/Character/CAnimTreeTweenBase.hpp @@ -0,0 +1,13 @@ +#ifndef __PSHAG_CANIMTREETWEENBASE_HPP__ +#define __PSHAG_CANIMTREETWEENBASE_HPP__ + +namespace urde +{ + +class CAnimTreeTweenBase +{ +}; + +} + +#endif // __PSHAG_CANIMTREETWEENBASE_HPP__ diff --git a/Runtime/Character/CAnimation.cpp b/Runtime/Character/CAnimation.cpp new file mode 100644 index 000000000..280a463a1 --- /dev/null +++ b/Runtime/Character/CAnimation.cpp @@ -0,0 +1,13 @@ +#include "CAnimation.hpp" +#include "CMetaAnimFactory.hpp" + +namespace urde +{ + +CAnimation::CAnimation(CInputStream& in) +{ + x0_name = in.readString(); + x10_anim = CMetaAnimFactory::CreateMetaAnim(in); +} + +} diff --git a/Runtime/Character/CAnimation.hpp b/Runtime/Character/CAnimation.hpp new file mode 100644 index 000000000..483b4c16b --- /dev/null +++ b/Runtime/Character/CAnimation.hpp @@ -0,0 +1,21 @@ +#ifndef __PSHAG_CANIMATION_HPP__ +#define __PSHAG_CANIMATION_HPP__ + +#include "IOStreams.hpp" +#include "CMetaAnimFactory.hpp" + +namespace urde +{ +class IMetaAnim; + +class CAnimation +{ + std::string x0_name; + std::shared_ptr x10_anim; +public: + CAnimation(CInputStream& in); +}; + +} + +#endif // __PSHAG_CANIMATION_HPP__ diff --git a/Runtime/Character/CAnimationSet.cpp b/Runtime/Character/CAnimationSet.cpp index e69de29bb..d475f5262 100644 --- a/Runtime/Character/CAnimationSet.cpp +++ b/Runtime/Character/CAnimationSet.cpp @@ -0,0 +1,55 @@ +#include "CAnimationSet.hpp" +#include "CMetaTransFactory.hpp" + +namespace urde +{ + +CAnimationSet::CAnimationSet(CInputStream& in) +: x0_tableCount(in.readUint16Big()) +{ + u32 animationCount = in.readUint32Big(); + x4_animations.reserve(animationCount); + for (u32 i=0 ; i 1) + { + u32 additiveAnimCount = in.readUint32Big(); + x28_additiveInfo.reserve(additiveAnimCount); + for (u32 i=0 ; i 2) + { + u32 halfTransitionCount = in.readUint32Big(); + x40_halfTransitions.reserve(halfTransitionCount); + for (u32 i=0 ; i 3) + { + u32 animResourcesCount = in.readUint32Big(); + x50_animRes.reserve(animResourcesCount); + for (u32 i=0 ; i x4_animations; + std::vector x14_transitions; + std::shared_ptr x24_defaultTransition; + std::vector> x28_additiveInfo; + CAdditiveAnimationInfo x38_defaultAdditiveInfo; + std::vector x40_halfTransitions; + std::vector> x50_animRes; + public: CAnimationSet(CInputStream& in); }; diff --git a/Runtime/Character/CCharacterInfo.cpp b/Runtime/Character/CCharacterInfo.cpp index e5250e348..01239889f 100644 --- a/Runtime/Character/CCharacterInfo.cpp +++ b/Runtime/Character/CCharacterInfo.cpp @@ -3,6 +3,32 @@ namespace urde { +CCharacterInfo::CParticleResData::CParticleResData(CInputStream& in, u16 tableCount) +{ + u32 partCount = in.readUint32Big(); + x0_part.reserve(partCount); + for (u32 i=0 ; i 5) + { + u32 elscCount = in.readUint32Big(); + x30_elsc.reserve(elscCount); + for (u32 i=0 ; i>> MakeAnimInfoVector(CInputStream& in) { @@ -26,7 +52,51 @@ CCharacterInfo::CCharacterInfo(CInputStream& in) x18_cskr(in.readUint32Big()), x1c_cinf(in.readUint32Big()), x20_animInfo(MakeAnimInfoVector(in)), - x30_pasDatabase(in) -{} + x30_pasDatabase(in), + x44_partRes(in, x0_tableCount), + x84_unk(in.readUint32Big()) +{ + if (x0_tableCount > 1) + { + u32 aabbCount = in.readUint32Big(); + x88_aabbs.reserve(aabbCount); + for (u32 i=0 ; i 2) + { + u32 effectCount = in.readUint32Big(); + x98_effects.reserve(effectCount); + for (u32 i=0 ; i()); + std::vector& comps = x98_effects.back().second; + u32 compCount = in.readUint32Big(); + comps.reserve(compCount); + for (u32 j=0 ; j 3) + { + xa8_cmdlOverlay = in.readUint32Big(); + xac_cskrOverlay = in.readUint32Big(); + } + + if (x0_tableCount > 4) + { + u32 aidxCount = in.readUint32Big(); + xb0_animIdxs.reserve(aidxCount); + for (u32 i=0 ; i x0_part; + std::vector x10_swhc; + std::vector x20_; + std::vector x30_elsc; + CParticleResData(CInputStream& in, u16 tableCount); + }; +private: u16 x0_tableCount; std::string x4_name; TResId x14_cmdl; @@ -16,6 +28,15 @@ class CCharacterInfo TResId x1c_cinf; std::vector>> x20_animInfo; CPASDatabase x30_pasDatabase; + CParticleResData x44_partRes; + u32 x84_unk; + std::vector> x88_aabbs; + std::vector>> x98_effects; + + TResId xa8_cmdlOverlay = 0; + TResId xac_cskrOverlay = 0; + + std::vector xb0_animIdxs; public: CCharacterInfo(CInputStream& in); diff --git a/Runtime/Character/CEffectComponent.cpp b/Runtime/Character/CEffectComponent.cpp new file mode 100644 index 000000000..9913506c8 --- /dev/null +++ b/Runtime/Character/CEffectComponent.cpp @@ -0,0 +1,23 @@ +#include "CEffectComponent.hpp" + +namespace urde +{ + +SObjectTag CEffectComponent::GetSObjectTagFromStream(CInputStream& in) +{ + char tpChars[4]; + in.readBytesToBuf(tpChars, 4); + return {tpChars, in.readUint32Big()}; +} + +CEffectComponent::CEffectComponent(CInputStream& in) +{ + x0_name = in.readString(); + x10_tag = GetSObjectTagFromStream(in); + x18_boneName = in.readString(); + x28_ = in.readFloatBig(); + x2c_ = in.readUint32Big(); + x30_ = in.readUint32Big(); +} + +} diff --git a/Runtime/Character/CEffectComponent.hpp b/Runtime/Character/CEffectComponent.hpp new file mode 100644 index 000000000..33be1d81e --- /dev/null +++ b/Runtime/Character/CEffectComponent.hpp @@ -0,0 +1,24 @@ +#ifndef __PSHAG_CEFFECTCOMPONENT_HPP__ +#define __PSHAG_CEFFECTCOMPONENT_HPP__ + +#include "IOStreams.hpp" + +namespace urde +{ + +class CEffectComponent +{ + std::string x0_name; + SObjectTag x10_tag; + std::string x18_boneName; + float x28_; + u32 x2c_; + u32 x30_; + static SObjectTag GetSObjectTagFromStream(CInputStream& in); +public: + CEffectComponent(CInputStream& in); +}; + +} + +#endif // __PSHAG_CEFFECTCOMPONENT_HPP__ diff --git a/Runtime/Character/CHalfTransition.cpp b/Runtime/Character/CHalfTransition.cpp new file mode 100644 index 000000000..19b29d799 --- /dev/null +++ b/Runtime/Character/CHalfTransition.cpp @@ -0,0 +1,13 @@ +#include "CHalfTransition.hpp" +#include "CMetaTransFactory.hpp" + +namespace urde +{ + +CHalfTransition::CHalfTransition(CInputStream& in) +{ + x0_id = in.readUint32Big(); + x4_trans = CMetaTransFactory::CreateMetaTrans(in); +} + +} diff --git a/Runtime/Character/CHalfTransition.hpp b/Runtime/Character/CHalfTransition.hpp new file mode 100644 index 000000000..dd909c87d --- /dev/null +++ b/Runtime/Character/CHalfTransition.hpp @@ -0,0 +1,20 @@ +#ifndef __PSHAG_CHALFTRANSITION_HPP__ +#define __PSHAG_CHALFTRANSITION_HPP__ + +#include "IOStreams.hpp" +#include "IMetaTrans.hpp" + +namespace urde +{ + +class CHalfTransition +{ + u32 x0_id; + std::shared_ptr x4_trans; +public: + CHalfTransition(CInputStream& in); +}; + +} + +#endif // __PSHAG_CHALFTRANSITION_HPP__ diff --git a/Runtime/Character/CMakeLists.txt b/Runtime/Character/CMakeLists.txt index c12fdf25a..a82daa117 100644 --- a/Runtime/Character/CMakeLists.txt +++ b/Runtime/Character/CMakeLists.txt @@ -25,4 +25,32 @@ add_library(RuntimeCommonCharacter CPASParmInfo.hpp CPASParmInfo.cpp CPASAnimInfo.hpp CPASAnimInfo.cpp CPASAnimParm.hpp CPASAnimParm.cpp + CEffectComponent.hpp CEffectComponent.cpp + CAnimation.hpp CAnimation.cpp + CTransition.hpp CTransition.cpp + CMetaAnimFactory.hpp CMetaAnimFactory.cpp + CMetaAnimPlay.hpp CMetaAnimPlay.cpp + CMetaAnimBlend.hpp CMetaAnimBlend.cpp + CMetaAnimPhaseBlend.hpp CMetaAnimPhaseBlend.cpp + CMetaAnimRandom.hpp CMetaAnimRandom.cpp + CMetaAnimSequence.hpp CMetaAnimSequence.cpp + CMetaTransFactory.hpp CMetaTransFactory.cpp + CMetaTransMetaAnim.hpp CMetaTransMetaAnim.cpp + CMetaTransTrans.hpp CMetaTransTrans.cpp + CMetaTransPhaseTrans.hpp CMetaTransPhaseTrans.cpp + CMetaTransSnap.hpp CMetaTransSnap.cpp + CAnimTreeLoopIn.hpp CAnimTreeLoopIn.cpp + CAnimTreeSequence.hpp CAnimTreeSequence.cpp + CAnimTreeAnimReaderContainer.hpp CAnimTreeAnimReaderContainer.cpp + CAnimTreeBlend.hpp CAnimTreeBlend.cpp + CAnimTreeNode.hpp CAnimTreeNode.cpp + CAnimTreeScale.hpp CAnimTreeScale.cpp + CAnimTreeTimeScale.hpp CAnimTreeTimeScale.cpp + CAnimTreeTransition.hpp CAnimTreeTransition.cpp + CAnimTreeTweenBase.hpp CAnimTreeTweenBase.cpp + CAnimTreeSingleChild.hpp CAnimTreeSingleChild.cpp + CAnimTreeDoubleChild.hpp CAnimTreeDoubleChild.cpp + IAnimReader.hpp IAnimReader.cpp + CPrimitive.hpp CPrimitive.cpp + CHalfTransition.hpp CHalfTransition.cpp CBodyState.hpp) diff --git a/Runtime/Character/CMetaAnimBlend.cpp b/Runtime/Character/CMetaAnimBlend.cpp new file mode 100644 index 000000000..d39357eb8 --- /dev/null +++ b/Runtime/Character/CMetaAnimBlend.cpp @@ -0,0 +1,26 @@ +#include "CMetaAnimBlend.hpp" + +namespace urde +{ + +CMetaAnimBlend::CMetaAnimBlend(CInputStream& in) +{ +} + +std::shared_ptr +CMetaAnimBlend::GetAnimationTree(const CAnimSysContext& animSys, + const CMetaAnimTreeBuildOrders& orders) const +{ +} + +void CMetaAnimBlend::GetUniquePrimitives(std::set& primsOut) const +{ +} + +std::shared_ptr +CMetaAnimBlend::VGetAnimationTree(const CAnimSysContext& animSys, + const CMetaAnimTreeBuildOrders& orders) const +{ +} + +} diff --git a/Runtime/Character/CMetaAnimBlend.hpp b/Runtime/Character/CMetaAnimBlend.hpp new file mode 100644 index 000000000..e0c611897 --- /dev/null +++ b/Runtime/Character/CMetaAnimBlend.hpp @@ -0,0 +1,25 @@ +#ifndef __PSHAG_CMETAANIMBLEND_HPP__ +#define __PSHAG_CMETAANIMBLEND_HPP__ + +#include "IMetaAnim.hpp" +#include "IOStreams.hpp" + +namespace urde +{ + +class CMetaAnimBlend : public IMetaAnim +{ +public: + CMetaAnimBlend(CInputStream& in); + EMetaAnimType GetType() const {return EMetaAnimType::Blend;} + + std::shared_ptr GetAnimationTree(const CAnimSysContext& animSys, + const CMetaAnimTreeBuildOrders& orders) const; + void GetUniquePrimitives(std::set& primsOut) const; + std::shared_ptr VGetAnimationTree(const CAnimSysContext& animSys, + const CMetaAnimTreeBuildOrders& orders) const; +}; + +} + +#endif // __PSHAG_CMETAANIMBLEND_HPP__ diff --git a/Runtime/Character/CMetaAnimFactory.cpp b/Runtime/Character/CMetaAnimFactory.cpp new file mode 100644 index 000000000..811132e2a --- /dev/null +++ b/Runtime/Character/CMetaAnimFactory.cpp @@ -0,0 +1,33 @@ +#include "CMetaAnimFactory.hpp" +#include "CMetaAnimPlay.hpp" +#include "CMetaAnimBlend.hpp" +#include "CMetaAnimPhaseBlend.hpp" +#include "CMetaAnimRandom.hpp" +#include "CMetaAnimSequence.hpp" + +namespace urde +{ + +std::shared_ptr CMetaAnimFactory::CreateMetaAnim(CInputStream& in) +{ + EMetaAnimType type = EMetaAnimType(in.readUint32Big()); + + switch (type) + { + case EMetaAnimType::Primitive: + return std::make_shared(in); + case EMetaAnimType::Blend: + return std::make_shared(in); + case EMetaAnimType::PhaseBlend: + return std::make_shared(in); + case EMetaAnimType::Random: + return std::make_shared(in); + case EMetaAnimType::Sequence: + return std::make_shared(in); + default: break; + } + + return {}; +} + +} diff --git a/Runtime/Character/CMetaAnimFactory.hpp b/Runtime/Character/CMetaAnimFactory.hpp new file mode 100644 index 000000000..e2d6dbb47 --- /dev/null +++ b/Runtime/Character/CMetaAnimFactory.hpp @@ -0,0 +1,18 @@ +#ifndef __PSHAG_CMETAANIMFACTORY_HPP__ +#define __PSHAG_CMETAANIMFACTORY_HPP__ + +#include "IOStreams.hpp" +#include "IMetaAnim.hpp" + +namespace urde +{ + +class CMetaAnimFactory +{ +public: + static std::shared_ptr CreateMetaAnim(CInputStream& in); +}; + +} + +#endif // __PSHAG_CMETAANIMFACTORY_HPP__ diff --git a/Runtime/Character/CMetaAnimPhaseBlend.cpp b/Runtime/Character/CMetaAnimPhaseBlend.cpp new file mode 100644 index 000000000..44cdadb4a --- /dev/null +++ b/Runtime/Character/CMetaAnimPhaseBlend.cpp @@ -0,0 +1,26 @@ +#include "CMetaAnimPhaseBlend.hpp" + +namespace urde +{ + +CMetaAnimPhaseBlend::CMetaAnimPhaseBlend(CInputStream& in) +{ +} + +std::shared_ptr +CMetaAnimPhaseBlend::GetAnimationTree(const CAnimSysContext& animSys, + const CMetaAnimTreeBuildOrders& orders) const +{ +} + +void CMetaAnimPhaseBlend::GetUniquePrimitives(std::set& primsOut) const +{ +} + +std::shared_ptr +CMetaAnimPhaseBlend::VGetAnimationTree(const CAnimSysContext& animSys, + const CMetaAnimTreeBuildOrders& orders) const +{ +} + +} diff --git a/Runtime/Character/CMetaAnimPhaseBlend.hpp b/Runtime/Character/CMetaAnimPhaseBlend.hpp new file mode 100644 index 000000000..f83dea123 --- /dev/null +++ b/Runtime/Character/CMetaAnimPhaseBlend.hpp @@ -0,0 +1,25 @@ +#ifndef __PSHAG_CMETAANIMPHASEBLEND_HPP__ +#define __PSHAG_CMETAANIMPHASEBLEND_HPP__ + +#include "IMetaAnim.hpp" +#include "IOStreams.hpp" + +namespace urde +{ + +class CMetaAnimPhaseBlend : public IMetaAnim +{ +public: + CMetaAnimPhaseBlend(CInputStream& in); + EMetaAnimType GetType() const {return EMetaAnimType::PhaseBlend;} + + std::shared_ptr GetAnimationTree(const CAnimSysContext& animSys, + const CMetaAnimTreeBuildOrders& orders) const; + void GetUniquePrimitives(std::set& primsOut) const; + std::shared_ptr VGetAnimationTree(const CAnimSysContext& animSys, + const CMetaAnimTreeBuildOrders& orders) const; +}; + +} + +#endif // __PSHAG_CMETAANIMPHASEBLEND_HPP__ diff --git a/Runtime/Character/CMetaAnimPlay.cpp b/Runtime/Character/CMetaAnimPlay.cpp new file mode 100644 index 000000000..728afea3b --- /dev/null +++ b/Runtime/Character/CMetaAnimPlay.cpp @@ -0,0 +1,26 @@ +#include "CMetaAnimPlay.hpp" + +namespace urde +{ + +CMetaAnimPlay::CMetaAnimPlay(CInputStream& in) +{ +} + +std::shared_ptr +CMetaAnimPlay::GetAnimationTree(const CAnimSysContext& animSys, + const CMetaAnimTreeBuildOrders& orders) const +{ +} + +void CMetaAnimPlay::GetUniquePrimitives(std::set& primsOut) const +{ +} + +std::shared_ptr +CMetaAnimPlay::VGetAnimationTree(const CAnimSysContext& animSys, + const CMetaAnimTreeBuildOrders& orders) const +{ +} + +} diff --git a/Runtime/Character/CMetaAnimPlay.hpp b/Runtime/Character/CMetaAnimPlay.hpp new file mode 100644 index 000000000..1b3e8f9eb --- /dev/null +++ b/Runtime/Character/CMetaAnimPlay.hpp @@ -0,0 +1,25 @@ +#ifndef __PSHAG_CMETAANIMPLAY_HPP__ +#define __PSHAG_CMETAANIMPLAY_HPP__ + +#include "IMetaAnim.hpp" +#include "IOStreams.hpp" + +namespace urde +{ + +class CMetaAnimPlay : public IMetaAnim +{ +public: + CMetaAnimPlay(CInputStream& in); + EMetaAnimType GetType() const {return EMetaAnimType::Primitive;} + + std::shared_ptr GetAnimationTree(const CAnimSysContext& animSys, + const CMetaAnimTreeBuildOrders& orders) const; + void GetUniquePrimitives(std::set& primsOut) const; + std::shared_ptr VGetAnimationTree(const CAnimSysContext& animSys, + const CMetaAnimTreeBuildOrders& orders) const; +}; + +} + +#endif // __PSHAG_CMETAANIMPLAY_HPP__ diff --git a/Runtime/Character/CMetaAnimRandom.cpp b/Runtime/Character/CMetaAnimRandom.cpp new file mode 100644 index 000000000..6213b8e77 --- /dev/null +++ b/Runtime/Character/CMetaAnimRandom.cpp @@ -0,0 +1,26 @@ +#include "CMetaAnimRandom.hpp" + +namespace urde +{ + +CMetaAnimRandom::CMetaAnimRandom(CInputStream& in) +{ +} + +std::shared_ptr +CMetaAnimRandom::GetAnimationTree(const CAnimSysContext& animSys, + const CMetaAnimTreeBuildOrders& orders) const +{ +} + +void CMetaAnimRandom::GetUniquePrimitives(std::set& primsOut) const +{ +} + +std::shared_ptr +CMetaAnimRandom::VGetAnimationTree(const CAnimSysContext& animSys, + const CMetaAnimTreeBuildOrders& orders) const +{ +} + +} diff --git a/Runtime/Character/CMetaAnimRandom.hpp b/Runtime/Character/CMetaAnimRandom.hpp new file mode 100644 index 000000000..ce3d4ba43 --- /dev/null +++ b/Runtime/Character/CMetaAnimRandom.hpp @@ -0,0 +1,25 @@ +#ifndef __PSHAG_CMETAANIMRANDOM_HPP__ +#define __PSHAG_CMETAANIMRANDOM_HPP__ + +#include "IMetaAnim.hpp" +#include "IOStreams.hpp" + +namespace urde +{ + +class CMetaAnimRandom : public IMetaAnim +{ +public: + CMetaAnimRandom(CInputStream& in); + EMetaAnimType GetType() const {return EMetaAnimType::Random;} + + std::shared_ptr GetAnimationTree(const CAnimSysContext& animSys, + const CMetaAnimTreeBuildOrders& orders) const; + void GetUniquePrimitives(std::set& primsOut) const; + std::shared_ptr VGetAnimationTree(const CAnimSysContext& animSys, + const CMetaAnimTreeBuildOrders& orders) const; +}; + +} + +#endif // __PSHAG_CMETAANIMRANDOM_HPP__ diff --git a/Runtime/Character/CMetaAnimSequence.cpp b/Runtime/Character/CMetaAnimSequence.cpp new file mode 100644 index 000000000..ed1ca4d2b --- /dev/null +++ b/Runtime/Character/CMetaAnimSequence.cpp @@ -0,0 +1,26 @@ +#include "CMetaAnimSequence.hpp" + +namespace urde +{ + +CMetaAnimSequence::CMetaAnimSequence(CInputStream& in) +{ +} + +std::shared_ptr +CMetaAnimSequence::GetAnimationTree(const CAnimSysContext& animSys, + const CMetaAnimTreeBuildOrders& orders) const +{ +} + +void CMetaAnimSequence::GetUniquePrimitives(std::set& primsOut) const +{ +} + +std::shared_ptr +CMetaAnimSequence::VGetAnimationTree(const CAnimSysContext& animSys, + const CMetaAnimTreeBuildOrders& orders) const +{ +} + +} diff --git a/Runtime/Character/CMetaAnimSequence.hpp b/Runtime/Character/CMetaAnimSequence.hpp new file mode 100644 index 000000000..8e873a759 --- /dev/null +++ b/Runtime/Character/CMetaAnimSequence.hpp @@ -0,0 +1,25 @@ +#ifndef __PSHAG_CMETAANIMSEQUENCE_HPP__ +#define __PSHAG_CMETAANIMSEQUENCE_HPP__ + +#include "IMetaAnim.hpp" +#include "IOStreams.hpp" + +namespace urde +{ + +class CMetaAnimSequence : public IMetaAnim +{ +public: + CMetaAnimSequence(CInputStream& in); + EMetaAnimType GetType() const {return EMetaAnimType::Sequence;} + + std::shared_ptr GetAnimationTree(const CAnimSysContext& animSys, + const CMetaAnimTreeBuildOrders& orders) const; + void GetUniquePrimitives(std::set& primsOut) const; + std::shared_ptr VGetAnimationTree(const CAnimSysContext& animSys, + const CMetaAnimTreeBuildOrders& orders) const; +}; + +} + +#endif // __PSHAG_CMETAANIMSEQUENCE_HPP__ diff --git a/Runtime/Character/CMetaTransFactory.cpp b/Runtime/Character/CMetaTransFactory.cpp new file mode 100644 index 000000000..515b69ee7 --- /dev/null +++ b/Runtime/Character/CMetaTransFactory.cpp @@ -0,0 +1,30 @@ +#include "CMetaTransFactory.hpp" +#include "CMetaTransMetaAnim.hpp" +#include "CMetaTransTrans.hpp" +#include "CMetaTransPhaseTrans.hpp" +#include "CMetaTransSnap.hpp" + +namespace urde +{ + +std::shared_ptr CMetaTransFactory::CreateMetaTrans(CInputStream& in) +{ + EMetaTransType type = EMetaTransType(in.readUint32Big()); + + switch (type) + { + case EMetaTransType::MetaAnim: + return std::make_shared(in); + case EMetaTransType::Trans: + return std::make_shared(in); + case EMetaTransType::PhaseTrans: + return std::make_shared(in); + case EMetaTransType::Snap: + return std::make_shared(in); + default: break; + } + + return {}; +} + +} diff --git a/Runtime/Character/CMetaTransFactory.hpp b/Runtime/Character/CMetaTransFactory.hpp new file mode 100644 index 000000000..befa22357 --- /dev/null +++ b/Runtime/Character/CMetaTransFactory.hpp @@ -0,0 +1,18 @@ +#ifndef __PSHAG_CMETATRANSFACTORY_HPP__ +#define __PSHAG_CMETATRANSFACTORY_HPP__ + +#include "IOStreams.hpp" +#include "IMetaTrans.hpp" + +namespace urde +{ + +class CMetaTransFactory +{ +public: + static std::shared_ptr CreateMetaTrans(CInputStream& in); +}; + +} + +#endif // __PSHAG_CMETATRANSFACTORY_HPP__ diff --git a/Runtime/Character/CMetaTransMetaAnim.cpp b/Runtime/Character/CMetaTransMetaAnim.cpp new file mode 100644 index 000000000..1310ff42e --- /dev/null +++ b/Runtime/Character/CMetaTransMetaAnim.cpp @@ -0,0 +1,17 @@ +#include "CMetaTransMetaAnim.hpp" + +namespace urde +{ + +CMetaTransMetaAnim::CMetaTransMetaAnim(CInputStream& in) +{ +} + +std::shared_ptr +CMetaTransMetaAnim::VGetTransitionTree(const std::weak_ptr& a, + const std::weak_ptr& b, + const CAnimSysContext& animSys) const +{ +} + +} diff --git a/Runtime/Character/CMetaTransMetaAnim.hpp b/Runtime/Character/CMetaTransMetaAnim.hpp new file mode 100644 index 000000000..0da282d6f --- /dev/null +++ b/Runtime/Character/CMetaTransMetaAnim.hpp @@ -0,0 +1,23 @@ +#ifndef __PSHAG_CMETATRANSMETAANIM_HPP__ +#define __PSHAG_CMETATRANSMETAANIM_HPP__ + +#include "IMetaTrans.hpp" +#include "IOStreams.hpp" + +namespace urde +{ + +class CMetaTransMetaAnim : public IMetaTrans +{ +public: + CMetaTransMetaAnim(CInputStream& in); + EMetaTransType GetType() const {return EMetaTransType::MetaAnim;} + + std::shared_ptr VGetTransitionTree(const std::weak_ptr& a, + const std::weak_ptr& b, + const CAnimSysContext& animSys) const; +}; + +} + +#endif // __PSHAG_CMETATRANSMETAANIM_HPP__ diff --git a/Runtime/Character/CMetaTransPhaseTrans.cpp b/Runtime/Character/CMetaTransPhaseTrans.cpp new file mode 100644 index 000000000..13550f997 --- /dev/null +++ b/Runtime/Character/CMetaTransPhaseTrans.cpp @@ -0,0 +1,17 @@ +#include "CMetaTransPhaseTrans.hpp" + +namespace urde +{ + +CMetaTransPhaseTrans::CMetaTransPhaseTrans(CInputStream& in) +{ +} + +std::shared_ptr +CMetaTransPhaseTrans::VGetTransitionTree(const std::weak_ptr& a, + const std::weak_ptr& b, + const CAnimSysContext& animSys) const +{ +} + +} diff --git a/Runtime/Character/CMetaTransPhaseTrans.hpp b/Runtime/Character/CMetaTransPhaseTrans.hpp new file mode 100644 index 000000000..472045714 --- /dev/null +++ b/Runtime/Character/CMetaTransPhaseTrans.hpp @@ -0,0 +1,23 @@ +#ifndef __PSHAG_CMETATRANSPHASETRANS_HPP__ +#define __PSHAG_CMETATRANSPHASETRANS_HPP__ + +#include "IMetaTrans.hpp" +#include "IOStreams.hpp" + +namespace urde +{ + +class CMetaTransPhaseTrans : public IMetaTrans +{ +public: + CMetaTransPhaseTrans(CInputStream& in); + EMetaTransType GetType() const {return EMetaTransType::PhaseTrans;} + + std::shared_ptr VGetTransitionTree(const std::weak_ptr& a, + const std::weak_ptr& b, + const CAnimSysContext& animSys) const; +}; + +} + +#endif // __PSHAG_CMETATRANSPHASETRANS_HPP__ diff --git a/Runtime/Character/CMetaTransSnap.cpp b/Runtime/Character/CMetaTransSnap.cpp new file mode 100644 index 000000000..122ab93f9 --- /dev/null +++ b/Runtime/Character/CMetaTransSnap.cpp @@ -0,0 +1,17 @@ +#include "CMetaTransSnap.hpp" + +namespace urde +{ + +CMetaTransSnap::CMetaTransSnap(CInputStream& in) +{ +} + +std::shared_ptr +CMetaTransSnap::VGetTransitionTree(const std::weak_ptr& a, + const std::weak_ptr& b, + const CAnimSysContext& animSys) const +{ +} + +} diff --git a/Runtime/Character/CMetaTransSnap.hpp b/Runtime/Character/CMetaTransSnap.hpp new file mode 100644 index 000000000..57a6a8658 --- /dev/null +++ b/Runtime/Character/CMetaTransSnap.hpp @@ -0,0 +1,23 @@ +#ifndef __PSHAG_CMETATRANSSNAP_HPP__ +#define __PSHAG_CMETATRANSSNAP_HPP__ + +#include "IMetaTrans.hpp" +#include "IOStreams.hpp" + +namespace urde +{ + +class CMetaTransSnap : public IMetaTrans +{ +public: + CMetaTransSnap(CInputStream& in); + EMetaTransType GetType() const {return EMetaTransType::Snap;} + + std::shared_ptr VGetTransitionTree(const std::weak_ptr& a, + const std::weak_ptr& b, + const CAnimSysContext& animSys) const; +}; + +} + +#endif // __PSHAG_CMETATRANSSNAP_HPP__ diff --git a/Runtime/Character/CMetaTransTrans.cpp b/Runtime/Character/CMetaTransTrans.cpp new file mode 100644 index 000000000..3c31ded2e --- /dev/null +++ b/Runtime/Character/CMetaTransTrans.cpp @@ -0,0 +1,17 @@ +#include "CMetaTransTrans.hpp" + +namespace urde +{ + +CMetaTransTrans::CMetaTransTrans(CInputStream& in) +{ +} + +std::shared_ptr +CMetaTransTrans::VGetTransitionTree(const std::weak_ptr& a, + const std::weak_ptr& b, + const CAnimSysContext& animSys) const +{ +} + +} diff --git a/Runtime/Character/CMetaTransTrans.hpp b/Runtime/Character/CMetaTransTrans.hpp new file mode 100644 index 000000000..d87daac99 --- /dev/null +++ b/Runtime/Character/CMetaTransTrans.hpp @@ -0,0 +1,23 @@ +#ifndef __PSHAG_CMETATRANSTRANS_HPP__ +#define __PSHAG_CMETATRANSTRANS_HPP__ + +#include "IMetaTrans.hpp" +#include "IOStreams.hpp" + +namespace urde +{ + +class CMetaTransTrans : public IMetaTrans +{ +public: + CMetaTransTrans(CInputStream& in); + EMetaTransType GetType() const {return EMetaTransType::Trans;} + + std::shared_ptr VGetTransitionTree(const std::weak_ptr& a, + const std::weak_ptr& b, + const CAnimSysContext& animSys) const; +}; + +} + +#endif // __PSHAG_CMETATRANSTRANS_HPP__ diff --git a/Runtime/Character/CPrimitive.cpp b/Runtime/Character/CPrimitive.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/Character/CPrimitive.hpp b/Runtime/Character/CPrimitive.hpp new file mode 100644 index 000000000..56b680e84 --- /dev/null +++ b/Runtime/Character/CPrimitive.hpp @@ -0,0 +1,13 @@ +#ifndef __PSHAG_CPRIMITIVE_HPP__ +#define __PSHAG_CPRIMITIVE_HPP__ + +namespace urde +{ + +class CPrimitive +{ +}; + +} + +#endif // __PSHAG_CPRIMITIVE_HPP__ diff --git a/Runtime/Character/CTransition.cpp b/Runtime/Character/CTransition.cpp new file mode 100644 index 000000000..7606859a7 --- /dev/null +++ b/Runtime/Character/CTransition.cpp @@ -0,0 +1,10 @@ +#include "CTransition.hpp" + +namespace urde +{ + +CTransition::CTransition(CInputStream& in) +{ +} + +} diff --git a/Runtime/Character/CTransition.hpp b/Runtime/Character/CTransition.hpp new file mode 100644 index 000000000..0c6e51696 --- /dev/null +++ b/Runtime/Character/CTransition.hpp @@ -0,0 +1,22 @@ +#ifndef __PSHAG_CTRANSITION_HPP__ +#define __PSHAG_CTRANSITION_HPP__ + +#include "IOStreams.hpp" +#include "CMetaTransFactory.hpp" + +namespace urde +{ + +class CTransition +{ + u32 x0_id; + u32 x4_animA; + u32 x8_animB; + std::unique_ptr xc_trans; +public: + CTransition(CInputStream& in); +}; + +} + +#endif // __PSHAG_CTRANSITION_HPP__ diff --git a/Runtime/Character/IAnimReader.cpp b/Runtime/Character/IAnimReader.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Runtime/Character/IAnimReader.hpp b/Runtime/Character/IAnimReader.hpp new file mode 100644 index 000000000..40d37b747 --- /dev/null +++ b/Runtime/Character/IAnimReader.hpp @@ -0,0 +1,13 @@ +#ifndef __PSHAG_IANIMREADER_HPP__ +#define __PSHAG_IANIMREADER_HPP__ + +namespace urde +{ + +class IAnimReader +{ +}; + +} + +#endif // __PSHAG_IANIMREADER_HPP__ diff --git a/Runtime/Character/IMetaAnim.hpp b/Runtime/Character/IMetaAnim.hpp index 14c4fec1c..786da89c8 100644 --- a/Runtime/Character/IMetaAnim.hpp +++ b/Runtime/Character/IMetaAnim.hpp @@ -2,12 +2,34 @@ #define __PSHAG_IMETAANIM_HPP__ #include "../RetroTypes.hpp" +#include namespace urde { +class CAnimTreeNode; +class CAnimSysContext; +class CMetaAnimTreeBuildOrders; +class CPrimitive; + +enum class EMetaAnimType +{ + Primitive, + Blend, + PhaseBlend, + Random, + Sequence +}; class IMetaAnim { +public: + virtual ~IMetaAnim() = default; + virtual std::shared_ptr GetAnimationTree(const CAnimSysContext& animSys, + const CMetaAnimTreeBuildOrders& orders) const=0; + virtual void GetUniquePrimitives(std::set& primsOut) const=0; + virtual EMetaAnimType GetType() const=0; + virtual std::shared_ptr VGetAnimationTree(const CAnimSysContext& animSys, + const CMetaAnimTreeBuildOrders& orders) const=0; }; } diff --git a/Runtime/Character/IMetaTrans.hpp b/Runtime/Character/IMetaTrans.hpp index ca57f050f..953347808 100644 --- a/Runtime/Character/IMetaTrans.hpp +++ b/Runtime/Character/IMetaTrans.hpp @@ -5,9 +5,25 @@ namespace urde { +class CAnimTreeNode; +class CAnimSysContext; + +enum class EMetaTransType +{ + MetaAnim, + Trans, + PhaseTrans, + Snap, +}; class IMetaTrans { +public: + virtual ~IMetaTrans() = default; + virtual std::shared_ptr VGetTransitionTree(const std::weak_ptr& a, + const std::weak_ptr& b, + const CAnimSysContext& animSys) const=0; + virtual EMetaTransType GetType() const=0; }; }