mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-18 02:05:23 +00:00
Explicit Asset ID refactor
This commit is contained in:
@@ -3,18 +3,18 @@
|
||||
|
||||
namespace DataSpec::DNAMP2 {
|
||||
|
||||
std::string PAK::bestEntryName(const nod::Node& pakNode, const Entry& entry, bool& named) const {
|
||||
std::string PAK::bestEntryName(const nod::Node& pakNode, const Entry& entry, std::string& catalogueName) const {
|
||||
std::unordered_map<UniqueID32, Entry>::const_iterator search;
|
||||
if (entry.type == FOURCC('AGSC') && (search = m_entries.find(entry.id)) != m_entries.cend()) {
|
||||
/* Use internal AGSC name for entry */
|
||||
auto rs = search->second.beginReadStream(pakNode);
|
||||
AGSC::Header header;
|
||||
header.read(rs);
|
||||
named = true;
|
||||
return header.groupName;
|
||||
catalogueName = header.groupName;
|
||||
return fmt::format(fmt("{}_{}"), header.groupName, entry.id);
|
||||
}
|
||||
|
||||
return DNAMP1::PAK::bestEntryName(pakNode, entry, named);
|
||||
return DNAMP1::PAK::bestEntryName(pakNode, entry, catalogueName);
|
||||
}
|
||||
|
||||
} // namespace DataSpec::DNAMP2
|
||||
|
||||
Reference in New Issue
Block a user