summaryrefslogtreecommitdiff
path: root/misc_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-03-25 14:19:33 +0000
committertron <tron@openttd.org>2005-03-25 14:19:33 +0000
commit9832a691fe1db29d9564c4fbea0c057faa1e030c (patch)
treea7a6df81cc0c220bd888291e50a656b598e33b4b /misc_gui.c
parent6d75cce924fb6c46be7a0cae11cf1485451d494f (diff)
downloadopenttd-9832a691fe1db29d9564c4fbea0c057faa1e030c.tar.xz
(svn r2060) Clean up some string construction and remove now unused macro
Diffstat (limited to 'misc_gui.c')
-rw-r--r--misc_gui.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/misc_gui.c b/misc_gui.c
index 0b35bbcc3..ae71ba38e 100644
--- a/misc_gui.c
+++ b/misc_gui.c
@@ -663,18 +663,17 @@ void GuiShowTooltips(StringID string_id)
}
-static void DrawStationCoverageText(const uint *accepts, int str_x, int str_y, uint mask)
+static void DrawStationCoverageText(const AcceptedCargo accepts,
+ int str_x, int str_y, uint mask)
{
+ char *b = _userstring;
int i;
- char *b;
- b = _userstring;
b = InlineString(b, STR_000D_ACCEPTS);
- for(i=0; i!=NUM_CARGO; i++,mask>>=1) {
- if (accepts[i] >= 8 && (mask&1) ) {
- StringID id = _cargoc.names_s[i];
- b = InlineString(b, id);
+ for (i = 0; i != NUM_CARGO; i++, mask >>= 1) {
+ if (accepts[i] >= 8 && mask & 1) {
+ b = InlineString(b, _cargoc.names_s[i]);
*b++ = ',';
*b++ = ' ';
}
@@ -684,7 +683,7 @@ static void DrawStationCoverageText(const uint *accepts, int str_x, int str_y, u
b = InlineString(b, STR_00D0_NOTHING);
*b++ = '\0';
} else {
- b[-2] = 0;
+ b[-2] = '\0';
}
DrawStringMultiLine(str_x, str_y, STR_SPEC_USERSTRING, 144);