mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-15 23:37:02 +00:00
Added progress bars to extract system
This commit is contained in:
@@ -66,8 +66,10 @@ ResExtractor PAKBridge::LookupExtractor(const PAK::Entry& entry)
|
||||
|
||||
bool PAKBridge::extractResources(const HECL::ProjectPath& workingOut,
|
||||
const HECL::ProjectPath& cookedOut,
|
||||
bool force)
|
||||
bool force,
|
||||
std::function<void(float)> progress)
|
||||
{
|
||||
size_t count = 0;
|
||||
for (const std::pair<UniqueID64, PAK::Entry*>& item : m_pak.m_idMap)
|
||||
{
|
||||
PAKEntryReadStream s;
|
||||
@@ -90,6 +92,9 @@ bool PAKBridge::extractResources(const HECL::ProjectPath& workingOut,
|
||||
fwrite(s.data(), 1, s.length(), fout);
|
||||
fclose(fout);
|
||||
}
|
||||
|
||||
++count;
|
||||
progress(count / (float)m_pak.m_idMap.size());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user