Mercurial > hg > openttd
changeset 17966:e93068641d06 draft
(svn r22775) -Fix: [NewGRF] Stringcodes 82 and 83 are the same as the date codes in old OpenTTD. (Hirundo)
author | frosch <frosch@openttd.org> |
---|---|
date | Sat, 20 Aug 2011 21:42:05 +0000 |
parents | 91c35a630a92 |
children | 241ed75d1019 |
files | src/newgrf_text.cpp src/table/control_codes.h |
diffstat | 2 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/newgrf_text.cpp +++ b/src/newgrf_text.cpp @@ -454,7 +454,7 @@ } case 0x82: case 0x83: - case 0x84: d += Utf8Encode(d, SCC_NEWGRF_PRINT_DATE + c - 0x82); break; + case 0x84: d += Utf8Encode(d, SCC_NEWGRF_PRINT_DATE_LONG + c - 0x82); break; case 0x85: d += Utf8Encode(d, SCC_NEWGRF_DISCARD_WORD); break; case 0x86: d += Utf8Encode(d, SCC_NEWGRF_ROTATE_TOP_4_WORDS); break; case 0x87: d += Utf8Encode(d, SCC_NEWGRF_PRINT_WORD_VOLUME); break; @@ -1027,8 +1027,8 @@ case SCC_NEWGRF_PRINT_WORD_STATION_NAME: case SCC_NEWGRF_PRINT_UNSIGNED_WORD: *argv = _newgrf_textrefstack.PopUnsignedWord(); break; - case SCC_NEWGRF_PRINT_DATE: - case SCC_NEWGRF_PRINT_MONTH_YEAR: *argv = _newgrf_textrefstack.PopUnsignedWord() + DAYS_TILL_ORIGINAL_BASE_YEAR; break; + case SCC_NEWGRF_PRINT_DATE_LONG: + case SCC_NEWGRF_PRINT_DATE_SHORT: *argv = _newgrf_textrefstack.PopUnsignedWord() + DAYS_TILL_ORIGINAL_BASE_YEAR; break; case SCC_NEWGRF_DISCARD_WORD: _newgrf_textrefstack.PopUnsignedWord(); break; @@ -1063,11 +1063,11 @@ case SCC_NEWGRF_PRINT_STRING_ID: return SCC_NEWGRF_PRINT_STRING_ID; - case SCC_NEWGRF_PRINT_DATE: + case SCC_NEWGRF_PRINT_DATE_LONG: return SCC_DATE_LONG; - case SCC_NEWGRF_PRINT_MONTH_YEAR: - return SCC_DATE_TINY; + case SCC_NEWGRF_PRINT_DATE_SHORT: + return SCC_DATE_SHORT; case SCC_NEWGRF_PRINT_WORD_SPEED: return SCC_VELOCITY;
--- a/src/table/control_codes.h +++ b/src/table/control_codes.h @@ -118,8 +118,8 @@ SCC_NEWGRF_PRINT_UNSIGNED_WORD, ///< Read 2 bytes from the stack as unsigned value SCC_NEWGRF_PRINT_DWORD_CURRENCY, ///< Read 4 bytes from the stack as currency SCC_NEWGRF_PRINT_STRING_ID, ///< Read 2 bytes from the stack as String ID - SCC_NEWGRF_PRINT_DATE, ///< Read 2 bytes from the stack as base 1920 date - SCC_NEWGRF_PRINT_MONTH_YEAR, ///< Read 2 bytes from the stack as base 1920 date + SCC_NEWGRF_PRINT_DATE_LONG, ///< Read 2 bytes from the stack as base 1920 date + SCC_NEWGRF_PRINT_DATE_SHORT, ///< Read 2 bytes from the stack as base 1920 date SCC_NEWGRF_PRINT_WORD_SPEED, ///< Read 2 bytes from the stack as signed speed SCC_NEWGRF_PRINT_WORD_VOLUME, ///< Read 2 bytes from the stack as signed volume SCC_NEWGRF_PRINT_WORD_WEIGHT, ///< Read 2 bytes from the stack as signed weight