2023-06-29 04:10:08 -04:00
|
|
|
#include "mxflcpresenter.h"
|
|
|
|
|
2023-07-02 03:00:28 -04:00
|
|
|
#include "decomp.h"
|
2023-11-19 07:28:06 -05:00
|
|
|
#include "mxbitmap.h"
|
|
|
|
#include "mxomni.h"
|
|
|
|
#include "mxpalette.h"
|
|
|
|
#include "mxvideomanager.h"
|
2023-07-02 03:00:28 -04:00
|
|
|
|
|
|
|
DECOMP_SIZE_ASSERT(MxFlcPresenter, 0x68);
|
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x100b3310
|
2023-06-29 04:10:08 -04:00
|
|
|
MxFlcPresenter::MxFlcPresenter()
|
|
|
|
{
|
2023-11-29 07:35:32 -05:00
|
|
|
this->m_flicHeader = NULL;
|
2024-01-17 11:53:53 -05:00
|
|
|
this->m_flags &= ~c_bit2;
|
|
|
|
this->m_flags &= ~c_bit3;
|
2023-06-29 04:10:08 -04:00
|
|
|
}
|
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x100b3420
|
2023-06-29 04:10:08 -04:00
|
|
|
MxFlcPresenter::~MxFlcPresenter()
|
|
|
|
{
|
2023-11-29 07:35:32 -05:00
|
|
|
if (this->m_flicHeader) {
|
|
|
|
delete this->m_flicHeader;
|
2023-10-24 19:38:27 -04:00
|
|
|
}
|
2023-06-29 04:10:08 -04:00
|
|
|
}
|
2023-11-19 07:28:06 -05:00
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x100b3490
|
2023-11-29 07:35:32 -05:00
|
|
|
void MxFlcPresenter::LoadHeader(MxStreamChunk* p_chunk)
|
|
|
|
{
|
|
|
|
m_flicHeader = (FLIC_HEADER*) new MxU8[p_chunk->GetLength()];
|
|
|
|
memcpy(m_flicHeader, p_chunk->GetData(), p_chunk->GetLength());
|
|
|
|
}
|
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x100b34d0
|
2023-11-29 07:35:32 -05:00
|
|
|
void MxFlcPresenter::CreateBitmap()
|
|
|
|
{
|
|
|
|
if (m_bitmap)
|
|
|
|
delete m_bitmap;
|
|
|
|
|
|
|
|
m_bitmap = new MxBitmap;
|
|
|
|
m_bitmap->SetSize(m_flicHeader->width, m_flicHeader->height, NULL, FALSE);
|
|
|
|
}
|
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x100b3620
|
2023-12-07 07:13:31 -05:00
|
|
|
void MxFlcPresenter::RealizePalette()
|
2023-11-19 07:28:06 -05:00
|
|
|
{
|
2023-12-07 07:13:31 -05:00
|
|
|
MxPalette* palette = m_bitmap->CreatePalette();
|
|
|
|
MVideoManager()->RealizePalette(palette);
|
|
|
|
delete palette;
|
2023-11-19 07:28:06 -05:00
|
|
|
}
|