mirror of https://github.com/AxioDL/metaforce.git
Implement CSnakeWeedSwarm loader
This commit is contained in:
parent
bc9d225c89
commit
e116d887c7
|
@ -88,7 +88,7 @@ set(WORLD_SOURCES
|
|||
CScriptGunTurret.hpp CScriptGunTurret.cpp
|
||||
CScriptCameraPitchVolume.hpp CScriptCameraPitchVolume.cpp
|
||||
CTeamAiMgr.hpp CTeamAiMgr.cpp
|
||||
CSnakeWeedSwarm.hpp
|
||||
CSnakeWeedSwarm.hpp CSnakeWeedSwarm.cpp
|
||||
CScriptSpindleCamera.hpp CScriptSpindleCamera.cpp
|
||||
CScriptCameraHintTrigger.hpp CScriptCameraHintTrigger.cpp
|
||||
CAmbientAI.hpp CAmbientAI.cpp
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
#include "CSnakeWeedSwarm.hpp"
|
||||
#include "CAnimationParameters.hpp"
|
||||
#include "TCastTo.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
|
||||
|
||||
CSnakeWeedSwarm::CSnakeWeedSwarm(TUniqueId uid, bool active, std::string_view name, const CEntityInfo& info,
|
||||
const zeus::CVector3f& pos, const zeus::CVector3f& scale,
|
||||
const CAnimationParameters& animParms, const CActorParameters& actParms,
|
||||
float f1, float f2, float f3, float f4, float f5, float f6, float f7,
|
||||
float f8, float f9, float f10, float f11, float f12, float f13, float f14,
|
||||
const CDamageInfo&, float /*f15*/, u32 w1, u32 w2, u32 w3, u32 w4, u32 w5,
|
||||
u32 w6, float f16)
|
||||
: CActor(uid, active, name, info, zeus::CTransform::Translate(pos),
|
||||
CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::Trigger, EMaterialTypes::NonSolidDamageable), actParms, kInvalidUniqueId)
|
||||
{
|
||||
}
|
||||
|
||||
void CSnakeWeedSwarm::Accept(urde::IVisitor& visitor)
|
||||
{
|
||||
visitor.Visit(this);
|
||||
}
|
||||
|
||||
}
|
|
@ -6,9 +6,16 @@
|
|||
|
||||
namespace urde
|
||||
{
|
||||
class CAnimationParameters;
|
||||
class CSnakeWeedSwarm : public CActor
|
||||
{
|
||||
public:
|
||||
CSnakeWeedSwarm(TUniqueId, bool, std::string_view, const CEntityInfo&, const zeus::CVector3f&, const zeus::CVector3f&,
|
||||
const CAnimationParameters&, const CActorParameters&, float, float, float, float, float, float, float,
|
||||
float, float, float, float, float, float, float, const CDamageInfo&, float, u32, u32, u32, u32, u32,
|
||||
u32, float);
|
||||
|
||||
void Accept(IVisitor&);
|
||||
void ApplyRadiusDamage(const zeus::CVector3f& pos, const CDamageInfo& info,
|
||||
CStateManager& stateMgr) {}
|
||||
};
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "CAmbientAI.hpp"
|
||||
#include "CScriptCameraPitchVolume.hpp"
|
||||
#include "CTeamAiMgr.hpp"
|
||||
#include "CSnakeWeedSwarm.hpp"
|
||||
#include "CScriptCameraShaker.hpp"
|
||||
#include "CScriptCameraWaypoint.hpp"
|
||||
#include "CScriptColorModulate.hpp"
|
||||
|
@ -2468,7 +2469,42 @@ CEntity* ScriptLoader::LoadTeamAIMgr(CStateManager& mgr, CInputStream& in, int p
|
|||
|
||||
CEntity* ScriptLoader::LoadSnakeWeedSwarm(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info)
|
||||
{
|
||||
if (!EnsurePropertyCount(propCount, 25, "SnakeWeedSwarm") || propCount > 29)
|
||||
return nullptr;
|
||||
|
||||
std::string name = mgr.HashInstanceName(in);
|
||||
zeus::CVector3f pos = zeus::CVector3f::ReadBig(in);
|
||||
zeus::CVector3f scale = zeus::CVector3f::ReadBig(in);
|
||||
bool active = in.readBool();
|
||||
CAnimationParameters animParms = LoadAnimationParameters(in);
|
||||
CActorParameters actParms = LoadActorParameters(in);
|
||||
float f1 = in.readFloatBig();
|
||||
float f2 = in.readFloatBig();
|
||||
float f3 = in.readFloatBig();
|
||||
float f4 = in.readFloatBig();
|
||||
float f5 = in.readFloatBig();
|
||||
float f6 = in.readFloatBig();
|
||||
float f7 = in.readFloatBig();
|
||||
float f8 = in.readFloatBig();
|
||||
float f9 = in.readFloatBig();
|
||||
float f10 = in.readFloatBig();
|
||||
float f11 = in.readFloatBig();
|
||||
float f12 = in.readFloatBig();
|
||||
float f13 = in.readFloatBig();
|
||||
float f14 = in.readFloatBig();
|
||||
CDamageInfo dInfo(in);
|
||||
float f15 = in.readFloatBig();
|
||||
u32 w4 = in.readUint32Big();
|
||||
u32 w5 = in.readUint32Big();
|
||||
u32 w6 = in.readUint32Big();
|
||||
u32 w7 = (propCount < 29 ? -1 : in.readUint32Big());
|
||||
u32 w8 = (propCount < 29 ? -1 : in.readUint32Big());
|
||||
u32 w9 = (propCount < 29 ? -1 : in.readUint32Big());
|
||||
u32 f16 = (propCount < 29 ? 0.f : in.readFloatBig());
|
||||
|
||||
return new CSnakeWeedSwarm(mgr.AllocateUniqueId(), active, name, info, pos, scale, animParms,
|
||||
actParms, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
|
||||
f14, dInfo, f15, w4, w5, w6, w7, w8, w9, f16);
|
||||
}
|
||||
|
||||
CEntity* ScriptLoader::LoadActorContraption(CStateManager& mgr, CInputStream& in, int propCount,
|
||||
|
@ -2515,6 +2551,17 @@ CEntity* ScriptLoader::LoadOculus(CStateManager& mgr, CInputStream& in, int prop
|
|||
|
||||
CEntity* ScriptLoader::LoadGeemer(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info)
|
||||
{
|
||||
if (!EnsurePropertyCount(propCount, 16, "Geemer"))
|
||||
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);
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue