This commit is contained in:
Christian Semmler 2024-01-18 19:09:28 -05:00
parent 267e3a0753
commit 7fe5cb8d09

View File

@ -45,32 +45,28 @@ void MxFlcPresenter::CreateBitmap()
// FUNCTION: LEGO1 0x100b3570 // FUNCTION: LEGO1 0x100b3570
void MxFlcPresenter::LoadFrame(MxStreamChunk* p_chunk) void MxFlcPresenter::LoadFrame(MxStreamChunk* p_chunk)
{ {
MxU32* dat = (MxU32*) p_chunk->GetData() + 4; MxU32* data = (MxU32*) p_chunk->GetData();
MxU32 offset = *(MxU32*) p_chunk->GetData(); MxS32 length = *data;
data++;
MxRect32* rects = (MxRect32*) data;
MxBool decodedColorMap; MxBool decodedColorMap;
DecodeFLCFrame( DecodeFLCFrame(
&m_bitmap->GetBitmapInfo()->m_bmiHeader, &m_bitmap->GetBitmapInfo()->m_bmiHeader,
m_bitmap->GetBitmapData(), m_bitmap->GetBitmapData(),
m_flcHeader, m_flcHeader,
&dat[offset], &rects[length],
//&(p_chunk->GetData() + 4)[*(MxU32*) p_chunk->GetData()],
&decodedColorMap &decodedColorMap
); );
if (((MxDSMediaAction*) m_action)->GetPaletteManagement() && decodedColorMap) if (((MxDSMediaAction*) m_action)->GetPaletteManagement() && decodedColorMap)
RealizePalette(); RealizePalette();
while (offset > 0) { for (MxS32 i = 0; i < length; i++) {
dat += 4; MxRect32 rect(rects[i]);
MxRect32 rect( rect.AddPoint(m_location);
dat[-4] + m_location.GetX(),
dat[-3] + m_location.GetY(),
dat[-2] + m_location.GetX(),
dat[-1] + m_location.GetY()
);
MVideoManager()->InvalidateRect(rect); MVideoManager()->InvalidateRect(rect);
offset--;
} }
} }