mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-17 08:57:09 +00:00
Lots of work to get MP2 repacking functional
This commit is contained in:
@@ -200,10 +200,11 @@ void CAreaCooker::WritePrimeSCLY(IOutputStream& rOut)
|
||||
// SCGN
|
||||
if (mVersion == eEchoesDemo)
|
||||
{
|
||||
rOut.WriteString("SCGN", 4);
|
||||
// IMPORTANT TODO - REGENERATE SCGN LAYER
|
||||
/*rOut.WriteString("SCGN", 4);
|
||||
rOut.WriteByte(1);
|
||||
CScriptCooker::WriteLayer(mVersion, mpArea->mpGeneratorLayer, rOut);
|
||||
FinishSection(false);
|
||||
FinishSection(false);*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,9 +221,10 @@ void CAreaCooker::WriteEchoesSCLY(IOutputStream& rOut)
|
||||
}
|
||||
|
||||
// SCGN
|
||||
// IMPORTANT TODO - REGENERATE SCGN
|
||||
rOut.WriteString("SCGN", 4);
|
||||
rOut.WriteByte(0x1);
|
||||
CScriptCooker::WriteLayer(mVersion, mpArea->mpGeneratorLayer, rOut);
|
||||
//CScriptCooker::WriteLayer(mVersion, mpArea->mpGeneratorLayer, rOut);
|
||||
FinishSection(true);
|
||||
}
|
||||
|
||||
@@ -276,7 +278,7 @@ void CAreaCooker::FinishBlock()
|
||||
|
||||
if (EnableCompression)
|
||||
{
|
||||
bool Success = CompressionUtil::CompressSegmentedData((u8*) mCompressedData.Data(), mCompressedData.Size(), CompressedBuf.data(), CompressedSize, UseZlib);
|
||||
bool Success = CompressionUtil::CompressSegmentedData((u8*) mCompressedData.Data(), mCompressedData.Size(), CompressedBuf.data(), CompressedSize, UseZlib, true);
|
||||
u32 PadBytes = (32 - (CompressedSize % 32)) & 0x1F;
|
||||
WriteCompressedData = Success && (CompressedSize + PadBytes < (u32) mCompressedData.Size());
|
||||
}
|
||||
|
||||
@@ -141,6 +141,10 @@ bool CWorldCooker::CookMLVL(CWorld *pWorld, IOutputStream& rMLVL)
|
||||
for (u32 iOff = 0; iOff < ModuleLayerOffsets.size(); iOff++)
|
||||
rMLVL.WriteLong(ModuleLayerOffsets[iOff]);
|
||||
}
|
||||
|
||||
// Internal Name
|
||||
if (Game >= eEchoesDemo)
|
||||
rMLVL.WriteString(rArea.InternalName.ToStdString());
|
||||
}
|
||||
|
||||
if (Game <= eCorruption)
|
||||
|
||||
Reference in New Issue
Block a user