mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-03 01:13:22 +00:00
- added limited support for replacing the intermission backgrounds in Doom 1 with widescreen images.
Due to how the placement works here, it is only usable with fullscreenautoaspect mode 3.
This commit is contained in:
parent
794a53f0c9
commit
e00f27ddf5
2 changed files with 3 additions and 1 deletions
|
@ -399,7 +399,7 @@ bool SetTextureParms(F2DDrawer * drawer, DrawParms *parms, FGameTexture *img, do
|
||||||
auto screenratio = ActiveRatio(GetWidth(), GetHeight());
|
auto screenratio = ActiveRatio(GetWidth(), GetHeight());
|
||||||
if (autoaspect == 3)
|
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 if (screenratio > 1.32) autoaspect = 2; // on anything 4:3 and wider crop the sides of the image.
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -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
|
// placing the animations precisely where they belong on the base pic
|
||||||
animwidth = background->GetDisplayWidth();
|
animwidth = background->GetDisplayWidth();
|
||||||
animheight = background->GetDisplayHeight();
|
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);
|
DrawTexture(twod, background, 0, 0, DTA_Fullscreen, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -726,6 +727,7 @@ void WI_Drawer()
|
||||||
IFVIRTUALPTRNAME(WI_Screen, "StatusScreen", Drawer)
|
IFVIRTUALPTRNAME(WI_Screen, "StatusScreen", Drawer)
|
||||||
{
|
{
|
||||||
FillBorder(twod, nullptr);
|
FillBorder(twod, nullptr);
|
||||||
|
twod->ClearClipRect();
|
||||||
VMValue self = WI_Screen;
|
VMValue self = WI_Screen;
|
||||||
VMCall(func, &self, 1, nullptr, 0);
|
VMCall(func, &self, 1, nullptr, 0);
|
||||||
twod->ClearClipRect(); // make sure the scripts don't leave a valid clipping rect behind.
|
twod->ClearClipRect(); // make sure the scripts don't leave a valid clipping rect behind.
|
||||||
|
|
Loading…
Reference in a new issue