mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-20 10:25:40 +00:00
Initial commit of current work on Prime World Editor
This commit is contained in:
33
Resource/cooker/CSectionMgrOut.cpp
Normal file
33
Resource/cooker/CSectionMgrOut.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#include "CSectionMgrOut.h"
|
||||
|
||||
CSectionMgrOut::CSectionMgrOut()
|
||||
{
|
||||
mSectionCount = 0;
|
||||
mCurSectionStart = 0;
|
||||
mCurSectionIndex = 0;
|
||||
}
|
||||
|
||||
void CSectionMgrOut::SetSectionCount(u32 Count)
|
||||
{
|
||||
mSectionCount = Count;
|
||||
mSectionSizes.resize(Count);
|
||||
}
|
||||
|
||||
void CSectionMgrOut::Init(const COutputStream& OutputStream)
|
||||
{
|
||||
mCurSectionStart = OutputStream.Tell();
|
||||
mCurSectionIndex = 0;
|
||||
}
|
||||
|
||||
void CSectionMgrOut::AddSize(COutputStream& OutputStream)
|
||||
{
|
||||
mSectionSizes[mCurSectionIndex] = OutputStream.Tell() - mCurSectionStart;
|
||||
mCurSectionIndex++;
|
||||
mCurSectionStart = OutputStream.Tell();
|
||||
}
|
||||
|
||||
void CSectionMgrOut::WriteSizes(COutputStream& OutputStream)
|
||||
{
|
||||
for (u32 iSec = 0; iSec < mSectionCount; iSec++)
|
||||
OutputStream.WriteLong(mSectionSizes[iSec]);
|
||||
}
|
||||
Reference in New Issue
Block a user