diff --git a/Runtime/MP1/World/CMakeLists.txt b/Runtime/MP1/World/CMakeLists.txt index 661dcaedf..f48042339 100644 --- a/Runtime/MP1/World/CMakeLists.txt +++ b/Runtime/MP1/World/CMakeLists.txt @@ -30,6 +30,7 @@ set(MP1_WORLD_SOURCES COmegaPirate.hpp COmegaPirate.cpp CParasite.hpp CParasite.cpp CPhazonHealingNodule.hpp CPhazonHealingNodule.cpp + CPhazonPool.hpp CPhazonPool.cpp CPuddleSpore.hpp CPuddleSpore.cpp CPuddleToadGamma.hpp CPuddleToadGamma.cpp CPuffer.hpp CPuffer.cpp diff --git a/Runtime/MP1/World/CPhazonPool.cpp b/Runtime/MP1/World/CPhazonPool.cpp new file mode 100644 index 000000000..fd1c4954f --- /dev/null +++ b/Runtime/MP1/World/CPhazonPool.cpp @@ -0,0 +1,10 @@ +#include "Runtime/MP1/World/CPhazonPool.hpp" + +namespace urde::MP1 { +CPhazonPool::CPhazonPool(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf, + const zeus::CVector3f& scale, bool active, CAssetId w1, CAssetId w2, CAssetId w3, CAssetId w4, + u32 p11, const CDamageInfo& dInfo, const zeus::CVector3f& orientedForce, + ETriggerFlags triggerFlags, bool p15, float p16, float p17, float p18, float p19) +: CScriptTrigger(uid, name, info, xf.origin, zeus::skNullBox, dInfo, orientedForce, triggerFlags, active, false, + false) {} +} // namespace urde::MP1 diff --git a/Runtime/MP1/World/CPhazonPool.hpp b/Runtime/MP1/World/CPhazonPool.hpp new file mode 100644 index 000000000..f00f828d7 --- /dev/null +++ b/Runtime/MP1/World/CPhazonPool.hpp @@ -0,0 +1,42 @@ +#pragma once + +#include "Runtime/World/CScriptTrigger.hpp" + +#include "Runtime/Particle/CElementGen.hpp" + +namespace urde::MP1 { +class CPhazonPool : public CScriptTrigger { +private: + u32 x164_; + std::unique_ptr x168_; + std::unique_ptr x16c_; + std::unique_ptr x170_; + std::unique_ptr x174_; + zeus::CAABox x178_; + zeus::CVector3f x190_; + float x19c_; + float x1a0_; + float x1a4_; + float x1a8_; + float x1ac_; + float x1b0_; + float x1b4_; + float x1b8_; + float x1bc_; + float x1c0_; + float x1c4_; + float x1c8_; + float x1cc_; + float x1d0_; + float x1d4_; + u32 x1d8_; + u32 x1dc_; + bool x1e0_24_ : 1; + +public: + CPhazonPool(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf, + const zeus::CVector3f& scale, bool active, CAssetId w1, CAssetId w2, CAssetId w3, CAssetId w4, u32 p11, + const CDamageInfo& dInfo, const zeus::CVector3f& orientedForce, ETriggerFlags triggerFlags, bool p15, + float p16, float p17, float p18, float p19); +}; +} // namespace urde::MP1 diff --git a/Runtime/World/ScriptLoader.cpp b/Runtime/World/ScriptLoader.cpp index ffeea0634..41ff3a2d3 100644 --- a/Runtime/World/ScriptLoader.cpp +++ b/Runtime/World/ScriptLoader.cpp @@ -34,6 +34,7 @@ #include "Runtime/MP1/World/COmegaPirate.hpp" #include "Runtime/MP1/World/CParasite.hpp" #include "Runtime/MP1/World/CPhazonHealingNodule.hpp" +#include "Runtime/MP1/World/CPhazonPool.hpp" #include "Runtime/MP1/World/CPuddleSpore.hpp" #include "Runtime/MP1/World/CPuddleToadGamma.hpp" #include "Runtime/MP1/World/CPuffer.hpp" @@ -3668,15 +3669,29 @@ CEntity* ScriptLoader::LoadOmegaPirate(CStateManager& mgr, CInputStream& in, int } CEntity* ScriptLoader::LoadPhazonPool(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info) { - if (!EnsurePropertyCount(propCount, 9, "PhazonHealingNodule")) { + if (!EnsurePropertyCount(propCount, 18, "PhazonPool")) { return nullptr; } SScaledActorHead actHead = LoadScaledActorHead(in, mgr); - auto pair = CPatternedInfo::HasCorrectParameterCount(in); - if (!pair.first) { - return nullptr; - } + bool active = in.readBool(); + CAssetId w1{in}; + CAssetId w2{in}; + CAssetId w3{in}; + CAssetId w4{in}; + u32 u1 = in.readUint32Big(); + CDamageInfo dInfo{in}; + zeus::CVector3f orientedForce{in.readVec3f()}; + ETriggerFlags triggerFlags = static_cast(in.readUint32Big()); + float f1 = in.readFloatBig(); + float f2 = in.readFloatBig(); + float f3 = in.readFloatBig(); + bool b2 = in.readBool(); + float f4 = in.readFloatBig(); + + return new MP1::CPhazonPool(mgr.AllocateUniqueId(), actHead.x0_name, info, + zeus::CTransform::Translate(actHead.x10_transform.origin), actHead.x40_scale, active, w1, + w2, w3, w4, u1, dInfo, orientedForce, triggerFlags, b2, f1, f2, f3, f4); } CEntity* ScriptLoader::LoadPhazonHealingNodule(CStateManager& mgr, CInputStream& in, int propCount,