From cf215aaa6a2e7ec618a3d29ff071e18effb956fe Mon Sep 17 00:00:00 2001 From: Muzychenko Andrey <33288308+k4zmu2a@users.noreply.github.com> Date: Mon, 25 Oct 2021 17:30:39 +0300 Subject: [PATCH] =?UTF-8?q?Added=20Traditional=20Chinese=20and=20Simplifie?= =?UTF-8?q?d=20Chinese=20languages=20to=20options.=20They=20don=E2=80=99t?= =?UTF-8?q?=20work=20without=20Chinese=20locale.=20Ref=20#68.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SpaceCadetPinball/gdrv.cpp | 6 ++++++ SpaceCadetPinball/options.cpp | 2 ++ SpaceCadetPinball/options.h | 2 ++ SpaceCadetPinball/resource.h | 2 +- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/SpaceCadetPinball/gdrv.cpp b/SpaceCadetPinball/gdrv.cpp index 1cd1ba2..78ac18f 100644 --- a/SpaceCadetPinball/gdrv.cpp +++ b/SpaceCadetPinball/gdrv.cpp @@ -457,6 +457,12 @@ void gdrv::grtext_draw_ttext_in_box(LPCSTR text, int xOff, int yOff, int width, case Languages::Russian: charset = RUSSIAN_CHARSET; break; + case Languages::TraditionalChinese: + charset = CHINESEBIG5_CHARSET; + break; + case Languages::SimplifiedChinese: + charset = GB2312_CHARSET; + break; } // Default font does not scale well diff --git a/SpaceCadetPinball/options.cpp b/SpaceCadetPinball/options.cpp index 6122f79..180e22f 100644 --- a/SpaceCadetPinball/options.cpp +++ b/SpaceCadetPinball/options.cpp @@ -72,6 +72,8 @@ LanguageMenuEntry options::LanguageMenu[] { {L"English", Languages::English}, {L"Русский", Languages::Russian}, + {L"正體字", Languages::SimplifiedChinese}, + {L"简化字", Languages::TraditionalChinese}, }; void options::ReadOptions() diff --git a/SpaceCadetPinball/options.h b/SpaceCadetPinball/options.h index 37e78f4..5ff3305 100644 --- a/SpaceCadetPinball/options.h +++ b/SpaceCadetPinball/options.h @@ -6,6 +6,8 @@ enum class Languages { English = MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), Russian = MAKELANGID(LANG_RUSSIAN, SUBLANG_DEFAULT), + TraditionalChinese = MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL), + SimplifiedChinese = MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED), }; struct LanguageMenuEntry diff --git a/SpaceCadetPinball/resource.h b/SpaceCadetPinball/resource.h index 73894c2..4a170bc 100644 --- a/SpaceCadetPinball/resource.h +++ b/SpaceCadetPinball/resource.h @@ -242,7 +242,7 @@ #define DLG_HIGHSCORES_EditName5 605 #define Menu1_AlternativeRender 601 #define Menu1_Language 700 -#define Menu1_LanguageMax 702 +#define Menu1_LanguageMax 704 // Next default values for new objects //