2020-01-15 12:07:48 +00:00
|
|
|
#include "Runtime/Character/CMetaTransFactory.hpp"
|
|
|
|
|
|
|
|
#include "Runtime/Character/CMetaTransMetaAnim.hpp"
|
|
|
|
#include "Runtime/Character/CMetaTransPhaseTrans.hpp"
|
|
|
|
#include "Runtime/Character/CMetaTransSnap.hpp"
|
|
|
|
#include "Runtime/Character/CMetaTransTrans.hpp"
|
2016-04-10 21:22:59 +00:00
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
namespace metaforce {
|
2016-04-10 21:22:59 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
std::shared_ptr<IMetaTrans> CMetaTransFactory::CreateMetaTrans(CInputStream& in) {
|
2022-02-18 07:37:54 +00:00
|
|
|
EMetaTransType type = EMetaTransType(in.ReadLong());
|
2016-04-10 21:22:59 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
switch (type) {
|
|
|
|
case EMetaTransType::MetaAnim:
|
|
|
|
return std::make_shared<CMetaTransMetaAnim>(in);
|
|
|
|
case EMetaTransType::Trans:
|
|
|
|
return std::make_shared<CMetaTransTrans>(in);
|
|
|
|
case EMetaTransType::PhaseTrans:
|
|
|
|
return std::make_shared<CMetaTransPhaseTrans>(in);
|
|
|
|
case EMetaTransType::Snap:
|
|
|
|
return std::make_shared<CMetaTransSnap>();
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2016-04-10 21:22:59 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
return {};
|
2016-04-10 21:22:59 +00:00
|
|
|
}
|
2021-04-10 08:42:06 +00:00
|
|
|
} // namespace metaforce
|