From 34e0361bc1531095e22bae871f120a5914708c24 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Mon, 28 Sep 2015 20:49:31 -0700 Subject: [PATCH] Update NODLib --- DataSpec/SpecBase.cpp | 6 ++++-- DataSpec/SpecMP1.cpp | 4 +++- DataSpec/SpecMP2.cpp | 3 ++- DataSpec/SpecMP3.cpp | 5 +++-- NODLib | 2 +- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/DataSpec/SpecBase.cpp b/DataSpec/SpecBase.cpp index 230a39139..606d8f532 100644 --- a/DataSpec/SpecBase.cpp +++ b/DataSpec/SpecBase.cpp @@ -54,10 +54,12 @@ void SpecBase::doExtract(const ExtractPassInfo& info, FExtractProgress progress) /* Extract update partition for repacking later */ const HECL::SystemString& target = m_project.getProjectRootPath().getAbsolutePath(); NOD::DiscBase::IPartition* update = m_disc->getUpdatePartition(); + NOD::ExtractionContext ctx = {false, info.force, nullptr}; + if (update) { progress(_S("Update Partition"), _S(""), 0, 0.0); - update->getFSTRoot().extractToDirectory(target, info.force); + update->getFSTRoot().extractToDirectory(target, ctx); progress(_S("Update Partition"), _S(""), 0, 1.0); } @@ -68,7 +70,7 @@ void SpecBase::doExtract(const ExtractPassInfo& info, FExtractProgress progress) const NOD::DiscBase::IPartition::Node& root = data->getFSTRoot(); for (const NOD::DiscBase::IPartition::Node& child : root) if (child.getKind() == NOD::DiscBase::IPartition::Node::NODE_FILE) - child.extractToDirectory(target, info.force); + child.extractToDirectory(target, ctx); progress(_S("Trilogy Files"), _S(""), 1, 1.0); } } diff --git a/DataSpec/SpecMP1.cpp b/DataSpec/SpecMP1.cpp index fea0bdb1c..f38985cf1 100644 --- a/DataSpec/SpecMP1.cpp +++ b/DataSpec/SpecMP1.cpp @@ -210,6 +210,8 @@ struct SpecMP1 : SpecBase bool extractFromDisc(NOD::DiscBase&, bool force, FExtractProgress progress) { + NOD::ExtractionContext ctx = {false, force, nullptr}; + progress(_S("Indexing PAKs"), _S(""), 2, 0.0); m_pakRouter.build(m_paks, [&progress](float factor) { @@ -222,7 +224,7 @@ struct SpecMP1 : SpecBase int prog = 0; for (const NOD::DiscBase::IPartition::Node* node : m_nonPaks) { - node->extractToDirectory(m_workPath.getAbsolutePath(), force); + node->extractToDirectory(m_workPath.getAbsolutePath(), ctx); HECL::SystemStringView nameView(node->getName()); progress(_S("MP1 Root"), nameView.sys_str().c_str(), 3, prog++ / (float)m_nonPaks.size()); } diff --git a/DataSpec/SpecMP2.cpp b/DataSpec/SpecMP2.cpp index 9093fcbd6..d55653eed 100644 --- a/DataSpec/SpecMP2.cpp +++ b/DataSpec/SpecMP2.cpp @@ -203,6 +203,7 @@ struct SpecMP2 : SpecBase bool extractFromDisc(NOD::DiscBase&, bool force, FExtractProgress progress) { + NOD::ExtractionContext ctx = {false, force, nullptr}; progress(_S("Indexing PAKs"), _S(""), 2, 0.0); m_pakRouter.build(m_paks, [&progress](float factor) { @@ -215,7 +216,7 @@ struct SpecMP2 : SpecBase int prog = 0; for (const NOD::DiscBase::IPartition::Node* node : m_nonPaks) { - node->extractToDirectory(m_workPath.getAbsolutePath(), force); + node->extractToDirectory(m_workPath.getAbsolutePath(), ctx); HECL::SystemStringView nameView(node->getName()); progress(_S("MP2 Root"), nameView.sys_str().c_str(), 3, prog++ / (float)m_nonPaks.size()); } diff --git a/DataSpec/SpecMP3.cpp b/DataSpec/SpecMP3.cpp index bb980d297..cc2995167 100644 --- a/DataSpec/SpecMP3.cpp +++ b/DataSpec/SpecMP3.cpp @@ -321,6 +321,7 @@ struct SpecMP3 : SpecBase bool extractFromDisc(NOD::DiscBase&, bool force, FExtractProgress progress) { + NOD::ExtractionContext ctx = {false, force, nullptr}; int compIdx = 2; int prog; if (doMP3) @@ -338,7 +339,7 @@ struct SpecMP3 : SpecBase prog = 0; for (const NOD::DiscBase::IPartition::Node* node : m_nonPaks) { - node->extractToDirectory(mp3WorkPath.getAbsolutePath(), force); + node->extractToDirectory(mp3WorkPath.getAbsolutePath(), ctx); HECL::SystemStringView nameView(node->getName()); progress(_S("MP3 Root"), nameView.sys_str().c_str(), compIdx, prog++ / (float)m_nonPaks.size()); } @@ -383,7 +384,7 @@ struct SpecMP3 : SpecBase int prog = 0; for (const NOD::DiscBase::IPartition::Node* node : m_feNonPaks) { - node->extractToDirectory(m_feWorkPath.getAbsolutePath(), force); + node->extractToDirectory(m_feWorkPath.getAbsolutePath(), ctx); HECL::SystemStringView nameView(node->getName()); progress(_S("fe Root"), nameView.sys_str().c_str(), compIdx, prog++ / (float)m_feNonPaks.size()); } diff --git a/NODLib b/NODLib index dfdfdb274..b73b2b25e 160000 --- a/NODLib +++ b/NODLib @@ -1 +1 @@ -Subproject commit dfdfdb274917439e7a069d24a045277896cff433 +Subproject commit b73b2b25eae2e30062b99dfdad7316dd20e7447b