mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-21 07:11:16 +00:00
fix: MxPalette rgbquad ctor functionally matches
Not quite ASM matching yet because of weird register allocation mismatches.
This commit is contained in:
parent
5dd157fe6c
commit
ebc3145ca7
@ -271,6 +271,24 @@ MxPalette::MxPalette()
|
|||||||
this->m_skyColor = this->m_entries[141];
|
this->m_skyColor = this->m_entries[141];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100BEED0
|
||||||
|
MxPalette::MxPalette(const RGBQUAD *p_colors)
|
||||||
|
{
|
||||||
|
this->m_overrideSkyColor = FALSE;
|
||||||
|
this->m_palette = NULL;
|
||||||
|
GetDefaultPalette(this->m_entries);
|
||||||
|
|
||||||
|
for ( int i = 10; i < 246; i++ )
|
||||||
|
{
|
||||||
|
this->m_entries[i].peRed = p_colors[i].rgbRed;
|
||||||
|
this->m_entries[i].peGreen = p_colors[i].rgbGreen;
|
||||||
|
this->m_entries[i].peBlue = p_colors[i].rgbBlue;
|
||||||
|
this->m_entries[i].peFlags = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
this->m_skyColor = this->m_entries[141];
|
||||||
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 100bef90
|
// OFFSET: LEGO1 100bef90
|
||||||
MxPalette::~MxPalette()
|
MxPalette::~MxPalette()
|
||||||
{
|
{
|
||||||
@ -307,17 +325,6 @@ MxPalette* MxPalette::Clone()
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100beed0
|
|
||||||
MxPalette* MxPalette::FromBitmapPalette(RGBQUAD* p_bmp)
|
|
||||||
{
|
|
||||||
// FIXME: Incomplete
|
|
||||||
this->m_overrideSkyColor = FALSE;
|
|
||||||
ApplySystemEntriesToPalette(this->m_entries);
|
|
||||||
memcpy(this->m_entries + 10, &p_bmp[10], 246);
|
|
||||||
this->m_skyColor = this->m_entries[141];
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100bf420
|
// OFFSET: LEGO1 0x100bf420
|
||||||
void MxPalette::GetDefaultPalette(LPPALETTEENTRY p_entries)
|
void MxPalette::GetDefaultPalette(LPPALETTEENTRY p_entries)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user