mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-02-11 07:40:41 +00:00
- simplify some of my math in the the fullscreen HUD drawers.
May no one ever see the original code again... :S
This commit is contained in:
parent
5cb3562bc1
commit
4e0bef35c0
3 changed files with 3 additions and 6 deletions
|
@ -167,8 +167,7 @@ public:
|
||||||
auto strlen = format.Len();
|
auto strlen = format.Len();
|
||||||
if (strlen > 1)
|
if (strlen > 1)
|
||||||
{
|
{
|
||||||
auto scaler = strlen - 1;
|
imgX += (imgX * 0.6) * (strlen - 1);
|
||||||
imgX += ((imgX / 2.) * scaler) + ((imgX / (10. * scale)) * scaler);
|
|
||||||
}
|
}
|
||||||
DrawGraphic(imgWeap, -imgX, -1.5, DI_ITEM_RIGHT_BOTTOM, 1, -1, -1, weapScale, weapScale);
|
DrawGraphic(imgWeap, -imgX, -1.5, DI_ITEM_RIGHT_BOTTOM, 1, -1, -1, weapScale, weapScale);
|
||||||
}
|
}
|
||||||
|
|
|
@ -153,8 +153,7 @@ public:
|
||||||
auto strlen = format.Len();
|
auto strlen = format.Len();
|
||||||
if (strlen > 1)
|
if (strlen > 1)
|
||||||
{
|
{
|
||||||
auto scaler = strlen - 1;
|
imgX += (imgX * 0.755) * (strlen - 1);
|
||||||
imgX += ((imgX / 2.) * scaler) + ((imgX / (7.8125 * scale)) * scaler);
|
|
||||||
}
|
}
|
||||||
DrawGraphic(imgWeap, -imgX, -2, DI_ITEM_RIGHT_BOTTOM, 1, -1, -1, weapScale, weapScale);
|
DrawGraphic(imgWeap, -imgX, -2, DI_ITEM_RIGHT_BOTTOM, 1, -1, -1, weapScale, weapScale);
|
||||||
}
|
}
|
||||||
|
|
|
@ -810,8 +810,7 @@ private:
|
||||||
auto strlen = format.Len();
|
auto strlen = format.Len();
|
||||||
if (strlen > 1)
|
if (strlen > 1)
|
||||||
{
|
{
|
||||||
auto scaler = strlen - 1;
|
imgX += (imgX * 0.855) * (strlen - 1);
|
||||||
imgX += ((imgX / 2.) * scaler) + ((imgX / 2.85) * scaler);
|
|
||||||
}
|
}
|
||||||
DrawGraphic(imgWeap, -imgX, -1, DI_ITEM_RIGHT_BOTTOM, 1, -1, -1, weapScale, weapScale);
|
DrawGraphic(imgWeap, -imgX, -1, DI_ITEM_RIGHT_BOTTOM, 1, -1, -1, weapScale, weapScale);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue