Change canvas rendering to use the aspect ratio of the canvas and generalize 5:4 rendering as AspectTallerThanWide

This commit is contained in:
Magnus Norddahl 2016-09-13 23:26:30 +02:00 committed by Christoph Oelckers
commit 017d1cee29
7 changed files with 36 additions and 21 deletions

View file

@ -318,7 +318,7 @@ void R_SWRSetWindow(int windowSize, int fullWidth, int fullHeight, int stHeight,
virtwidth = virtwidth2 = fullWidth;
virtheight = virtheight2 = fullHeight;
if (Is54Aspect(trueratio))
if (AspectTallerThanWide(trueratio))
{
virtheight2 = virtheight2 * AspectMultiplier(trueratio) / 48;
}
@ -327,7 +327,7 @@ void R_SWRSetWindow(int windowSize, int fullWidth, int fullHeight, int stHeight,
virtwidth2 = virtwidth2 * AspectMultiplier(trueratio) / 48;
}
if (Is54Aspect(WidescreenRatio))
if (AspectTallerThanWide(WidescreenRatio))
{
virtheight = virtheight * AspectMultiplier(WidescreenRatio) / 48;
}
@ -948,7 +948,7 @@ void R_RenderViewToCanvas (AActor *actor, DCanvas *canvas,
RenderTarget = canvas;
bRenderingToCanvas = true;
R_SetWindow (12, width, height, height);
R_SetWindow (12, width, height, height, true);
viewwindowx = x;
viewwindowy = y;
viewactive = true;