mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-17 08:57:09 +00:00
CGameArea: Simplify allocation handling
Eliminates manual new/delete and also makes the lifecycle of allocations enforced within the interface.
This commit is contained in:
@@ -191,7 +191,7 @@ void CAreaCooker::WritePrimeSCLY(IOutputStream& rOut)
|
||||
for (uint32 LayerIdx = 0; LayerIdx < NumLayers; LayerIdx++)
|
||||
{
|
||||
uint32 LayerStart = rOut.Tell();
|
||||
ScriptCooker.WriteLayer(rOut, mpArea->mScriptLayers[LayerIdx]);
|
||||
ScriptCooker.WriteLayer(rOut, mpArea->mScriptLayers[LayerIdx].get());
|
||||
|
||||
// Pad the layer to 32 bytes
|
||||
uint32 LayerSize = rOut.Tell() - LayerStart;
|
||||
@@ -233,7 +233,7 @@ void CAreaCooker::WriteEchoesSCLY(IOutputStream& rOut)
|
||||
rOut.WriteFourCC( FOURCC('SCLY') );
|
||||
rOut.WriteByte(1);
|
||||
rOut.WriteLong(LayerIdx);
|
||||
ScriptCooker.WriteLayer(rOut, mpArea->mScriptLayers[LayerIdx]);
|
||||
ScriptCooker.WriteLayer(rOut, mpArea->mScriptLayers[LayerIdx].get());
|
||||
FinishSection(true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user