1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-14 22:03:27 +01:00

rename palette

This commit is contained in:
FunkyFr3sh 2024-12-15 08:02:00 +01:00
parent 308fefb654
commit 9a015c47cb
3 changed files with 6 additions and 6 deletions

View File

@ -12,7 +12,7 @@ HRESULT ddp_SetEntries(IDirectDrawPaletteImpl* This, DWORD dwFlags, DWORD dwStar
HRESULT dd_CreatePalette(DWORD dwFlags, LPPALETTEENTRY lpDDColorArray, IDirectDrawPaletteImpl** lpDDPalette, IUnknown FAR* unkOuter);
// Original palette copied from Windows ME
static PALETTEENTRY g_ddp_me_palette[] =
static PALETTEENTRY g_ddp_default_palette[] =
{
{ 0, 0, 0, 0 },
{ 128, 0, 0, 0 },

View File

@ -1581,7 +1581,7 @@ HRESULT dd_CreateSurface(
if (dst_surface->bpp == 8)
{
IDirectDrawPaletteImpl* lpDDPalette;
dd_CreatePalette(DDPCAPS_ALLOW256, g_ddp_me_palette, &lpDDPalette, NULL);
dd_CreatePalette(DDPCAPS_ALLOW256, g_ddp_default_palette, &lpDDPalette, NULL);
dds_SetPalette(dst_surface, lpDDPalette);
// Make sure temp palette will be released once replaced

View File

@ -1375,10 +1375,10 @@ UINT WINAPI fake_GetSystemPaletteEntries(HDC hdc, UINT iStart, UINT cEntries, LP
{
for (int i = iStart, x = 0; i < iStart + cEntries && i < 256; i++, x++)
{
pPalEntries[x].peRed = g_ddp_me_palette[i].peRed;
pPalEntries[x].peGreen = g_ddp_me_palette[i].peGreen;
pPalEntries[x].peBlue = g_ddp_me_palette[i].peBlue;
pPalEntries[x].peFlags = g_ddp_me_palette[i].peFlags;
pPalEntries[x].peRed = g_ddp_default_palette[i].peRed;
pPalEntries[x].peGreen = g_ddp_default_palette[i].peGreen;
pPalEntries[x].peBlue = g_ddp_default_palette[i].peBlue;
pPalEntries[x].peFlags = g_ddp_default_palette[i].peFlags;
}
}