(svn r2936) Move string commands to a non-printable range and remove stale comments
authortron
Sat, 10 Sep 2005 15:14:35 +0000
changeset 2410 795225af3c72
parent 2409 eed16baa35ac
child 2411 8c239fc63cf7
(svn r2936) Move string commands to a non-printable range and remove stale comments
strgen/strgen.c
strings.c
--- a/strgen/strgen.c	Sat Sep 10 09:52:33 2005 +0000
+++ b/strgen/strgen.c	Sat Sep 10 15:14:35 2005 +0000
@@ -332,7 +332,7 @@
 		Fatal("%s: Invalid number of plural forms. Expecting %d, found %d.", _cur_ident,
 			_plural_form_counts[_lang_pluralform], nw);
 
-	PutByte(0x7D);
+	PutByte(0x8D);
 	PutByte(TranslateArgumentIdx(argidx));
 	EmitWordList(words, nw);
 }
@@ -408,14 +408,6 @@
 	{"DKBLUE", EmitSingleByte,  30, 0},
 	{"BLACK", EmitSingleByte,   31, 0},
 
-	// 0x7B=123 is the LAST special character we may use.
-
-	// Numbers
-	{"COMMA", EmitSingleByte, 0x7B, 1}, // Number with comma
-	{"NUM", EmitSingleByte,  0x7E, 1}, // Signed number
-
-	{"CURRENCY", EmitSingleByte, 0x7F, 1},
-
 	// 0x85
 	{"CURRCOMPACT", EmitEscapedByte, 0, 1},		// compact currency (32 bits)
 	{"REV", EmitEscapedByte, 2, 0},						// openttd revision string
@@ -456,6 +448,12 @@
 
 	{"STRING", EmitSingleByte, 0x88, 1, C_CASE},
 
+	// Numbers
+	{"COMMA", EmitSingleByte, 0x8B, 1}, // Number with comma
+	{"NUM",   EmitSingleByte, 0x8E, 1}, // Signed number
+
+	{"CURRENCY", EmitSingleByte, 0x8F, 1},
+
 	{"WAYPOINT", EmitSingleByte, 0x99, 1}, // waypoint name
 	{"STATION", EmitSingleByte, 0x9A, 1},
 	{"TOWN", EmitSingleByte, 0x9B, 1},
@@ -1017,7 +1015,7 @@
 
 static void PutArgidxCommand(void)
 {
-	PutByte(0x7C);
+	PutByte(0x8C);
 	PutByte(TranslateArgumentIdx(_cur_argidx));
 }
 
--- a/strings.c	Sat Sep 10 09:52:33 2005 +0000
+++ b/strings.c	Sat Sep 10 15:14:35 2005 +0000
@@ -498,26 +498,7 @@
 			*buff++ = *str++;
 			*buff++ = *str++;
 			break;
-		case 0x7B: // {COMMA}
-			buff = FormatCommaNumber(buff, GetInt32(&argv));
-			break;
-		case 0x7C: // Move argument pointer
-			argv = argv_orig + (byte)*str++;
-			break;
-		case 0x7D: { // {P}
-			int32 v = argv_orig[(byte)*str++]; // contains the number that determines plural
-			int len;
-			str = ParseStringChoice(str, DeterminePluralForm(v), buff, &len);
-			buff += len;
-			break;
-		}
-		case 0x7E: // {NUM}
-			buff = FormatNoCommaNumber(buff, GetInt32(&argv));
-			break;
-		case 0x7F: // {CURRENCY}
-			buff = FormatGenericCurrency(buff, &_currency_specs[_opt_ptr->currency], GetInt32(&argv), false);
-			break;
-		// 0x80 is reserved for EURO
+
 		case 0x81: // {STRINL}
 			str += 2;
 			buff = GetStringWithArgs(buff, READ_LE_UINT16(str-2), argv);
@@ -682,6 +663,30 @@
 			break;
 		}
 
+		case 0x8B: // {COMMA}
+			buff = FormatCommaNumber(buff, GetInt32(&argv));
+			break;
+
+		case 0x8C: // Move argument pointer
+			argv = argv_orig + (byte)*str++;
+			break;
+
+		case 0x8D: { // {P}
+			int32 v = argv_orig[(byte)*str++]; // contains the number that determines plural
+			int len;
+			str = ParseStringChoice(str, DeterminePluralForm(v), buff, &len);
+			buff += len;
+			break;
+		}
+
+		case 0x8E: // {NUM}
+			buff = FormatNoCommaNumber(buff, GetInt32(&argv));
+			break;
+
+		case 0x8F: // {CURRENCY}
+			buff = FormatGenericCurrency(buff, &_currency_specs[_opt_ptr->currency], GetInt32(&argv), false);
+			break;
+
 		case 0x99: { // {WAYPOINT}
 			int32 temp[2];
 			Waypoint *wp = GetWaypoint(GetInt32(&argv));
@@ -749,10 +754,6 @@
 			break;
 		}
 
-		// case 0x88..0x98: // {COLORS}
-		// case 0xE: // {TINYFONT}
-		// case 0xF: // {BIGFONT}
-		// 0x9E is the highest number that is available.
 		default:
 			*buff++ = b;
 		}