mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-04 01:41:56 +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. # Conflicts: # src/wi_stuff.cpp
This commit is contained in:
parent
96cd602de1
commit
bbceaa1fcb
2 changed files with 3 additions and 1 deletions
|
@ -418,7 +418,7 @@ bool DCanvas::SetTextureParms(DrawParms *parms, FTexture *img, double xx, double
|
|||
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
|
||||
{
|
||||
|
|
|
@ -605,6 +605,7 @@ void DInterBackground::drawBackground(int state, bool drawsplat, bool snl_pointe
|
|||
// placing the animations precisely where they belong on the base pic
|
||||
animwidth = background->GetScaledWidthDouble();
|
||||
animheight = background->GetScaledHeightDouble();
|
||||
if (gameinfo.fullscreenautoaspect == 3 && animheight == 200 && animwidth > 320) animwidth = 320; // deal with widescreen replacements that keep the original coordinates.
|
||||
screen->DrawTexture(background, 0, 0, DTA_Fullscreen, true, TAG_DONE);
|
||||
}
|
||||
else
|
||||
|
@ -728,6 +729,7 @@ void WI_Drawer()
|
|||
IFVIRTUALPTRNAME(WI_Screen, "StatusScreen", Drawer)
|
||||
{
|
||||
screen->FillBorder(nullptr);
|
||||
screen->ClearClipRect();
|
||||
VMValue self = WI_Screen;
|
||||
VMCall(func, &self, 1, nullptr, 0);
|
||||
screen->ClearClipRect(); // make sure the scripts don't leave a valid clipping rect behind.
|
||||
|
|
Loading…
Reference in a new issue