2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 05:07:43 +00:00

New code style refactor

This commit is contained in:
Jack Andersen
2018-12-07 19:30:43 -10:00
parent 41ae32be31
commit 636c82a568
1451 changed files with 171430 additions and 203303 deletions

View File

@@ -5,29 +5,27 @@
#include "CMetaAnimRandom.hpp"
#include "CMetaAnimSequence.hpp"
namespace urde
{
namespace urde {
std::shared_ptr<IMetaAnim> CMetaAnimFactory::CreateMetaAnim(CInputStream& in)
{
EMetaAnimType type = EMetaAnimType(in.readUint32Big());
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;
}
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 {};
return {};
}
}
} // namespace urde