2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 22:27:41 +00:00

Fully working PAK/MLVL/STRG reads

This commit is contained in:
Jack Andersen
2015-07-13 14:38:48 -10:00
parent 7876d4c209
commit 31f77497fd
13 changed files with 297 additions and 51 deletions

View File

@@ -3,6 +3,7 @@
#include <unordered_map>
#include <NOD/DiscBase.hpp>
#include "../Logging.hpp"
#include "../DNACommon/DNACommon.hpp"
@@ -32,6 +33,13 @@ struct PAK : BigDNA
UniqueID32 id;
Value<atUint32> size;
Value<atUint32> offset;
std::unique_ptr<atUint8[]> getBuffer(const NOD::DiscBase::IPartition::Node& pak, atUint64& szOut) const;
inline PAKEntryReadStream beginReadStream(const NOD::DiscBase::IPartition::Node& pak, atUint64 off=0) const
{
atUint64 sz;
return PAKEntryReadStream(getBuffer(pak, sz), sz, off);
}
};
std::vector<NameEntry> m_nameEntries;