mirror of https://github.com/AxioDL/metaforce.git
Update boo, fixes and initial imps
This commit is contained in:
parent
41edf5a226
commit
c6fdd8297e
|
@ -97,6 +97,20 @@ CAnimData::CAnimData(CAssetId id,
|
|||
x1f8_animRoot = treeNode;
|
||||
}
|
||||
|
||||
void CAnimData::InitializeEffects(CStateManager& mgr, TAreaId aId, const zeus::CVector3f& scale)
|
||||
{
|
||||
for (const auto& effects : xc_charInfo.GetEffectList())
|
||||
{
|
||||
for (const auto& effect : effects.second)
|
||||
{
|
||||
x120_particleDB.CacheParticleDesc(effect.GetParticleTag());
|
||||
x120_particleDB.AddParticleEffect(effect.GetSegmentName(), effect.GetFlags(), CParticleData(), scale, mgr,
|
||||
aId, true, x21c_particleLightIdx);
|
||||
x120_particleDB.SetParticleEffectState(effect.GetComponentName(), false, mgr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CAssetId CAnimData::GetEventResourceIdForAnimResourceId(CAssetId id) const
|
||||
{
|
||||
return x0_charFactory->GetEventResourceIdForAnimResourceId(id);
|
||||
|
|
|
@ -165,6 +165,7 @@ public:
|
|||
const TLockedToken<CCharacterFactory>& charFactory,
|
||||
int drawInstCount);
|
||||
|
||||
void InitializeEffects(CStateManager&, TAreaId, const zeus::CVector3f&);
|
||||
CAssetId GetEventResourceIdForAnimResourceId(CAssetId) const;
|
||||
void AddAdditiveSegData(const CSegIdList& list, CSegStatementSet& stSet);
|
||||
static SAdvancementResults AdvanceAdditiveAnim(std::shared_ptr<CAnimTreeNode>& anim, const CCharAnimTime& time);
|
||||
|
|
|
@ -12,6 +12,7 @@ namespace urde
|
|||
class CCharacterInfo
|
||||
{
|
||||
friend class CAnimData;
|
||||
|
||||
public:
|
||||
struct CParticleResData
|
||||
{
|
||||
|
@ -21,6 +22,7 @@ public:
|
|||
std::vector<CAssetId> x30_elsc;
|
||||
CParticleResData(CInputStream& in, u16 tableCount);
|
||||
};
|
||||
|
||||
private:
|
||||
u16 x0_tableCount;
|
||||
std::string x4_name;
|
||||
|
@ -43,20 +45,23 @@ public:
|
|||
CCharacterInfo(CInputStream& in);
|
||||
|
||||
std::string_view GetCharacterName() const { return x4_name; }
|
||||
CAssetId GetModelId() const {return x14_cmdl;}
|
||||
CAssetId GetSkinRulesId() const {return x18_cskr;}
|
||||
CAssetId GetCharLayoutInfoId() const {return x1c_cinf;}
|
||||
CAssetId GetModelId() const { return x14_cmdl; }
|
||||
CAssetId GetSkinRulesId() const { return x18_cskr; }
|
||||
CAssetId GetCharLayoutInfoId() const { return x1c_cinf; }
|
||||
|
||||
const std::vector<std::pair<std::string, zeus::CAABox>>& GetAnimBBoxList() const { return x88_aabbs; }
|
||||
const std::vector<std::pair<std::string, std::vector<CEffectComponent>>>& GetEffectList() const
|
||||
{
|
||||
return x98_effects;
|
||||
}
|
||||
|
||||
CAssetId GetIceModelId() const {return xa8_cmdlOverlay;}
|
||||
CAssetId GetIceSkinRulesId() const {return xac_cskrOverlay;}
|
||||
CAssetId GetIceModelId() const { return xa8_cmdlOverlay; }
|
||||
CAssetId GetIceSkinRulesId() const { return xac_cskrOverlay; }
|
||||
|
||||
const CParticleResData& GetParticleResData() const {return x44_partRes;}
|
||||
const CParticleResData& GetParticleResData() const { return x44_partRes; }
|
||||
u32 GetAnimationIndex(u32 idx) const { return xb0_animIdxs.at(idx); }
|
||||
const CPASDatabase& GetPASDatabase() const { return x30_pasDatabase; }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __URDE_CCHARACTERINFO_HPP__
|
||||
|
|
|
@ -14,12 +14,15 @@ CMetaAnimBlend::CMetaAnimBlend(CInputStream& in)
|
|||
|
||||
void CMetaAnimBlend::GetUniquePrimitives(std::set<CPrimitive>& primsOut) const
|
||||
{
|
||||
x4_animA->GetUniquePrimitives(primsOut);
|
||||
x4_animA->GetUniquePrimitives(primsOut);
|
||||
}
|
||||
|
||||
std::shared_ptr<CAnimTreeNode>
|
||||
CMetaAnimBlend::VGetAnimationTree(const CAnimSysContext& animSys,
|
||||
const CMetaAnimTreeBuildOrders& orders) const
|
||||
{
|
||||
CMetaAnimTreeBuildOrders buildOrders = CMetaAnimTreeBuildOrders::NoSpecialOrders();
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@ CMetaAnimPhaseBlend::CMetaAnimPhaseBlend(CInputStream& in)
|
|||
|
||||
void CMetaAnimPhaseBlend::GetUniquePrimitives(std::set<CPrimitive>& primsOut) const
|
||||
{
|
||||
x4_animA->GetUniquePrimitives(primsOut);
|
||||
x8_animB->GetUniquePrimitives(primsOut);
|
||||
}
|
||||
|
||||
std::shared_ptr<CAnimTreeNode>
|
||||
|
|
|
@ -24,6 +24,8 @@ CMetaAnimRandom::CMetaAnimRandom(CInputStream& in)
|
|||
|
||||
void CMetaAnimRandom::GetUniquePrimitives(std::set<CPrimitive>& primsOut) const
|
||||
{
|
||||
for (const auto& pair : x4_randomData)
|
||||
pair.first->GetUniquePrimitives(primsOut);
|
||||
}
|
||||
|
||||
std::shared_ptr<CAnimTreeNode>
|
||||
|
|
|
@ -16,6 +16,11 @@ CParticleDatabase::CParticleDatabase()
|
|||
xb4_25_drawingEnds = false;
|
||||
}
|
||||
|
||||
void CParticleDatabase::CacheParticleDesc(const SObjectTag &tag)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CParticleDatabase::CacheParticleDesc(const CCharacterInfo::CParticleResData& desc)
|
||||
{
|
||||
for (CAssetId id : desc.x0_part)
|
||||
|
|
|
@ -47,6 +47,7 @@ class CParticleDatabase
|
|||
std::map<std::string, std::unique_ptr<CParticleGenInfo>>& map, bool deleteIfDone);
|
||||
public:
|
||||
CParticleDatabase();
|
||||
void CacheParticleDesc(const SObjectTag& tag);
|
||||
void CacheParticleDesc(const CCharacterInfo::CParticleResData& desc);
|
||||
void SetModulationColorAllActiveEffects(const zeus::CColor& color);
|
||||
void SuspendAllActiveEffects(CStateManager& stateMgr);
|
||||
|
|
|
@ -55,7 +55,13 @@ struct CMetaAnimTreeBuildOrders
|
|||
std::experimental::optional<CPreAdvanceIndicator> x0_;
|
||||
std::experimental::optional<CPreAdvanceIndicator> x44_;
|
||||
static CMetaAnimTreeBuildOrders NoSpecialOrders() { return {}; }
|
||||
void PreAdvanceForAll(const CPreAdvanceIndicator& ind) { x44_.emplace(ind); }
|
||||
static CMetaAnimTreeBuildOrders PreAdvanceForAll(const CPreAdvanceIndicator& ind)
|
||||
{
|
||||
CMetaAnimTreeBuildOrders ret;
|
||||
ret.x0_.emplace(ind);
|
||||
ret.x44_.emplace(ind);
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
|
||||
class IMetaAnim
|
||||
|
|
|
@ -55,17 +55,15 @@ void CActor::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateMana
|
|||
if (HasModelData() && x64_modelData->AnimationData())
|
||||
{
|
||||
TAreaId aid = GetAreaId();
|
||||
// x64_modelData->AnimationData()->sub_8002AE6C(mgr, aid, x64_modelData->x0_particleScale);
|
||||
x64_modelData->AnimationData()->InitializeEffects(mgr, aid, x64_modelData->GetScale());
|
||||
}
|
||||
}
|
||||
break;
|
||||
case EScriptObjectMessage::Deleted: // 34
|
||||
{
|
||||
RemoveEmitter();
|
||||
#if 0
|
||||
if (HasModelData() && x64_modelData->AnimationData() && x64_modelData->GetNormalModel())
|
||||
x64_modelData->AnimationData()->GetParticleDB().GetActiveParticleLightIds(mgr);
|
||||
#endif
|
||||
x64_modelData->AnimationData()->GetParticleDB().DeleteAllLights(mgr);
|
||||
}
|
||||
break;
|
||||
case EScriptObjectMessage::InitializedInArea: // 35
|
||||
|
|
2
hecl
2
hecl
|
@ -1 +1 @@
|
|||
Subproject commit 2bfe803bf63aa17af34adac7c7b317dc8c646467
|
||||
Subproject commit f4dd74c50be1f6e557f72986dea84d27f10a3819
|
Loading…
Reference in New Issue