mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-12 05:11:45 +00:00
- Scale the scroller images so that the center 4:3 area is always fully visible.
This commit is contained in:
parent
763b460df0
commit
1704f16ae5
1 changed files with 4 additions and 2 deletions
|
@ -53,6 +53,8 @@
|
||||||
#include "templates.h"
|
#include "templates.h"
|
||||||
#include "s_music.h"
|
#include "s_music.h"
|
||||||
|
|
||||||
|
#define ScaleToFit43 3
|
||||||
|
|
||||||
FIntermissionDescriptorList IntermissionDescriptors;
|
FIntermissionDescriptorList IntermissionDescriptors;
|
||||||
|
|
||||||
IMPLEMENT_CLASS(DIntermissionScreen, false, false)
|
IMPLEMENT_CLASS(DIntermissionScreen, false, false)
|
||||||
|
@ -751,7 +753,7 @@ void DIntermissionScreenScroller::Drawer ()
|
||||||
// Now set a clipping rectangle for the intended viewport
|
// Now set a clipping rectangle for the intended viewport
|
||||||
double displayratio = atotalwidth / double(aheight) - 4./3.;
|
double displayratio = atotalwidth / double(aheight) - 4./3.;
|
||||||
double displaywidth = aheight * displayratio;
|
double displaywidth = aheight * displayratio;
|
||||||
screen->CalcFullscreenScale(displaywidth, aheight, gameinfo.fullscreenautoaspect, drect);
|
screen->CalcFullscreenScale(displaywidth, aheight, ScaleToFit43, drect);
|
||||||
screen->SetClipRect(int(drect.left), int(drect.top), int(drect.width), int(drect.height));
|
screen->SetClipRect(int(drect.left), int(drect.top), int(drect.width), int(drect.height));
|
||||||
|
|
||||||
int ticker = clamp(mTicker - mScrollDelay, 0, mScrollTime);
|
int ticker = clamp(mTicker - mScrollDelay, 0, mScrollTime);
|
||||||
|
@ -790,7 +792,7 @@ void DIntermissionScreenScroller::Drawer ()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// guesstimate the intended aspect ratio.
|
// guesstimate the intended aspect ratio.
|
||||||
screen->CalcFullscreenScale(fwidth, aheight, gameinfo.fullscreenautoaspect, drect);
|
screen->CalcFullscreenScale(fwidth, aheight, ScaleToFit43, drect);
|
||||||
screen->SetClipRect(int(drect.left), int(drect.top), int(drect.width), int(drect.height));
|
screen->SetClipRect(int(drect.left), int(drect.top), int(drect.width), int(drect.height));
|
||||||
|
|
||||||
int ticker = clamp(mTicker - mScrollDelay, 0, mScrollTime);
|
int ticker = clamp(mTicker - mScrollDelay, 0, mScrollTime);
|
||||||
|
|
Loading…
Reference in a new issue