mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-21 11:31:41 +00:00
- add scaling customization for classic ui flat scaling
This commit is contained in:
parent
b746484da3
commit
8f63bd773a
1 changed files with 4 additions and 2 deletions
|
@ -44,6 +44,8 @@ static F2DDrawer drawer;
|
|||
F2DDrawer* twod = &drawer;
|
||||
|
||||
EXTERN_CVAR(Float, transsouls)
|
||||
CVAR(Float, classic_scaling_factor, 1.0, CVAR_ARCHIVE)
|
||||
CVAR(Float, classic_scaling_pixelaspect, 1.2, CVAR_ARCHIVE)
|
||||
|
||||
IMPLEMENT_CLASS(DShape2DTransform, false, false)
|
||||
|
||||
|
@ -755,8 +757,8 @@ void F2DDrawer::AddFlatFill(int left, int top, int right, int bottom, FGameTextu
|
|||
|
||||
case -1: // classic flat scaling
|
||||
float ar = 4.f / 3.f / (float)ActiveRatio((float)screen->GetWidth(), (float)screen->GetHeight());
|
||||
float sw = 320.f / (float)screen->GetWidth() / ar;
|
||||
float sh = 200.f / (float)screen->GetHeight();
|
||||
float sw = 320.f * classic_scaling_factor / (float)screen->GetWidth() / ar;
|
||||
float sh = 240.f / classic_scaling_pixelaspect * classic_scaling_factor / (float)screen->GetHeight();
|
||||
fU1 = float(left) / (float)src->GetDisplayWidth() * fs * sw;
|
||||
fV1 = float(top) / (float)src->GetDisplayHeight() * fs * sh;
|
||||
fU2 = float(right) / (float)src->GetDisplayWidth() * fs * sw;
|
||||
|
|
Loading…
Reference in a new issue