Font system refactor, use pre-rendered fonts

This commit is contained in:
elasota
2021-03-27 02:08:03 -04:00
parent c87f238563
commit 50f420d2b1
63 changed files with 976 additions and 1294 deletions

View File

@@ -145,7 +145,7 @@ void DrawHighScores (DrawSurface *surface)
DisposeGWorld(tempMap);
DisposeGWorld(tempMask);
PortabilityLayer::RenderedFont *appFont14 = GetApplicationFont(14, PortabilityLayer::FontFamilyFlag_Bold, true);
PortabilityLayer::RenderedFont *appFont14 = GetFont(PortabilityLayer::FontPresets::kApplication14Bold);
PasStringCopy(PSTR("\xa5 "), tempStr);
PasStringConcat(tempStr, thisHouseName);
@@ -157,7 +157,7 @@ void DrawHighScores (DrawSurface *surface)
const Point scoreTextPoint = Point::Create(scoreLeft + ((kScoreWide - appFont14->MeasurePStr(tempStr)) / 2), dropIt - 65);
surface->DrawString(scoreTextPoint, tempStr, cyanColor, appFont14);
PortabilityLayer::RenderedFont *appFont12 = GetApplicationFont(12, PortabilityLayer::FontFamilyFlag_Bold, true);
PortabilityLayer::RenderedFont *appFont12 = GetFont(PortabilityLayer::FontPresets::kApplication12Bold);
thisHousePtr = *thisHouse;
// message for score #1
@@ -264,7 +264,7 @@ void DrawHighScores (DrawSurface *surface)
}
}
PortabilityLayer::RenderedFont *appFont9 = GetApplicationFont(9, PortabilityLayer::FontFamilyFlag_Bold, true);
PortabilityLayer::RenderedFont *appFont9 = GetFont(PortabilityLayer::FontPresets::kApplication9Bold);
const Point textPos = Point::Create(scoreLeft + 80, dropIt - 1 + (10 * kScoreSpacing));
GetLocalizedString(8, tempStr);