mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 20:50:58 +00:00
Use lightlist.extra_colormap double pointers in OpenGL
This commit is contained in:
parent
7d36aae7c4
commit
62b6950e33
2 changed files with 17 additions and 17 deletions
|
@ -1126,7 +1126,7 @@ static void HWR_SplitWall(sector_t *sector, wallVert3D *wallVerts, INT32 texnum,
|
|||
else
|
||||
{
|
||||
lightnum = *list[i].lightlevel;
|
||||
colormap = list[i].extra_colormap;
|
||||
colormap = *list[i].extra_colormap;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3486,12 +3486,12 @@ static void HWR_Subsector(size_t num)
|
|||
light = R_GetPlaneLight(gr_frontsector, locFloorHeight, false);
|
||||
if (gr_frontsector->floorlightsec == -1)
|
||||
floorlightlevel = *gr_frontsector->lightlist[light].lightlevel;
|
||||
floorcolormap = gr_frontsector->lightlist[light].extra_colormap;
|
||||
floorcolormap = *gr_frontsector->lightlist[light].extra_colormap;
|
||||
|
||||
light = R_GetPlaneLight(gr_frontsector, locCeilingHeight, false);
|
||||
if (gr_frontsector->ceilinglightsec == -1)
|
||||
ceilinglightlevel = *gr_frontsector->lightlist[light].lightlevel;
|
||||
ceilingcolormap = gr_frontsector->lightlist[light].extra_colormap;
|
||||
ceilingcolormap = *gr_frontsector->lightlist[light].extra_colormap;
|
||||
}
|
||||
|
||||
sub->sector->extra_colormap = gr_frontsector->extra_colormap;
|
||||
|
@ -3617,7 +3617,7 @@ static void HWR_Subsector(size_t num)
|
|||
*rover->bottomheight,
|
||||
*gr_frontsector->lightlist[light].lightlevel,
|
||||
rover->alpha-1 > 255 ? 255 : rover->alpha-1, rover->master->frontsector, PF_Translucent,
|
||||
false, gr_frontsector->lightlist[light].extra_colormap);
|
||||
false, *gr_frontsector->lightlist[light].extra_colormap);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
@ -3625,7 +3625,7 @@ static void HWR_Subsector(size_t num)
|
|||
HWR_GetFlat(levelflats[*rover->bottompic].lumpnum);
|
||||
light = R_GetPlaneLight(gr_frontsector, centerHeight, dup_viewz < cullHeight ? true : false);
|
||||
HWR_RenderPlane(NULL, &extrasubsectors[num], false, *rover->bottomheight, PF_Occlude, *gr_frontsector->lightlist[light].lightlevel, levelflats[*rover->bottompic].lumpnum,
|
||||
rover->master->frontsector, 255, false, gr_frontsector->lightlist[light].extra_colormap);
|
||||
rover->master->frontsector, 255, false, *gr_frontsector->lightlist[light].extra_colormap);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3680,7 +3680,7 @@ static void HWR_Subsector(size_t num)
|
|||
*rover->topheight,
|
||||
*gr_frontsector->lightlist[light].lightlevel,
|
||||
rover->alpha-1 > 255 ? 255 : rover->alpha-1, rover->master->frontsector, PF_Translucent,
|
||||
false, gr_frontsector->lightlist[light].extra_colormap);
|
||||
false, *gr_frontsector->lightlist[light].extra_colormap);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
@ -3689,7 +3689,7 @@ static void HWR_Subsector(size_t num)
|
|||
HWR_GetFlat(levelflats[*rover->toppic].lumpnum);
|
||||
light = R_GetPlaneLight(gr_frontsector, centerHeight, dup_viewz < cullHeight ? true : false);
|
||||
HWR_RenderPlane(NULL, &extrasubsectors[num], true, *rover->topheight, PF_Occlude, *gr_frontsector->lightlist[light].lightlevel, levelflats[*rover->toppic].lumpnum,
|
||||
rover->master->frontsector, 255, false, gr_frontsector->lightlist[light].extra_colormap);
|
||||
rover->master->frontsector, 255, false, *gr_frontsector->lightlist[light].extra_colormap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4200,8 +4200,8 @@ static void HWR_DrawSpriteShadow(gr_vissprite_t *spr, GLPatch_t *gpatch, float t
|
|||
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
||||
lightlevel = *sector->lightlist[light].lightlevel;
|
||||
|
||||
if (sector->lightlist[light].extra_colormap)
|
||||
colormap = sector->lightlist[light].extra_colormap;
|
||||
if (*sector->lightlist[light].extra_colormap)
|
||||
colormap = *sector->lightlist[light].extra_colormap;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -4362,7 +4362,7 @@ static void HWR_SplitSprite(gr_vissprite_t *spr)
|
|||
|
||||
// Start with the lightlevel and colormap from the top of the sprite
|
||||
lightlevel = *list[sector->numlights - 1].lightlevel;
|
||||
colormap = list[sector->numlights - 1].extra_colormap;
|
||||
colormap = *list[sector->numlights - 1].extra_colormap;
|
||||
i = 0;
|
||||
temp = FLOAT_TO_FIXED(realtop);
|
||||
|
||||
|
@ -4378,7 +4378,7 @@ static void HWR_SplitSprite(gr_vissprite_t *spr)
|
|||
{
|
||||
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
||||
lightlevel = *list[i-1].lightlevel;
|
||||
colormap = list[i-1].extra_colormap;
|
||||
colormap = *list[i-1].extra_colormap;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -4386,7 +4386,7 @@ static void HWR_SplitSprite(gr_vissprite_t *spr)
|
|||
i = R_GetPlaneLight(sector, temp, false);
|
||||
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
||||
lightlevel = *list[i].lightlevel;
|
||||
colormap = list[i].extra_colormap;
|
||||
colormap = *list[i].extra_colormap;
|
||||
#endif
|
||||
|
||||
for (i = 0; i < sector->numlights; i++)
|
||||
|
@ -4402,7 +4402,7 @@ static void HWR_SplitSprite(gr_vissprite_t *spr)
|
|||
{
|
||||
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
||||
lightlevel = *list[i].lightlevel;
|
||||
colormap = list[i].extra_colormap;
|
||||
colormap = *list[i].extra_colormap;
|
||||
}
|
||||
|
||||
#ifdef ESLOPE
|
||||
|
@ -4734,8 +4734,8 @@ static inline void HWR_DrawPrecipitationSprite(gr_vissprite_t *spr)
|
|||
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
||||
lightlevel = *sector->lightlist[light].lightlevel;
|
||||
|
||||
if (sector->lightlist[light].extra_colormap)
|
||||
colormap = sector->lightlist[light].extra_colormap;
|
||||
if (*sector->lightlist[light].extra_colormap)
|
||||
colormap = *sector->lightlist[light].extra_colormap;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1194,8 +1194,8 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
|
|||
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
||||
lightlevel = *sector->lightlist[light].lightlevel;
|
||||
|
||||
if (sector->lightlist[light].extra_colormap)
|
||||
colormap = sector->lightlist[light].extra_colormap;
|
||||
if (*sector->lightlist[light].extra_colormap)
|
||||
colormap = *sector->lightlist[light].extra_colormap;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue