mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-26 09:54:18 +00:00
Name various functions and other members (#418)
* Name various functions and other members * Rename var
This commit is contained in:
committed by
GitHub
parent
79465d358d
commit
58ea45f4cc
@@ -9,8 +9,8 @@ MxDSSubscriber::MxDSSubscriber()
|
||||
{
|
||||
m_unk0x48 = -1;
|
||||
m_objectId = -1;
|
||||
m_unk0x20 = NULL;
|
||||
m_unk0x3c = NULL;
|
||||
m_pendingChunkCursor = NULL;
|
||||
m_consumedChunkCursor = NULL;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b7e00
|
||||
@@ -21,13 +21,13 @@ MxDSSubscriber::~MxDSSubscriber()
|
||||
|
||||
DeleteChunks();
|
||||
|
||||
if (m_unk0x20)
|
||||
delete m_unk0x20;
|
||||
m_unk0x20 = NULL;
|
||||
if (m_pendingChunkCursor)
|
||||
delete m_pendingChunkCursor;
|
||||
m_pendingChunkCursor = NULL;
|
||||
|
||||
if (m_unk0x3c)
|
||||
delete m_unk0x3c;
|
||||
m_unk0x3c = NULL;
|
||||
if (m_consumedChunkCursor)
|
||||
delete m_consumedChunkCursor;
|
||||
m_consumedChunkCursor = NULL;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b7ed0
|
||||
@@ -40,12 +40,12 @@ MxResult MxDSSubscriber::Create(MxStreamController* p_controller, MxU32 p_object
|
||||
return FAILURE;
|
||||
m_controller = p_controller;
|
||||
|
||||
m_unk0x20 = new MxStreamChunkListCursor(&m_unk0x08);
|
||||
if (!m_unk0x20)
|
||||
m_pendingChunkCursor = new MxStreamChunkListCursor(&m_pendingChunks);
|
||||
if (!m_pendingChunkCursor)
|
||||
return FAILURE;
|
||||
|
||||
m_unk0x3c = new MxStreamChunkListCursor(&m_unk0x24);
|
||||
if (!m_unk0x3c)
|
||||
m_consumedChunkCursor = new MxStreamChunkListCursor(&m_consumedChunks);
|
||||
if (!m_consumedChunkCursor)
|
||||
return FAILURE;
|
||||
|
||||
m_controller->AddSubscriber(this);
|
||||
@@ -58,13 +58,13 @@ void MxDSSubscriber::DeleteChunks()
|
||||
if (m_controller) {
|
||||
MxStreamChunk* chunk = NULL;
|
||||
|
||||
while (m_unk0x20->First(chunk)) {
|
||||
m_unk0x20->Detach();
|
||||
while (m_pendingChunkCursor->First(chunk)) {
|
||||
m_pendingChunkCursor->Detach();
|
||||
delete chunk;
|
||||
}
|
||||
|
||||
while (m_unk0x3c->First(chunk)) {
|
||||
m_unk0x3c->Detach();
|
||||
while (m_consumedChunkCursor->First(chunk)) {
|
||||
m_consumedChunkCursor->Detach();
|
||||
delete chunk;
|
||||
}
|
||||
}
|
||||
@@ -73,49 +73,49 @@ void MxDSSubscriber::DeleteChunks()
|
||||
// FUNCTION: LEGO1 0x100b8150
|
||||
MxResult MxDSSubscriber::AddChunk(MxStreamChunk* p_chunk, MxBool p_append)
|
||||
{
|
||||
if (m_unk0x20) {
|
||||
if (m_pendingChunkCursor) {
|
||||
if (p_append)
|
||||
m_unk0x08.Append(p_chunk);
|
||||
m_pendingChunks.Append(p_chunk);
|
||||
else
|
||||
m_unk0x08.Prepend(p_chunk);
|
||||
m_pendingChunks.Prepend(p_chunk);
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b8250
|
||||
MxStreamChunk* MxDSSubscriber::FUN_100b8250()
|
||||
MxStreamChunk* MxDSSubscriber::NextChunk()
|
||||
{
|
||||
MxStreamChunk* chunk = NULL;
|
||||
|
||||
if (m_unk0x20)
|
||||
m_unk0x20->First(chunk);
|
||||
if (m_pendingChunkCursor)
|
||||
m_pendingChunkCursor->First(chunk);
|
||||
|
||||
if (chunk) {
|
||||
m_unk0x20->Detach();
|
||||
m_unk0x24.Append(chunk);
|
||||
m_pendingChunkCursor->Detach();
|
||||
m_consumedChunks.Append(chunk);
|
||||
}
|
||||
|
||||
return chunk;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b8360
|
||||
MxStreamChunk* MxDSSubscriber::FUN_100b8360()
|
||||
MxStreamChunk* MxDSSubscriber::CurrentChunk()
|
||||
{
|
||||
MxStreamChunk* chunk = NULL;
|
||||
|
||||
if (m_unk0x20)
|
||||
m_unk0x20->First(chunk);
|
||||
if (m_pendingChunkCursor)
|
||||
m_pendingChunkCursor->First(chunk);
|
||||
|
||||
return chunk;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b8390
|
||||
void MxDSSubscriber::FUN_100b8390(MxStreamChunk* p_chunk)
|
||||
void MxDSSubscriber::DestroyChunk(MxStreamChunk* p_chunk)
|
||||
{
|
||||
if (p_chunk) {
|
||||
if (m_unk0x3c->Find(p_chunk)) {
|
||||
m_unk0x3c->Detach();
|
||||
if (m_consumedChunkCursor->Find(p_chunk)) {
|
||||
m_consumedChunkCursor->Detach();
|
||||
if (p_chunk)
|
||||
delete p_chunk;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user