- Duke: Only draw the screen border when the viewport isn't 100%.

This commit is contained in:
Mitchell Richters 2023-01-13 08:56:12 +11:00
parent 087aa7b2ee
commit 8ef7e0e4f3

View file

@ -53,6 +53,7 @@ void DrawBorder()
auto tex = tileGetTexture(TILE_SCREENBORDER);
if (tex != nullptr && tex->isValid())
{
// Backdrop.
if (viewport3d.Top() > 0)
{
twod->AddFlatFill(0, 0, twod->GetWidth(), viewport3d.Top(), tex, false, 1);
@ -69,6 +70,10 @@ void DrawBorder()
{
twod->AddFlatFill(viewport3d.Right(), viewport3d.Top(), twod->GetWidth(), viewport3d.Bottom(), tex, false, 1);
}
// Border.
if (hud_size < Hud_Stbar)
{
auto vb = tileGetTexture(TILE_VIEWBORDER);
auto ve = tileGetTexture(TILE_VIEWBORDER + 1);
int x1 = viewport3d.Left() - 4;
@ -85,6 +90,7 @@ void DrawBorder()
twod->AddFlatFill(x2 - 4, y2 - 4, x2, y2, ve, 4);
}
}
}
void DrawStatusBar()
{