From 162ef18a2613bd7aa6d949a7293a3a6686923de9 Mon Sep 17 00:00:00 2001 From: Hielke Morsink Date: Sat, 16 Apr 2022 16:58:48 +0200 Subject: [PATCH] =?UTF-8?q?Add=20eye=20glyph=20(=F0=9F=91=81)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/g2/font/eye.png | Bin 0 -> 150 bytes resources/g2/sprites.json | 18 ++++++++++++++++++ src/openrct2/drawing/Font.cpp | 1 + src/openrct2/localisation/FormatCodes.h | 1 + src/openrct2/localisation/Language.h | 1 + src/openrct2/sprites.h | 4 +++- 6 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 resources/g2/font/eye.png diff --git a/resources/g2/font/eye.png b/resources/g2/font/eye.png new file mode 100644 index 0000000000000000000000000000000000000000..ec9be5068a16e439c6c1c67efa7f0f612c34373b GIT binary patch literal 150 zcmeAS@N?(olHy`uVBq!ia0vp^d_c^_#0(^VZf_3(Qak}ZA+G=b|L54t0|yS&Y;9|7-2TOix%uVIOUyjmvlk0X wylZFT{JeTAuR~`x506i{v4n)g7AXmaw#WPi;o*BqfMzgwy85}Sb4q9e09Cs&PXGV_ literal 0 HcmV?d00001 diff --git a/resources/g2/sprites.json b/resources/g2/sprites.json index 7c472f3bac..ee20fa5e9a 100644 --- a/resources/g2/sprites.json +++ b/resources/g2/sprites.json @@ -1127,6 +1127,12 @@ "palette": "keep", "forceBmp": true }, + { + "path": "font/eye.png", + "y_offset": 0, + "palette": "keep", + "forceBmp": true + }, { "path": "font/latin/ae-uc-bold.png", "y_offset": 0, @@ -1726,6 +1732,12 @@ "palette": "keep", "forceBmp": true }, + { + "path": "font/eye.png", + "y_offset": 0, + "palette": "keep", + "forceBmp": true + }, { "path": "font/latin/ae-uc-tiny.png", "y_offset": 0, @@ -2332,6 +2344,12 @@ "palette": "keep", "forceBmp": true }, + { + "path": "font/eye.png", + "y_offset": 0, + "palette": "keep", + "forceBmp": true + }, { "path": "support/flat_to_steep_1_1.png", "x_offset": -32, diff --git a/src/openrct2/drawing/Font.cpp b/src/openrct2/drawing/Font.cpp index 604398c0b8..325d7c0442 100644 --- a/src/openrct2/drawing/Font.cpp +++ b/src/openrct2/drawing/Font.cpp @@ -219,6 +219,7 @@ static const std::unordered_map codepointOffsetMap = { // Emoji { UnicodeChar::cross, CSChar::cross - CS_SPRITE_FONT_OFFSET }, { UnicodeChar::water, CSChar::water - CS_SPRITE_FONT_OFFSET }, + { UnicodeChar::eye, SPR_G2_EYE - SPR_CHAR_START }, { UnicodeChar::road, CSChar::road - CS_SPRITE_FONT_OFFSET }, { UnicodeChar::railway, CSChar::railway - CS_SPRITE_FONT_OFFSET }, diff --git a/src/openrct2/localisation/FormatCodes.h b/src/openrct2/localisation/FormatCodes.h index 7b84e44e21..fe9b9791ad 100644 --- a/src/openrct2/localisation/FormatCodes.h +++ b/src/openrct2/localisation/FormatCodes.h @@ -320,6 +320,7 @@ namespace UnicodeChar constexpr char32_t cross = 0x274C; constexpr char32_t variation_selector = 0xFE0F; constexpr char32_t water = 0x1F30A; + constexpr char32_t eye = 0x1F441; constexpr char32_t road = 0x1F6E3; constexpr char32_t railway = 0x1F6E4; diff --git a/src/openrct2/localisation/Language.h b/src/openrct2/localisation/Language.h index d3b9d89bd3..f29eb2911a 100644 --- a/src/openrct2/localisation/Language.h +++ b/src/openrct2/localisation/Language.h @@ -90,6 +90,7 @@ constexpr const char* BlackDownArrowString = u8"{BLACK}▼"; constexpr const char* BlackLeftArrowString = u8"{BLACK}◀"; constexpr const char* BlackRightArrowString = u8"{BLACK}▶"; constexpr const char* CheckBoxMarkString = u8"✓"; +constexpr const char* EyeString = u8"👁"; uint8_t language_get_id_from_locale(const char* locale); const char* language_get_string(rct_string_id id); diff --git a/src/openrct2/sprites.h b/src/openrct2/sprites.h index 2fa4f8598e..900efba87a 100644 --- a/src/openrct2/sprites.h +++ b/src/openrct2/sprites.h @@ -1023,7 +1023,9 @@ enum SPR_G2_RIGHT_BRACE, SPR_G2_TILDE, - SPR_G2_GLYPH_COUNT = (SPR_G2_TILDE - SPR_G2_CHAR_BEGIN) + 1, + SPR_G2_EYE, + + SPR_G2_GLYPH_COUNT = (SPR_G2_EYE - SPR_G2_CHAR_BEGIN) + 1, SPR_G2_CHAR_END = SPR_G2_CHAR_BEGIN + SPR_G2_GLYPH_COUNT * 3, SPR_G2_SUPPORT_BEGIN = SPR_G2_CHAR_END,