2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 23:07:42 +00:00

More CThardus imps, add reference CTevPass imps

This commit is contained in:
2020-02-29 17:11:41 -08:00
parent 617844efce
commit 9f5f0abab4
9 changed files with 480 additions and 68 deletions

View File

@@ -41,6 +41,7 @@
#include "Runtime/MP1/World/CSpacePirate.hpp"
#include "Runtime/MP1/World/CSpankWeed.hpp"
#include "Runtime/MP1/World/CThardus.hpp"
#include "Runtime/MP1/World/CThardusRockProjectile.hpp"
#include "Runtime/MP1/World/CTryclops.hpp"
#include "Runtime/MP1/World/CWarWasp.hpp"
#include "Runtime/Particle/CWeaponDescription.hpp"
@@ -2738,7 +2739,31 @@ CEntity* ScriptLoader::LoadColorModulate(CStateManager& mgr, CInputStream& in, i
CEntity* ScriptLoader::LoadThardusRockProjectile(CStateManager& mgr, CInputStream& in, int propCount,
const CEntityInfo& info) {
return nullptr;
if (!EnsurePropertyCount(propCount, 3, "ThardusRockProjectile"))
return nullptr;
SScaledActorHead actorHead = LoadScaledActorHead(in, mgr);
auto [pInfoValid, pInfoCount] = CPatternedInfo::HasCorrectParameterCount(in);
if (!pInfoValid)
return nullptr;
CPatternedInfo pInfo(in, pInfoCount);
CActorParameters actParms = LoadActorParameters(in);
in.readBool();
in.readBool();
float f1 = in.readFloatBig();
CAssetId modelId(in);
CAssetId stateMachine(in);
if (!pInfo.GetAnimationParameters().GetACSFile().IsValid())
return nullptr;
std::vector<std::unique_ptr<CModelData>> mDataVec;
CModelData mData(CAnimRes(pInfo.GetAnimationParameters().GetACSFile(), 0, actorHead.x40_scale,
pInfo.GetAnimationParameters().GetInitialAnimation(), true));
mDataVec.reserve(3);
mDataVec.emplace_back(std::make_unique<CModelData>(CStaticRes(modelId, zeus::skOne3f)));
return new MP1::CThardusRockProjectile(mgr.AllocateUniqueId(), actorHead.x0_name, info, actorHead.x10_transform,
std::move(mData), actParms, pInfo, std::move(mDataVec), stateMachine, f1);
}
CEntity* ScriptLoader::LoadMidi(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info) {