metaforce/Runtime/Character/CPASParmInfo.cpp

41 lines
1.0 KiB
C++
Raw Normal View History

2016-04-10 04:49:02 +00:00
#include "CPASParmInfo.hpp"
namespace urde
{
CPASParmInfo::CPASParmInfo(CInputStream& in)
{
2016-08-21 05:47:47 +00:00
xc_min.m_int = 0;
x10_max.m_int = 0;
2016-04-10 04:49:02 +00:00
x0_type = CPASAnimParm::EParmType(in.readUint32Big());
2016-08-21 05:47:47 +00:00
x4_weightFunction = EWeightFunction(in.readUint32Big());
x8_weight = in.readFloatBig();
2016-04-10 04:49:02 +00:00
switch (x0_type)
{
case CPASAnimParm::EParmType::Int32:
2016-08-21 05:47:47 +00:00
xc_min.m_int = in.readInt32Big();
x10_max.m_int = in.readInt32Big();
2016-04-10 04:49:02 +00:00
break;
case CPASAnimParm::EParmType::UInt32:
2016-08-21 05:47:47 +00:00
xc_min.m_uint = in.readUint32Big();
x10_max.m_uint = in.readUint32Big();
2016-04-10 04:49:02 +00:00
break;
case CPASAnimParm::EParmType::Float:
2016-08-21 05:47:47 +00:00
xc_min.m_float = in.readFloatBig();
x10_max.m_float = in.readFloatBig();
2016-04-10 04:49:02 +00:00
break;
case CPASAnimParm::EParmType::Bool:
2016-08-21 05:47:47 +00:00
xc_min.m_bool = in.readBool();
x10_max.m_bool = in.readBool();
2016-04-10 04:49:02 +00:00
break;
case CPASAnimParm::EParmType::Enum:
2016-08-21 05:47:47 +00:00
xc_min.m_int = in.readInt32Big();
x10_max.m_int = in.readInt32Big();
2016-04-10 04:49:02 +00:00
break;
default: break;
}
}
}