Merge branch 'master' into VC/TextFinish

# Conflicts:
#	src/text/Text.cpp
This commit is contained in:
Sergeanur
2020-10-11 10:34:47 +03:00
7 changed files with 35 additions and 31 deletions

View File

@ -5,6 +5,32 @@
#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;
}
CFontDetails CFont::Details;
int16 CFont::NewLine;
CSprite2d CFont::Sprite[MAX_FONTS];

View File

@ -1,5 +1,10 @@
#pragma once
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);
struct CFontDetails
{
CRGBA color;