mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-30 22:50:51 +00:00
Add colormap_data to side_t and store colormaps there on setup
This commit is contained in:
parent
ad9ef5d593
commit
f7ff440250
3 changed files with 5 additions and 3 deletions
|
@ -1469,7 +1469,7 @@ static void P_LoadRawSideDefs2(void *data)
|
|||
case 447: // Change colormap of tagged sectors! -- Monster Iestyn 14/06/18
|
||||
// SoM: R_CreateColormap will only create a colormap in software mode...
|
||||
// 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);
|
||||
sd->toptexture = sd->midtexture = sd->bottomtexture = 0;
|
||||
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
|
||||
// -- Monster Iestyn 14/06/18
|
||||
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;
|
||||
|
||||
case 448: // Change skybox viewpoint/centerpoint
|
||||
|
@ -6769,7 +6769,7 @@ void P_SpawnSpecials(INT32 fromnetsave)
|
|||
|
||||
case 606: // HACK! Copy colormaps. Just plain colormaps.
|
||||
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;
|
||||
|
||||
#ifdef ESLOPE // Slope copy specials. Handled here for sanity.
|
||||
|
|
|
@ -476,6 +476,8 @@ typedef struct
|
|||
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.
|
||||
|
||||
extracolormap_t *colormap_data; // storage for colormaps; not applied to sectors.
|
||||
} side_t;
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue