remove bottommap,midmap and topmap stuff
was non functional anyways so get rid of it
This commit is contained in:
1 parent
7554c50165
commit
47e2b9456d
4 files changed
+27
-46
No files matched your search
+2
-8
@@ -795,9 +795,6 @@ static const sector_t sector_default = {
|
||||
.ceilinglightsec = -1,
|
||||
.maxattached = 1,
|
||||
.moved = true,
|
||||
.bottommap = -1,
|
||||
.midmap = -1,
|
||||
.topmap = -1,
|
||||
.verticalflip = false,
|
||||
};
|
||||
|
||||
@@ -1284,12 +1281,10 @@ static void P_LoadSideColormaps(mapsidedef_t *msd, side_t *sd, sector_t *sec)
|
||||
RGBA_t color;
|
||||
size_t j;
|
||||
|
||||
sec->midmap = R_CreateColormap(msd->toptexture, msd->midtexture,
|
||||
msd->bottomtexture);
|
||||
sec->extra_colormap = &extra_colormaps[R_CreateColormap(msd->toptexture, msd->midtexture, msd->bottomtexture)];
|
||||
sd->toptexture = sd->bottomtexture = 0;
|
||||
#define HEX2INT(x) (x >= '0' && x <= '9' ? x - '0' : x >= 'a' && x <= 'f' ? x - 'a' + 10 : x >= 'A' && x <= 'F' ? x - 'A' + 10 : 0)
|
||||
#define ALPHA2INT(x) (x >= 'a' && x <= 'z' ? x - 'a' : x >= 'A' && x <= 'Z' ? x - 'A' : x >= '0' && x <= '9' ? 25 : 0)
|
||||
sec->extra_colormap = &extra_colormaps[sec->midmap];
|
||||
|
||||
if (msd->toptexture[0] == '#' && msd->toptexture[1] && msd->toptexture[2] && msd->toptexture[3] && msd->toptexture[4] && msd->toptexture[5] && msd->toptexture[6])
|
||||
{
|
||||
@@ -1378,8 +1373,7 @@ static void P_LoadSideColormaps(mapsidedef_t *msd, side_t *sd, sector_t *sec)
|
||||
{
|
||||
if (msd->toptexture[0] == '#' || msd->bottomtexture[0] == '#')
|
||||
{
|
||||
sec->midmap = R_CreateColormap(msd->toptexture, msd->midtexture,
|
||||
msd->bottomtexture);
|
||||
sec->extra_colormap = &extra_colormaps[R_CreateColormap(msd->toptexture, msd->midtexture, msd->bottomtexture)];
|
||||
sd->toptexture = sd->bottomtexture = 0;
|
||||
}
|
||||
else
|
||||
|
||||
+1
-1
@@ -6278,7 +6278,7 @@ void P_SpawnSpecials(INT32 fromnetsave, boolean reloadinggamestate)
|
||||
|
||||
case 606: // HACK! Copy colormaps. Just plain colormaps.
|
||||
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;
|
||||
|
||||
case 720:
|
||||
|
||||
+24
-35
@@ -177,8 +177,6 @@ void R_PortalClearClipSegs(INT32 start, INT32 end)
|
||||
sector_t *R_FakeFlat(sector_t *sec, sector_t *tempsec, INT32 *floorlightlevel,
|
||||
INT32 *ceilinglightlevel, boolean back)
|
||||
{
|
||||
INT32 mapnum = -1;
|
||||
|
||||
if (floorlightlevel)
|
||||
*floorlightlevel = sec->floorlightsec == -1 ?
|
||||
sec->lightlevel : sectors[sec->floorlightsec].lightlevel;
|
||||
@@ -187,10 +185,10 @@ sector_t *R_FakeFlat(sector_t *sec, sector_t *tempsec, INT32 *floorlightlevel,
|
||||
*ceilinglightlevel = sec->ceilinglightsec == -1 ?
|
||||
sec->lightlevel : sectors[sec->ceilinglightsec].lightlevel;
|
||||
|
||||
// If the sector has a midmap, it's probably from 280 type
|
||||
if (sec->midmap != -1)
|
||||
mapnum = sec->midmap;
|
||||
else if (sec->heightsec != -1)
|
||||
// if (sec->midmap != -1)
|
||||
// mapnum = sec->midmap;
|
||||
// In original colormap code, this block did not run if sec->midmap was set
|
||||
if (!sec->extra_colormap && sec->heightsec != -1)
|
||||
{
|
||||
const sector_t *s = §ors[sec->heightsec];
|
||||
mobj_t *pviewmobj = viewplayer->mo;
|
||||
@@ -214,8 +212,6 @@ sector_t *R_FakeFlat(sector_t *sec, sector_t *tempsec, INT32 *floorlightlevel,
|
||||
tempsec->floorheight = s->floorheight;
|
||||
tempsec->ceilingheight = s->ceilingheight;
|
||||
|
||||
mapnum = s->midmap;
|
||||
|
||||
if ((underwater && (tempsec-> floorheight = sec->floorheight,
|
||||
tempsec->ceilingheight = s->floorheight - 1, !back)) || viewz <= s->floorheight)
|
||||
{ // head-below-floor hack
|
||||
@@ -241,7 +237,6 @@ sector_t *R_FakeFlat(sector_t *sec, sector_t *tempsec, INT32 *floorlightlevel,
|
||||
tempsec->ceiling_yoffs = s->ceiling_yoffs;
|
||||
tempsec->ceilingpic_angle = s->ceilingpic_angle;
|
||||
}
|
||||
mapnum = s->bottommap;
|
||||
}
|
||||
|
||||
tempsec->lightlevel = s->lightlevel;
|
||||
@@ -265,8 +260,6 @@ sector_t *R_FakeFlat(sector_t *sec, sector_t *tempsec, INT32 *floorlightlevel,
|
||||
tempsec->floor_yoffs = tempsec->ceiling_yoffs = s->ceiling_yoffs;
|
||||
tempsec->floorpic_angle = tempsec->ceilingpic_angle = s->ceilingpic_angle;
|
||||
|
||||
mapnum = s->topmap;
|
||||
|
||||
if (s->floorpic == skyflatnum) // SKYFIX?
|
||||
{
|
||||
tempsec->ceilingheight = tempsec->floorheight-1;
|
||||
@@ -297,11 +290,6 @@ sector_t *R_FakeFlat(sector_t *sec, sector_t *tempsec, INT32 *floorlightlevel,
|
||||
sec = tempsec;
|
||||
}
|
||||
|
||||
if (mapnum >= 0 && (size_t)mapnum < num_extra_colormaps)
|
||||
sec->extra_colormap = &extra_colormaps[mapnum];
|
||||
else
|
||||
sec->extra_colormap = NULL;
|
||||
|
||||
return sec;
|
||||
}
|
||||
|
||||
@@ -826,8 +814,9 @@ static void R_Subsector(size_t num)
|
||||
|
||||
sub->sector->extra_colormap = frontsector->extra_colormap;
|
||||
|
||||
if ((P_GetSectorFloorZAt(frontsector, viewx, viewy) < viewz || (frontsector->heightsec != -1
|
||||
&& sectors[frontsector->heightsec].ceilingpic == skyflatnum)))
|
||||
if (P_GetSectorFloorZAt(frontsector, viewx, viewy) < viewz
|
||||
|| frontsector->floorpic == skyflatnum
|
||||
|| (frontsector->heightsec != -1 && sectors[frontsector->heightsec].ceilingpic == skyflatnum))
|
||||
{
|
||||
floorplane = R_FindPlane(frontsector->floorheight, frontsector->floorpic, floorlightlevel,
|
||||
frontsector->floor_xoffs, frontsector->floor_yoffs, frontsector->floorpic_angle, floorcolormap, NULL
|
||||
@@ -838,9 +827,9 @@ static void R_Subsector(size_t num)
|
||||
else
|
||||
floorplane = NULL;
|
||||
|
||||
if ((P_GetSectorCeilingZAt(frontsector, viewx, viewy) > viewz || frontsector->ceilingpic == skyflatnum
|
||||
|| (frontsector->heightsec != -1
|
||||
&& sectors[frontsector->heightsec].floorpic == skyflatnum)))
|
||||
if (P_GetSectorCeilingZAt(frontsector, viewx, viewy) > viewz
|
||||
|| frontsector->ceilingpic == skyflatnum
|
||||
|| (frontsector->heightsec != -1 && sectors[frontsector->heightsec].floorpic == skyflatnum))
|
||||
{
|
||||
ceilingplane = R_FindPlane(frontsector->ceilingheight, frontsector->ceilingpic,
|
||||
ceilinglightlevel, frontsector->ceiling_xoffs, frontsector->ceiling_yoffs, frontsector->ceilingpic_angle,
|
||||
@@ -889,12 +878,15 @@ static void R_Subsector(size_t num)
|
||||
light = R_GetPlaneLight(frontsector, planecenterz,
|
||||
viewz < heightcheck);
|
||||
|
||||
ffloor[numffloors].plane = R_FindPlane(*rover->bottomheight, *rover->bottompic,
|
||||
*frontsector->lightlist[light].lightlevel, *rover->bottomxoffs,
|
||||
*rover->bottomyoffs, *rover->bottomangle, frontsector->lightlist[light].extra_colormap, rover
|
||||
ffloor[numffloors].plane = R_FindPlane(
|
||||
*rover->bottomheight, *rover->bottompic,
|
||||
*frontsector->lightlist[light].lightlevel,
|
||||
*rover->bottomxoffs, *rover->bottomyoffs, *rover->bottomangle,
|
||||
frontsector->lightlist[light].extra_colormap, rover
|
||||
, NULL
|
||||
, *rover->b_slope
|
||||
, R_NoEncore(rover->master->frontsector, true), true, frontsector);
|
||||
, R_NoEncore(rover->master->frontsector, true), true, frontsector
|
||||
);
|
||||
|
||||
ffloor[numffloors].slope = *rover->b_slope;
|
||||
|
||||
@@ -923,12 +915,15 @@ static void R_Subsector(size_t num)
|
||||
{
|
||||
light = R_GetPlaneLight(frontsector, planecenterz, viewz < heightcheck);
|
||||
|
||||
ffloor[numffloors].plane = R_FindPlane(*rover->topheight, *rover->toppic,
|
||||
*frontsector->lightlist[light].lightlevel, *rover->topxoffs, *rover->topyoffs, *rover->topangle,
|
||||
ffloor[numffloors].plane = R_FindPlane(
|
||||
*rover->topheight, *rover->toppic,
|
||||
*frontsector->lightlist[light].lightlevel,
|
||||
*rover->topxoffs, *rover->topyoffs, *rover->topangle,
|
||||
frontsector->lightlist[light].extra_colormap, rover
|
||||
, NULL
|
||||
, *rover->t_slope
|
||||
, R_NoEncore(rover->master->frontsector, false), false, frontsector);
|
||||
, R_NoEncore(rover->master->frontsector, false), false, frontsector
|
||||
);
|
||||
|
||||
ffloor[numffloors].slope = *rover->t_slope;
|
||||
|
||||
@@ -1056,7 +1051,7 @@ void R_Prep3DFloors(sector_t *sector)
|
||||
ffloor_t *rover;
|
||||
ffloor_t *best;
|
||||
fixed_t bestheight, maxheight;
|
||||
INT32 count, i, mapnum;
|
||||
INT32 count, i;
|
||||
sector_t *sec;
|
||||
pslope_t *bestslope = NULL;
|
||||
fixed_t heighttest; // I think it's better to check the Z height at the sector's center
|
||||
@@ -1139,12 +1134,6 @@ void R_Prep3DFloors(sector_t *sector)
|
||||
sector->lightlist[i].flags = best->flags;
|
||||
sector->lightlist[i].slope = bestslope;
|
||||
sec = §ors[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)
|
||||
{
|
||||
|
||||
@@ -358,8 +358,6 @@ typedef struct sector_s
|
||||
|
||||
INT32 crumblestate; // used for crumbling and bobbing
|
||||
|
||||
INT32 bottommap, midmap, topmap; // dynamic colormaps
|
||||
|
||||
// list of mobjs that are at least partially in the sector
|
||||
// thinglist is a subset of touching_thinglist
|
||||
struct msecnode_s *touching_thinglist;
|
||||
|
||||
Reference in new issue
Block a user