(svn r21885) -Fix [FS#4422]: NewGRF string codes 0x80 and 0x81 were broken since the typechecking of string parameters

This commit is contained in:
yexo
2011-01-21 23:10:02 +00:00
parent c9bd9b0c23
commit 0cdb1c78cd
3 changed files with 32 additions and 6 deletions

View File

@@ -447,7 +447,7 @@ char *TranslateTTDPatchCodes(uint32 grfid, uint8 language_id, const char *str, i
StringID string;
string = ((uint8)*str++);
string |= ((uint8)*str++) << 8;
d += Utf8Encode(d, SCC_STRING_ID);
d += Utf8Encode(d, SCC_NEWGRF_STRINL);
d += Utf8Encode(d, MapGRFStringID(grfid, string));
break;
}
@@ -1059,7 +1059,7 @@ uint RemapNewGRFStringControlCode(uint scc, char *buf_start, char **buff, const
return SCC_CURRENCY;
case SCC_NEWGRF_PRINT_STRING_ID:
return SCC_STRING1;
return SCC_NEWGRF_PRINT_STRING_ID;
case SCC_NEWGRF_PRINT_DATE:
return SCC_DATE_LONG;