From ad0e175af6190e756d0be6f30c89b675d2509406 Mon Sep 17 00:00:00 2001 From: lahm86 <33758420+lahm86@users.noreply.github.com> Date: Mon, 9 Sep 2024 11:22:33 +0100 Subject: [PATCH] console: use arrow sprite for caret This replaces the placeholder caret with the same arrow sprite as is used in TR1X. Resolves #91. --- CHANGELOG.md | 1 + src/game/console.c | 2 +- src/game/text.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 263ad11f..fef2a7cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ - fixed the music at the beginning of Offshore Rig not playing (#150, regression from 0.1) - improved initial level load time by lazy-loading audio samples (#114) - improved crash debug information (#137) +- improved the console caret sprite (#91) ## [0.2](https://github.com/LostArtefacts/TR2X/compare/0.1.1...0.2) - 2024-05-07 - added dev console with the following commands: diff --git a/src/game/console.c b/src/game/console.c index 706455e0..8c83823c 100644 --- a/src/game/console.c +++ b/src/game/console.c @@ -166,7 +166,7 @@ void Console_Open(void) m_Prompt.caret = strlen(m_Prompt.text); - m_Prompt.caret_ts = Text_Create(MARGIN, -MARGIN, 0, "\x26"); + m_Prompt.caret_ts = Text_Create(MARGIN, -MARGIN, 0, "\x11"); Text_SetScale( m_Prompt.caret_ts, PHD_ONE * m_PromptScale, PHD_ONE * m_PromptScale); Text_AlignBottom(m_Prompt.caret_ts, true); diff --git a/src/game/text.c b/src/game/text.c index af695d42..7b73f868 100644 --- a/src/game/text.c +++ b/src/game/text.c @@ -19,7 +19,7 @@ #define CHAR_SECRET_1 0x7Fu #define CHAR_SECRET_2 0x80u #define CHAR_SECRET_3 0x81u -#define IS_CHAR_LEGAL(c) ((c) <= CHAR_SECRET_3 && ((c) <= 10u || (c) >= 32u)) +#define IS_CHAR_LEGAL(c) ((c) <= CHAR_SECRET_3 && ((c) <= 18u || (c) >= 32u)) #define IS_CHAR_SECRET(c) ((c) >= CHAR_SECRET_1 && (c) <= CHAR_SECRET_3) #define IS_CHAR_DIACRITIC(c) \ ((c) == '(' || (c) == ')' || (c) == '$' || (c) == '~')