Skip to content

Commit

Permalink
- added limited support for replacing the intermission backgrounds in…
Browse files Browse the repository at this point in the history
… Doom 1 with widescreen images.

Due to how the placement works here, it is only usable with fullscreenautoaspect mode 3.
  • Loading branch information
coelckers committed Jun 6, 2020
1 parent 794a53f commit e00f27d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/2d/v_draw.cpp
Expand Up @@ -399,7 +399,7 @@ bool SetTextureParms(F2DDrawer * drawer, DrawParms *parms, FGameTexture *img, do
auto screenratio = ActiveRatio(GetWidth(), GetHeight());
if (autoaspect == 3)
{
if (screenratio >= aspect || aspect < 1.4) autoaspect = 1; // screen is wider than the image -> pillarbox it. 4:3 images must also be pillarboxes if the screen is taller than the image
if (screenratio >= aspect || aspect < 1.4) autoaspect = 1; // screen is wider than the image -> pillarbox it. 4:3 images must also be pillarboxed if the screen is taller than the image
else if (screenratio > 1.32) autoaspect = 2; // on anything 4:3 and wider crop the sides of the image.
else
{
Expand Down
2 changes: 2 additions & 0 deletions src/wi_stuff.cpp
Expand Up @@ -601,6 +601,7 @@ void DInterBackground::drawBackground(int state, bool drawsplat, bool snl_pointe
// placing the animations precisely where they belong on the base pic
animwidth = background->GetDisplayWidth();
animheight = background->GetDisplayHeight();
if (gameinfo.fullscreenautoaspect == 3 && animheight == 200 && animwidth > 320) animwidth = 320; // deal with widescreen replacements that keep the original coordinates.
DrawTexture(twod, background, 0, 0, DTA_Fullscreen, true, TAG_DONE);
}
else
Expand Down Expand Up @@ -726,6 +727,7 @@ void WI_Drawer()
IFVIRTUALPTRNAME(WI_Screen, "StatusScreen", Drawer)
{
FillBorder(twod, nullptr);
twod->ClearClipRect();
VMValue self = WI_Screen;
VMCall(func, &self, 1, nullptr, 0);
twod->ClearClipRect(); // make sure the scripts don't leave a valid clipping rect behind.
Expand Down

0 comments on commit e00f27d

Please sign in to comment.