2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-10 02:27:42 +00:00

All cooked resources extracting; decompression bug-fixes

This commit is contained in:
Jack Andersen
2015-07-17 18:33:38 -10:00
parent 94d84d8991
commit dea341d27b
22 changed files with 564 additions and 168 deletions

View File

@@ -13,6 +13,8 @@ namespace DNAMP1
struct PAK : BigDNA
{
bool m_useLzo;
PAK(bool useLzo) : m_useLzo(useLzo) {}
DECL_EXPLICIT_DNA
struct NameEntry : BigDNA
@@ -37,7 +39,8 @@ struct PAK : BigDNA
inline PAKEntryReadStream beginReadStream(const NOD::DiscBase::IPartition::Node& pak, atUint64 off=0) const
{
atUint64 sz;
return PAKEntryReadStream(getBuffer(pak, sz), sz, off);
std::unique_ptr<atUint8[]> buf = getBuffer(pak, sz);
return PAKEntryReadStream(std::move(buf), sz, off);
}
};
@@ -70,7 +73,7 @@ struct PAK : BigDNA
return nentry.name;
/* Otherwise return ID format string */
return entry.id.toString();
return entry.type.toString() + '_' + entry.id.toString();
}
};