GL aspect ratio adjustments
This commit is contained in:
parent
7070bded77
commit
7bdbaaff22
2 changed files with 4 additions and 10 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue