diff --git a/ExternalLibs/glfont2/glfont2.cpp b/ExternalLibs/glfont2/glfont2.cpp index 56b5abe..7cff0ff 100644 --- a/ExternalLibs/glfont2/glfont2.cpp +++ b/ExternalLibs/glfont2/glfont2.cpp @@ -195,7 +195,7 @@ int GLFont::GetEndChar (void) return header.end_char; } //******************************************************************* -void GLFont::GetCharSize (unsigned int c, std::pair *size) +void GLFont::GetCharSize (unsigned char c, std::pair *size) { //Make sure character is in range if (c < header.start_char || c > header.end_char) @@ -216,7 +216,7 @@ void GLFont::GetCharSize (unsigned int c, std::pair *size) } } //******************************************************************* -int GLFont::GetCharWidth (unsigned int c) +int GLFont::GetCharWidth (unsigned char c) { //Make sure in range if (c < header.start_char || c > header.end_char) @@ -240,7 +240,7 @@ int GLFont::GetCharWidth (unsigned int c) } } //******************************************************************* -int GLFont::GetCharHeight (unsigned int c) +int GLFont::GetCharHeight (unsigned char c) { //Make sure in range if (c < header.start_char || c > header.end_char) @@ -266,7 +266,7 @@ void GLFont::Begin (void) void GLFont::GetStringSize (const std::string &text, std::pair *size) { unsigned int i; - unsigned char c; + unsigned int c; GLFontChar *glfont_char; float width; diff --git a/ExternalLibs/glfont2/glfont2.h b/ExternalLibs/glfont2/glfont2.h index b2dc491..235869b 100644 --- a/ExternalLibs/glfont2/glfont2.h +++ b/ExternalLibs/glfont2/glfont2.h @@ -70,9 +70,9 @@ public: int GetEndChar (void); //Character size retrieval methods - void GetCharSize (unsigned int c, std::pair *size); - int GetCharWidth (unsigned int c); - int GetCharHeight (unsigned int c); + void GetCharSize (unsigned char c, std::pair *size); + int GetCharWidth (unsigned char c); + int GetCharHeight (unsigned char c); void GetStringSize (const std::string &text, std::pair *size); @@ -86,21 +86,20 @@ public: float y, const float *top_color, const float *bottom_color, float alpha, float lastAlpha) { unsigned int i; - T c; GLFontChar *glfont_char; float width, height; //Begin rendering quads glBegin(GL_QUADS); - int sz = text.size(); + unsigned int sz = text.size(); float a = 0; //Loop through characters for (i = 0; i < sz; i++) { //Make sure character is in range - c = text[i]; + unsigned int c = (unsigned char)text[i]; if (c < header.start_char || c > header.end_char) continue;