mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2025-02-18 09:31:09 +00:00
Merge R_SetupSpanBits with R_SetSpanSource and rename it to R_SetSpanTexture
This commit is contained in:
parent
4d0cc9e7bb
commit
5a7765910f
4 changed files with 7 additions and 15 deletions
|
@ -601,7 +601,7 @@ namespace swrenderer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void R_SetupSpanBits(FTexture *tex)
|
void R_SetSpanTexture(FTexture *tex)
|
||||||
{
|
{
|
||||||
using namespace drawerargs;
|
using namespace drawerargs;
|
||||||
|
|
||||||
|
@ -616,6 +616,9 @@ namespace swrenderer
|
||||||
{
|
{
|
||||||
ds_ybits--;
|
ds_ybits--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ds_source = r_swtruecolor ? (const uint8_t*)tex->GetPixelsBgra() : tex->GetPixels();
|
||||||
|
ds_source_mipmapped = tex->Mipmapped() && tex->GetWidth() > 1 && tex->GetHeight() > 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void R_SetSpanColormap(FDynamicColormap *colormap, int shade)
|
void R_SetSpanColormap(FDynamicColormap *colormap, int shade)
|
||||||
|
@ -623,14 +626,6 @@ namespace swrenderer
|
||||||
R_SetDSColorMapLight(colormap, 0, shade);
|
R_SetDSColorMapLight(colormap, 0, shade);
|
||||||
}
|
}
|
||||||
|
|
||||||
void R_SetSpanSource(FTexture *tex)
|
|
||||||
{
|
|
||||||
using namespace drawerargs;
|
|
||||||
|
|
||||||
ds_source = r_swtruecolor ? (const uint8_t*)tex->GetPixelsBgra() : tex->GetPixels();
|
|
||||||
ds_source_mipmapped = tex->Mipmapped() && tex->GetWidth() > 1 && tex->GetHeight() > 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void R_DrawWallColumn()
|
void R_DrawWallColumn()
|
||||||
|
|
|
@ -178,9 +178,8 @@ namespace swrenderer
|
||||||
void R_SetDSColorMapLight(FSWColormap *base_colormap, float light, int shade);
|
void R_SetDSColorMapLight(FSWColormap *base_colormap, float light, int shade);
|
||||||
void R_SetTranslationMap(lighttable_t *translation);
|
void R_SetTranslationMap(lighttable_t *translation);
|
||||||
|
|
||||||
void R_SetupSpanBits(FTexture *tex);
|
void R_SetSpanTexture(FTexture *tex);
|
||||||
void R_SetSpanColormap(FDynamicColormap *colormap, int shade);
|
void R_SetSpanColormap(FDynamicColormap *colormap, int shade);
|
||||||
void R_SetSpanSource(FTexture *tex);
|
|
||||||
|
|
||||||
void R_MapTiltedPlane(int y, int x1);
|
void R_MapTiltedPlane(int y, int x1);
|
||||||
void R_MapColoredPlane(int y, int x1);
|
void R_MapColoredPlane(int y, int x1);
|
||||||
|
|
|
@ -1179,10 +1179,9 @@ void R_DrawSinglePlane (visplane_t *pl, fixed_t alpha, bool additive, bool maske
|
||||||
{ // Don't waste time on a masked texture if it isn't really masked.
|
{ // Don't waste time on a masked texture if it isn't really masked.
|
||||||
masked = false;
|
masked = false;
|
||||||
}
|
}
|
||||||
R_SetupSpanBits(tex);
|
R_SetSpanTexture(tex);
|
||||||
double xscale = pl->xform.xScale * tex->Scale.X;
|
double xscale = pl->xform.xScale * tex->Scale.X;
|
||||||
double yscale = pl->xform.yScale * tex->Scale.Y;
|
double yscale = pl->xform.yScale * tex->Scale.Y;
|
||||||
R_SetSpanSource(tex);
|
|
||||||
|
|
||||||
basecolormap = pl->colormap;
|
basecolormap = pl->colormap;
|
||||||
planeshade = LIGHT2SHADE(pl->lightlevel);
|
planeshade = LIGHT2SHADE(pl->lightlevel);
|
||||||
|
|
|
@ -1379,12 +1379,11 @@ void DCanvas::FillSimplePoly(FTexture *tex, FVector2 *points, int npoints,
|
||||||
sinrot = sin(rotation.Radians());
|
sinrot = sin(rotation.Radians());
|
||||||
|
|
||||||
// Setup constant texture mapping parameters.
|
// Setup constant texture mapping parameters.
|
||||||
R_SetupSpanBits(tex);
|
R_SetSpanTexture(tex);
|
||||||
if (colormap)
|
if (colormap)
|
||||||
R_SetSpanColormap(colormap, clamp(shade >> FRACBITS, 0, NUMCOLORMAPS - 1));
|
R_SetSpanColormap(colormap, clamp(shade >> FRACBITS, 0, NUMCOLORMAPS - 1));
|
||||||
else
|
else
|
||||||
R_SetSpanColormap(&identitycolormap, 0);
|
R_SetSpanColormap(&identitycolormap, 0);
|
||||||
R_SetSpanSource(tex);
|
|
||||||
if (ds_xbits != 0)
|
if (ds_xbits != 0)
|
||||||
{
|
{
|
||||||
scalex = double(1u << (32 - ds_xbits)) / scalex;
|
scalex = double(1u << (32 - ds_xbits)) / scalex;
|
||||||
|
|
Loading…
Reference in a new issue