commit
81545d9b4e
22 changed files with 365 additions and 194 deletions
|
|
@ -138,7 +138,7 @@ angle_t LocalViewAngle;
|
|||
int LocalViewPitch;
|
||||
bool LocalKeyboardTurner;
|
||||
|
||||
int WidescreenRatio;
|
||||
float WidescreenRatio;
|
||||
int setblocks;
|
||||
int extralight;
|
||||
bool setsizeneeded;
|
||||
|
|
@ -198,9 +198,9 @@ void R_SetViewSize (int blocks)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void R_SetWindow (int windowSize, int fullWidth, int fullHeight, int stHeight)
|
||||
void R_SetWindow (int windowSize, int fullWidth, int fullHeight, int stHeight, bool renderingToCanvas)
|
||||
{
|
||||
int trueratio;
|
||||
float trueratio;
|
||||
|
||||
if (windowSize >= 11)
|
||||
{
|
||||
|
|
@ -220,8 +220,15 @@ void R_SetWindow (int windowSize, int fullWidth, int fullHeight, int stHeight)
|
|||
freelookviewheight = ((setblocks*fullHeight)/10)&~7;
|
||||
}
|
||||
|
||||
// If the screen is approximately 16:9 or 16:10, consider it widescreen.
|
||||
WidescreenRatio = CheckRatio (fullWidth, fullHeight, &trueratio);
|
||||
if (renderingToCanvas)
|
||||
{
|
||||
WidescreenRatio = fullWidth / (float)fullHeight;
|
||||
trueratio = WidescreenRatio;
|
||||
}
|
||||
else
|
||||
{
|
||||
WidescreenRatio = ActiveRatio(fullWidth, fullHeight, &trueratio);
|
||||
}
|
||||
|
||||
DrawFSHUD = (windowSize == 11);
|
||||
|
||||
|
|
@ -230,13 +237,13 @@ void R_SetWindow (int windowSize, int fullWidth, int fullHeight, int stHeight)
|
|||
|
||||
centery = viewheight/2;
|
||||
centerx = viewwidth/2;
|
||||
if (Is54Aspect(WidescreenRatio))
|
||||
if (AspectTallerThanWide(WidescreenRatio))
|
||||
{
|
||||
centerxwide = centerx;
|
||||
}
|
||||
else
|
||||
{
|
||||
centerxwide = centerx * BaseRatioSizes[WidescreenRatio][3] / 48;
|
||||
centerxwide = centerx * AspectMultiplier(WidescreenRatio) / 48;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue