Add colormap_data to side_t and store colormaps there on setup
This commit is contained in:
parent
ad9ef5d593
commit
f7ff440250
|
@ -1469,7 +1469,7 @@ static void P_LoadRawSideDefs2(void *data)
|
||||||
case 447: // Change colormap of tagged sectors! -- Monster Iestyn 14/06/18
|
case 447: // Change colormap of tagged sectors! -- Monster Iestyn 14/06/18
|
||||||
// SoM: R_CreateColormap will only create a colormap in software mode...
|
// SoM: R_CreateColormap will only create a colormap in software mode...
|
||||||
// Perhaps we should just call it instead of doing the calculations here.
|
// Perhaps we should just call it instead of doing the calculations here.
|
||||||
sec->extra_colormap = sec->spawn_extra_colormap = R_CreateColormap(msd->toptexture, msd->midtexture,
|
sd->colormap_data = R_CreateColormap(msd->toptexture, msd->midtexture,
|
||||||
msd->bottomtexture);
|
msd->bottomtexture);
|
||||||
sd->toptexture = sd->midtexture = sd->bottomtexture = 0;
|
sd->toptexture = sd->midtexture = sd->bottomtexture = 0;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -3256,7 +3256,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||||
// This could even override existing colormaps I believe
|
// This could even override existing colormaps I believe
|
||||||
// -- Monster Iestyn 14/06/18
|
// -- Monster Iestyn 14/06/18
|
||||||
for (secnum = -1; (secnum = P_FindSectorFromLineTag(line, secnum)) >= 0 ;)
|
for (secnum = -1; (secnum = P_FindSectorFromLineTag(line, secnum)) >= 0 ;)
|
||||||
sectors[secnum].extra_colormap = line->frontsector->extra_colormap;
|
sectors[secnum].extra_colormap = sides[line->sidenum[0]].colormap_data;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 448: // Change skybox viewpoint/centerpoint
|
case 448: // Change skybox viewpoint/centerpoint
|
||||||
|
@ -6769,7 +6769,7 @@ void P_SpawnSpecials(INT32 fromnetsave)
|
||||||
|
|
||||||
case 606: // HACK! Copy colormaps. Just plain colormaps.
|
case 606: // HACK! Copy colormaps. Just plain colormaps.
|
||||||
for (s = -1; (s = P_FindSectorFromLineTag(lines + i, s)) >= 0 ;)
|
for (s = -1; (s = P_FindSectorFromLineTag(lines + i, s)) >= 0 ;)
|
||||||
sectors[s].extra_colormap = sectors[s].spawn_extra_colormap = lines[i].frontsector->extra_colormap;
|
sectors[s].extra_colormap = sectors[s].spawn_extra_colormap = sides[lines[i].sidenum[0]].colormap_data;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef ESLOPE // Slope copy specials. Handled here for sanity.
|
#ifdef ESLOPE // Slope copy specials. Handled here for sanity.
|
||||||
|
|
|
@ -476,6 +476,8 @@ typedef struct
|
||||||
INT16 repeatcnt; // # of times to repeat midtexture
|
INT16 repeatcnt; // # of times to repeat midtexture
|
||||||
|
|
||||||
char *text; // a concatination of all top, bottom, and mid texture names, for linedef specials that require a string.
|
char *text; // a concatination of all top, bottom, and mid texture names, for linedef specials that require a string.
|
||||||
|
|
||||||
|
extracolormap_t *colormap_data; // storage for colormaps; not applied to sectors.
|
||||||
} side_t;
|
} side_t;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue