Get rid of bottommap, midmap, topmap

This commit is contained in:
mazmazz 2018-09-10 16:16:04 -04:00
parent 574a591d43
commit e0d8a6eec0
4 changed files with 5 additions and 25 deletions

View File

@ -718,7 +718,6 @@ static void P_LoadRawSectors(UINT8 *data, size_t i)
ss->spawn_flr_xoffs = ss->spawn_ceil_xoffs = ss->spawn_flr_yoffs = ss->spawn_ceil_yoffs = 0; ss->spawn_flr_xoffs = ss->spawn_ceil_xoffs = ss->spawn_flr_yoffs = ss->spawn_ceil_yoffs = 0;
ss->floorpic_angle = ss->ceilingpic_angle = 0; ss->floorpic_angle = ss->ceilingpic_angle = 0;
ss->spawn_flrpic_angle = ss->spawn_ceilpic_angle = 0; ss->spawn_flrpic_angle = ss->spawn_ceilpic_angle = 0;
ss->bottommap = ss->midmap = ss->topmap = -1;
ss->gravity = NULL; ss->gravity = NULL;
ss->cullheight = NULL; ss->cullheight = NULL;
ss->verticalflip = false; ss->verticalflip = false;

View File

@ -6760,7 +6760,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].midmap = lines[i].frontsector->midmap; sectors[s].extra_colormap = lines[i].frontsector->extra_colormap;
break; break;
#ifdef ESLOPE // Slope copy specials. Handled here for sanity. #ifdef ESLOPE // Slope copy specials. Handled here for sanity.

View File

@ -234,8 +234,6 @@ static INT32 R_DoorClosed(void)
sector_t *R_FakeFlat(sector_t *sec, sector_t *tempsec, INT32 *floorlightlevel, sector_t *R_FakeFlat(sector_t *sec, sector_t *tempsec, INT32 *floorlightlevel,
INT32 *ceilinglightlevel, boolean back) INT32 *ceilinglightlevel, boolean back)
{ {
INT32 mapnum = -1;
if (floorlightlevel) if (floorlightlevel)
*floorlightlevel = sec->floorlightsec == -1 ? *floorlightlevel = sec->floorlightsec == -1 ?
sec->lightlevel : sectors[sec->floorlightsec].lightlevel; sec->lightlevel : sectors[sec->floorlightsec].lightlevel;
@ -244,10 +242,10 @@ sector_t *R_FakeFlat(sector_t *sec, sector_t *tempsec, INT32 *floorlightlevel,
*ceilinglightlevel = sec->ceilinglightsec == -1 ? *ceilinglightlevel = sec->ceilinglightsec == -1 ?
sec->lightlevel : sectors[sec->ceilinglightsec].lightlevel; sec->lightlevel : sectors[sec->ceilinglightsec].lightlevel;
// If the sector has a midmap, it's probably from 280 type // if (sec->midmap != -1)
if (sec->midmap != -1) // mapnum = sec->midmap;
mapnum = sec->midmap; // In original colormap code, this block did not run if sec->midmap was set
else if (sec->heightsec != -1) if (!sec->extra_colormap && sec->heightsec != -1)
{ {
const sector_t *s = &sectors[sec->heightsec]; const sector_t *s = &sectors[sec->heightsec];
mobj_t *viewmobj = viewplayer->mo; mobj_t *viewmobj = viewplayer->mo;
@ -271,8 +269,6 @@ sector_t *R_FakeFlat(sector_t *sec, sector_t *tempsec, INT32 *floorlightlevel,
tempsec->floorheight = s->floorheight; tempsec->floorheight = s->floorheight;
tempsec->ceilingheight = s->ceilingheight; tempsec->ceilingheight = s->ceilingheight;
mapnum = s->midmap;
if ((underwater && (tempsec-> floorheight = sec->floorheight, if ((underwater && (tempsec-> floorheight = sec->floorheight,
tempsec->ceilingheight = s->floorheight - 1, !back)) || viewz <= s->floorheight) tempsec->ceilingheight = s->floorheight - 1, !back)) || viewz <= s->floorheight)
{ // head-below-floor hack { // head-below-floor hack
@ -298,7 +294,6 @@ sector_t *R_FakeFlat(sector_t *sec, sector_t *tempsec, INT32 *floorlightlevel,
tempsec->ceiling_yoffs = s->ceiling_yoffs; tempsec->ceiling_yoffs = s->ceiling_yoffs;
tempsec->ceilingpic_angle = s->ceilingpic_angle; tempsec->ceilingpic_angle = s->ceilingpic_angle;
} }
mapnum = s->bottommap;
} }
tempsec->lightlevel = s->lightlevel; tempsec->lightlevel = s->lightlevel;
@ -322,8 +317,6 @@ sector_t *R_FakeFlat(sector_t *sec, sector_t *tempsec, INT32 *floorlightlevel,
tempsec->floor_yoffs = tempsec->ceiling_yoffs = s->ceiling_yoffs; tempsec->floor_yoffs = tempsec->ceiling_yoffs = s->ceiling_yoffs;
tempsec->floorpic_angle = tempsec->ceilingpic_angle = s->ceilingpic_angle; tempsec->floorpic_angle = tempsec->ceilingpic_angle = s->ceilingpic_angle;
mapnum = s->topmap;
if (s->floorpic == skyflatnum) // SKYFIX? if (s->floorpic == skyflatnum) // SKYFIX?
{ {
tempsec->ceilingheight = tempsec->floorheight-1; tempsec->ceilingheight = tempsec->floorheight-1;
@ -354,11 +347,6 @@ sector_t *R_FakeFlat(sector_t *sec, sector_t *tempsec, INT32 *floorlightlevel,
sec = tempsec; sec = tempsec;
} }
if (mapnum >= 0 && (size_t)mapnum < num_extra_colormaps)
sec->extra_colormap = &extra_colormaps[mapnum];
else
sec->extra_colormap = NULL;
return sec; return sec;
} }
@ -1342,11 +1330,6 @@ void R_Prep3DFloors(sector_t *sector)
sector->lightlist[i].slope = bestslope; sector->lightlist[i].slope = bestslope;
#endif #endif
sec = &sectors[best->secnum]; sec = &sectors[best->secnum];
mapnum = sec->midmap;
if (mapnum >= 0 && (size_t)mapnum < num_extra_colormaps)
sec->extra_colormap = &extra_colormaps[mapnum];
else
sec->extra_colormap = NULL;
if (best->flags & FF_NOSHADE) if (best->flags & FF_NOSHADE)
{ {

View File

@ -333,8 +333,6 @@ typedef struct sector_s
INT32 floorlightsec, ceilinglightsec; INT32 floorlightsec, ceilinglightsec;
INT32 crumblestate; // used for crumbling and bobbing INT32 crumblestate; // used for crumbling and bobbing
INT32 bottommap, midmap, topmap; // dynamic colormaps
// list of mobjs that are at least partially in the sector // list of mobjs that are at least partially in the sector
// thinglist is a subset of touching_thinglist // thinglist is a subset of touching_thinglist
struct msecnode_s *touching_thinglist; struct msecnode_s *touching_thinglist;