summaryrefslogtreecommitdiffstats
path: root/src/text/Text.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/text/Text.cpp')
-rw-r--r--src/text/Text.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/text/Text.cpp b/src/text/Text.cpp
index 7afd64d2..efb8b2a9 100644
--- a/src/text/Text.cpp
+++ b/src/text/Text.cpp
@@ -13,7 +13,7 @@
static wchar WideErrorString[25];
-CText TheText;
+CText *CText::msInstance = nil;
CText::CText(void)
{
@@ -41,7 +41,7 @@ CText::Load(void)
CFileMgr::SetDir("TEXT");
switch(FrontEndMenuManager.m_PrefsLanguage){
case CMenuManager::LANGUAGE_AMERICAN:
- sprintf(filename, "AMERICAN.GXT");
+ sprintf(filename, "ENGLISH.GXT");
break;
case CMenuManager::LANGUAGE_FRENCH:
sprintf(filename, "FRENCH.GXT");
@@ -93,11 +93,13 @@ CText::Load(void)
keyArray.Update(data.chars);
CFileMgr::CloseFile(file);
CFileMgr::SetDir("");
+ bIsLoaded = true;
}
void
CText::Unload(void)
{
+ bIsLoaded = false;
CMessages::ClearAllMessagesDisplayedByGame();
keyArray.Unload();
data.Unload();
@@ -245,7 +247,7 @@ CText::LoadMissionText(char *MissionTableName)
CFileMgr::SetDir("TEXT");
switch (FrontEndMenuManager.m_PrefsLanguage) {
case CMenuManager::LANGUAGE_AMERICAN:
- sprintf(filename, "AMERICAN.GXT");
+ sprintf(filename, "ENGLISH.GXT");
break;
case CMenuManager::LANGUAGE_FRENCH:
sprintf(filename, "FRENCH.GXT");
@@ -307,6 +309,11 @@ CText::LoadMissionText(char *MissionTableName)
bIsMissionTextLoaded = true;
}
+bool
+CText::IsLoaded()
+{
+ return bIsLoaded;
+}
void
CKeyArray::Load(size_t length, int file, size_t* offset)