summaryrefslogtreecommitdiffstats
path: root/src/render/Font.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-10-11 11:58:11 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-10-11 11:58:11 +0200
commit552f308e9e0a745852ca11064b6b31e16b115917 (patch)
treea88d109962a7de5594f3781fe1e388879936218c /src/render/Font.cpp
parentControl updates (diff)
parentMerge pull request #760 from Sergeanur/VC/TextFinish (diff)
downloadre3-552f308e9e0a745852ca11064b6b31e16b115917.tar
re3-552f308e9e0a745852ca11064b6b31e16b115917.tar.gz
re3-552f308e9e0a745852ca11064b6b31e16b115917.tar.bz2
re3-552f308e9e0a745852ca11064b6b31e16b115917.tar.lz
re3-552f308e9e0a745852ca11064b6b31e16b115917.tar.xz
re3-552f308e9e0a745852ca11064b6b31e16b115917.tar.zst
re3-552f308e9e0a745852ca11064b6b31e16b115917.zip
Diffstat (limited to 'src/render/Font.cpp')
-rw-r--r--src/render/Font.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/render/Font.cpp b/src/render/Font.cpp
index c0cc333a..8deac7bf 100644
--- a/src/render/Font.cpp
+++ b/src/render/Font.cpp
@@ -5,6 +5,46 @@
#include "Font.h"
#include "Timer.h"
+void
+AsciiToUnicode(const char *src, wchar *dst)
+{
+ while((*dst++ = (unsigned char)*src++) != '\0');
+}
+
+void
+UnicodeStrcat(wchar *dst, wchar *append)
+{
+ UnicodeStrcpy(&dst[UnicodeStrlen(dst)], append);
+}
+
+void
+UnicodeStrcpy(wchar *dst, const wchar *src)
+{
+ while((*dst++ = *src++) != '\0');
+}
+
+int
+UnicodeStrlen(const wchar *str)
+{
+ int len;
+ for(len = 0; *str != '\0'; len++, 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];