diff options
author | darkvater <darkvater@openttd.org> | 2004-09-13 20:38:36 +0000 |
---|---|---|
committer | darkvater <darkvater@openttd.org> | 2004-09-13 20:38:36 +0000 |
commit | fc9a450e758067385129eddf3001efee9e562518 (patch) | |
tree | fbd94462b721e747cd83ba19d0dbf192ffd81440 /strings.c | |
parent | add49120dde81d212df460679bec15cbdd04a6a3 (diff) | |
download | openttd-fc9a450e758067385129eddf3001efee9e562518.tar.xz |
(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.
Diffstat (limited to 'strings.c')
-rw-r--r-- | strings.c | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -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"); |