mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 16:24:55 +00:00
Full PAK Indexing even for partial extracts
This commit is contained in:
@@ -24,8 +24,10 @@ static bool GetNoShare(const std::string& name)
|
||||
return true;
|
||||
}
|
||||
|
||||
PAKBridge::PAKBridge(HECL::Database::Project& project, const NOD::DiscBase::IPartition::Node& node)
|
||||
: m_project(project), m_node(node), m_pak(GetNoShare(node.getName()))
|
||||
PAKBridge::PAKBridge(HECL::Database::Project& project,
|
||||
const NOD::DiscBase::IPartition::Node& node,
|
||||
bool doExtract)
|
||||
: m_project(project), m_node(node), m_pak(GetNoShare(node.getName())), m_doExtract(doExtract)
|
||||
{
|
||||
NOD::AthenaPartReadStream rs(node.beginReadStream());
|
||||
m_pak.read(rs);
|
||||
@@ -79,7 +81,7 @@ void PAKBridge::build()
|
||||
{
|
||||
if (entry.type == FOURCC('MLVL'))
|
||||
{
|
||||
PAKBridge::Level& level = m_levelDeps[entry.id];
|
||||
Level& level = m_levelDeps[entry.id];
|
||||
|
||||
PAKEntryReadStream rs = entry.beginReadStream(m_node);
|
||||
MLVL mlvl;
|
||||
|
||||
@@ -18,26 +18,14 @@ class PAKBridge
|
||||
const NOD::DiscBase::IPartition::Node& m_node;
|
||||
PAK m_pak;
|
||||
public:
|
||||
struct Level
|
||||
{
|
||||
HECL::SystemString name;
|
||||
struct Area
|
||||
{
|
||||
HECL::SystemString name;
|
||||
struct Layer
|
||||
{
|
||||
HECL::SystemString name;
|
||||
std::unordered_set<UniqueID64> resources;
|
||||
};
|
||||
std::vector<Layer> layers;
|
||||
std::unordered_set<UniqueID64> resources;
|
||||
};
|
||||
std::unordered_map<UniqueID64, Area> areas;
|
||||
};
|
||||
bool m_doExtract;
|
||||
using Level = Level<UniqueID64>;
|
||||
std::unordered_map<UniqueID64, Level> m_levelDeps;
|
||||
HECL::SystemString m_levelString;
|
||||
|
||||
PAKBridge(HECL::Database::Project& project, const NOD::DiscBase::IPartition::Node& node);
|
||||
PAKBridge(HECL::Database::Project& project,
|
||||
const NOD::DiscBase::IPartition::Node& node,
|
||||
bool doExtract=true);
|
||||
void build();
|
||||
static ResExtractor<PAKBridge> LookupExtractor(const PAK::Entry& entry);
|
||||
inline const std::string& getName() const {return m_node.getName();}
|
||||
|
||||
Reference in New Issue
Block a user