From 8c2d76b5892f008ec04282dff635f380bedf79c7 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Tue, 28 Jun 2011 15:39:19 +0000 Subject: [PATCH] - fix for about screen (avoid using Vera font seems buggy) --- source/glest_game/facilities/game_util.cpp | 15 ++++++++++----- source/glest_game/menu/menu_state_about.cpp | 1 + source/shared_lib/sources/graphics/font.cpp | 2 +- .../sources/graphics/gl/text_renderer_gl.cpp | 11 ++++++++--- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/source/glest_game/facilities/game_util.cpp b/source/glest_game/facilities/game_util.cpp index 94eaeeddd..2b415503d 100644 --- a/source/glest_game/facilities/game_util.cpp +++ b/source/glest_game/facilities/game_util.cpp @@ -151,11 +151,16 @@ string getAboutString2(int i){ string getTeammateName(int i) { switch(i) { - case 0: return "Marti�o Figueroa"; - case 1: return "Jos� Luis Gonz�lez"; - case 2: return "Tucho Fern�ndez"; - case 3: return "Jos� Zanni"; - case 4: return "F�lix Men�ndez"; + case 0: return "Martiño Figueroa"; + //case 0: return "Martino Figueroa"; + case 1: return "José Luis González"; + //case 1: return "Jose Luis Gonzalez"; + case 2: return "Tucho Fernández"; + //case 2: return "Tucho Fernandez"; + case 3: return "José Zanni"; + //case 3: return "Jose Zanni"; + case 4: return "Félix Menéndez"; + //case 4: return "Felix Menendez"; case 5: return "Marcos Caruncho"; case 6: return "Matthias Braun"; case 7: return "Titus Tscharntke"; diff --git a/source/glest_game/menu/menu_state_about.cpp b/source/glest_game/menu/menu_state_about.cpp index 01951d97b..c62deea9c 100644 --- a/source/glest_game/menu/menu_state_about.cpp +++ b/source/glest_game/menu/menu_state_about.cpp @@ -80,6 +80,7 @@ MenuStateAbout::MenuStateAbout(Program *program, MainMenu *mainMenu) : labelTeammateName[i].init(100 + i * 180, 500); labelTeammateRole[i].registerGraphicComponent(containerName, "labelTeammateRole" + intToStr(i)); labelTeammateRole[i].init(100 + i * 180, 520); + labelTeammateName[i].setText(getTeammateName(i)); labelTeammateRole[i].setText(getTeammateRole(i)); } diff --git a/source/shared_lib/sources/graphics/font.cpp b/source/shared_lib/sources/graphics/font.cpp index 64840ff8a..424db07fd 100644 --- a/source/shared_lib/sources/graphics/font.cpp +++ b/source/shared_lib/sources/graphics/font.cpp @@ -36,7 +36,7 @@ int Font::charCount = 256; std::string Font::fontTypeName = "Times New Roman"; bool Font::fontIsMultibyte = false; bool Font::forceLegacyFonts = false; -float FontMetrics::DEFAULT_Y_OFFSET_FACTOR = 0.0f; +float FontMetrics::DEFAULT_Y_OFFSET_FACTOR = 2.0f; bool Font::fontIsRightToLeft = false; float Font::scaleFontValue = 0.75; //int Font::scaleFontYOffset = 0; diff --git a/source/shared_lib/sources/graphics/gl/text_renderer_gl.cpp b/source/shared_lib/sources/graphics/gl/text_renderer_gl.cpp index c421f697a..6c9d75dcd 100644 --- a/source/shared_lib/sources/graphics/gl/text_renderer_gl.cpp +++ b/source/shared_lib/sources/graphics/gl/text_renderer_gl.cpp @@ -408,9 +408,14 @@ void TextRenderer3DGl::specialFTGLErrorCheckWorkaround(string text) { if(error) { if(SystemFlags::VERBOSE_MODE_ENABLED) printf("\n\nIn [%s::%s Line: %d] error = %d for text [%s]\n\n",__FILE__,__FUNCTION__,__LINE__,error,text.c_str()); - if(currentFTGLErrorCount > 0) { - printf("error = %d for text [%s]\n",error,text.c_str()); - assertGlWithErrorNumber(error); + if(currentFTGLErrorCount > 5) { + printf("\n**FTGL Error = %d for text [%s] currentFTGLErrorCount = %d\n\n",error,text.c_str(),currentFTGLErrorCount); + fflush(stdout); + + //assertGlWithErrorNumber(error); + } + else { + //printf("\n**FTGL #2 Error = %d for text [%s] currentFTGLErrorCount = %d\n\n",error,text.c_str(),currentFTGLErrorCount); } currentFTGLErrorCount++;