mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
Fix in-game 2d map view line colors when using palettes that differ completely from Duke3D's palette
git-svn-id: https://svn.eduke32.com/eduke32@6461 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
938d444b35
commit
ff8d608caf
2 changed files with 12 additions and 6 deletions
|
@ -294,6 +294,12 @@ void E_PostLoadPalette(void)
|
|||
|
||||
redcol = getclosestcol(255, 0, 0);
|
||||
|
||||
for (size_t i = 0; i<16; i++)
|
||||
{
|
||||
palette_t *edcol = (palette_t *) &vgapal16[4*i];
|
||||
editorcolors[i] = getclosestcol_lim(edcol->b, edcol->g, edcol->r, 239);
|
||||
}
|
||||
|
||||
// Bmemset(PaletteIndexFullbrights, 0, sizeof(PaletteIndexFullbrights));
|
||||
for (bssize_t c = 0; c < 255; ++c) // skipping transparent color
|
||||
{
|
||||
|
|
|
@ -355,11 +355,11 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
|
|||
if (sector[wal->nextsector].floorz == z2)
|
||||
if (((wal->cstat|wall[wal->nextwall].cstat)&(16+32)) == 0) continue;
|
||||
|
||||
col = 139; //red
|
||||
if ((wal->cstat|wall[wal->nextwall].cstat)&1) col = 234; //magenta
|
||||
col = editorcolors[1]; //red
|
||||
if ((wal->cstat|wall[wal->nextwall].cstat)&1) col = editorcolors[5]; //magenta
|
||||
|
||||
if (!(show2dsector[wal->nextsector>>3]&(1<<(wal->nextsector&7))))
|
||||
col = 24;
|
||||
col = editorcolors[7];
|
||||
else continue;
|
||||
|
||||
ox = wal->x-cposx;
|
||||
|
@ -390,8 +390,8 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
|
|||
|
||||
if (j == k || (spr->cstat&0x8000) || spr->cstat == 257 || spr->xrepeat == 0) continue;
|
||||
|
||||
col = 71; //cyan
|
||||
if (spr->cstat&1) col = 234; //magenta
|
||||
col = editorcolors[6]; //cyan
|
||||
if (spr->cstat&1) col = editorcolors[5]; //magenta
|
||||
|
||||
sprx = spr->x;
|
||||
spry = spr->y;
|
||||
|
@ -562,7 +562,7 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
|
|||
x2 = dmulscale16(ox, xvect, -oy, yvect)+(xdim<<11);
|
||||
y2 = dmulscale16(oy, xvect2, ox, yvect2)+(ydim<<11);
|
||||
|
||||
drawline256(x1, y1, x2, y2, 24);
|
||||
drawline256(x1, y1, x2, y2, editorcolors[7]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue