Apply colormaps directly to sectors in kart maps, fixes Misty Maze
+ fix encore mapping not applying to fade color (Sunbeam Paradise)
This commit is contained in:
parent
ad2761f365
commit
b051e142c1
3 changed files with 13 additions and 1 deletions
|
|
@ -1213,6 +1213,8 @@ static void P_LoadSidedefs(UINT8 *data)
|
|||
// SoM: R_CreateColormap will only create a colormap in software mode...
|
||||
// Perhaps we should just call it instead of doing the calculations here.
|
||||
sd->colormap_data = R_CreateColormapFromLinedef(msd->toptexture, msd->midtexture, msd->bottomtexture);
|
||||
if (mapnamespace == MNS_SRB2KART)
|
||||
sd->sector->extra_colormap = sd->sector->spawn_extra_colormap = sd->colormap_data;
|
||||
sd->toptexture = sd->midtexture = sd->bottomtexture = 0;
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -7784,7 +7784,9 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
if (sectors[s].colormap_protected)
|
||||
continue;
|
||||
|
||||
if (!udmf)
|
||||
if (mapnamespace == MNS_SRB2KART)
|
||||
exc = lines[i].frontsector->extra_colormap;
|
||||
else if (!udmf)
|
||||
exc = sides[lines[i].sidenum[0]].colormap_data;
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -964,6 +964,14 @@ extracolormap_t *R_CreateColormapFromLinedef(char *p1, char *p2, char *p3)
|
|||
cr = pLocalPalette[j].s.red;
|
||||
cg = pLocalPalette[j].s.green;
|
||||
cb = pLocalPalette[j].s.blue;
|
||||
|
||||
if (mapnamespace == MNS_SRB2KART)
|
||||
{
|
||||
j = encoremap[NearestColor((UINT8)cfr, (UINT8)cfg, (UINT8)cfb)];
|
||||
cfr = pLocalPalette[j].s.red;
|
||||
cfg = pLocalPalette[j].s.green;
|
||||
cfb = pLocalPalette[j].s.blue;
|
||||
}
|
||||
}
|
||||
|
||||
// Pack rgba values into combined var
|
||||
|
|
|
|||
Loading…
Reference in a new issue