diff options
Diffstat (limited to 'Source/Core/VideoBackends/Software/RasterFont.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Software/RasterFont.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/VideoBackends/Software/RasterFont.cpp b/Source/Core/VideoBackends/Software/RasterFont.cpp index 7876ac4585..8aefd89599 100644 --- a/Source/Core/VideoBackends/Software/RasterFont.cpp +++ b/Source/Core/VideoBackends/Software/RasterFont.cpp @@ -161,7 +161,7 @@ void RasterFont::printString(const char *s, double x, double y, double z) void RasterFont::printCenteredString(const char *s, double y, int screen_width, double z) { int length = (int)strlen(s); - int x = (int)(screen_width/2.0 - (length/2.0)*char_width); + int x = (int)(screen_width/2.0 - (length/2.0) * CHAR_WIDTH); printString(s, x, y, z); } @@ -177,7 +177,7 @@ void RasterFont::printMultilineText(const char *text, double start_x, double sta { *t = 0; printString(temp, x, y, z); - y -= char_height * 2.0f / bbHeight; + y -= CHAR_HEIGHT * 2.0f / bbHeight; x = start_x; t = temp; } @@ -187,12 +187,12 @@ void RasterFont::printMultilineText(const char *text, double start_x, double sta } else if (*text == '\t') { - //todo: add tabs every something like 4*char_width + //todo: add tabs every something like 4 * CHAR_WIDTH *t = 0; int cpos = (int)strlen(temp); int newpos = (cpos + 4) & (~3); printString(temp, x, y, z); - x = start_x + (char_width*newpos) * 2.0f / bbWidth; + x = start_x + (CHAR_WIDTH * newpos) * 2.0f / bbWidth; t = temp; *t++ = ' '; } |
