summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorludde <ludde@openttd.org>2005-07-13 20:41:44 +0000
committerludde <ludde@openttd.org>2005-07-13 20:41:44 +0000
commitbe98b1bf7e1c7fdab206746084de7cb1a062d672 (patch)
tree771efd86d6bbfceb70a4d624b3ab560b12ef6564
parenta1ec4aff7730c6bf56a4f2c6269d4cab985f47af (diff)
downloadopenttd-be98b1bf7e1c7fdab206746084de7cb1a062d672.tar.xz
(svn r2562) Fix: Merged {NUMU16}, {INT32}. They do the same thing now.
-rw-r--r--strgen/strgen.c4
-rw-r--r--strings.c7
2 files changed, 4 insertions, 7 deletions
diff --git a/strgen/strgen.c b/strgen/strgen.c
index a85d59b58..376a0ffb6 100644
--- a/strgen/strgen.c
+++ b/strgen/strgen.c
@@ -242,13 +242,13 @@ static const CmdStruct _cmd_structs[] = {
{"COMMA16", EmitSingleByte, 0x7B},
{"COMMA8", EmitSingleByte, 0x7B},
- {"NUMU16", EmitSingleByte, 0x7E},
+ {"NUMU16", EmitSingleByte, 0x7E}, // These two do the same thing nowadays
+ {"INT32", EmitSingleByte, 0x7E}, // signed 32 bit integer
{"CURRENCY", EmitSingleByte, 0x7F},
// 0x85
{"CURRCOMPACT", EmitEscapedByte, 0}, // compact currency (32 bits)
- {"INT32", EmitEscapedByte, 1}, // signed 32 bit integer
{"REV", EmitEscapedByte, 2}, // openttd revision string
{"SHORTCARGO", EmitEscapedByte, 3}, // short cargo description, only ### tons, or ### litres
{"CURRCOMPACT64", EmitEscapedByte, 4}, // compact currency 64 bits
diff --git a/strings.c b/strings.c
index 9306a4308..c50933321 100644
--- a/strings.c
+++ b/strings.c
@@ -416,8 +416,8 @@ static char *DecodeString(char *buff, const char *str)
case 0x7D: // {COMMA8}
assert(0);
break;
- case 0x7E: // {NUMU16}
- buff = FormatNoCommaNumber(buff, GetParamInt16());
+ case 0x7E: // {NUMU16}, {INT32}
+ buff = FormatNoCommaNumber(buff, GetParamInt32());
break;
case 0x7F: // {CURRENCY}
buff = FormatGenericCurrency(buff, &_currency_specs[_opt_ptr->currency], GetParamInt32(), false);
@@ -453,9 +453,6 @@ static char *DecodeString(char *buff, const char *str)
case 0: /* {CURRCOMPACT} */
buff = FormatGenericCurrency(buff, &_currency_specs[_opt_ptr->currency], GetParamInt32(), true);
break;
- case 1: /* {INT32} */
- buff = FormatNoCommaNumber(buff, GetParamInt32());
- break;
case 2: /* {REV} */
buff = strecpy(buff, _openttd_revision, NULL);
break;