Codechange: Remove FONT_HEIGHT_... macros. (#11481)

These make it look like we're dealing with a constant, but actually each is a call to `GetCharacterHeight(...)`.
This commit is contained in:
Peter Nelson
2023-11-21 19:04:24 +00:00
committed by GitHub
parent 96ec9c1b47
commit c18a1494b7
57 changed files with 369 additions and 381 deletions

View File

@@ -38,7 +38,7 @@ void DrawAircraftDetails(const Aircraft *v, const Rect &r)
SetDParam(1, u->build_year);
SetDParam(2, u->value);
DrawString(r.left, r.right, y, STR_VEHICLE_INFO_BUILT_VALUE);
y += FONT_HEIGHT_NORMAL;
y += GetCharacterHeight(FS_NORMAL);
SetDParam(0, u->cargo_type);
SetDParam(1, u->cargo_cap);
@@ -46,7 +46,7 @@ void DrawAircraftDetails(const Aircraft *v, const Rect &r)
SetDParam(3, u->Next()->cargo_cap);
SetDParam(4, GetCargoSubtypeText(u));
DrawString(r.left, r.right, y, (u->Next()->cargo_cap != 0) ? STR_VEHICLE_INFO_CAPACITY_CAPACITY : STR_VEHICLE_INFO_CAPACITY);
y += FONT_HEIGHT_NORMAL + WidgetDimensions::scaled.vsep_normal;
y += GetCharacterHeight(FS_NORMAL) + WidgetDimensions::scaled.vsep_normal;
}
if (u->cargo_cap != 0) {
@@ -58,7 +58,7 @@ void DrawAircraftDetails(const Aircraft *v, const Rect &r)
SetDParam(1, cargo_count);
SetDParam(2, u->cargo.GetFirstStation());
DrawString(r.left, r.right, y, STR_VEHICLE_DETAILS_CARGO_FROM);
y += FONT_HEIGHT_NORMAL;
y += GetCharacterHeight(FS_NORMAL);
feeder_share += u->cargo.GetFeederShare();
}
}