mirror of https://github.com/AxioDL/metaforce.git
CPhazonHealingNodule: Create class
This commit is contained in:
parent
93751972ac
commit
0bef9104b5
|
@ -29,6 +29,7 @@ set(MP1_WORLD_SOURCES
|
||||||
CNewIntroBoss.hpp CNewIntroBoss.cpp
|
CNewIntroBoss.hpp CNewIntroBoss.cpp
|
||||||
COmegaPirate.hpp COmegaPirate.cpp
|
COmegaPirate.hpp COmegaPirate.cpp
|
||||||
CParasite.hpp CParasite.cpp
|
CParasite.hpp CParasite.cpp
|
||||||
|
CPhazonHealingNodule.hpp CPhazonHealingNodule.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
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
#include "Runtime/MP1/World/CPhazonHealingNodule.hpp"
|
||||||
|
|
||||||
|
#include "Runtime/CSimplePool.hpp"
|
||||||
|
#include "Runtime/GameGlobalObjects.hpp"
|
||||||
|
#include "Runtime/World/CPatternedInfo.hpp"
|
||||||
|
|
||||||
|
namespace urde::MP1 {
|
||||||
|
CPhazonHealingNodule::CPhazonHealingNodule(TUniqueId uid, std::string_view name, const CEntityInfo& info,
|
||||||
|
const zeus::CTransform& xf, CModelData&& mData,
|
||||||
|
const CActorParameters& actParams, const CPatternedInfo& pInfo,
|
||||||
|
CAssetId particleDescId, std::string str)
|
||||||
|
: CPatterned(ECharacter::PhazonHealingNodule, uid, name, EFlavorType::Zero, info, xf, std::move(mData), pInfo,
|
||||||
|
EMovementType::Flyer, EColliderType::One, EBodyType::Restricted, actParams, EKnockBackVariant::Medium)
|
||||||
|
, x570_(g_SimplePool->GetObj(SObjectTag{SBIG('ELSC'), particleDescId}))
|
||||||
|
, x580_(pInfo.GetHealthInfo())
|
||||||
|
, x58c_(std::move(str)) {
|
||||||
|
const CMaterialFilter& filter = GetMaterialFilter();
|
||||||
|
CMaterialList include = filter.GetIncludeList();
|
||||||
|
CMaterialList exclude = filter.GetExcludeList();
|
||||||
|
exclude.Add(EMaterialTypes::Character);
|
||||||
|
SetMaterialFilter(CMaterialFilter::MakeIncludeExclude(include, exclude));
|
||||||
|
}
|
||||||
|
} // namespace urde::MP1
|
|
@ -0,0 +1,24 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Runtime/World/CPatterned.hpp"
|
||||||
|
#include "Runtime/Particle/CParticleElectric.hpp"
|
||||||
|
|
||||||
|
namespace urde::MP1 {
|
||||||
|
class CPhazonHealingNodule : public CPatterned {
|
||||||
|
private:
|
||||||
|
int x568_ = 0;
|
||||||
|
u8 x56c_ = 0;
|
||||||
|
TUniqueId x56e_ = kInvalidUniqueId;
|
||||||
|
TCachedToken<CElectricDescription> x570_;
|
||||||
|
std::unique_ptr<CParticleElectric> x57c_; // was rstl::rc_ptr
|
||||||
|
CHealthInfo x580_;
|
||||||
|
int x588_ = 0; // not init in ctr
|
||||||
|
std::string x58c_;
|
||||||
|
// u32 x59c_;
|
||||||
|
|
||||||
|
public:
|
||||||
|
CPhazonHealingNodule(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
|
||||||
|
CModelData&& mData, const CActorParameters& actParams, const CPatternedInfo& pInfo,
|
||||||
|
CAssetId particleDescId, std::string str);
|
||||||
|
};
|
||||||
|
} // namespace urde::MP1
|
|
@ -10,7 +10,9 @@
|
||||||
#include "Runtime/CToken.hpp"
|
#include "Runtime/CToken.hpp"
|
||||||
#include "Runtime/rstl.hpp"
|
#include "Runtime/rstl.hpp"
|
||||||
#include "Runtime/Graphics/CLineRenderer.hpp"
|
#include "Runtime/Graphics/CLineRenderer.hpp"
|
||||||
|
#include "Runtime/Particle/CElementGen.hpp"
|
||||||
#include "Runtime/Particle/CParticleGen.hpp"
|
#include "Runtime/Particle/CParticleGen.hpp"
|
||||||
|
#include "Runtime/Particle/CParticleSwoosh.hpp"
|
||||||
|
|
||||||
#include <zeus/CAABox.hpp>
|
#include <zeus/CAABox.hpp>
|
||||||
#include <zeus/CColor.hpp>
|
#include <zeus/CColor.hpp>
|
||||||
|
@ -19,8 +21,6 @@
|
||||||
|
|
||||||
namespace urde {
|
namespace urde {
|
||||||
class CElectricDescription;
|
class CElectricDescription;
|
||||||
class CElementGen;
|
|
||||||
class CParticleSwoosh;
|
|
||||||
|
|
||||||
class CParticleElectric : public CParticleGen {
|
class CParticleElectric : public CParticleGen {
|
||||||
static u16 g_GlobalSeed;
|
static u16 g_GlobalSeed;
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include "Runtime/MP1/World/CNewIntroBoss.hpp"
|
#include "Runtime/MP1/World/CNewIntroBoss.hpp"
|
||||||
#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/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"
|
||||||
|
@ -3672,7 +3673,32 @@ CEntity* ScriptLoader::LoadPhazonPool(CStateManager& mgr, CInputStream& in, int
|
||||||
|
|
||||||
CEntity* ScriptLoader::LoadPhazonHealingNodule(CStateManager& mgr, CInputStream& in, int propCount,
|
CEntity* ScriptLoader::LoadPhazonHealingNodule(CStateManager& mgr, CInputStream& in, int propCount,
|
||||||
const CEntityInfo& info) {
|
const CEntityInfo& info) {
|
||||||
return nullptr;
|
if (!EnsurePropertyCount(propCount, 9, "PhazonHealingNodule")) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
SScaledActorHead actHead = LoadScaledActorHead(in, mgr);
|
||||||
|
auto pair = CPatternedInfo::HasCorrectParameterCount(in);
|
||||||
|
if (!pair.first) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
CPatternedInfo pInfo(in, pair.second);
|
||||||
|
CActorParameters actParms = LoadActorParameters(in);
|
||||||
|
|
||||||
|
in.readBool();
|
||||||
|
CAssetId w1{in};
|
||||||
|
std::string w2 = in.readString();
|
||||||
|
|
||||||
|
if (!pInfo.GetAnimationParameters().GetACSFile().IsValid()) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
CModelData mData(CAnimRes(pInfo.GetAnimationParameters().GetACSFile(), pInfo.GetAnimationParameters().GetCharacter(),
|
||||||
|
actHead.x40_scale, pInfo.GetAnimationParameters().GetInitialAnimation(), true));
|
||||||
|
|
||||||
|
return new MP1::CPhazonHealingNodule(mgr.AllocateUniqueId(), actHead.x0_name, info, actHead.x10_transform,
|
||||||
|
std::move(mData), actParms, pInfo, w1, std::move(w2));
|
||||||
}
|
}
|
||||||
|
|
||||||
CEntity* ScriptLoader::LoadNewCameraShaker(CStateManager& mgr, CInputStream& in, int propCount,
|
CEntity* ScriptLoader::LoadNewCameraShaker(CStateManager& mgr, CInputStream& in, int propCount,
|
||||||
|
|
Loading…
Reference in New Issue