Update NODLib

This commit is contained in:
Phillip Stephens 2015-09-28 20:49:31 -07:00
parent 9e4fd874cd
commit 34e0361bc1
5 changed files with 13 additions and 7 deletions

View File

@ -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);
}
}

View File

@ -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());
}

View File

@ -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());
}

View File

@ -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());
}

2
NODLib

@ -1 +1 @@
Subproject commit dfdfdb274917439e7a069d24a045277896cff433
Subproject commit b73b2b25eae2e30062b99dfdad7316dd20e7447b