mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 17:47:43 +00:00
Integrate Amuse into hecl cook/extract for MP1/2
This commit is contained in:
23
DataSpec/DNAMP2/PAK.cpp
Normal file
23
DataSpec/DNAMP2/PAK.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#include "PAK.hpp"
|
||||
#include "AGSC.hpp"
|
||||
|
||||
namespace DataSpec::DNAMP2
|
||||
{
|
||||
|
||||
std::string PAK::bestEntryName(const nod::Node& pakNode, const Entry& entry, bool& named) 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;
|
||||
}
|
||||
|
||||
return DNAMP1::PAK::bestEntryName(pakNode, entry, named);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user