2020-01-15 04:07:48 -08:00
|
|
|
#include "Runtime/Character/CMetaAnimFactory.hpp"
|
|
|
|
|
|
|
|
#include "Runtime/Character/CMetaAnimBlend.hpp"
|
|
|
|
#include "Runtime/Character/CMetaAnimPhaseBlend.hpp"
|
|
|
|
#include "Runtime/Character/CMetaAnimPlay.hpp"
|
|
|
|
#include "Runtime/Character/CMetaAnimRandom.hpp"
|
|
|
|
#include "Runtime/Character/CMetaAnimSequence.hpp"
|
2016-04-10 14:22:59 -07:00
|
|
|
|
2021-04-10 01:42:06 -07:00
|
|
|
namespace metaforce {
|
2016-04-10 14:22:59 -07:00
|
|
|
|
2018-12-07 21:30:43 -08:00
|
|
|
std::shared_ptr<IMetaAnim> CMetaAnimFactory::CreateMetaAnim(CInputStream& in) {
|
2022-02-17 23:37:54 -08:00
|
|
|
EMetaAnimType type = EMetaAnimType(in.ReadLong());
|
2016-04-10 14:22:59 -07:00
|
|
|
|
2018-12-07 21:30:43 -08:00
|
|
|
switch (type) {
|
|
|
|
case EMetaAnimType::Play:
|
|
|
|
return std::make_shared<CMetaAnimPlay>(in);
|
|
|
|
case EMetaAnimType::Blend:
|
|
|
|
return std::make_shared<CMetaAnimBlend>(in);
|
|
|
|
case EMetaAnimType::PhaseBlend:
|
|
|
|
return std::make_shared<CMetaAnimPhaseBlend>(in);
|
|
|
|
case EMetaAnimType::Random:
|
|
|
|
return std::make_shared<CMetaAnimRandom>(in);
|
|
|
|
case EMetaAnimType::Sequence:
|
|
|
|
return std::make_shared<CMetaAnimSequence>(in);
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2016-04-10 14:22:59 -07:00
|
|
|
|
2018-12-07 21:30:43 -08:00
|
|
|
return {};
|
2016-04-10 14:22:59 -07:00
|
|
|
}
|
|
|
|
|
2021-04-10 01:42:06 -07:00
|
|
|
} // namespace metaforce
|