auto-enumerate FONT_TYPE_COUNT instead of defining it

This commit is contained in:
Stefan Seyfried
2013-04-13 17:27:21 +02:00
parent 61bf95f552
commit ee3580214f
5 changed files with 32 additions and 32 deletions

View File

@@ -1611,7 +1611,7 @@ void CNeutrinoApp::SetupFonts()
g_fontRenderer->AddFont(font.filename, true); // make italics
style[2] = "Italic";
for (int i = 0; i < FONT_TYPE_COUNT; i++)
for (int i = 0; i < SNeutrinoSettings::FONT_TYPE_COUNT; i++)
{
if(g_Font[i]) delete g_Font[i];
g_Font[i] = g_fontRenderer->getFont(font.name, style[neutrino_font[i].style], configfile.getInt32(locale_real_names[neutrino_font[i].name], neutrino_font[i].defaultsize) + neutrino_font[i].size_offset * font.size_offset);
@@ -4058,7 +4058,7 @@ void CNeutrinoApp::Cleanup()
delete RADIOsatList; RADIOsatList = NULL;
printf("cleanup 1\n");fflush(stdout);
for (int i = 0; i < FONT_TYPE_COUNT; i++) {
for (int i = 0; i < SNeutrinoSettings::FONT_TYPE_COUNT; i++) {
delete g_Font[i];
g_Font[i] = NULL;
}