- fixed compile error.

This commit is contained in:
Christoph Oelckers 2020-06-16 22:06:25 +02:00
parent 9a2c2d5a98
commit b9a567463c
3 changed files with 1 additions and 51 deletions

View file

@ -1162,55 +1162,6 @@ void VirtualToRealCoordsInt(F2DDrawer *drawer, int &x, int &y, int &w, int &h,
h = int(dy + dh + 0.5) - y; h = int(dy + dh + 0.5) - y;
} }
//==========================================================================
//
//
//
//==========================================================================
void FillBorder (F2DDrawer *drawer, FGameTexture *img)
{
auto Width = drawer->GetWidth();
auto Height = drawer->GetHeight();
float myratio = ActiveRatio (Width, Height);
if (myratio >= 1.3f && myratio <= 1.4f)
{ // This is a 4:3 display, so no border to show
return;
}
int bordtop, bordbottom, bordleft, bordright, bord;
if (AspectTallerThanWide(myratio))
{ // Screen is taller than it is wide
bordleft = bordright = 0;
bord = Height - Height * AspectMultiplier(myratio) / 48;
bordtop = bord / 2;
bordbottom = bord - bordtop;
}
else
{ // Screen is wider than it is tall
bordtop = bordbottom = 0;
bord = Width - Width * AspectMultiplier(myratio) / 48;
bordleft = bord / 2;
bordright = bord - bordleft;
}
if (img != NULL)
{
int filltype = (ui_screenborder_classic_scaling) ? -1 : 0;
drawer->AddFlatFill(0, 0, Width, bordtop, img, filltype); // Top
drawer->AddFlatFill(0, bordtop, bordleft, Height - bordbottom, img, filltype); // Left
drawer->AddFlatFill(Width - bordright, bordtop, Width, Height - bordbottom, img, filltype); // Right
drawer->AddFlatFill(0, Height - bordbottom, Width, Height, img, filltype); // Bottom
}
else
{
ClearRect(drawer, 0, 0, Width, bordtop, GPalette.BlackIndex, 0); // Top
ClearRect(drawer, 0, bordtop, bordleft, Height - bordbottom, GPalette.BlackIndex, 0); // Left
ClearRect(drawer, Width - bordright, bordtop, Width, Height - bordbottom, GPalette.BlackIndex, 0); // Right
ClearRect(drawer, 0, Height - bordbottom, Width, Height, GPalette.BlackIndex, 0); // Bottom
}
}
//========================================================================== //==========================================================================
// //
// Draw a line // Draw a line

View file

@ -219,7 +219,6 @@ void DrawTexture(F2DDrawer* drawer, FGameTexture* img, double x, double y, int t
void DoDim(F2DDrawer* drawer, PalEntry color, float amount, int x1, int y1, int w, int h, FRenderStyle* style = nullptr); void DoDim(F2DDrawer* drawer, PalEntry color, float amount, int x1, int y1, int w, int h, FRenderStyle* style = nullptr);
void Dim(F2DDrawer* drawer, PalEntry color, float damount, int x1, int y1, int w, int h, FRenderStyle* style = nullptr); void Dim(F2DDrawer* drawer, PalEntry color, float damount, int x1, int y1, int w, int h, FRenderStyle* style = nullptr);
void FillBorder(F2DDrawer *drawer, FGameTexture* img); // Fills the border around a 4:3 part of the screen on non-4:3 displays
void DrawBorder(F2DDrawer* drawer, FTextureID, int x1, int y1, int x2, int y2); void DrawBorder(F2DDrawer* drawer, FTextureID, int x1, int y1, int x2, int y2);
void DrawFrame(F2DDrawer* twod, PalEntry color, int left, int top, int width, int height, int thickness); void DrawFrame(F2DDrawer* twod, PalEntry color, int left, int top, int width, int height, int thickness);

View file

@ -418,7 +418,7 @@ void feebtag(int x, int y, int z, int nSector, short *nSprite, int nVal2, int nV
if (diff > INT_MAX) if (diff > INT_MAX)
{ {
OSD_Printf("%s %d: overflow\n", EDUKE32_FUNCTION, __LINE__); Printf("%s %d: overflow\n", EDUKE32_FUNCTION, __LINE__);
diff = INT_MAX; diff = INT_MAX;
} }