summaryrefslogtreecommitdiff
path: root/src/strings.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-04-19 18:03:24 +0000
committerpeter1138 <peter1138@openttd.org>2008-04-19 18:03:24 +0000
commit4f2c2656e74a4f21d68797b7f03a113cc87d7bcd (patch)
tree0dfcfa69d643d1e10c84a2fc90cad0bcf7707ab4 /src/strings.cpp
parent01549e1574b8c4deeb28bf5127bc5027d58841d1 (diff)
downloadopenttd-4f2c2656e74a4f21d68797b7f03a113cc87d7bcd.tar.xz
(svn r12793) -Codechange: Use enum values for station types instead of mysterious hex (ln)
Diffstat (limited to 'src/strings.cpp')
-rw-r--r--src/strings.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/strings.cpp b/src/strings.cpp
index 4f84a8776..7ed45a745 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -1046,11 +1046,11 @@ static char* FormatString(char* buff, const char* str, const int64* argv, uint c
static char *StationGetSpecialString(char *buff, int x, const char* last)
{
- if ((x & 0x01) && (buff + Utf8CharLen(SCC_TRAIN) < last)) buff += Utf8Encode(buff, SCC_TRAIN);
- if ((x & 0x02) && (buff + Utf8CharLen(SCC_LORRY) < last)) buff += Utf8Encode(buff, SCC_LORRY);
- if ((x & 0x04) && (buff + Utf8CharLen(SCC_BUS) < last)) buff += Utf8Encode(buff, SCC_BUS);
- if ((x & 0x08) && (buff + Utf8CharLen(SCC_PLANE) < last)) buff += Utf8Encode(buff, SCC_PLANE);
- if ((x & 0x10) && (buff + Utf8CharLen(SCC_SHIP) < last)) buff += Utf8Encode(buff, SCC_SHIP);
+ if ((x & FACIL_TRAIN) && (buff + Utf8CharLen(SCC_TRAIN) < last)) buff += Utf8Encode(buff, SCC_TRAIN);
+ if ((x & FACIL_TRUCK_STOP) && (buff + Utf8CharLen(SCC_LORRY) < last)) buff += Utf8Encode(buff, SCC_LORRY);
+ if ((x & FACIL_BUS_STOP) && (buff + Utf8CharLen(SCC_BUS) < last)) buff += Utf8Encode(buff, SCC_BUS);
+ if ((x & FACIL_AIRPORT) && (buff + Utf8CharLen(SCC_PLANE) < last)) buff += Utf8Encode(buff, SCC_PLANE);
+ if ((x & FACIL_DOCK) && (buff + Utf8CharLen(SCC_SHIP) < last)) buff += Utf8Encode(buff, SCC_SHIP);
*buff = '\0';
return buff;
}