From b9a567463c163918829ef714f22ddb962e7ff2a1 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 16 Jun 2020 22:06:25 +0200 Subject: [PATCH] - fixed compile error. --- source/common/2d/v_draw.cpp | 49 ----------------------------------- source/common/2d/v_draw.h | 1 - source/exhumed/src/player.cpp | 2 +- 3 files changed, 1 insertion(+), 51 deletions(-) diff --git a/source/common/2d/v_draw.cpp b/source/common/2d/v_draw.cpp index e05fe4f9f..4556eeb03 100644 --- a/source/common/2d/v_draw.cpp +++ b/source/common/2d/v_draw.cpp @@ -1162,55 +1162,6 @@ void VirtualToRealCoordsInt(F2DDrawer *drawer, int &x, int &y, int &w, int &h, 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 diff --git a/source/common/2d/v_draw.h b/source/common/2d/v_draw.h index daf7e8568..c48fd417b 100644 --- a/source/common/2d/v_draw.h +++ b/source/common/2d/v_draw.h @@ -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 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 DrawFrame(F2DDrawer* twod, PalEntry color, int left, int top, int width, int height, int thickness); diff --git a/source/exhumed/src/player.cpp b/source/exhumed/src/player.cpp index 9e2b3f991..53195a3c6 100644 --- a/source/exhumed/src/player.cpp +++ b/source/exhumed/src/player.cpp @@ -418,7 +418,7 @@ void feebtag(int x, int y, int z, int nSector, short *nSprite, int nVal2, int nV if (diff > INT_MAX) { - OSD_Printf("%s %d: overflow\n", EDUKE32_FUNCTION, __LINE__); + Printf("%s %d: overflow\n", EDUKE32_FUNCTION, __LINE__); diff = INT_MAX; }