summaryrefslogtreecommitdiff
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 1369d1db..e387fe01 100644
--- a/src/text/Text.cpp
+++ b/src/text/Text.cpp
@@ -11,7 +11,7 @@
wchar WideErrorString[25];
-CText TheText;
+CText *CText::msInstance = nil;
CText::CText(void)
{
@@ -39,7 +39,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");
@@ -91,11 +91,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();
@@ -243,7 +245,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");
@@ -305,6 +307,11 @@ CText::LoadMissionText(char *MissionTableName)
bIsMissionTextLoaded = true;
}
+bool
+CText::IsLoaded()
+{
+ return bIsLoaded;
+}
void
CKeyArray::Load(size_t length, int file, size_t* offset)