diff --git a/LEGO1/mxpalette.cpp b/LEGO1/mxpalette.cpp index d6ac1e6d..984e6af8 100644 --- a/LEGO1/mxpalette.cpp +++ b/LEGO1/mxpalette.cpp @@ -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() { diff --git a/LEGO1/mxpalette.h b/LEGO1/mxpalette.h index 67a272d0..a22b1d7f 100644 --- a/LEGO1/mxpalette.h +++ b/LEGO1/mxpalette.h @@ -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);