mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-25 01:14:19 +00:00
push progress, gn
This commit is contained in:
@@ -5,8 +5,15 @@ MxPalette::MxPalette()
|
|||||||
{
|
{
|
||||||
this->m_overrideSkyColor = FALSE;
|
this->m_overrideSkyColor = FALSE;
|
||||||
this->m_attached = NULL;
|
this->m_attached = NULL;
|
||||||
// GetDefaultSkyPalette
|
GetDefaultPalette(this->m_entries);
|
||||||
// this->m_skyColor = whatever it is once i figure out how m_palette works
|
this->m_skyColor = this->m_entries[0x8d];
|
||||||
|
// FIXME: Incomplete
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 100bef90
|
||||||
|
MxPalette::~MxPalette()
|
||||||
|
{
|
||||||
|
delete m_attached; // yes this matches more
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100bf150
|
// OFFSET: LEGO1 0x100bf150
|
||||||
@@ -16,6 +23,23 @@ MxResult MxPalette::GetEntries(LPPALETTEENTRY p_entries)
|
|||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100bf420
|
||||||
|
void MxPalette::GetDefaultPalette(LPPALETTEENTRY p_entries)
|
||||||
|
{
|
||||||
|
HDC hdc = GetDC((HWND) NULL);
|
||||||
|
int rasterCaps = GetDeviceCaps(hdc, RASTERCAPS);
|
||||||
|
if ((rasterCaps & RC_PALETTE) != 0) {
|
||||||
|
int paletteSize = GetDeviceCaps(hdc, SIZEPALETTE);
|
||||||
|
if (paletteSize == 256) {
|
||||||
|
GetSystemPaletteEntries(hdc, 0, 256, p_entries);
|
||||||
|
p_entries += 10;
|
||||||
|
memcpy(p_entries, this->m_entries, sizeof(this->m_entries));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ReleaseDC((HWND) NULL, hdc);
|
||||||
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100bf330
|
// OFFSET: LEGO1 0x100bf330
|
||||||
void MxPalette::Detach()
|
void MxPalette::Detach()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ public:
|
|||||||
__declspec(dllexport) void Detach();
|
__declspec(dllexport) void Detach();
|
||||||
|
|
||||||
MxPalette();
|
MxPalette();
|
||||||
|
~MxPalette();
|
||||||
|
void GetDefaultPalette(LPPALETTEENTRY p_entries);
|
||||||
MxResult GetEntries(LPPALETTEENTRY p_entries);
|
MxResult GetEntries(LPPALETTEENTRY p_entries);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user