1
0
Fork 0

(svn r23029) -Fix: [NewGRF] support for cases in strings was broken

release/1.2
yexo 2011-10-14 16:51:30 +00:00
parent 1312c35bb6
commit 47aaf41d40
2 changed files with 3 additions and 1 deletions

View File

@ -528,7 +528,7 @@ char *TranslateTTDPatchCodes(uint32 grfid, uint8 language_id, bool allow_newline
int mapped = lm != NULL ? lm->GetMapping(index, code == 0x0E) : -1; int mapped = lm != NULL ? lm->GetMapping(index, code == 0x0E) : -1;
if (mapped >= 0) { if (mapped >= 0) {
d += Utf8Encode(d, code == 0x0E ? SCC_GENDER_INDEX : SCC_SETCASE); d += Utf8Encode(d, code == 0x0E ? SCC_GENDER_INDEX : SCC_SETCASE);
d += Utf8Encode(d, mapped); d += Utf8Encode(d, code == 0x0E ? mapped : mapped + 1);
} }
break; break;
} }

View File

@ -715,6 +715,8 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
case SCC_NEWGRF_PRINT_WORD_STRING_ID: { case SCC_NEWGRF_PRINT_WORD_STRING_ID: {
StringID substr = args->GetInt32(SCC_NEWGRF_PRINT_WORD_STRING_ID); StringID substr = args->GetInt32(SCC_NEWGRF_PRINT_WORD_STRING_ID);
str_stack.push(GetStringPtr(substr)); str_stack.push(GetStringPtr(substr));
casei = modifier >> 24;
modifier = 0;
break; break;
} }