Skip to content

Commit

Permalink
Add Russian rouble sign
Browse files Browse the repository at this point in the history
  • Loading branch information
Gymnasiast committed Nov 9, 2018
1 parent 18f1fab commit 72d2ebd
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 3 deletions.
2 changes: 1 addition & 1 deletion data/language/en-GB.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3077,7 +3077,7 @@ STR_5574 :Server Name:
STR_5575 :Max Players:
STR_5576 :Port:
STR_5577 :South Korean Won (W)
STR_5578 :Russian Rouble (R)
STR_5578 :Russian Rouble ()
STR_5579 :Window scale factor:
STR_5580 :Czech koruna (Kč)
STR_5581 :Show FPS
Expand Down
1 change: 1 addition & 0 deletions distribution/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Feature: [#8073] Auto-upload minidumps to backtrace.io (optional, MSVC/Windows only)
- Feature: [#8078] Add save_park command to in-game console.
- Feature: [#8080] New console variable "current_rotation" to get or set view rotation.
- Feature: [#8098] Glyph for Russian rouble sign.
- Feature: [#8099] Add Powered Launch mode to Inverted RC (for RCT1 parity).
- Feature: [#8190] Allow building footpaths on 'corner down' terrain.
- Feature: [#8191] Allow building on-ride photos and water S-bends on the Water Coaster.
Expand Down
Binary file added resources/g2/font/rouble-bold.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/g2/font/rouble-small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/g2/font/rouble-tiny.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions resources/g2/sprites.json
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,12 @@
"palette": "keep",
"forceBmp": true
},
{
"path": "font/rouble-small.png",
"y_offset": 0,
"palette": "keep",
"forceBmp": true
},
{
"path": "font/latin/ae-uc-bold.png",
"y_offset": 0,
Expand Down Expand Up @@ -1245,6 +1251,12 @@
"palette": "keep",
"forceBmp": true
},
{
"path": "font/rouble-bold.png",
"y_offset": 0,
"palette": "keep",
"forceBmp": true
},
{
"path": "font/latin/ae-uc-tiny.png",
"y_offset": 0,
Expand Down Expand Up @@ -1655,5 +1667,11 @@
"y_offset": -1,
"palette": "keep",
"forceBmp": true
},
{
"path": "font/rouble-tiny.png",
"y_offset": 0,
"palette": "keep",
"forceBmp": true
}
]
1 change: 1 addition & 0 deletions src/openrct2/drawing/Font.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ static const std::map<char32_t, int32_t> codepointOffsetMap = {
// Currency
{ UnicodeChar::guilder, SPR_G2_GUILDER_SIGN - SPR_CHAR_START },
{ UnicodeChar::euro, CSChar::euro - CS_SPRITE_FONT_OFFSET },
{ UnicodeChar::rouble, SPR_G2_ROUBLE_SIGN - SPR_CHAR_START },

// Dingbats
{ UnicodeChar::up, CSChar::up - CS_SPRITE_FONT_OFFSET },
Expand Down
2 changes: 1 addition & 1 deletion src/openrct2/localisation/Currency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ currency_descriptor CurrencyDescriptors[CURRENCY_END] = {
{ "SEK", 10, CURRENCY_SUFFIX, " kr", CURRENCY_SUFFIX, " kr", STR_KRONA }, // Swedish Krona
{ "EUR", 10, CURRENCY_PREFIX, "\xE2\x82\xAC", CURRENCY_SUFFIX, "EUR", STR_EUROS }, // Euro
{ "KRW", 10000, CURRENCY_PREFIX, "\xE2\x82\xA9", CURRENCY_PREFIX, "W", STR_WON }, // South Korean Won
{ "RUB", 1000, CURRENCY_PREFIX, "R ", CURRENCY_PREFIX, "R ", STR_ROUBLE }, // Russian Rouble
{ "RUB", 1000, CURRENCY_SUFFIX, "\xE2\x82\xBD", CURRENCY_PREFIX, "R ", STR_ROUBLE }, // Russian Rouble
{ "CZK", 100, CURRENCY_SUFFIX, " K\xC4\x8D", CURRENCY_SUFFIX, " Kc", STR_CZECH_KORUNA }, // Czech koruna
{ "HKD", 100, CURRENCY_PREFIX, "$", CURRENCY_PREFIX, "HKD", STR_HONG_KONG_DOLLAR}, // Hong Kong Dollar
{ "TWD", 1000, CURRENCY_PREFIX, "NT$", CURRENCY_PREFIX, "NT$", STR_NEW_TAIWAN_DOLLAR}, // New Taiwan Dollar
Expand Down
1 change: 1 addition & 0 deletions src/openrct2/localisation/FormatCodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ namespace UnicodeChar
// Currency
constexpr char32_t guilder = 0x192;
constexpr char32_t euro = 0x20AC;
constexpr char32_t rouble = 0x20BD;

// Dingbats
constexpr char32_t up = 0x25B2;
Expand Down
4 changes: 3 additions & 1 deletion src/openrct2/sprites.h
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,9 @@ enum
SPR_G2_E_CARON_UPPER = SPR_G2_CHAR_BEGIN + 72,
SPR_G2_E_CARON_LOWER = SPR_G2_CHAR_BEGIN + 73,

SPR_G2_CHAR_END = SPR_G2_E_CARON_LOWER,
SPR_G2_ROUBLE_SIGN = SPR_G2_CHAR_BEGIN + 74,

SPR_G2_CHAR_END = SPR_G2_ROUBLE_SIGN,
SPR_G2_GLYPH_COUNT = (SPR_G2_CHAR_END - SPR_G2_CHAR_BEGIN) + 1,

// 0x60000, chosen because it's a round hex number
Expand Down

0 comments on commit 72d2ebd

Please sign in to comment.