Codechange: Replace currency macros with functions. (#12396)

This commit is contained in:
Peter Nelson
2024-03-29 14:49:48 +00:00
committed by GitHub
parent e21c12afeb
commit 8d312b305b
8 changed files with 59 additions and 45 deletions

View File

@@ -1252,7 +1252,7 @@ struct PerformanceRatingDetailWindow : Window {
* least 999 999 M which roughly is equally long. Furthermore if the
* exchange rate is that high, 999 999 k is usually not enough anymore
* to show the different currency numbers. */
if (_currency->rate < 1000) max /= _currency->rate;
if (GetCurrency().rate < 1000) max /= GetCurrency().rate;
SetDParam(0, max);
SetDParam(1, max);
uint score_detail_width = GetStringBoundingBox(STR_PERFORMANCE_DETAIL_AMOUNT_CURRENCY).width;