mirror of
https://github.com/isledecomp/isle-portable.git
synced 2025-02-16 19:50:52 -05:00
Name various functions and other members (#418)
* Name various functions and other members * Rename var
This commit is contained in:
parent
79465d358d
commit
58ea45f4cc
16 changed files with 133 additions and 133 deletions
|
@ -28,7 +28,7 @@ public:
|
|||
virtual void ReadyTickle() override; // vtable+0x18
|
||||
virtual void Destroy() override; // vtable+0x38
|
||||
|
||||
MxResult ParsePallete(MxStreamChunk* p_chunk);
|
||||
MxResult ParsePalette(MxStreamChunk* p_chunk);
|
||||
|
||||
private:
|
||||
void Init();
|
||||
|
|
|
@ -22,7 +22,7 @@ void LegoActionControlPresenter::ReadyTickle()
|
|||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Starting;
|
||||
|
||||
m_subscriber->FUN_100b8390(chunk);
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
if (m_compositePresenter) {
|
||||
if (m_action->GetDuration() == -1 || m_action->GetFlags() & 1) {
|
||||
m_compositePresenter->VTable0x60(this);
|
||||
|
|
|
@ -114,7 +114,7 @@ void MxCompositeMediaPresenter::StartingTickle()
|
|||
}
|
||||
else {
|
||||
for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) {
|
||||
if (!(*it)->GetAction()->GetStartTime() && ((MxMediaPresenter*) *it)->FUN_100b5650() &&
|
||||
if (!(*it)->GetAction()->GetStartTime() && ((MxMediaPresenter*) *it)->CurrentChunk() &&
|
||||
!((*it)->GetAction()->GetFlags() & MxDSAction::Flag_Bit9)) {
|
||||
(*it)->Tickle();
|
||||
(*it)->GetAction()->SetFlags((*it)->GetAction()->GetFlags() | MxDSAction::Flag_Bit9);
|
||||
|
|
|
@ -46,7 +46,7 @@ void LegoPalettePresenter::Destroy()
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1007a130
|
||||
MxResult LegoPalettePresenter::ParsePallete(MxStreamChunk* p_chunk)
|
||||
MxResult LegoPalettePresenter::ParsePalette(MxStreamChunk* p_chunk)
|
||||
{
|
||||
MxU8 buffer[40];
|
||||
RGBQUAD palleteData[256];
|
||||
|
@ -72,15 +72,15 @@ MxResult LegoPalettePresenter::ParsePallete(MxStreamChunk* p_chunk)
|
|||
// FUNCTION: LEGO1 0x1007a230
|
||||
void LegoPalettePresenter::ReadyTickle()
|
||||
{
|
||||
MxStreamChunk* chunk = m_subscriber->FUN_100b8360();
|
||||
MxStreamChunk* chunk = m_subscriber->CurrentChunk();
|
||||
if (chunk) {
|
||||
if (chunk->GetTime() <= m_action->GetElapsedTime()) {
|
||||
ParseExtra();
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Starting;
|
||||
chunk = m_subscriber->FUN_100b8250();
|
||||
MxResult result = ParsePallete(chunk);
|
||||
m_subscriber->FUN_100b8390(chunk);
|
||||
chunk = m_subscriber->NextChunk();
|
||||
MxResult result = ParsePalette(chunk);
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
|
||||
if (result == SUCCESS) {
|
||||
VideoManager()->RealizePalette(m_palette);
|
||||
|
|
|
@ -32,21 +32,21 @@ public:
|
|||
MxResult Create(MxStreamController* p_controller, MxU32 p_objectId, MxS16 p_unk0x48);
|
||||
void DeleteChunks();
|
||||
MxResult AddChunk(MxStreamChunk* p_chunk, MxBool p_append);
|
||||
MxStreamChunk* FUN_100b8250();
|
||||
MxStreamChunk* FUN_100b8360();
|
||||
void FUN_100b8390(MxStreamChunk* p_chunk);
|
||||
MxStreamChunk* NextChunk();
|
||||
MxStreamChunk* CurrentChunk();
|
||||
void DestroyChunk(MxStreamChunk* p_chunk);
|
||||
|
||||
inline MxU32 GetObjectId() { return m_objectId; }
|
||||
inline MxS16 GetUnknown48() { return m_unk0x48; }
|
||||
|
||||
private:
|
||||
MxStreamChunkList m_unk0x08; // 0x08
|
||||
MxStreamChunkListCursor* m_unk0x20; // 0x20
|
||||
MxStreamChunkList m_unk0x24; // 0x24
|
||||
MxStreamChunkListCursor* m_unk0x3c; // 0x3c
|
||||
MxStreamController* m_controller; // 0x40
|
||||
MxU32 m_objectId; // 0x44
|
||||
MxS16 m_unk0x48; // 0x48
|
||||
MxStreamChunkList m_pendingChunks; // 0x08
|
||||
MxStreamChunkListCursor* m_pendingChunkCursor; // 0x20
|
||||
MxStreamChunkList m_consumedChunks; // 0x24
|
||||
MxStreamChunkListCursor* m_consumedChunkCursor; // 0x3c
|
||||
MxStreamController* m_controller; // 0x40
|
||||
MxU32 m_objectId; // 0x44
|
||||
MxS16 m_unk0x48; // 0x48
|
||||
};
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100b7de0
|
||||
|
|
|
@ -35,19 +35,19 @@ public:
|
|||
virtual MxResult StartAction(MxStreamController*, MxDSAction*) override; // vtable+0x3c
|
||||
virtual void EndAction() override; // vtable+0x40
|
||||
virtual void Enable(MxBool p_enable) override; // vtable+0x54
|
||||
virtual void AppendChunk(MxStreamChunk* p_chunk); // vtable+0x58
|
||||
virtual void LoopChunk(MxStreamChunk* p_chunk); // vtable+0x58
|
||||
|
||||
protected:
|
||||
MxDSSubscriber* m_subscriber; // 0x40
|
||||
MxStreamChunkList* m_chunks; // 0x44
|
||||
MxStreamChunkListCursor* m_cursor; // 0x48
|
||||
MxStreamChunk* m_currentChunk; // 0x4c
|
||||
MxDSSubscriber* m_subscriber; // 0x40
|
||||
MxStreamChunkList* m_loopingChunks; // 0x44
|
||||
MxStreamChunkListCursor* m_loopingChunkCursor; // 0x48
|
||||
MxStreamChunk* m_currentChunk; // 0x4c
|
||||
|
||||
void Init();
|
||||
void Destroy(MxBool p_fromDestructor);
|
||||
|
||||
public:
|
||||
MxStreamChunk* FUN_100b5650();
|
||||
MxStreamChunk* CurrentChunk();
|
||||
MxStreamChunk* NextChunk();
|
||||
};
|
||||
|
||||
|
|
|
@ -26,21 +26,21 @@ public:
|
|||
return !strcmp(p_name, MxWavePresenter::ClassName()) || MxSoundPresenter::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual void ReadyTickle() override; // vtable+0x18
|
||||
virtual void StartingTickle() override; // vtable+0x1c
|
||||
virtual void StreamingTickle() override; // vtable+0x20
|
||||
virtual void DoneTickle() override; // vtable+0x2c
|
||||
virtual void ParseExtra() override; // vtable+0x30
|
||||
virtual MxResult AddToManager() override; // vtable+0x34
|
||||
virtual void Destroy() override; // vtable+0x38
|
||||
virtual void EndAction() override; // vtable+0x40
|
||||
virtual MxResult PutData() override; // vtable+0x4c
|
||||
virtual void Enable(MxBool p_enable) override; // vtable+0x54
|
||||
virtual void AppendChunk(MxStreamChunk* p_chunk) override; // vtable+0x58
|
||||
virtual void SetVolume(MxS32 p_volume) override; // vtable+0x60
|
||||
virtual void Pause(); // vtable+0x64
|
||||
virtual void Resume(); // vtable+0x68
|
||||
virtual MxBool IsPaused(); // vtable+0x6c
|
||||
virtual void ReadyTickle() override; // vtable+0x18
|
||||
virtual void StartingTickle() override; // vtable+0x1c
|
||||
virtual void StreamingTickle() override; // vtable+0x20
|
||||
virtual void DoneTickle() override; // vtable+0x2c
|
||||
virtual void ParseExtra() override; // vtable+0x30
|
||||
virtual MxResult AddToManager() override; // vtable+0x34
|
||||
virtual void Destroy() override; // vtable+0x38
|
||||
virtual void EndAction() override; // vtable+0x40
|
||||
virtual MxResult PutData() override; // vtable+0x4c
|
||||
virtual void Enable(MxBool p_enable) override; // vtable+0x54
|
||||
virtual void LoopChunk(MxStreamChunk* p_chunk) override; // vtable+0x58
|
||||
virtual void SetVolume(MxS32 p_volume) override; // vtable+0x60
|
||||
virtual void Pause(); // vtable+0x64
|
||||
virtual void Resume(); // vtable+0x68
|
||||
virtual MxBool IsPaused(); // vtable+0x6c
|
||||
|
||||
// Reference: https://github.com/itsmattkc/SIEdit/blob/master/lib/othertypes.h
|
||||
// SIZE 0x1c
|
||||
|
|
|
@ -35,7 +35,7 @@ void MxMIDIPresenter::Destroy(MxBool p_fromDestructor)
|
|||
m_criticalSection.Enter();
|
||||
|
||||
if (m_subscriber && m_chunk)
|
||||
m_subscriber->FUN_100b8390(m_chunk);
|
||||
m_subscriber->DestroyChunk(m_chunk);
|
||||
Init();
|
||||
|
||||
m_criticalSection.Leave();
|
||||
|
@ -50,7 +50,7 @@ void MxMIDIPresenter::ReadyTickle()
|
|||
MxStreamChunk* chunk = NextChunk();
|
||||
|
||||
if (chunk) {
|
||||
m_subscriber->FUN_100b8390(chunk);
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
ParseExtra();
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Starting;
|
||||
|
@ -60,7 +60,7 @@ void MxMIDIPresenter::ReadyTickle()
|
|||
// FUNCTION: LEGO1 0x100c28d0
|
||||
void MxMIDIPresenter::StartingTickle()
|
||||
{
|
||||
MxStreamChunk* chunk = FUN_100b5650();
|
||||
MxStreamChunk* chunk = CurrentChunk();
|
||||
|
||||
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime()) {
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
|
|
|
@ -134,7 +134,7 @@ void MxWavePresenter::ReadyTickle()
|
|||
if (chunk) {
|
||||
m_waveFormat = (WaveFormat*) new MxU8[chunk->GetLength()];
|
||||
memcpy(m_waveFormat, chunk->GetData(), chunk->GetLength());
|
||||
m_subscriber->FUN_100b8390(chunk);
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
ParseExtra();
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Starting;
|
||||
|
@ -144,7 +144,7 @@ void MxWavePresenter::ReadyTickle()
|
|||
// FUNCTION: LEGO1 0x100b1d50
|
||||
void MxWavePresenter::StartingTickle()
|
||||
{
|
||||
MxStreamChunk* chunk = FUN_100b5650();
|
||||
MxStreamChunk* chunk = CurrentChunk();
|
||||
|
||||
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime()) {
|
||||
MxU32 length = chunk->GetLength();
|
||||
|
@ -199,7 +199,7 @@ void MxWavePresenter::StreamingTickle()
|
|||
{
|
||||
if (!m_currentChunk) {
|
||||
if (!(m_action->GetFlags() & MxDSAction::Flag_Looping)) {
|
||||
MxStreamChunk* chunk = FUN_100b5650();
|
||||
MxStreamChunk* chunk = CurrentChunk();
|
||||
|
||||
if (chunk && chunk->GetFlags() & MxDSChunk::Flag_End && !(chunk->GetFlags() & MxDSChunk::Flag_Bit16)) {
|
||||
chunk->SetFlags(chunk->GetFlags() | MxDSChunk::Flag_Bit16);
|
||||
|
@ -237,11 +237,11 @@ void MxWavePresenter::DoneTickle()
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b2130
|
||||
void MxWavePresenter::AppendChunk(MxStreamChunk* p_chunk)
|
||||
void MxWavePresenter::LoopChunk(MxStreamChunk* p_chunk)
|
||||
{
|
||||
WriteToSoundBuffer(p_chunk->GetData(), p_chunk->GetLength());
|
||||
if (IsEnabled())
|
||||
m_subscriber->FUN_100b8390(p_chunk);
|
||||
m_subscriber->DestroyChunk(p_chunk);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b2160
|
||||
|
@ -254,7 +254,7 @@ MxResult MxWavePresenter::PutData()
|
|||
case TickleState_Streaming:
|
||||
if (m_currentChunk && FUN_100b1ba0()) {
|
||||
WriteToSoundBuffer(m_currentChunk->GetData(), m_currentChunk->GetLength());
|
||||
m_subscriber->FUN_100b8390(m_currentChunk);
|
||||
m_subscriber->DestroyChunk(m_currentChunk);
|
||||
m_currentChunk = NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,8 +27,8 @@ void MxMediaPresenter::Destroy()
|
|||
void MxMediaPresenter::Init()
|
||||
{
|
||||
this->m_subscriber = NULL;
|
||||
this->m_chunks = NULL;
|
||||
this->m_cursor = NULL;
|
||||
this->m_loopingChunks = NULL;
|
||||
this->m_loopingChunkCursor = NULL;
|
||||
this->m_currentChunk = NULL;
|
||||
}
|
||||
|
||||
|
@ -39,22 +39,22 @@ void MxMediaPresenter::Destroy(MxBool p_fromDestructor)
|
|||
MxAutoLocker lock(&m_criticalSection);
|
||||
|
||||
if (m_currentChunk && m_subscriber)
|
||||
m_subscriber->FUN_100b8390(m_currentChunk);
|
||||
m_subscriber->DestroyChunk(m_currentChunk);
|
||||
|
||||
if (m_subscriber)
|
||||
delete m_subscriber;
|
||||
|
||||
if (m_cursor)
|
||||
delete m_cursor;
|
||||
if (m_loopingChunkCursor)
|
||||
delete m_loopingChunkCursor;
|
||||
|
||||
if (m_chunks) {
|
||||
MxStreamChunkListCursor cursor(m_chunks);
|
||||
if (m_loopingChunks) {
|
||||
MxStreamChunkListCursor cursor(m_loopingChunks);
|
||||
MxStreamChunk* chunk;
|
||||
|
||||
while (cursor.Next(chunk))
|
||||
chunk->Release();
|
||||
|
||||
delete m_chunks;
|
||||
delete m_loopingChunks;
|
||||
}
|
||||
|
||||
Init();
|
||||
|
@ -65,44 +65,44 @@ void MxMediaPresenter::Destroy(MxBool p_fromDestructor)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b5650
|
||||
MxStreamChunk* MxMediaPresenter::FUN_100b5650()
|
||||
MxStreamChunk* MxMediaPresenter::CurrentChunk()
|
||||
{
|
||||
MxStreamChunk* result = NULL;
|
||||
MxStreamChunk* chunk = NULL;
|
||||
|
||||
if (m_subscriber) {
|
||||
result = m_subscriber->FUN_100b8360();
|
||||
chunk = m_subscriber->CurrentChunk();
|
||||
|
||||
if (result && result->GetFlags() & MxDSChunk::Flag_Bit3) {
|
||||
if (chunk && chunk->GetFlags() & MxDSChunk::Flag_Bit3) {
|
||||
m_action->SetFlags(m_action->GetFlags() | MxDSAction::Flag_Bit7);
|
||||
m_subscriber->FUN_100b8250();
|
||||
m_subscriber->FUN_100b8390(result);
|
||||
result = NULL;
|
||||
m_subscriber->NextChunk();
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
chunk = NULL;
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Done;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
return chunk;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b56b0
|
||||
MxStreamChunk* MxMediaPresenter::NextChunk()
|
||||
{
|
||||
MxStreamChunk* result = NULL;
|
||||
MxStreamChunk* chunk = NULL;
|
||||
|
||||
if (m_subscriber) {
|
||||
result = m_subscriber->FUN_100b8250();
|
||||
chunk = m_subscriber->NextChunk();
|
||||
|
||||
if (result && result->GetFlags() & MxDSChunk::Flag_Bit3) {
|
||||
if (chunk && chunk->GetFlags() & MxDSChunk::Flag_Bit3) {
|
||||
m_action->SetFlags(m_action->GetFlags() | MxDSAction::Flag_Bit7);
|
||||
m_subscriber->FUN_100b8390(result);
|
||||
result = NULL;
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
chunk = NULL;
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Done;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
return chunk;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b5700
|
||||
|
@ -113,10 +113,10 @@ MxResult MxMediaPresenter::StartAction(MxStreamController* p_controller, MxDSAct
|
|||
|
||||
if (MxPresenter::StartAction(p_controller, p_action) == SUCCESS) {
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Looping) {
|
||||
m_chunks = new MxStreamChunkList;
|
||||
m_cursor = new MxStreamChunkListCursor(m_chunks);
|
||||
m_loopingChunks = new MxStreamChunkList;
|
||||
m_loopingChunkCursor = new MxStreamChunkListCursor(m_loopingChunks);
|
||||
|
||||
if (!m_chunks && !m_cursor)
|
||||
if (!m_loopingChunks && !m_loopingChunkCursor)
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
@ -180,7 +180,7 @@ MxResult MxMediaPresenter::Tickle()
|
|||
{
|
||||
MxAutoLocker lock(&m_criticalSection);
|
||||
|
||||
FUN_100b5650();
|
||||
CurrentChunk();
|
||||
|
||||
return MxPresenter::Tickle();
|
||||
}
|
||||
|
@ -193,16 +193,16 @@ void MxMediaPresenter::StreamingTickle()
|
|||
|
||||
if (m_currentChunk) {
|
||||
if (m_currentChunk->GetFlags() & MxDSChunk::Flag_End) {
|
||||
m_subscriber->FUN_100b8390(m_currentChunk);
|
||||
m_subscriber->DestroyChunk(m_currentChunk);
|
||||
m_currentChunk = NULL;
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Repeating;
|
||||
}
|
||||
else if (m_action->GetFlags() & MxDSAction::Flag_Looping) {
|
||||
AppendChunk(m_currentChunk);
|
||||
LoopChunk(m_currentChunk);
|
||||
|
||||
if (!IsEnabled()) {
|
||||
m_subscriber->FUN_100b8390(m_currentChunk);
|
||||
m_subscriber->DestroyChunk(m_currentChunk);
|
||||
m_currentChunk = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -214,9 +214,9 @@ void MxMediaPresenter::StreamingTickle()
|
|||
void MxMediaPresenter::RepeatingTickle()
|
||||
{
|
||||
if (IsEnabled() && !m_currentChunk) {
|
||||
if (m_cursor)
|
||||
if (!m_cursor->Next(m_currentChunk))
|
||||
m_cursor->Next(m_currentChunk);
|
||||
if (m_loopingChunkCursor)
|
||||
if (!m_loopingChunkCursor->Next(m_currentChunk))
|
||||
m_loopingChunkCursor->Next(m_currentChunk);
|
||||
|
||||
if (m_currentChunk) {
|
||||
MxLong time = m_currentChunk->GetTime();
|
||||
|
@ -243,7 +243,7 @@ void MxMediaPresenter::DoneTickle()
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b5f10
|
||||
void MxMediaPresenter::AppendChunk(MxStreamChunk* p_chunk)
|
||||
void MxMediaPresenter::LoopChunk(MxStreamChunk* p_chunk)
|
||||
{
|
||||
MxStreamChunk* chunk = new MxStreamChunk;
|
||||
|
||||
|
@ -253,7 +253,7 @@ void MxMediaPresenter::AppendChunk(MxStreamChunk* p_chunk)
|
|||
chunk->SetTime(p_chunk->GetTime());
|
||||
|
||||
memcpy(chunk->GetData(), p_chunk->GetData(), chunk->GetLength());
|
||||
m_chunks->Append(chunk);
|
||||
m_loopingChunks->Append(chunk);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b6030
|
||||
|
@ -268,8 +268,8 @@ void MxMediaPresenter::Enable(MxBool p_enable)
|
|||
SetTickleState(TickleState_Repeating);
|
||||
}
|
||||
else {
|
||||
if (m_cursor)
|
||||
m_cursor->Reset();
|
||||
if (m_loopingChunkCursor)
|
||||
m_loopingChunkCursor->Reset();
|
||||
m_currentChunk = NULL;
|
||||
SetTickleState(TickleState_Done);
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ void MxEventPresenter::ReadyTickle()
|
|||
|
||||
if (chunk) {
|
||||
CopyData(chunk);
|
||||
m_subscriber->FUN_100b8390(chunk);
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
ParseExtra();
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Starting;
|
||||
|
@ -107,7 +107,7 @@ MxResult MxEventPresenter::PutData()
|
|||
}
|
||||
|
||||
if (m_currentTickleState == TickleState_Streaming)
|
||||
m_subscriber->FUN_100b8390(m_currentChunk);
|
||||
m_subscriber->DestroyChunk(m_currentChunk);
|
||||
m_currentChunk = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -46,9 +46,9 @@ void MxLoopingFlcPresenter::NextFrame()
|
|||
}
|
||||
else {
|
||||
LoadFrame(chunk);
|
||||
AppendChunk(chunk);
|
||||
LoopChunk(chunk);
|
||||
m_unk0x68 += m_flicHeader->speed;
|
||||
}
|
||||
|
||||
m_subscriber->FUN_100b8390(chunk);
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
}
|
||||
|
|
|
@ -57,11 +57,11 @@ void MxLoopingSmkPresenter::NextFrame()
|
|||
}
|
||||
else {
|
||||
LoadFrame(chunk);
|
||||
AppendChunk(chunk);
|
||||
LoopChunk(chunk);
|
||||
m_elapsedDuration += 1000 / ((MxDSMediaAction*) m_action)->GetFramesPerSecond();
|
||||
}
|
||||
|
||||
m_subscriber->FUN_100b8390(chunk);
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b4a90
|
||||
|
@ -73,7 +73,7 @@ void MxLoopingSmkPresenter::VTable0x8c()
|
|||
}
|
||||
else {
|
||||
MxStreamChunk* chunk;
|
||||
m_cursor->Current(chunk);
|
||||
m_loopingChunkCursor->Current(chunk);
|
||||
LoadFrame(chunk);
|
||||
m_elapsedDuration += 1000 / ((MxDSMediaAction*) m_action)->GetFramesPerSecond();
|
||||
}
|
||||
|
@ -83,9 +83,9 @@ void MxLoopingSmkPresenter::VTable0x8c()
|
|||
void MxLoopingSmkPresenter::RepeatingTickle()
|
||||
{
|
||||
for (MxS16 i = 0; i < m_unk0x5c; i++) {
|
||||
if (!m_cursor->HasMatch()) {
|
||||
if (!m_loopingChunkCursor->HasMatch()) {
|
||||
MxStreamChunk* chunk;
|
||||
MxStreamChunkListCursor cursor(m_chunks);
|
||||
MxStreamChunkListCursor cursor(m_loopingChunks);
|
||||
|
||||
cursor.Last(chunk);
|
||||
MxLong time = chunk->GetTime();
|
||||
|
@ -99,18 +99,18 @@ void MxLoopingSmkPresenter::RepeatingTickle()
|
|||
while (cursor.Next(chunk))
|
||||
chunk->SetTime(chunk->GetTime() + time);
|
||||
|
||||
m_cursor->Next();
|
||||
m_loopingChunkCursor->Next();
|
||||
}
|
||||
|
||||
MxStreamChunk* chunk;
|
||||
m_cursor->Current(chunk);
|
||||
m_loopingChunkCursor->Current(chunk);
|
||||
|
||||
if (m_action->GetElapsedTime() < chunk->GetTime())
|
||||
break;
|
||||
|
||||
VTable0x8c();
|
||||
|
||||
m_cursor->Next(chunk);
|
||||
m_loopingChunkCursor->Next(chunk);
|
||||
|
||||
if (m_currentTickleState != TickleState_Repeating)
|
||||
break;
|
||||
|
|
|
@ -63,7 +63,7 @@ void MxStillPresenter::NextFrame()
|
|||
{
|
||||
MxStreamChunk* chunk = NextChunk();
|
||||
LoadFrame(chunk);
|
||||
m_subscriber->FUN_100b8390(chunk);
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b9dd0
|
||||
|
@ -122,7 +122,7 @@ void MxStillPresenter::StartingTickle()
|
|||
// FUNCTION: LEGO1 0x100b9f90
|
||||
void MxStillPresenter::StreamingTickle()
|
||||
{
|
||||
MxStreamChunk* chunk = FUN_100b5650();
|
||||
MxStreamChunk* chunk = CurrentChunk();
|
||||
|
||||
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime()) {
|
||||
m_chunkTime = chunk->GetTime();
|
||||
|
|
|
@ -241,13 +241,13 @@ void MxVideoPresenter::NextFrame()
|
|||
MxStreamChunk* chunk = NextChunk();
|
||||
|
||||
if (chunk->GetFlags() & MxDSChunk::Flag_End) {
|
||||
m_subscriber->FUN_100b8390(chunk);
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Repeating;
|
||||
}
|
||||
else {
|
||||
LoadFrame(chunk);
|
||||
m_subscriber->FUN_100b8390(chunk);
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -458,7 +458,7 @@ void MxVideoPresenter::ReadyTickle()
|
|||
|
||||
if (chunk) {
|
||||
LoadHeader(chunk);
|
||||
m_subscriber->FUN_100b8390(chunk);
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
ParseExtra();
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Starting;
|
||||
|
@ -468,7 +468,7 @@ void MxVideoPresenter::ReadyTickle()
|
|||
// FUNCTION: LEGO1 0x100b2fa0
|
||||
void MxVideoPresenter::StartingTickle()
|
||||
{
|
||||
MxStreamChunk* chunk = FUN_100b5650();
|
||||
MxStreamChunk* chunk = CurrentChunk();
|
||||
|
||||
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime()) {
|
||||
CreateBitmap();
|
||||
|
@ -502,7 +502,7 @@ void MxVideoPresenter::StreamingTickle()
|
|||
break;
|
||||
|
||||
LoadFrame(m_currentChunk);
|
||||
m_subscriber->FUN_100b8390(m_currentChunk);
|
||||
m_subscriber->DestroyChunk(m_currentChunk);
|
||||
m_currentChunk = NULL;
|
||||
m_flags |= Flag_Bit1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue