strings.c
changeset 1621 890ab08b9855
parent 1542 62a03537ad0b
child 1625 c2849df304da
--- a/strings.c	Sat Apr 02 12:45:12 2005 +0000
+++ b/strings.c	Sat Apr 02 15:03:48 2005 +0000
@@ -16,6 +16,7 @@
 static char *GetSpecialPlayerNameString(char *buff, int ind);
 
 static char *DecodeString(char *buff, const char *str);
+static char *FormatNoCommaNumber(char *buff, int32 number);
 
 extern const char _openttd_revision[];
 
@@ -152,6 +153,12 @@
 			return DecodeString(buffr, _screenshot_name);
 	}
 
+	if (string >> 12 == 1) {
+		// black number encoded in the string ID
+		*buffr++ = 31; // BLACK
+		return FormatNoCommaNumber(buffr, string & 0xFFF);
+	}
+
 	switch (tab) {
 		case 4:
 			if (index >= 0xC0) return GetSpecialTownNameString(buffr, index - 0xC0);