Add bottomclip parameter to FillSimplePoly() for the software implementation
- Polygons will be clipped to bottomclip. If this is zero or below, they will be clipped to the bottom of the screen instead. This keeps the polygons from overwriting the status bar border for sofware 2D. The hardware version ignores it, since it always draws the status bar border every frame.
This commit is contained in:
parent
dbc54fbca0
commit
55ee78fc0b
5 changed files with 22 additions and 11 deletions
|
|
@ -3084,11 +3084,16 @@ void D3DFB::FlatFill(int left, int top, int right, int bottom, FTexture *src, bo
|
|||
//
|
||||
// Here, "simple" means that a simple triangle fan can draw it.
|
||||
//
|
||||
// Bottomclip is ignored by this implementation, since the hardware renderer
|
||||
// will unconditionally draw the status bar border every frame on top of the
|
||||
// polygons, so there's no need to waste time setting up a special scissor
|
||||
// rectangle here and needlessly forcing separate batches.
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void D3DFB::FillSimplePoly(FTexture *texture, FVector2 *points, int npoints,
|
||||
double originx, double originy, double scalex, double scaley,
|
||||
DAngle rotation, FDynamicColormap *colormap, int lightlevel)
|
||||
DAngle rotation, FDynamicColormap *colormap, int lightlevel, int bottomclip)
|
||||
{
|
||||
// Use an equation similar to player sprites to determine shade
|
||||
double fadelevel = clamp((LIGHT2SHADE(lightlevel)/65536. - 12) / NUMCOLORMAPS, 0.0, 1.0);
|
||||
|
|
@ -3109,7 +3114,7 @@ void D3DFB::FillSimplePoly(FTexture *texture, FVector2 *points, int npoints,
|
|||
}
|
||||
if (In2D < 2)
|
||||
{
|
||||
Super::FillSimplePoly(texture, points, npoints, originx, originy, scalex, scaley, rotation, colormap, lightlevel);
|
||||
Super::FillSimplePoly(texture, points, npoints, originx, originy, scalex, scaley, rotation, colormap, lightlevel, bottomclip);
|
||||
return;
|
||||
}
|
||||
if (!InScene)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue