Implement/match LegoPhonemePresenter::LoadFrame & PutFrame (#812)

* Implement/match LegoPhonemePresenter::LoadFrame & PutFrame

* add beta10 annotations
This commit is contained in:
Christian Semmler
2024-04-17 07:26:11 -04:00
committed by GitHub
parent d639eb4c2b
commit 11410890cd
10 changed files with 89 additions and 68 deletions

View File

@@ -33,7 +33,7 @@ public:
private:
void Init();
undefined4 m_unk0x68; // 0x68
MxS32 m_rectCount; // 0x68
LegoTextureInfo* m_textureInfo; // 0x6c
MxBool m_unk0x70; // 0x70
MxString m_roiName; // 0x74

View File

@@ -100,17 +100,17 @@ void LegoMeterPresenter::ParseExtra()
void LegoMeterPresenter::StreamingTickle()
{
MxStillPresenter::StreamingTickle();
m_unk0x6c = new MxU8[m_bitmap->GetBmiStride() * m_bitmap->GetBmiHeightAbs()];
m_unk0x6c = new MxU8[m_frameBitmap->GetBmiStride() * m_frameBitmap->GetBmiHeightAbs()];
if (m_unk0x6c == NULL) {
EndAction();
}
memcpy(m_unk0x6c, m_bitmap->GetBitmapData(), m_bitmap->GetBmiStride() * m_bitmap->GetBmiHeightAbs());
memcpy(m_unk0x6c, m_frameBitmap->GetImage(), m_frameBitmap->GetBmiStride() * m_frameBitmap->GetBmiHeightAbs());
m_unk0x88 = 0;
m_unk0x8a = 0;
m_unk0x8c = m_bitmap->GetBmiWidth() - 1;
m_unk0x8e = m_bitmap->GetBmiHeightAbs() - 1;
m_unk0x8c = m_frameBitmap->GetBmiWidth() - 1;
m_unk0x8e = m_frameBitmap->GetBmiHeightAbs() - 1;
}
// FUNCTION: LEGO1 0x10043a30

View File

@@ -21,13 +21,14 @@ LegoPhonemePresenter::~LegoPhonemePresenter()
// FUNCTION: LEGO1 0x1004e3b0
void LegoPhonemePresenter::Init()
{
m_unk0x68 = 0;
m_rectCount = 0;
m_textureInfo = NULL;
m_unk0x70 = FALSE;
m_unk0x84 = FALSE;
}
// FUNCTION: LEGO1 0x1004e3d0
// FUNCTION: BETA10 0x100c3646
void LegoPhonemePresenter::StartingTickle()
{
MxFlcPresenter::StartingTickle();
@@ -84,16 +85,36 @@ void LegoPhonemePresenter::StartingTickle()
}
}
// STUB: LEGO1 0x1004e800
// FUNCTION: LEGO1 0x1004e800
// FUNCTION: BETA10 0x100c3ac9
void LegoPhonemePresenter::LoadFrame(MxStreamChunk* p_chunk)
{
// TODO
MxU8* data = p_chunk->GetData();
m_rectCount = *(MxS32*) data;
data += sizeof(MxS32);
MxRect32* rects = (MxRect32*) data;
data += m_rectCount * sizeof(MxRect32);
MxBool decodedColorMap;
DecodeFLCFrame(
&m_frameBitmap->GetBitmapInfo()->m_bmiHeader,
m_frameBitmap->GetImage(),
m_flcHeader,
(FLIC_FRAME*) data,
&decodedColorMap
);
}
// STUB: LEGO1 0x1004e840
// FUNCTION: LEGO1 0x1004e840
// FUNCTION: BETA10 0x100c3b5d
void LegoPhonemePresenter::PutFrame()
{
// TODO
if (m_textureInfo != NULL && m_rectCount != 0) {
m_textureInfo->FUN_10066010(m_frameBitmap->GetImage());
m_rectCount = 0;
}
}
// STUB: LEGO1 0x1004e870