2
0
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:
Jack Andersen
2018-09-02 14:46:16 -10:00
parent 5a60a0acfc
commit e46ec80b64
150 changed files with 5011 additions and 430 deletions

23
DataSpec/DNAMP2/PAK.cpp Normal file
View 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);
}
}