From b0becb5a2d28550a089e6e0ef2d041956dc887e4 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sun, 11 Oct 2020 10:39:04 +0300 Subject: UnicodeMakeUpperCase move + arg fix --- src/render/Font.cpp | 14 ++++++++++++++ src/render/Font.h | 1 + 2 files changed, 15 insertions(+) (limited to 'src/render') diff --git a/src/render/Font.cpp b/src/render/Font.cpp index 7459c101..8deac7bf 100644 --- a/src/render/Font.cpp +++ b/src/render/Font.cpp @@ -31,6 +31,20 @@ UnicodeStrlen(const wchar *str) return len; } +void +UnicodeMakeUpperCase(wchar *dst, const wchar *src) //idk what to do with it, seems to be incorrect implementation by R* +{ + while (*src != '\0') { + if (*src < 'a' || *src > 'z') + *dst = *src; + else + *dst = *src - 32; + dst++; + src++; + } + *dst = '\0'; +} + CFontDetails CFont::Details; int16 CFont::NewLine; CSprite2d CFont::Sprite[MAX_FONTS]; diff --git a/src/render/Font.h b/src/render/Font.h index f0ca9760..47a39f73 100644 --- a/src/render/Font.h +++ b/src/render/Font.h @@ -4,6 +4,7 @@ void AsciiToUnicode(const char *src, wchar *dst); void UnicodeStrcpy(wchar *dst, const wchar *src); void UnicodeStrcat(wchar *dst, wchar *append); int UnicodeStrlen(const wchar *str); +void UnicodeMakeUpperCase(wchar *dst, const wchar *src); struct CFontDetails { -- cgit v1.2.3