summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Software/RasterFont.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2014-08-10 20:48:28 -0400
committerLioncash <mathew1800@gmail.com>2014-08-10 20:48:28 -0400
commitb05065732236200ed3dfee3f13ad3dc70d6c713e (patch)
treeec5177b9acae0eaa5d241e95645d3a929defaeaf /Source/Core/VideoBackends/Software/RasterFont.cpp
parenta1418192416e012e509c16bbb5c4380f0a30de0c (diff)
Software: Make constants char_width and char_height private in RasterFont
Diffstat (limited to 'Source/Core/VideoBackends/Software/RasterFont.cpp')
-rw-r--r--Source/Core/VideoBackends/Software/RasterFont.cpp8
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++ = ' ';
}