mirror of https://github.com/AxioDL/metaforce.git
More bug fixes
This commit is contained in:
parent
979a54a8a8
commit
5f03362149
|
@ -5,9 +5,9 @@ namespace DataSpec::DNAAudio
|
||||||
|
|
||||||
bool ATBL::Extract(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath)
|
bool ATBL::Extract(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath)
|
||||||
{
|
{
|
||||||
size_t idxCount = rs.length() / 2;
|
uint32_t idxCount = rs.readUint32Big();
|
||||||
athena::io::YAMLDocWriter w("ATBL");
|
athena::io::YAMLDocWriter w("ATBL");
|
||||||
for (size_t i=0 ; i<idxCount ; ++i)
|
for (uint32_t i=0 ; i<idxCount ; ++i)
|
||||||
{
|
{
|
||||||
uint16_t idx = rs.readUint16Big();
|
uint16_t idx = rs.readUint16Big();
|
||||||
if (idx == 0xffff)
|
if (idx == 0xffff)
|
||||||
|
@ -52,6 +52,7 @@ bool ATBL::Cook(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPat
|
||||||
athena::io::FileWriter w(outPath.getAbsolutePath());
|
athena::io::FileWriter w(outPath.getAbsolutePath());
|
||||||
if (w.hasError())
|
if (w.hasError())
|
||||||
return false;
|
return false;
|
||||||
|
w.writeUint32Big(uint32_t(vecOut.size()));
|
||||||
w.writeBytes(vecOut.data(), vecOut.size() * 2);
|
w.writeBytes(vecOut.data(), vecOut.size() * 2);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -758,7 +758,7 @@ void CStateManager::DrawWorld() const
|
||||||
{
|
{
|
||||||
if (TCastToPtr<CActor> actor = ent)
|
if (TCastToPtr<CActor> actor = ent)
|
||||||
{
|
{
|
||||||
if (!actor->xe7_29_drawEnabled)
|
if (!actor->IsDrawEnabled())
|
||||||
continue;
|
continue;
|
||||||
TUniqueId actorId = actor->GetUniqueId();
|
TUniqueId actorId = actor->GetUniqueId();
|
||||||
if (!thermal && area.LookupPVSUniqueID(actorId) == actorId)
|
if (!thermal && area.LookupPVSUniqueID(actorId) == actorId)
|
||||||
|
@ -978,7 +978,7 @@ void CStateManager::PreRender()
|
||||||
{
|
{
|
||||||
if (TCastToPtr<CActor> act = ent)
|
if (TCastToPtr<CActor> act = ent)
|
||||||
{
|
{
|
||||||
if (act->IsActorActive())
|
if (act->IsDrawEnabled())
|
||||||
{
|
{
|
||||||
act->CalculateRenderBounds();
|
act->CalculateRenderBounds();
|
||||||
act->PreRender(*this, frustum);
|
act->PreRender(*this, frustum);
|
||||||
|
|
|
@ -632,6 +632,8 @@ void CBooModel::DrawSurface(const CBooSurface& surf, const CModelFlags& flags) c
|
||||||
if (data.flags.shadowOccluderMesh() && !g_DrawingOccluders)
|
if (data.flags.shadowOccluderMesh() && !g_DrawingOccluders)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
bool noZWrite = flags.m_noZWrite || !data.flags.depthWrite();
|
||||||
|
|
||||||
const std::vector<boo::ObjToken<boo::IShaderDataBinding>>& extendeds = inst.m_shaderDataBindings[surf.selfIdx];
|
const std::vector<boo::ObjToken<boo::IShaderDataBinding>>& extendeds = inst.m_shaderDataBindings[surf.selfIdx];
|
||||||
EExtendedShader extended = EExtendedShader::Flat;
|
EExtendedShader extended = EExtendedShader::Flat;
|
||||||
if (flags.m_extendedShader == EExtendedShader::Lighting)
|
if (flags.m_extendedShader == EExtendedShader::Lighting)
|
||||||
|
@ -640,28 +642,28 @@ void CBooModel::DrawSurface(const CBooSurface& surf, const CModelFlags& flags) c
|
||||||
{
|
{
|
||||||
/* Override shader if originally opaque (typical for FRME models) */
|
/* Override shader if originally opaque (typical for FRME models) */
|
||||||
if (flags.x0_blendMode > 6)
|
if (flags.x0_blendMode > 6)
|
||||||
extended = flags.m_noCull ? (flags.m_noZWrite ?
|
extended = flags.m_noCull ? (noZWrite ?
|
||||||
EExtendedShader::ForcedAdditiveNoCullNoZWrite :
|
EExtendedShader::ForcedAdditiveNoCullNoZWrite :
|
||||||
EExtendedShader::ForcedAdditiveNoCull) :
|
EExtendedShader::ForcedAdditiveNoCull) :
|
||||||
(flags.m_noZWrite ?
|
(noZWrite ?
|
||||||
EExtendedShader::ForcedAdditiveNoZWrite :
|
EExtendedShader::ForcedAdditiveNoZWrite :
|
||||||
EExtendedShader::ForcedAdditive);
|
EExtendedShader::ForcedAdditive);
|
||||||
else if (flags.x0_blendMode > 4)
|
else if (flags.x0_blendMode > 4)
|
||||||
extended = flags.m_noCull ? (flags.m_noZWrite ?
|
extended = flags.m_noCull ? (noZWrite ?
|
||||||
EExtendedShader::ForcedAlphaNoCullNoZWrite :
|
EExtendedShader::ForcedAlphaNoCullNoZWrite :
|
||||||
EExtendedShader::ForcedAlphaNoCull) :
|
EExtendedShader::ForcedAlphaNoCull) :
|
||||||
(flags.m_noZWrite ?
|
(noZWrite ?
|
||||||
EExtendedShader::ForcedAlphaNoZWrite :
|
EExtendedShader::ForcedAlphaNoZWrite :
|
||||||
EExtendedShader::ForcedAlpha);
|
EExtendedShader::ForcedAlpha);
|
||||||
else
|
else
|
||||||
extended = flags.m_noCull ? (flags.m_noZWrite ?
|
extended = flags.m_noCull ? (noZWrite ?
|
||||||
EExtendedShader::ForcedAlphaNoCullNoZWrite :
|
EExtendedShader::ForcedAlphaNoCullNoZWrite :
|
||||||
EExtendedShader::ForcedAlphaNoCull) :
|
EExtendedShader::ForcedAlphaNoCull) :
|
||||||
(flags.m_noZWrite ?
|
(noZWrite ?
|
||||||
EExtendedShader::ForcedAlphaNoZWrite :
|
EExtendedShader::ForcedAlphaNoZWrite :
|
||||||
EExtendedShader::Lighting);
|
EExtendedShader::Lighting);
|
||||||
}
|
}
|
||||||
else if (flags.m_noCull && flags.m_noZWrite)
|
else if (flags.m_noCull && noZWrite)
|
||||||
{
|
{
|
||||||
/* Substitute no-cull,no-zwrite pipeline if available */
|
/* Substitute no-cull,no-zwrite pipeline if available */
|
||||||
if (data.heclIr.m_blendDst == boo::BlendFactor::One)
|
if (data.heclIr.m_blendDst == boo::BlendFactor::One)
|
||||||
|
@ -677,7 +679,7 @@ void CBooModel::DrawSurface(const CBooSurface& surf, const CModelFlags& flags) c
|
||||||
else
|
else
|
||||||
extended = EExtendedShader::ForcedAlphaNoCull;
|
extended = EExtendedShader::ForcedAlphaNoCull;
|
||||||
}
|
}
|
||||||
else if (flags.m_noZWrite)
|
else if (noZWrite)
|
||||||
{
|
{
|
||||||
/* Substitute no-zwrite pipeline if available */
|
/* Substitute no-zwrite pipeline if available */
|
||||||
if (data.heclIr.m_blendDst == boo::BlendFactor::One)
|
if (data.heclIr.m_blendDst == boo::BlendFactor::One)
|
||||||
|
|
|
@ -1784,6 +1784,7 @@ void CSamusHud::SetMessage(std::u16string_view text, const CHUDMemoParms& info)
|
||||||
{
|
{
|
||||||
if (info.IsFadeOutOnly())
|
if (info.IsFadeOutOnly())
|
||||||
{
|
{
|
||||||
|
x558_messageTextTime = 1.f;
|
||||||
if (!info.IsHintMemo() || !isWidgetVisible)
|
if (!info.IsHintMemo() || !isWidgetVisible)
|
||||||
return;
|
return;
|
||||||
CSfxManager::SfxStart(1449, 1.f, 0.f, false, 0x7f, false, kInvalidAreaId);
|
CSfxManager::SfxStart(1449, 1.f, 0.f, false, 0x7f, false, kInvalidAreaId);
|
||||||
|
|
|
@ -184,7 +184,7 @@ public:
|
||||||
const CActorLights* GetActorLights() const { return x90_actorLights.get(); }
|
const CActorLights* GetActorLights() const { return x90_actorLights.get(); }
|
||||||
CActorLights* ActorLights() { return x90_actorLights.get(); }
|
CActorLights* ActorLights() { return x90_actorLights.get(); }
|
||||||
bool CanDrawStatic() const;
|
bool CanDrawStatic() const;
|
||||||
bool IsActorActive() const { return xe7_29_drawEnabled; }
|
bool IsDrawEnabled() const { return xe7_29_drawEnabled; }
|
||||||
void SetWorldLightingDirty(bool b) { xe7_28_worldLightingDirty = b; }
|
void SetWorldLightingDirty(bool b) { xe7_28_worldLightingDirty = b; }
|
||||||
const CScannableObjectInfo* GetScannableObjectInfo() const;
|
const CScannableObjectInfo* GetScannableObjectInfo() const;
|
||||||
const CHealthInfo* GetHealthInfo(const CStateManager& mgr) const
|
const CHealthInfo* GetHealthInfo(const CStateManager& mgr) const
|
||||||
|
|
|
@ -65,7 +65,7 @@ zeus::CVector3f CScriptDoor::GetOrbitPosition(const CStateManager& /*mgr*/) cons
|
||||||
/* ORIGINAL 0-00 OFFSET: 8007E550 */
|
/* ORIGINAL 0-00 OFFSET: 8007E550 */
|
||||||
void CScriptDoor::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager &mgr)
|
void CScriptDoor::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager &mgr)
|
||||||
{
|
{
|
||||||
switch(msg)
|
switch (msg)
|
||||||
{
|
{
|
||||||
case EScriptObjectMessage::Close:
|
case EScriptObjectMessage::Close:
|
||||||
{
|
{
|
||||||
|
@ -77,11 +77,9 @@ void CScriptDoor::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStat
|
||||||
|
|
||||||
if (x2a8_26_isOpen)
|
if (x2a8_26_isOpen)
|
||||||
{
|
{
|
||||||
// if (x27e_partner2 != kInvalidUniqueId)
|
if (x27e_partner2 != kInvalidUniqueId)
|
||||||
// {
|
if (CEntity* ent = mgr.ObjectById(x27e_partner2))
|
||||||
// if (CEntity* ent = mgr.ObjectById(x27e_partner2))
|
mgr.SendScriptMsg(ent, GetUniqueId(), EScriptObjectMessage::Close);
|
||||||
// mgr.SendScriptMsg(ent, GetUniqueId(), EScriptObjectMessage::Close);
|
|
||||||
// }
|
|
||||||
x2a8_26_isOpen = false;
|
x2a8_26_isOpen = false;
|
||||||
SetDoorAnimation(EDoorAnimType::Close);
|
SetDoorAnimation(EDoorAnimType::Close);
|
||||||
mgr.GetCameraManager()->GetBallCamera()->DoorClosing(GetUniqueId());
|
mgr.GetCameraManager()->GetBallCamera()->DoorClosing(GetUniqueId());
|
||||||
|
|
|
@ -376,7 +376,7 @@ void CScriptEffect::CalculateRenderBounds()
|
||||||
|
|
||||||
if (particleBounds || electricBounds)
|
if (particleBounds || electricBounds)
|
||||||
{
|
{
|
||||||
zeus::CAABox renderBounds = zeus::CAABox::skNullBox;
|
zeus::CAABox renderBounds = zeus::CAABox::skInvertedBox;
|
||||||
if (particleBounds)
|
if (particleBounds)
|
||||||
{
|
{
|
||||||
renderBounds.accumulateBounds(particleBounds->min);
|
renderBounds.accumulateBounds(particleBounds->min);
|
||||||
|
|
|
@ -176,6 +176,9 @@ void CScriptSound::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CSta
|
||||||
break;
|
break;
|
||||||
case EScriptObjectMessage::Play:
|
case EScriptObjectMessage::Play:
|
||||||
{
|
{
|
||||||
|
if (xc_editorId.id == 0x00000223)
|
||||||
|
printf("");
|
||||||
|
|
||||||
if (GetActive())
|
if (GetActive())
|
||||||
PlaySound(mgr);
|
PlaySound(mgr);
|
||||||
}
|
}
|
||||||
|
|
2
amuse
2
amuse
|
@ -1 +1 @@
|
||||||
Subproject commit 594fb346e1ffd25f7d387f42716cd77202460c30
|
Subproject commit 1fefba66e7fc96cb6fc1b1b014c365da2e0b7a43
|
Loading…
Reference in New Issue