2016-04-25 05:03:38 +00:00
|
|
|
#include "CPatternedInfo.hpp"
|
|
|
|
#include "Audio/CSfxManager.hpp"
|
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
|
|
|
|
CPatternedInfo::CPatternedInfo(CInputStream& in, u32 pcount)
|
2016-12-19 18:27:58 +00:00
|
|
|
: 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)
|
2016-12-19 18:27:58 +00:00
|
|
|
, 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())
|
2016-12-19 18:27:58 +00:00
|
|
|
, 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())
|
2016-12-19 18:27:58 +00:00
|
|
|
, x108_(in.readFloatBig())
|
|
|
|
, x10c_particle1Frames(in.readUint32Big())
|
|
|
|
, x110_particle1Scale(zeus::CVector3f::ReadBig(in))
|
2018-09-07 23:51:07 +00:00
|
|
|
, x11c_particle1(in)
|
|
|
|
, x120_electric(in)
|
2016-04-25 05:03:38 +00:00
|
|
|
{
|
|
|
|
if (pcount >= 36)
|
|
|
|
x124_particle2Scale.readBig(in);
|
|
|
|
if (pcount >= 37)
|
2018-09-07 23:51:07 +00:00
|
|
|
x130_particle2 = CAssetId(in);
|
2016-04-25 05:03:38 +00:00
|
|
|
if (pcount >= 38)
|
2016-09-02 15:26:29 +00:00
|
|
|
x134_iceShatterSfx = CSfxManager::TranslateSFXID(in.readUint32Big());
|
2016-04-25 05:03:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
std::pair<bool, u32> CPatternedInfo::HasCorrectParameterCount(CInputStream& in)
|
|
|
|
{
|
|
|
|
u32 pcount = in.readUint32Big();
|
2018-10-11 22:57:05 +00:00
|
|
|
return {(pcount >= 35 && pcount <= 38), pcount};
|
2016-04-25 05:03:38 +00:00
|
|
|
}
|
|
|
|
}
|