Implement ApplySystemEntriesToPalette except the memcpy calls

This commit is contained in:
Joshua Peisach 2023-07-01 18:45:55 -04:00
parent 927fcd7cf1
commit 5c0883e0d5
2 changed files with 19 additions and 0 deletions

View File

@ -17,6 +17,24 @@ MxPalette::~MxPalette()
}
}
// OFFSET: LEGO1 0x100bf390
void MxPalette::ApplySystemEntriesToPalette(LPPALETTEENTRY p_entries)
{
// FIXME: incomplete
HDC hdc = GetDC(NULL);
unsigned int rastercaps = GetDeviceCaps(hdc, RASTERCAPS);
int sizepalettecaps;
if ((rastercaps & RC_PALETTE) != 0) {
sizepalettecaps = GetDeviceCaps(hdc, SIZEPALETTE);
if(sizepalettecaps = 256) {
GetSystemPaletteEntries(hdc,0,10,p_entries);
GetSystemPaletteEntries(hdc,246,10,p_entries + 0xf6);
ReleaseDC(NULL, hdc);
}
}
// FIXME: we get g_defaultPalette here, we need to define that, then we cna do the memcpy's
}
// OFFSET: LEGO1 100bf0b0
MxPalette* MxPalette::Clone()
{

View File

@ -17,6 +17,7 @@ class MxPalette : public MxCore
MxPalette();
virtual ~MxPalette();
void ApplySystemEntriesToPalette(LPPALETTEENTRY p_entries);
MxPalette* Clone();
void GetDefaultPalette(LPPALETTEENTRY p_entries);
MxResult GetEntries(LPPALETTEENTRY p_entries);