1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-02-02 17:11:20 +01:00

Add: Identify cities on the main viewport by appending an icon to their names (#14504)

Co-authored-by: Peter Nelson <peter1138@openttd.org>
This commit is contained in:
Su
2025-08-15 21:49:25 +01:00
committed by GitHub
parent 3d806d6a65
commit 85af200788
10 changed files with 36 additions and 6 deletions

View File

@@ -171,6 +171,8 @@ enum StringControlCode : uint16_t {
* These are mapped to the original glyphs */
SCC_LESS_THAN = SCC_SPRITE_START + 0x3C,
SCC_GREATER_THAN = SCC_SPRITE_START + 0x3E,
SCC_TOWN = SCC_SPRITE_START + 0x9B,
SCC_CITY = SCC_SPRITE_START + 0x9C,
SCC_LEFT_ARROW = SCC_SPRITE_START + 0x9D,
SCC_UP_ARROW = SCC_SPRITE_START + 0xA0,
SCC_DOWN_ARROW = SCC_SPRITE_START + 0xAA,

View File

@@ -146,6 +146,8 @@ static const CmdStruct _cmd_structs[] = {
{"RIGHT_ARROW", EmitSingleChar, SCC_RIGHT_ARROW, 0, std::nullopt, {CmdFlag::DontCount}},
{"SMALL_LEFT_ARROW", EmitSingleChar, SCC_LESS_THAN, 0, std::nullopt, {CmdFlag::DontCount}},
{"SMALL_RIGHT_ARROW", EmitSingleChar, SCC_GREATER_THAN, 0, std::nullopt, {CmdFlag::DontCount}},
{"TOWN_ICON", EmitSingleChar, SCC_TOWN, 0, std::nullopt, {CmdFlag::DontCount}},
{"CITY_ICON", EmitSingleChar, SCC_CITY, 0, std::nullopt, {CmdFlag::DontCount}},
/* The following are directional formatting codes used to get the RTL strings right:
* http://www.unicode.org/unicode/reports/tr9/#Directional_Formatting_Codes */