Client - Titles: add new function Titles_GetTextBody() to grab the body portion of a titles.txt entry

This commit is contained in:
Marco Cawthorne 2023-04-18 14:46:51 -07:00
parent ed2d73106f
commit 7f55f1c868
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
1 changed files with 19 additions and 0 deletions

View File

@ -82,6 +82,25 @@ Titles_Shutdown(void)
g_titles_count = 0;
}
string
Titles_GetTextBody(string shortName)
{
int foundID = -1i;
string compare = strtoupper(shortName);
for (int i = 0; i < g_titles_count; i++) {
if (g_titles[i].m_strName == compare) {
foundID = i;
break;
}
}
if (foundID >= 0)
return g_titles[foundID].m_strMessage;
return compare;
}
void
Titles_Init(void)
{