From 8007c5e483c6bb11d8fff7f120eb89d11a614fac Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Thu, 18 Jan 2024 21:23:07 -0500 Subject: [PATCH] Match MxFlcPresenter::LoadFrame to 100% --- LEGO1/omni/src/video/mxflcpresenter.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/LEGO1/omni/src/video/mxflcpresenter.cpp b/LEGO1/omni/src/video/mxflcpresenter.cpp index fa6d3cac..5e1019a1 100644 --- a/LEGO1/omni/src/video/mxflcpresenter.cpp +++ b/LEGO1/omni/src/video/mxflcpresenter.cpp @@ -45,18 +45,20 @@ void MxFlcPresenter::CreateBitmap() // FUNCTION: LEGO1 0x100b3570 void MxFlcPresenter::LoadFrame(MxStreamChunk* p_chunk) { - MxU32* data = (MxU32*) p_chunk->GetData(); - MxS32 rectCount = *data; - data++; + MxU8* data = p_chunk->GetData(); + + MxS32 rectCount = *(MxU32*) data; + data += sizeof(MxU32); MxRect32* rects = (MxRect32*) data; - MxBool decodedColorMap; + data += rectCount * sizeof(MxRect32); + MxBool decodedColorMap; DecodeFLCFrame( &m_bitmap->GetBitmapInfo()->m_bmiHeader, m_bitmap->GetBitmapData(), m_flcHeader, - &rects[rectCount], + data, &decodedColorMap );