mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-25 01:57:47 +01:00
rename palette
This commit is contained in:
parent
308fefb654
commit
9a015c47cb
@ -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);
|
HRESULT dd_CreatePalette(DWORD dwFlags, LPPALETTEENTRY lpDDColorArray, IDirectDrawPaletteImpl** lpDDPalette, IUnknown FAR* unkOuter);
|
||||||
|
|
||||||
// Original palette copied from Windows ME
|
// Original palette copied from Windows ME
|
||||||
static PALETTEENTRY g_ddp_me_palette[] =
|
static PALETTEENTRY g_ddp_default_palette[] =
|
||||||
{
|
{
|
||||||
{ 0, 0, 0, 0 },
|
{ 0, 0, 0, 0 },
|
||||||
{ 128, 0, 0, 0 },
|
{ 128, 0, 0, 0 },
|
||||||
|
@ -1581,7 +1581,7 @@ HRESULT dd_CreateSurface(
|
|||||||
if (dst_surface->bpp == 8)
|
if (dst_surface->bpp == 8)
|
||||||
{
|
{
|
||||||
IDirectDrawPaletteImpl* lpDDPalette;
|
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);
|
dds_SetPalette(dst_surface, lpDDPalette);
|
||||||
|
|
||||||
// Make sure temp palette will be released once replaced
|
// Make sure temp palette will be released once replaced
|
||||||
|
@ -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++)
|
for (int i = iStart, x = 0; i < iStart + cEntries && i < 256; i++, x++)
|
||||||
{
|
{
|
||||||
pPalEntries[x].peRed = g_ddp_me_palette[i].peRed;
|
pPalEntries[x].peRed = g_ddp_default_palette[i].peRed;
|
||||||
pPalEntries[x].peGreen = g_ddp_me_palette[i].peGreen;
|
pPalEntries[x].peGreen = g_ddp_default_palette[i].peGreen;
|
||||||
pPalEntries[x].peBlue = g_ddp_me_palette[i].peBlue;
|
pPalEntries[x].peBlue = g_ddp_default_palette[i].peBlue;
|
||||||
pPalEntries[x].peFlags = g_ddp_me_palette[i].peFlags;
|
pPalEntries[x].peFlags = g_ddp_default_palette[i].peFlags;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user