CPhazonPool: Initial structure

This commit is contained in:
Luke Street 2020-04-03 04:39:29 -04:00
parent 80b383b68f
commit c9f96d47d2
4 changed files with 73 additions and 5 deletions

View File

@ -30,6 +30,7 @@ set(MP1_WORLD_SOURCES
COmegaPirate.hpp COmegaPirate.cpp COmegaPirate.hpp COmegaPirate.cpp
CParasite.hpp CParasite.cpp CParasite.hpp CParasite.cpp
CPhazonHealingNodule.hpp CPhazonHealingNodule.cpp CPhazonHealingNodule.hpp CPhazonHealingNodule.cpp
CPhazonPool.hpp CPhazonPool.cpp
CPuddleSpore.hpp CPuddleSpore.cpp CPuddleSpore.hpp CPuddleSpore.cpp
CPuddleToadGamma.hpp CPuddleToadGamma.cpp CPuddleToadGamma.hpp CPuddleToadGamma.cpp
CPuffer.hpp CPuffer.cpp CPuffer.hpp CPuffer.cpp

View File

@ -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

View File

@ -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<CModelData> x168_;
std::unique_ptr<CModelData> x16c_;
std::unique_ptr<CElementGen> x170_;
std::unique_ptr<CElementGen> 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

View File

@ -34,6 +34,7 @@
#include "Runtime/MP1/World/COmegaPirate.hpp" #include "Runtime/MP1/World/COmegaPirate.hpp"
#include "Runtime/MP1/World/CParasite.hpp" #include "Runtime/MP1/World/CParasite.hpp"
#include "Runtime/MP1/World/CPhazonHealingNodule.hpp" #include "Runtime/MP1/World/CPhazonHealingNodule.hpp"
#include "Runtime/MP1/World/CPhazonPool.hpp"
#include "Runtime/MP1/World/CPuddleSpore.hpp" #include "Runtime/MP1/World/CPuddleSpore.hpp"
#include "Runtime/MP1/World/CPuddleToadGamma.hpp" #include "Runtime/MP1/World/CPuddleToadGamma.hpp"
#include "Runtime/MP1/World/CPuffer.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) { CEntity* ScriptLoader::LoadPhazonPool(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info) {
if (!EnsurePropertyCount(propCount, 9, "PhazonHealingNodule")) { if (!EnsurePropertyCount(propCount, 18, "PhazonPool")) {
return nullptr; return nullptr;
} }
SScaledActorHead actHead = LoadScaledActorHead(in, mgr); SScaledActorHead actHead = LoadScaledActorHead(in, mgr);
auto pair = CPatternedInfo::HasCorrectParameterCount(in); bool active = in.readBool();
if (!pair.first) { CAssetId w1{in};
return nullptr; 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<ETriggerFlags>(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, CEntity* ScriptLoader::LoadPhazonHealingNodule(CStateManager& mgr, CInputStream& in, int propCount,