2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-05-13 23:11:20 +00:00
metaforce/Runtime/Character/CMetaAnimFactory.cpp
Lioncash 1cb289f243 RuntimeCommon: Normalize cpp inclusions
Normalizes the headers for the cpp files in the RuntimeCommon target.
Now all headers and source files within the RuntimeCommon/RuntimeCommonB
targets are normalized and consistent with one another.
2020-01-15 09:15:47 -05:00

33 lines
944 B
C++

#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"
namespace urde {
std::shared_ptr<IMetaAnim> CMetaAnimFactory::CreateMetaAnim(CInputStream& in) {
EMetaAnimType type = EMetaAnimType(in.readUint32Big());
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;
}
return {};
}
} // namespace urde