From 0d13bb1a4d8b7841b37fda08a13c2a3e3b3e53f2 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Thu, 8 Dec 2022 14:45:30 -0800 Subject: [PATCH] Match and link CAnimation Former-commit-id: b2bebb982d5921c74637b3430c6ab650182e9411 --- configure.py | 2 +- include/Kyoto/Animation/CAnimation.hpp | 2 ++ include/Kyoto/Animation/CMetaAnimFactory.hpp | 13 +++++++++++++ src/Kyoto/Animation/CAnimation.cpp | 10 ++++++++++ 4 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 include/Kyoto/Animation/CMetaAnimFactory.hpp create mode 100644 src/Kyoto/Animation/CAnimation.cpp diff --git a/configure.py b/configure.py index 809b564e..2f634d6e 100755 --- a/configure.py +++ b/configure.py @@ -473,7 +473,7 @@ LIBS = [ ["Kyoto/Basics/COsContextDolphin", True], ["Kyoto/Basics/CSWDataDolphin", True], ["Kyoto/Basics/RAssertDolphin", False], - "Kyoto/Animation/CAnimation", + ["Kyoto/Animation/CAnimation", True], "Kyoto/Animation/CAnimationManager", "Kyoto/Animation/CAnimationSet", "Kyoto/Animation/CAnimCharacterSet", diff --git a/include/Kyoto/Animation/CAnimation.hpp b/include/Kyoto/Animation/CAnimation.hpp index eeb755f5..7e37cff6 100644 --- a/include/Kyoto/Animation/CAnimation.hpp +++ b/include/Kyoto/Animation/CAnimation.hpp @@ -5,9 +5,11 @@ #include "rstl/string.hpp" class IMetaAnim; +class CInputStream; class CAnimation { public: + CAnimation(CInputStream& in); const rstl::rc_ptr< IMetaAnim >& GetMetaAnim() const { return x10_anim; } private: diff --git a/include/Kyoto/Animation/CMetaAnimFactory.hpp b/include/Kyoto/Animation/CMetaAnimFactory.hpp new file mode 100644 index 00000000..a26daa93 --- /dev/null +++ b/include/Kyoto/Animation/CMetaAnimFactory.hpp @@ -0,0 +1,13 @@ +#ifndef _CMETAANIMFACTORY +#define _CMETAANIMFACTORY + +#include "rstl/rc_ptr.hpp" + +class IMetaAnim; +class CInputStream; +class CMetaAnimFactory { +public: + static rstl::rc_ptr< IMetaAnim > CreateMetaAnim(CInputStream& in); +}; + +#endif // _CMETAANIMFACTORY diff --git a/src/Kyoto/Animation/CAnimation.cpp b/src/Kyoto/Animation/CAnimation.cpp new file mode 100644 index 00000000..8446df92 --- /dev/null +++ b/src/Kyoto/Animation/CAnimation.cpp @@ -0,0 +1,10 @@ +#include "Kyoto/Animation/CAnimation.hpp" + +#include "Kyoto/Streams/CInputStream.hpp" +#include "Kyoto/Animation/CMetaAnimFactory.hpp" + +CAnimation::CAnimation(CInputStream& in) +: x0_name(in) +, x10_anim(CMetaAnimFactory::CreateMetaAnim(in)) { + +}