- 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:
Mitchell Richters 2020-08-21 16:23:44 +10:00
parent 5cb3562bc1
commit 4e0bef35c0
3 changed files with 3 additions and 6 deletions

View file

@ -167,8 +167,7 @@ public:
auto strlen = format.Len();
if (strlen > 1)
{
auto scaler = strlen - 1;
imgX += ((imgX / 2.) * scaler) + ((imgX / (10. * scale)) * scaler);
imgX += (imgX * 0.6) * (strlen - 1);
}
DrawGraphic(imgWeap, -imgX, -1.5, DI_ITEM_RIGHT_BOTTOM, 1, -1, -1, weapScale, weapScale);
}

View file

@ -153,8 +153,7 @@ public:
auto strlen = format.Len();
if (strlen > 1)
{
auto scaler = strlen - 1;
imgX += ((imgX / 2.) * scaler) + ((imgX / (7.8125 * scale)) * scaler);
imgX += (imgX * 0.755) * (strlen - 1);
}
DrawGraphic(imgWeap, -imgX, -2, DI_ITEM_RIGHT_BOTTOM, 1, -1, -1, weapScale, weapScale);
}

View file

@ -810,8 +810,7 @@ private:
auto strlen = format.Len();
if (strlen > 1)
{
auto scaler = strlen - 1;
imgX += ((imgX / 2.) * scaler) + ((imgX / 2.85) * scaler);
imgX += (imgX * 0.855) * (strlen - 1);
}
DrawGraphic(imgWeap, -imgX, -1, DI_ITEM_RIGHT_BOTTOM, 1, -1, -1, weapScale, weapScale);
}