(svn r12793) -Codechange: Use enum values for station types instead of mysterious hex (ln)
authorpeter1138
Sat, 19 Apr 2008 18:03:24 +0000
changeset 10261 b3e7149e3d81
parent 10260 2772bc477a4f
child 10262 10f50eb9b717
(svn r12793) -Codechange: Use enum values for station types instead of mysterious hex (ln)
src/strings.cpp
--- a/src/strings.cpp	Sat Apr 19 17:47:56 2008 +0000
+++ b/src/strings.cpp	Sat Apr 19 18:03:24 2008 +0000
@@ -1046,11 +1046,11 @@
 
 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;
 }