From 9c32213790b4796cc58ffdc7c31b3876426f82c9 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sat, 20 May 2017 00:41:49 -0700 Subject: [PATCH 1/3] Finish CActorContraption --- Editor/ViewManager.cpp | 2 +- .../Shaders/CTexturedQuadFilterGLSL.cpp | 4 +- Runtime/MP1/World/CActorContraption.cpp | 56 +++++++++++++++---- Runtime/MP1/World/CActorContraption.hpp | 7 ++- Runtime/Weapon/CFlameInfo.cpp | 17 ++++++ Runtime/Weapon/CFlameInfo.hpp | 10 +++- Runtime/Weapon/CFlameThrower.cpp | 12 ++-- Runtime/Weapon/CFlameThrower.hpp | 6 +- Runtime/Weapon/WeaponCommon.hpp | 28 +++++----- 9 files changed, 99 insertions(+), 43 deletions(-) diff --git a/Editor/ViewManager.cpp b/Editor/ViewManager.cpp index 77cd05b1d..8e0fab78a 100644 --- a/Editor/ViewManager.cpp +++ b/Editor/ViewManager.cpp @@ -27,7 +27,7 @@ namespace urde void ViewManager::BuildTestPART(urde::IObjectStore& objStore) { -// m_modelTest = objStore.GetObj("MP1/Shared/CMDL_B2B41738.blend"); + m_modelTest = objStore.GetObj("MP1/Shared/CMDL_B2B41738.blend"); #if 0 SObjectTag samusCharSet = m_projManager.TagFromPath(_S("MP1/Shared/ANCS_77289A4A.*")); SObjectTag platModel = m_projManager.TagFromPath(_S("MP1/Shared/CMDL_6FA561D0.blend")); diff --git a/Runtime/Graphics/Shaders/CTexturedQuadFilterGLSL.cpp b/Runtime/Graphics/Shaders/CTexturedQuadFilterGLSL.cpp index 26644d74c..9e4131301 100644 --- a/Runtime/Graphics/Shaders/CTexturedQuadFilterGLSL.cpp +++ b/Runtime/Graphics/Shaders/CTexturedQuadFilterGLSL.cpp @@ -80,7 +80,7 @@ BOO_GLSL_BINDING_HEAD "TBINDING0 uniform sampler2D tex;\n" "void main()\n" "{\n" -" colorOut = vtf.color * vec4(texture(tex, vtf.uv, lod).rgb, 1.0);\n" +" colorOut = vtf.color * vec4(texture(tex, vtf.uv, vtf.lod).rgb, 1.0);\n" "}\n"; static const char* FSAlpha = @@ -98,7 +98,7 @@ BOO_GLSL_BINDING_HEAD "TBINDING0 uniform sampler2D tex;\n" "void main()\n" "{\n" -" colorOut = vtf.color * texture(tex, vtf.uv, lod);\n" +" colorOut = vtf.color * texture(tex, vtf.uv, vtf.lod);\n" "}\n"; URDE_DECL_SPECIALIZE_MULTI_BLEND_SHADER(CTexturedQuadFilter) diff --git a/Runtime/MP1/World/CActorContraption.cpp b/Runtime/MP1/World/CActorContraption.cpp index f4c254070..4cad703a7 100644 --- a/Runtime/MP1/World/CActorContraption.cpp +++ b/Runtime/MP1/World/CActorContraption.cpp @@ -1,5 +1,6 @@ #include "MP1/World/CActorContraption.hpp" #include "Weapon/CFlameThrower.hpp" +#include "Weapon/CFlameInfo.hpp" #include "Character/CInt32POINode.hpp" #include "GameGlobalObjects.hpp" #include "CSimplePool.hpp" @@ -17,21 +18,33 @@ MP1::CActorContraption::CActorContraption(TUniqueId uid, const std::string& name : CScriptActor(uid, name, info, xf, std::move(mData), aabox, f1, f2, matList, hInfo, dVuln, aParams, false, active, 0, 1.f, false, false, false, false) , x300_flameThrowerGen(g_SimplePool->GetObj("FlameThrower")) -, x308_partId(part) +, x308_flameFxId(part) , x30c_dInfo(dInfo) { } -void MP1::CActorContraption::Accept(IVisitor& visitor) +void MP1::CActorContraption::Accept(IVisitor& visitor) { visitor.Visit(this); } + +void MP1::CActorContraption::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) { - visitor.Visit(this); + bool curActive = GetActive(); + if (msg == EScriptObjectMessage::Registered) + AddMaterial(EMaterialTypes::ScanPassthrough, mgr); + else if (msg == EScriptObjectMessage::SetToZero) + ResetFlameThrowers(mgr); + + AcceptScriptMsg(msg, uid, mgr); + if (curActive == GetActive() || !GetActive()) + return; + + ResetFlameThrowers(mgr); } void MP1::CActorContraption::Think(float dt, CStateManager& mgr) { CScriptActor::Think(dt, mgr); - for (const std::pair& uid : x2e4_children) + for (const std::pair& uid : x2e8_children) { CFlameThrower* act = static_cast(mgr.ObjectById(uid.first)); @@ -40,16 +53,21 @@ void MP1::CActorContraption::Think(float dt, CStateManager& mgr) } } +void MP1::CActorContraption::ResetFlameThrowers(CStateManager& mgr) +{ + for (const std::pair& uid : x2e8_children) + { + CFlameThrower* act = static_cast(mgr.ObjectById(uid.first)); + if (act && !act->GetX400_25()) + act->Reset(mgr, false); + } +} + void MP1::CActorContraption::DoUserAnimEvent(CStateManager& mgr, CInt32POINode& node, EUserEventType evType) { if (evType == EUserEventType::DamageOff) { - for (const std::pair& uid : x2e4_children) - { - CFlameThrower* act = static_cast(mgr.ObjectById(uid.first)); - if (act && act->GetX400_25()) - act->Reset(mgr, false); - } + ResetFlameThrowers(mgr); } else if (evType == EUserEventType::DamageOn) { @@ -61,8 +79,24 @@ void MP1::CActorContraption::DoUserAnimEvent(CStateManager& mgr, CInt32POINode& CActor::DoUserAnimEvent(mgr, node, evType); } -CFlameThrower* MP1::CActorContraption::CreateFlameThrower(const std::string&, CStateManager&) +CFlameThrower* MP1::CActorContraption::CreateFlameThrower(const std::string& name, CStateManager& mgr) { + auto it = std::find_if(x2e8_children.begin(), x2e8_children.end(), + [&name](const std::pair& p) { return p.second == name; }); + + if (it == x2e8_children.end()) + { + TUniqueId id = mgr.AllocateUniqueId(); + CFlameInfo flameInfo(6, 6, x308_flameFxId, 20, 0.5f, 1.f, 1.f); + CFlameThrower* ret = new CFlameThrower(x300_flameThrowerGen, name, EWeaponType::Missile, flameInfo, + zeus::CTransform::Identity(), EMaterialTypes::CollisionActor, x30c_dInfo, + id, GetAreaId(), GetUniqueId(), 0, -1, -1, -1); + + x2e8_children.emplace_back(id, name); + + mgr.AddObject(ret); + return ret; + } return nullptr; } } diff --git a/Runtime/MP1/World/CActorContraption.hpp b/Runtime/MP1/World/CActorContraption.hpp index e68834dfb..eafe49345 100644 --- a/Runtime/MP1/World/CActorContraption.hpp +++ b/Runtime/MP1/World/CActorContraption.hpp @@ -12,9 +12,9 @@ namespace MP1 class CActorContraption : public CScriptActor { /* AKA Why Zoid?!?!?!? */ - std::vector> x2e4_children; + std::vector> x2e8_children; TToken x300_flameThrowerGen; - ResId x308_partId; + ResId x308_flameFxId; CDamageInfo x30c_dInfo; public: CActorContraption(TUniqueId, const std::string&, const CEntityInfo&, const zeus::CTransform&, CModelData&&, @@ -22,10 +22,11 @@ public: const CDamageVulnerability&, const CActorParameters&, ResId, const CDamageInfo&, bool); void Accept(IVisitor &visitor); - + void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager &); void Think(float, CStateManager &); void DoUserAnimEvent(CStateManager &, CInt32POINode &, EUserEventType); CFlameThrower* CreateFlameThrower(const std::string&, CStateManager&); + void ResetFlameThrowers(CStateManager& mgr); }; } } diff --git a/Runtime/Weapon/CFlameInfo.cpp b/Runtime/Weapon/CFlameInfo.cpp index e69de29bb..a7ed88b5e 100644 --- a/Runtime/Weapon/CFlameInfo.cpp +++ b/Runtime/Weapon/CFlameInfo.cpp @@ -0,0 +1,17 @@ +#include "Weapon/CFlameInfo.hpp" + +namespace urde +{ + +CFlameInfo::CFlameInfo(s32 w1, s32 w2, ResId flameFxId, s32 w3, float f1, float f2, float f3) + : x0_(w1) + , x4_(w2) + , x8_flameFxId(flameFxId) + , xc_(w3) + , x10_(f1) + , x18_(f2) + , x1c_(f3) +{ +} + +} diff --git a/Runtime/Weapon/CFlameInfo.hpp b/Runtime/Weapon/CFlameInfo.hpp index f27f3b158..a13afb190 100644 --- a/Runtime/Weapon/CFlameInfo.hpp +++ b/Runtime/Weapon/CFlameInfo.hpp @@ -7,12 +7,18 @@ namespace urde { class CFlameInfo { + s32 x0_; + s32 x4_; ResId x8_flameFxId; + s32 xc_; + float x10_; + float x18_; + float x1c_; public: - CFlameInfo(s32, u32, s32, s32, float, float, float); + CFlameInfo(s32, s32, ResId, s32, float, float, float); void GetAttributes() const; - void GetLength() const; + float GetLength() const; ResId GetFlameFxId() const { return x8_flameFxId; } }; } diff --git a/Runtime/Weapon/CFlameThrower.cpp b/Runtime/Weapon/CFlameThrower.cpp index 682083929..37b0bcfe5 100644 --- a/Runtime/Weapon/CFlameThrower.cpp +++ b/Runtime/Weapon/CFlameThrower.cpp @@ -10,7 +10,8 @@ const zeus::CVector3f CFlameThrower::kLightOffset(0, 3.f, 2.f); CFlameThrower::CFlameThrower(const TToken& wDesc, const std::string& name, EWeaponType wType, const CFlameInfo& flameInfo, const zeus::CTransform& xf, EMaterialTypes matType, - const CDamageInfo& dInfo, TUniqueId owner, TAreaId aId, TUniqueId uid, u32 w1) + const CDamageInfo& dInfo, TUniqueId owner, TAreaId aId, TUniqueId uid, u32 w1, u32 w2, + s16 sId, u32 w3) : CGameProjectile(false, wDesc, name, wType, xf, matType, dInfo, owner, aId, uid, kInvalidUniqueId, w1, false, zeus::CVector3f(1.f), {}, -1, false) , x2e8_(xf) @@ -24,12 +25,7 @@ void CFlameThrower::Accept(IVisitor& visitor) { visitor.Visit(this); } void CFlameThrower::SetTransform(const zeus::CTransform& xf) { x2e8_ = xf; } -void CFlameThrower::Reset(CStateManager&, bool) -{ -} - -void CFlameThrower::Fire(const zeus::CTransform&, CStateManager&, bool) -{ +void CFlameThrower::Reset(CStateManager&, bool) {} -} +void CFlameThrower::Fire(const zeus::CTransform&, CStateManager&, bool) {} } diff --git a/Runtime/Weapon/CFlameThrower.hpp b/Runtime/Weapon/CFlameThrower.hpp index 4978dc4c9..8251cfeca 100644 --- a/Runtime/Weapon/CFlameThrower.hpp +++ b/Runtime/Weapon/CFlameThrower.hpp @@ -23,12 +23,14 @@ class CFlameThrower : public CGameProjectile }; u32 _dummy = 0; }; + public: CFlameThrower(const TToken& wDesc, const std::string& name, EWeaponType wType, const CFlameInfo& flameInfo, const zeus::CTransform& xf, EMaterialTypes matType, - const CDamageInfo& dInfo, TUniqueId owner, TAreaId aId, TUniqueId uid, u32 w1); + const CDamageInfo& dInfo, TUniqueId owner, TAreaId aId, TUniqueId uid, u32 w1, u32 w2, s16 sId, + u32 w3); - void Accept(IVisitor &visitor); + void Accept(IVisitor& visitor); void SetTransform(const zeus::CTransform& xf); void Reset(CStateManager&, bool); void Fire(const zeus::CTransform&, CStateManager&, bool); diff --git a/Runtime/Weapon/WeaponCommon.hpp b/Runtime/Weapon/WeaponCommon.hpp index 68d02772c..fdb8563f6 100644 --- a/Runtime/Weapon/WeaponCommon.hpp +++ b/Runtime/Weapon/WeaponCommon.hpp @@ -10,20 +10,20 @@ enum class EWeaponType { None = -1, Power = 0, - Ice, - Wave, - Plasma, - Bomb, - PowerBomb, - Missile, - BoostBall, - Phazon, - AI, - PoisonWater, - Lava, - Hot, - Unused1, - Unused2 + Ice = 1, + Wave = 2, + Plasma = 3, + Bomb = 4, + PowerBomb = 5, + Missile = 6, + BoostBall = 7, + Phazon = 8, + AI = 9, + PoisonWater = 10, + Lava = 11, + Hot = 12, + Unused1 = 13, + Unused2 = 14 }; } #endif // __URDE_WEAPONCOMMON_HPP__ From b172bd26e604d8980804ddf0d067c6a3f5e4cdf6 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sat, 20 May 2017 23:01:24 -0700 Subject: [PATCH 2/3] Silence warning, implement Zoid loader, and update nod --- Runtime/Graphics/CPVSVisSet.cpp | 2 +- Runtime/MP1/World/CActorContraption.cpp | 8 ++-- Runtime/World/ScriptLoader.cpp | 59 ++++++++++++++++++------- nod | 2 +- 4 files changed, 50 insertions(+), 21 deletions(-) diff --git a/Runtime/Graphics/CPVSVisSet.cpp b/Runtime/Graphics/CPVSVisSet.cpp index a377de307..3304901fe 100644 --- a/Runtime/Graphics/CPVSVisSet.cpp +++ b/Runtime/Graphics/CPVSVisSet.cpp @@ -22,7 +22,7 @@ EPVSVisSetState CPVSVisSet::GetVisible(u32 idx) const if (idx < numFeatures) { /* This is a feature lookup */ - if (!x10_ptr[idx / 8] & (1 << (idx & 0x7))) + if (!(x10_ptr[idx / 8] & (1 << (idx & 0x7)))) return EPVSVisSetState::EndOfTree; return EPVSVisSetState::OutOfBounds; } diff --git a/Runtime/MP1/World/CActorContraption.cpp b/Runtime/MP1/World/CActorContraption.cpp index 4cad703a7..137b952a0 100644 --- a/Runtime/MP1/World/CActorContraption.cpp +++ b/Runtime/MP1/World/CActorContraption.cpp @@ -12,10 +12,10 @@ namespace urde MP1::CActorContraption::CActorContraption(TUniqueId uid, const std::string& name, const CEntityInfo& info, const zeus::CTransform& xf, CModelData&& mData, const zeus::CAABox& aabox, - const CMaterialList& matList, float f1, float f2, const CHealthInfo& hInfo, + const CMaterialList& matList, float mass, float zMomentum, const CHealthInfo& hInfo, const CDamageVulnerability& dVuln, const CActorParameters& aParams, ResId part, const CDamageInfo& dInfo, bool active) -: CScriptActor(uid, name, info, xf, std::move(mData), aabox, f1, f2, matList, hInfo, dVuln, aParams, false, active, 0, +: CScriptActor(uid, name, info, xf, std::move(mData), aabox, mass, zMomentum, matList, hInfo, dVuln, aParams, false, active, 0, 1.f, false, false, false, false) , x300_flameThrowerGen(g_SimplePool->GetObj("FlameThrower")) , x308_flameFxId(part) @@ -81,7 +81,7 @@ void MP1::CActorContraption::DoUserAnimEvent(CStateManager& mgr, CInt32POINode& CFlameThrower* MP1::CActorContraption::CreateFlameThrower(const std::string& name, CStateManager& mgr) { - auto it = std::find_if(x2e8_children.begin(), x2e8_children.end(), + const auto& it = std::find_if(x2e8_children.begin(), x2e8_children.end(), [&name](const std::pair& p) { return p.second == name; }); if (it == x2e8_children.end()) @@ -97,6 +97,6 @@ CFlameThrower* MP1::CActorContraption::CreateFlameThrower(const std::string& nam mgr.AddObject(ret); return ret; } - return nullptr; + return static_cast(mgr.ObjectById(it->first)); } } diff --git a/Runtime/World/ScriptLoader.cpp b/Runtime/World/ScriptLoader.cpp index b109c08af..a559f3aed 100644 --- a/Runtime/World/ScriptLoader.cpp +++ b/Runtime/World/ScriptLoader.cpp @@ -308,8 +308,8 @@ CLightParameters ScriptLoader::LoadLightParameters(CInputStream& in) if (propCount >= 14) layerIdx = in.readUint32Big(); - return CLightParameters(a, b, shadowTess, d, e, noLightsAmbient, makeLights, lightOpts, recalcOpts, actorPosBias, - maxDynamicLights, maxAreaLights, ambientChannelOverflow, layerIdx); + return CLightParameters(a, b, shadowTess, d, e, noLightsAmbient, makeLights, lightOpts, recalcOpts, + actorPosBias, maxDynamicLights, maxAreaLights, ambientChannelOverflow, layerIdx); } return CLightParameters::None(); } @@ -431,7 +431,7 @@ CEntity* ScriptLoader::LoadActor(CStateManager& mgr, CInputStream& in, int propC else data = CStaticRes(staticId, head.x40_scale); - if ((collisionExtent.x < 0.f || collisionExtent.y < 0.f || collisionExtent.z < 0.f)|| collisionExtent.isZero()) + if ((collisionExtent.x < 0.f || collisionExtent.y < 0.f || collisionExtent.z < 0.f) || collisionExtent.isZero()) aabb = data.GetBounds(head.x10_transform.getRotation()); return new CScriptActor(mgr.AllocateUniqueId(), head.x0_name, info, head.x10_transform, std::move(data), aabb, f1, @@ -1677,12 +1677,11 @@ CEntity* ScriptLoader::LoadDebrisExtended(CStateManager& mgr, CInputStream& in, if (g_ResFactory->GetResourceTypeById(model)) modelData = CModelData(CStaticRes(model, aHead.x40_scale)); - return new CScriptDebris(mgr.AllocateUniqueId(), aHead.x0_name, info, aHead.x10_transform, - std::move(modelData), aParam, f1, f2, f3, f4, f5, f6, f7, f8, f9, - c1, c2, f10, aHead.x40_scale, v1, f11, f12, v2, - particle1, particle1Scale, particle1B1, particle1B2, particle1W, - particle2, particle2Scale, particle2B1, particle2B2, particle2W, - particle3, particle3Scale, particle3W, b1, b2, b3, b4); + return new CScriptDebris(mgr.AllocateUniqueId(), aHead.x0_name, info, aHead.x10_transform, std::move(modelData), + aParam, f1, f2, f3, f4, f5, f6, f7, f8, f9, c1, c2, f10, aHead.x40_scale, v1, f11, f12, v2, + particle1, particle1Scale, particle1B1, particle1B2, particle1W, particle2, particle2Scale, + particle2B1, particle2B2, particle2W, particle3, particle3Scale, particle3W, b1, b2, b3, + b4); } CEntity* ScriptLoader::LoadSteam(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info) @@ -1710,8 +1709,7 @@ CEntity* ScriptLoader::LoadSteam(CStateManager& mgr, CInputStream& in, int propC zeus::CAABox aabb(-v2 * 0.5f, v2 * 0.5f); - return new CScriptSteam(mgr.AllocateUniqueId(), name, info, v1, aabb, dInfo, - v3, w1, b1, w2, f1, f2, f3, f4, b2); + return new CScriptSteam(mgr.AllocateUniqueId(), name, info, v1, aabb, dInfo, v3, w1, b1, w2, f1, f2, f3, f4, b2); } CEntity* ScriptLoader::LoadRipple(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info) @@ -1778,8 +1776,9 @@ CEntity* ScriptLoader::LoadPlayerActor(CStateManager& mgr, CInputStream& in, int return new CScriptPlayerActor(mgr.AllocateUniqueId(), aHead.x0_name, info, aHead.x10_transform, CAnimRes(animParms.GetACSFile(), animParms.GetCharacter(), aHead.x40_scale, - animParms.GetInitialAnimation(), loop), CModelData::CModelDataNull(), - aabox, true, list, mass, zMomentum, hInfo, dVuln, actParms, loop, active, flags, w1); + animParms.GetInitialAnimation(), loop), + CModelData::CModelDataNull(), aabox, true, list, mass, zMomentum, hInfo, dVuln, + actParms, loop, active, flags, w1); } CEntity* ScriptLoader::LoadFlaahgra(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info) @@ -1836,7 +1835,7 @@ CEntity* ScriptLoader::LoadVisorFlare(CStateManager& mgr, CInputStream& in, int u32 w2 = in.readUint32Big(); std::vector flares; flares.reserve(5); - for (int i=0 ; i<5 ; ++i) + for (int i = 0; i < 5; ++i) if (auto flare = CVisorFlare::LoadFlareDef(in)) flares.push_back(*flare); @@ -2170,8 +2169,38 @@ CEntity* ScriptLoader::Load(CStateManager& mgr, CInputStream& in, int propCount, CEntity* ScriptLoader::LoadActorContraption(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info) { + if (!EnsurePropertyCount(propCount, 15, "ActorContraption")) + return nullptr; - return nullptr; + SScaledActorHead head = LoadScaledActorHead(in, mgr); + zeus::CVector3f collisionExtent = zeus::CVector3f::ReadBig(in); + zeus::CVector3f collisionOrigin = zeus::CVector3f::ReadBig(in); + float mass = in.readFloatBig(); + float zMomentum = in.readFloatBig(); + CHealthInfo hInfo(in); + CDamageVulnerability dVuln(in); + CAnimationParameters animParams(in); + CActorParameters actParams = LoadActorParameters(in); + ResId flameFxId = in.readUint32Big(); + CDamageInfo dInfo(in); + bool active = in.readBool(); + + if (!g_ResFactory->GetResourceTypeById(animParams.GetACSFile())) + return nullptr; + + zeus::CAABox aabb = GetCollisionBox(mgr, info.GetAreaId(), collisionExtent, collisionOrigin); + CMaterialList list; + list.Add(EMaterialTypes::Immovable); + list.Add(EMaterialTypes::Solid); + + CModelData data(CAnimRes(animParams.GetACSFile(), animParams.GetCharacter(), head.x40_scale, + animParams.GetInitialAnimation(), true)); + + if ((collisionExtent.x < 0.f || collisionExtent.y < 0.f || collisionExtent.z < 0.f) || collisionExtent.isZero()) + aabb = data.GetBounds(head.x10_transform.getRotation()); + + return new MP1::CActorContraption(mgr.AllocateUniqueId(), head.x0_name, info, head.x10_transform, std::move(data), + aabb, list, mass, zMomentum, hInfo, dVuln, actParams, flameFxId, dInfo, active); } CEntity* ScriptLoader::LoadOculus(CStateManager& mgr, CInputStream& in, int propCount, const CEntityInfo& info) diff --git a/nod b/nod index e86971c9e..2bc7c4e56 160000 --- a/nod +++ b/nod @@ -1 +1 @@ -Subproject commit e86971c9e082b58bb04ee794a106874b3ceae1c7 +Subproject commit 2bc7c4e568a78babce8bfd38012c8084b3f2157a From c97c8d054b9f500ed562db52ccd146da5031bc43 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sun, 21 May 2017 03:27:21 -0700 Subject: [PATCH 3/3] update nod --- DataSpec/SpecMP1.cpp | 2 +- DataSpec/SpecMP2.cpp | 2 +- DataSpec/SpecMP3.cpp | 2 +- nod | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DataSpec/SpecMP1.cpp b/DataSpec/SpecMP1.cpp index 0f33b2583..333aeb103 100644 --- a/DataSpec/SpecMP1.cpp +++ b/DataSpec/SpecMP1.cpp @@ -341,7 +341,7 @@ struct SpecMP1 : SpecBase /* Extract non-pak files */ progress(_S("MP1 Root"), _S(""), 3, 0.0); int prog = 0; - ctx.progressCB = [&](const std::string& name) { + ctx.progressCB = [&](const std::string& name, float) { hecl::SystemStringView nameView(name); progress(_S("MP1 Root"), nameView.c_str(), 3, prog / (float)m_nonPaks.size()); }; diff --git a/DataSpec/SpecMP2.cpp b/DataSpec/SpecMP2.cpp index 46f1a8861..5e9e539ed 100644 --- a/DataSpec/SpecMP2.cpp +++ b/DataSpec/SpecMP2.cpp @@ -229,7 +229,7 @@ struct SpecMP2 : SpecBase mp2OutPath.makeDir(); progress(_S("MP2 Root"), _S(""), 3, 0.0); int prog = 0; - ctx.progressCB = [&](const std::string& name) { + ctx.progressCB = [&](const std::string& name, float) { hecl::SystemStringView nameView(name); progress(_S("MP2 Root"), nameView.c_str(), 3, prog / (float)m_nonPaks.size()); }; diff --git a/DataSpec/SpecMP3.cpp b/DataSpec/SpecMP3.cpp index 189af9d64..b10557f87 100644 --- a/DataSpec/SpecMP3.cpp +++ b/DataSpec/SpecMP3.cpp @@ -334,7 +334,7 @@ struct SpecMP3 : SpecBase size_t nodeCount = 0; int prog = 0; nod::ExtractionContext ctx = {true, force, - [&](const std::string& name) + [&](const std::string& name, float) { hecl::SystemStringView nameView(name); progress(currentTarget.c_str(), nameView.c_str(), compIdx, prog / (float)nodeCount); diff --git a/nod b/nod index 2bc7c4e56..e494dbba9 160000 --- a/nod +++ b/nod @@ -1 +1 @@ -Subproject commit 2bc7c4e568a78babce8bfd38012c8084b3f2157a +Subproject commit e494dbba9f29634ccbd2b9af203b86d11d5466d5