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

CINF/CSKR integration

This commit is contained in:
Jack Andersen
2015-08-12 21:29:00 -10:00
parent cdd7b45394
commit fd550702e1
21 changed files with 604 additions and 36 deletions

View File

@@ -571,6 +571,21 @@ public:
*nodeOut = nullptr;
return nullptr;
}
template <typename DNA>
bool lookupAndReadDNA(const typename BRIDGETYPE::PAKType::IDType& id, DNA& out)
{
const NOD::DiscBase::IPartition::Node* node;
const typename BRIDGETYPE::PAKType::Entry* entry = lookupEntry(id, &node);
if (!entry)
{
LogDNACommon.report(LogVisor::Error, "unable to find PAK entry %s", id.toString().c_str());
return false;
}
PAKEntryReadStream rs = entry->beginReadStream(*node);
out.read(rs);
return true;
}
};
/* Resource cooker function */