mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-20 14:51:15 +00:00
feat: add/match MxPalette::Reset [0x100BF490]
This commit is contained in:
parent
d711e015dc
commit
7b774666c8
@ -442,4 +442,19 @@ MxResult MxPalette::SetSkyColor(LPPALETTEENTRY p_sky_color)
|
||||
status = -1;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100BF490
|
||||
void MxPalette::Reset(MxBool p_ignoreSkyColor)
|
||||
{
|
||||
if ( this->m_palette != NULL )
|
||||
{
|
||||
GetDefaultPalette(this->m_entries);
|
||||
if ( !p_ignoreSkyColor )
|
||||
{
|
||||
this->m_entries[140] = this->m_entries[141] = this->m_skyColor;
|
||||
}
|
||||
SetEntries(this->m_entries);
|
||||
this->m_palette->SetEntries(0, 0, 256, this->m_entries);
|
||||
}
|
||||
}
|
||||
@ -24,6 +24,7 @@ class MxPalette : public MxCore
|
||||
MxResult GetEntries(LPPALETTEENTRY p_entries);
|
||||
MxResult SetEntries(LPPALETTEENTRY p_palette);
|
||||
MxResult SetSkyColor(LPPALETTEENTRY p_sky_color);
|
||||
void Reset(MxBool p_ignoreSkyColor);
|
||||
private:
|
||||
LPDIRECTDRAWPALETTE m_palette;
|
||||
PALETTEENTRY m_entries[256];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user