2020-01-15 12:07:48 +00:00
|
|
|
#include "Runtime/Character/CPASParmInfo.hpp"
|
2016-04-10 04:49:02 +00:00
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
namespace metaforce {
|
2016-04-10 04:49:02 +00:00
|
|
|
|
2022-02-18 07:37:54 +00:00
|
|
|
CPASParmInfo::CPASParmInfo(CInputStream& in)
|
|
|
|
: x0_type(CPASAnimParm::EParmType(in.ReadLong())), x4_weightFunction(EWeightFunction(in.ReadLong())) {
|
2018-12-08 05:30:43 +00:00
|
|
|
xc_min.m_int = 0;
|
|
|
|
x10_max.m_int = 0;
|
2022-02-18 07:37:54 +00:00
|
|
|
|
|
|
|
x8_weight = in.ReadFloat();
|
2016-04-10 04:49:02 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
switch (x0_type) {
|
|
|
|
case CPASAnimParm::EParmType::Int32:
|
2022-02-18 07:37:54 +00:00
|
|
|
xc_min.m_int = in.ReadInt32();
|
|
|
|
x10_max.m_int = in.ReadInt32();
|
2018-12-08 05:30:43 +00:00
|
|
|
break;
|
|
|
|
case CPASAnimParm::EParmType::UInt32:
|
2022-02-18 07:37:54 +00:00
|
|
|
xc_min.m_uint = in.ReadLong();
|
|
|
|
x10_max.m_uint = in.ReadLong();
|
2018-12-08 05:30:43 +00:00
|
|
|
break;
|
|
|
|
case CPASAnimParm::EParmType::Float:
|
2022-02-18 07:37:54 +00:00
|
|
|
xc_min.m_float = in.ReadFloat();
|
|
|
|
x10_max.m_float = in.ReadFloat();
|
2018-12-08 05:30:43 +00:00
|
|
|
break;
|
|
|
|
case CPASAnimParm::EParmType::Bool:
|
2022-02-18 07:37:54 +00:00
|
|
|
xc_min.m_bool = in.ReadBool();
|
|
|
|
x10_max.m_bool = in.ReadBool();
|
2018-12-08 05:30:43 +00:00
|
|
|
break;
|
|
|
|
case CPASAnimParm::EParmType::Enum:
|
2022-02-18 07:37:54 +00:00
|
|
|
xc_min.m_int = in.ReadInt32();
|
|
|
|
x10_max.m_int = in.ReadInt32();
|
2018-12-08 05:30:43 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2016-04-10 04:49:02 +00:00
|
|
|
}
|
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
} // namespace metaforce
|