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

MP2/3 MREA extract fix

This commit is contained in:
Jack Andersen
2017-01-16 17:51:42 -10:00
parent 3d91bb4e6a
commit b4a3d2b902
3 changed files with 11 additions and 3 deletions

View File

@@ -5,6 +5,8 @@
namespace DataSpec
{
extern hecl::Database::DataSpecEntry SpecEntMP3ORIG;
namespace DNAMP3
{
@@ -88,7 +90,9 @@ bool MREA::Extract(const SpecBase& dataSpec,
/* MREA decompression stream */
StreamReader drs(rs, head.compressedBlockCount, head.secIndexCount);
athena::io::FileWriter mreaDecompOut(pakRouter.getCooked(&entry).getWithExtension(_S(".decomp")).getAbsolutePath());
hecl::ProjectPath decompPath = outPath.getCookedPath(SpecEntMP3ORIG).getWithExtension(_S(".decomp"));
decompPath.makeDirChain(false);
athena::io::FileWriter mreaDecompOut(decompPath.getAbsolutePath());
head.write(mreaDecompOut);
mreaDecompOut.seekAlign32();
drs.writeDecompInfos(mreaDecompOut);