mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-24 04:51:41 +00:00
Remove spriteshade global
This commit is contained in:
parent
3b5dc96f4a
commit
65fa807433
6 changed files with 12 additions and 16 deletions
|
@ -88,8 +88,6 @@ namespace swrenderer
|
|||
fixed_t sky1scale; // [RH] Sky 1 scale factor
|
||||
fixed_t sky2scale; // [RH] Sky 2 scale factor
|
||||
|
||||
int spriteshade;
|
||||
|
||||
FTexture *WallSpriteTile;
|
||||
|
||||
//
|
||||
|
@ -198,7 +196,7 @@ bool R_ClipSpriteColumnWithPortals(vissprite_t* spr)
|
|||
// R_ProjectSprite
|
||||
// Generates a vissprite for a thing if it might be visible.
|
||||
//
|
||||
void R_ProjectSprite (AActor *thing, WaterFakeSide fakeside, F3DFloor *fakefloor, F3DFloor *fakeceiling, sector_t *current_sector)
|
||||
void R_ProjectSprite (AActor *thing, WaterFakeSide fakeside, F3DFloor *fakefloor, F3DFloor *fakeceiling, sector_t *current_sector, int spriteshade)
|
||||
{
|
||||
double tr_x;
|
||||
double tr_y;
|
||||
|
@ -357,7 +355,7 @@ void R_ProjectSprite (AActor *thing, WaterFakeSide fakeside, F3DFloor *fakefloor
|
|||
|
||||
if ((renderflags & RF_SPRITETYPEMASK) == RF_WALLSPRITE)
|
||||
{
|
||||
R_ProjectWallSprite(thing, pos, picnum, spriteScale, renderflags);
|
||||
R_ProjectWallSprite(thing, pos, picnum, spriteScale, renderflags, spriteshade);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -648,7 +646,7 @@ void R_AddSprites (sector_t *sec, int lightlevel, WaterFakeSide fakeside)
|
|||
// Well, now it will be done.
|
||||
sec->validcount = validcount;
|
||||
|
||||
spriteshade = LIGHT2SHADE(lightlevel + r_actualextralight);
|
||||
int spriteshade = LIGHT2SHADE(lightlevel + r_actualextralight);
|
||||
|
||||
// Handle all things in sector.
|
||||
for(auto p = sec->touching_renderthings; p != nullptr; p = p->m_snext)
|
||||
|
@ -685,7 +683,7 @@ void R_AddSprites (sector_t *sec, int lightlevel, WaterFakeSide fakeside)
|
|||
if(rover->bottom.plane->ZatPoint(0., 0.) >= thing->Top()) fakeceiling = rover;
|
||||
}
|
||||
}
|
||||
R_ProjectSprite (thing, fakeside, fakefloor, fakeceiling, sec);
|
||||
R_ProjectSprite (thing, fakeside, fakefloor, fakeceiling, sec, spriteshade);
|
||||
fakeceiling = NULL;
|
||||
fakefloor = NULL;
|
||||
}
|
||||
|
@ -1018,7 +1016,7 @@ void R_DrawSprite (vissprite_t *spr)
|
|||
}
|
||||
else
|
||||
{ // diminished light
|
||||
spriteshade = LIGHT2SHADE(sec->lightlevel + r_actualextralight);
|
||||
int spriteshade = LIGHT2SHADE(sec->lightlevel + r_actualextralight);
|
||||
spr->Style.BaseColormap = mybasecolormap;
|
||||
spr->Style.ColormapNum = GETPALOOKUP(r_SpriteVisibility / MAX(MINZ, (double)spr->depth), spriteshade);
|
||||
}
|
||||
|
@ -1349,7 +1347,7 @@ void R_DrawMaskedSingle (bool renew)
|
|||
|
||||
void R_DrawHeightPlanes(double height); // kg3D - fake planes
|
||||
|
||||
void R_DrawMasked (void)
|
||||
void R_DrawMasked ()
|
||||
{
|
||||
R_CollectPortals();
|
||||
R_SortVisSprites (DrewAVoxel ? sv_compare2d : sv_compare, firstvissprite - vissprites);
|
||||
|
|
|
@ -40,8 +40,6 @@ namespace swrenderer
|
|||
|
||||
extern FTexture *WallSpriteTile;
|
||||
|
||||
extern int spriteshade;
|
||||
|
||||
bool R_ClipSpriteColumnWithPortals(vissprite_t* spr);
|
||||
|
||||
|
||||
|
|
|
@ -147,7 +147,7 @@ namespace swrenderer
|
|||
|
||||
// get light level
|
||||
lightnum = ((floorlight + ceilinglight) >> 1) + r_actualextralight;
|
||||
spriteshade = LIGHT2SHADE(lightnum) - 24 * FRACUNIT;
|
||||
int spriteshade = LIGHT2SHADE(lightnum) - 24 * FRACUNIT;
|
||||
|
||||
if (camera->player != NULL)
|
||||
{
|
||||
|
@ -190,7 +190,7 @@ namespace swrenderer
|
|||
|
||||
if ((psp->GetID() != PSP_TARGETCENTER || CrosshairImage == nullptr) && psp->GetCaller() != nullptr)
|
||||
{
|
||||
R_DrawPSprite(psp, camera, bobx, boby, wx, wy, r_TicFracF);
|
||||
R_DrawPSprite(psp, camera, bobx, boby, wx, wy, r_TicFracF, spriteshade);
|
||||
}
|
||||
|
||||
psp = psp->GetNext();
|
||||
|
@ -200,7 +200,7 @@ namespace swrenderer
|
|||
}
|
||||
}
|
||||
|
||||
void R_DrawPSprite(DPSprite *pspr, AActor *owner, float bobx, float boby, double wx, double wy, double ticfrac)
|
||||
void R_DrawPSprite(DPSprite *pspr, AActor *owner, float bobx, float boby, double wx, double wy, double ticfrac, int spriteshade)
|
||||
{
|
||||
double tx;
|
||||
int x1;
|
||||
|
|
|
@ -20,6 +20,6 @@ namespace swrenderer
|
|||
void R_SetupPlayerSpriteScale();
|
||||
|
||||
void R_DrawPlayerSprites();
|
||||
void R_DrawPSprite(DPSprite *pspr, AActor *owner, float bobx, float boby, double wx, double wy, double ticfrac);
|
||||
void R_DrawPSprite(DPSprite *pspr, AActor *owner, float bobx, float boby, double wx, double wy, double ticfrac, int spriteshade);
|
||||
void R_DrawRemainingPlayerSprites();
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
|
||||
namespace swrenderer
|
||||
{
|
||||
void R_ProjectWallSprite(AActor *thing, const DVector3 &pos, FTextureID picnum, const DVector2 &scale, int renderflags)
|
||||
void R_ProjectWallSprite(AActor *thing, const DVector3 &pos, FTextureID picnum, const DVector2 &scale, int renderflags, int spriteshade)
|
||||
{
|
||||
FWallCoords wallc;
|
||||
double x1, x2;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
namespace swrenderer
|
||||
{
|
||||
void R_ProjectWallSprite(AActor *thing, const DVector3 &pos, FTextureID picnum, const DVector2 &scale, int renderflags);
|
||||
void R_ProjectWallSprite(AActor *thing, const DVector3 &pos, FTextureID picnum, const DVector2 &scale, int renderflags, int spriteshade);
|
||||
void R_DrawWallSprite(vissprite_t *spr, const short *mfloorclip, const short *mceilingclip);
|
||||
void R_WallSpriteColumn(int x, float maskedScaleY, bool sprflipvert, const short *mfloorclip, const short *mceilingclip);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue