GL aspect ratio adjustments

This commit is contained in:
Magnus Norddahl 2016-09-12 20:29:26 +02:00
commit 7bdbaaff22
2 changed files with 4 additions and 10 deletions

View file

@ -81,8 +81,6 @@ void FGLRenderer::DrawPSprite (player_t * player,DPSprite *psp, float sx, float
float scale;
float scalex;
float ftexturemid;
// 4:3 16:9 16:10 17:10 5:4 17:10 21:9
static float xratio[] = {1.f, 3.f/4, 5.f/6, 40.f/51, 1.f, 40.f/51, 4.f/7};
// [BB] In the HUD model step we just render the model and break out.
if ( hudModelStep )
@ -108,7 +106,7 @@ void FGLRenderer::DrawPSprite (player_t * player,DPSprite *psp, float sx, float
tex->GetSpriteRect(&r);
// calculate edges of the shape
scalex = xratio[WidescreenRatio] * vw / 320;
scalex = (320.0f / (240.0f * WidescreenRatio)) * vw / 320;
tx = sx - (160 - r.left);
x1 = tx * scalex + vw/2;