From fc9a450e758067385129eddf3001efee9e562518 Mon Sep 17 00:00:00 2001 From: darkvater Date: Mon, 13 Sep 2004 20:38:36 +0000 Subject: (svn r237) -Fix: [1025836] Company value problem (again). Now company value rightly shows the value, including ALL your money. -Fix: Graphs now accomodate 64bit numbers (so the company value graph doesn't plummet into -... if value is too big) -Strgen: added CURRCOMPACT64 for this, and 64bit versions of several macros. --- strings.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'strings.c') diff --git a/strings.c b/strings.c index 1c2d6dc84..f79b491ab 100644 --- a/strings.c +++ b/strings.c @@ -433,20 +433,19 @@ static byte *DecodeString(byte *buff, const byte *str) // 0x85 is used as escape character.. case 0x85: switch(*str++) { - case 0: + case 0: /* {CURRCOMPACT} */ buff = FormatGenericCurrency(buff, &_currency_specs[_opt.currency], GetParamInt32(), true); break; - case 1: // {INT32} + case 1: /* {INT32} */ buff = FormatNoCommaNumber(buff, GetParamInt32()); break; - - case 2: // {REV} + case 2: /* {REV} */ #ifdef WITH_REV buff = str_cat(buff, (const byte*)_openttd_revision); #endif break; - case 3: { // {SHORTCARGO} - // Layout: + case 3: { /* {SHORTCARGO} */ + // Short description of cargotypes. Layout: // 8-bit = cargo type // 16-bit = cargo count char *s; @@ -458,8 +457,11 @@ static byte *DecodeString(byte *buff, const byte *str) memcpy(buff++, " ", 1); while (*s) *buff++ = *s++; + } break; + case 4: /* {CURRCOMPACT64} */ + // 64 bit compact currency-unit + buff = FormatGenericCurrency(buff, &_currency_specs[_opt.currency], GetParamInt64(), true); break; - } default: error("!invalid escape sequence in string"); -- cgit v1.2.3-54-g00ecf