metaforce/Runtime/World/CPatternedInfo.cpp

56 lines
1.8 KiB
C++
Raw Normal View History

#include "Runtime/World/CPatternedInfo.hpp"
#include "Runtime/Audio/CSfxManager.hpp"
2016-04-25 05:03:38 +00:00
2018-12-08 05:30:43 +00:00
namespace urde {
2016-04-25 05:03:38 +00:00
CPatternedInfo::CPatternedInfo(CInputStream& in, u32 pcount)
: x0_mass(in.readFloatBig())
, x4_speed(in.readFloatBig())
, x8_turnSpeed(in.readFloatBig())
, xc_detectionRange(in.readFloatBig())
, x10_detectionHeightRange(in.readFloatBig())
, x14_dectectionAngle(in.readFloatBig())
, x18_minAttackRange(in.readFloatBig())
, x1c_maxAttackRange(in.readFloatBig())
, x20_averageAttackTime(in.readFloatBig())
, x24_attackTimeVariation(in.readFloatBig())
, x28_leashRadius(in.readFloatBig())
, x2c_playerLeashRadius(in.readFloatBig())
, x30_playerLeashTime(in.readFloatBig())
2018-09-14 00:49:34 +00:00
, x34_contactDamageInfo(in)
, x50_damageWaitTime(in.readFloatBig())
, x54_healthInfo(in)
, x5c_damageVulnerability(in)
, xc4_halfExtent(in.readFloatBig())
, xc8_height(in.readFloatBig())
, xcc_bodyOrigin(zeus::CVector3f::ReadBig(in))
, xd8_stepUpHeight(in.readFloatBig())
2018-02-14 07:51:18 +00:00
, xdc_xDamage(in.readFloatBig())
2018-11-11 03:27:54 +00:00
, xe0_frozenXDamage(in.readFloatBig())
, xe4_xDamageDelay(in.readFloatBig())
, xe8_deathSfx(CSfxManager::TranslateSFXID(in.readUint32Big()))
, xec_animParams(in)
, xf8_active(in.readBool())
, xfc_stateMachineId(in.readUint32Big())
2018-11-11 03:27:54 +00:00
, x100_intoFreezeDur(in.readFloatBig())
, x104_outofFreezeDur(in.readFloatBig())
, x108_(in.readFloatBig())
2018-11-24 08:09:35 +00:00
, x10c_pathfindingIndex(in.readUint32Big())
, x110_particle1Scale(zeus::CVector3f::ReadBig(in))
2018-09-07 23:51:07 +00:00
, x11c_particle1(in)
2018-12-08 05:30:43 +00:00
, x120_electric(in) {
if (pcount >= 36)
x124_particle2Scale.readBig(in);
if (pcount >= 37)
x130_particle2 = CAssetId(in);
if (pcount >= 38)
x134_iceShatterSfx = CSfxManager::TranslateSFXID(in.readUint32Big());
2016-04-25 05:03:38 +00:00
}
2018-12-08 05:30:43 +00:00
std::pair<bool, u32> CPatternedInfo::HasCorrectParameterCount(CInputStream& in) {
u32 pcount = in.readUint32Big();
return {(pcount >= 35 && pcount <= 38), pcount};
2016-04-25 05:03:38 +00:00
}
2018-12-08 05:30:43 +00:00
} // namespace urde