From 47aaf41d401ba7422f9a6cf4abb43d378e4ccdfd Mon Sep 17 00:00:00 2001 From: yexo Date: Fri, 14 Oct 2011 16:51:30 +0000 Subject: (svn r23029) -Fix: [NewGRF] support for cases in strings was broken --- src/newgrf_text.cpp | 2 +- src/strings.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/newgrf_text.cpp b/src/newgrf_text.cpp index a5f598360..4da01d2f1 100644 --- a/src/newgrf_text.cpp +++ b/src/newgrf_text.cpp @@ -528,7 +528,7 @@ char *TranslateTTDPatchCodes(uint32 grfid, uint8 language_id, bool allow_newline int mapped = lm != NULL ? lm->GetMapping(index, code == 0x0E) : -1; if (mapped >= 0) { d += Utf8Encode(d, code == 0x0E ? SCC_GENDER_INDEX : SCC_SETCASE); - d += Utf8Encode(d, mapped); + d += Utf8Encode(d, code == 0x0E ? mapped : mapped + 1); } break; } diff --git a/src/strings.cpp b/src/strings.cpp index 393c7884f..523b76a13 100644 --- a/src/strings.cpp +++ b/src/strings.cpp @@ -715,6 +715,8 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg case SCC_NEWGRF_PRINT_WORD_STRING_ID: { StringID substr = args->GetInt32(SCC_NEWGRF_PRINT_WORD_STRING_ID); str_stack.push(GetStringPtr(substr)); + casei = modifier >> 24; + modifier = 0; break; } -- cgit v1.2.3-70-g09d2