summaryrefslogtreecommitdiff
path: root/misc_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-02-06 22:25:27 +0000
committertron <tron@openttd.org>2005-02-06 22:25:27 +0000
commit257e97c09a5445c339118c3269cd3bd39151c65c (patch)
treef2cd6e89c719cd0e1e1f5f36d8b3e1bcb804079f /misc_gui.c
parent6984d6cd31d3ceb270a7caa75c4ed757788eb50b (diff)
downloadopenttd-257e97c09a5445c339118c3269cd3bd39151c65c.tar.xz
(svn r1833) byte -> char transition: the rest
Diffstat (limited to 'misc_gui.c')
-rw-r--r--misc_gui.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/misc_gui.c b/misc_gui.c
index 6db7b61d7..d6dacc454 100644
--- a/misc_gui.c
+++ b/misc_gui.c
@@ -678,7 +678,7 @@ void GuiShowTooltips(StringID string_id)
static void DrawStationCoverageText(const uint *accepts, int str_x, int str_y, uint mask)
{
int i;
- byte *b;
+ char *b;
b = _userstring;
b[0] = 0x81;
@@ -698,7 +698,7 @@ static void DrawStationCoverageText(const uint *accepts, int str_x, int str_y, u
}
}
- if (b == (byte*)&_userstring[3]) {
+ if (b == &_userstring[3]) {
b[0] = 0x81;
b[1] = STR_00D0_NOTHING;
b[2] = STR_00D0_NOTHING >> 8;
@@ -779,7 +779,7 @@ void SetHScrollCount(Window *w, int num)
* [IN]buf: string to be checked
* [OUT]count: gets set to the count of characters
* [OUT]width: gets set to the pixels width */
-static void GetCurrentStringSize(const byte *buf, int *count, int *width)
+static void GetCurrentStringSize(const char *buf, int *count, int *width)
{
*count = 0;
*width = -1;
@@ -788,7 +788,7 @@ static void GetCurrentStringSize(const byte *buf, int *count, int *width)
if (*++buf == 0)
break;
(*count)++;
- (*width) += _stringwidth_table[*buf - 32];
+ (*width) += _stringwidth_table[(byte)*buf - 32];
} while (1);
}