mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 08:24:16 +00:00
implement LegoLoadCacheSoundPresenter (#475)
* fix * fixes * Fix WaveFormat, match LegoLoadCacheSoundPresenter --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
#include "legoloadcachesoundpresenter.h"
|
||||
|
||||
#include "legocachesound.h"
|
||||
#include "mxstreamchunk.h"
|
||||
#include "mxwavepresenter.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoLoadCacheSoundPresenter, 0x90)
|
||||
|
||||
// FUNCTION: LEGO1 0x10018340
|
||||
@@ -25,26 +29,44 @@ void LegoLoadCacheSoundPresenter::Init()
|
||||
// FUNCTION: LEGO1 0x100184f0
|
||||
void LegoLoadCacheSoundPresenter::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
delete this->m_unk0x70;
|
||||
delete[] this->m_unk0x70;
|
||||
MxWavePresenter::Destroy(p_fromDestructor);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10018510
|
||||
// FUNCTION: LEGO1 0x10018510
|
||||
void LegoLoadCacheSoundPresenter::ReadyTickle()
|
||||
{
|
||||
// TODO
|
||||
MxStreamChunk* chunk = NextChunk();
|
||||
|
||||
if (chunk) {
|
||||
WaveFormat* header = (WaveFormat*) chunk->GetData();
|
||||
m_unk0x78 = 0;
|
||||
|
||||
MxU8* data = new MxU8[header->m_dataSize];
|
||||
m_unk0x70 = data;
|
||||
m_unk0x74 = data;
|
||||
|
||||
m_cacheSound = new LegoCacheSound;
|
||||
memcpy(&m_pcmWaveFormat, &header->m_pcmWaveFormat.wf, sizeof(m_pcmWaveFormat));
|
||||
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
ProgressTickleState(e_streaming);
|
||||
}
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100185f0
|
||||
void LegoLoadCacheSoundPresenter::StreamingTickle()
|
||||
{
|
||||
// TODO
|
||||
EndAction();
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100186f0
|
||||
// FUNCTION: LEGO1 0x100186f0
|
||||
void LegoLoadCacheSoundPresenter::DoneTickle()
|
||||
{
|
||||
// TODO
|
||||
if (m_unk0x7c != 0) {
|
||||
EndAction();
|
||||
}
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10018700
|
||||
|
Reference in New Issue
Block a user