isle/LEGO1/mxdschunk.cpp
Misha e824e321e8
Implement chunk parsing (#362)
* partial parsechunk implementation

* fix format

* param name fix

* rename functions

* match MxStreamController::RemoveSubscriber

* implement rest of MxDSBuffer

* Fixes and better matches

* Matche ParseChunk 100%

* Match MxDiskStreamProvider::VTable0x20

* Match MxDSBuffer::CalcBytesRemaining

* Minor stuff

* Minor improvements

* Refactor functions

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-12-26 22:27:54 +01:00

27 lines
379 B
C++

#include "mxdschunk.h"
DECOMP_SIZE_ASSERT(MxDSChunk, 0x1c);
// FUNCTION: LEGO1 0x100be050
MxDSChunk::MxDSChunk()
{
m_flags = 0;
m_data = NULL;
m_objectId = -1;
m_time = 0;
m_length = 0;
}
// FUNCTION: LEGO1 0x100be170
MxDSChunk::~MxDSChunk()
{
if (m_flags & Flag_Bit1) {
delete[] m_data;
}
}
// FUNCTION: LEGO1 0x100be1e0
MxU32 MxDSChunk::ReturnE()
{
return 0xe;
}