- changed menu scale to better fit the screen size and added some coordinate tweaking for the episode menu to shift long names to the left.

This commit is contained in:
Christoph Oelckers 2019-04-06 14:36:57 +02:00
commit f2d1126ff0
2 changed files with 29 additions and 6 deletions

View file

@ -544,6 +544,14 @@ void V_UpdateModeSize (int width, int height)
// The optimal scale will always be to fit a virtual 640 pixel wide display onto the screen.
// Exceptions are made for a few ranges where the available virtual width is > 480.
// This reference size is being used so that on 800x450 (small 16:9) a scale of 2 gets used.
CleanXfac = std::min(screen->GetWidth() / 400, screen->GetHeight() / 240);
if (CleanXfac >= 4) CleanXfac--; // Otherwise we do not have enough space for the episode/skill menus in some languages.
CleanYfac = CleanXfac;
CleanWidth = screen->GetWidth() / CleanXfac;
CleanHeight = screen->GetHeight() / CleanYfac;
int w = screen->GetWidth();
int factor;
if (w < 640) factor = 1;
@ -551,10 +559,6 @@ void V_UpdateModeSize (int width, int height)
else if (w >= 1600 && w < 1920) factor = 3;
else factor = w / 640;
CleanXfac = CleanYfac = factor;
CleanWidth = width / CleanXfac;
CleanHeight = height / CleanYfac;
CleanYfac_1 = CleanXfac_1 = MAX(1, int (CleanXfac * 0.7));
CleanWidth_1 = width / CleanXfac_1;
CleanHeight_1 = height / CleanYfac_1;