summaryrefslogtreecommitdiffstats
path: root/src/text
diff options
context:
space:
mode:
authorFire-Head <Fire-Head@users.noreply.github.com>2020-06-27 23:01:51 +0200
committerFire-Head <Fire-Head@users.noreply.github.com>2020-06-27 23:01:51 +0200
commit1c11a8081f246dda91ff11d4207d87bb93260b1a (patch)
tree226ff4fb914fbd93d67aff62ed24ac896ff2c89a /src/text
parentnullsampman (diff)
downloadre3-1c11a8081f246dda91ff11d4207d87bb93260b1a.tar
re3-1c11a8081f246dda91ff11d4207d87bb93260b1a.tar.gz
re3-1c11a8081f246dda91ff11d4207d87bb93260b1a.tar.bz2
re3-1c11a8081f246dda91ff11d4207d87bb93260b1a.tar.lz
re3-1c11a8081f246dda91ff11d4207d87bb93260b1a.tar.xz
re3-1c11a8081f246dda91ff11d4207d87bb93260b1a.tar.zst
re3-1c11a8081f246dda91ff11d4207d87bb93260b1a.zip
Diffstat (limited to '')
-rw-r--r--src/text/Text.cpp36
-rw-r--r--src/text/Text.h2
2 files changed, 30 insertions, 8 deletions
diff --git a/src/text/Text.cpp b/src/text/Text.cpp
index 549f68d9..926ccd1c 100644
--- a/src/text/Text.cpp
+++ b/src/text/Text.cpp
@@ -31,29 +31,29 @@ CText::Load(void)
CFileMgr::SetDir("TEXT");
switch(CMenuManager::m_PrefsLanguage){
- case LANGUAGE_AMERICAN:
+ case CMenuManager::LANGUAGE_AMERICAN:
sprintf(filename, "AMERICAN.GXT");
break;
- case LANGUAGE_FRENCH:
+ case CMenuManager::LANGUAGE_FRENCH:
sprintf(filename, "FRENCH.GXT");
break;
- case LANGUAGE_GERMAN:
+ case CMenuManager::LANGUAGE_GERMAN:
sprintf(filename, "GERMAN.GXT");
break;
- case LANGUAGE_ITALIAN:
+ case CMenuManager::LANGUAGE_ITALIAN:
sprintf(filename, "ITALIAN.GXT");
break;
- case LANGUAGE_SPANISH:
+ case CMenuManager::LANGUAGE_SPANISH:
sprintf(filename, "SPANISH.GXT");
break;
#ifdef MORE_LANGUAGES
- case LANGUAGE_POLISH:
+ case CMenuManager::LANGUAGE_POLISH:
sprintf(filename, "POLISH.GXT");
break;
- case LANGUAGE_RUSSIAN:
+ case CMenuManager::LANGUAGE_RUSSIAN:
sprintf(filename, "RUSSIAN.GXT");
break;
- case LANGUAGE_JAPANESE:
+ case CMenuManager::LANGUAGE_JAPANESE:
sprintf(filename, "JAPANESE.GXT");
break;
#endif
@@ -298,12 +298,32 @@ UnicodeToAsciiForSaveLoad(wchar *src)
return aStr;
}
+char*
+UnicodeToAsciiForMemoryCard(wchar *src)
+{
+ static char aStr[256];
+ int len;
+ for(len = 0; *src != '\0' && len < 256-1; len++, src++)
+ if(*src < 256)
+ aStr[len] = *src;
+ else
+ aStr[len] = '#';
+ aStr[len] = '\0';
+ return aStr;
+}
+
void
UnicodeStrcpy(wchar *dst, const wchar *src)
{
while((*dst++ = *src++) != '\0');
}
+void
+UnicodeStrcat(wchar *dst, wchar *append)
+{
+ UnicodeStrcpy(&dst[UnicodeStrlen(dst)], append);
+}
+
int
UnicodeStrlen(const wchar *str)
{
diff --git a/src/text/Text.h b/src/text/Text.h
index 4255e2a5..cb6a88c0 100644
--- a/src/text/Text.h
+++ b/src/text/Text.h
@@ -3,7 +3,9 @@
void AsciiToUnicode(const char *src, wchar *dst);
char *UnicodeToAscii(wchar *src);
char *UnicodeToAsciiForSaveLoad(wchar *src);
+char *UnicodeToAsciiForMemoryCard(wchar *src);
void UnicodeStrcpy(wchar *dst, const wchar *src);
+void UnicodeStrcat(wchar *dst, wchar *append);
int UnicodeStrlen(const wchar *str);
void TextCopy(wchar *dst, const wchar *src);