MCPcopy Create free account
hub / github.com/JACoders/OpenJK / SE_Init

Function SE_Init

code/qcommon/stringed_ingame.cpp:1179–1210  ·  view source on GitHub ↗

these two functions aren't needed other than to make Quake-type games happy and/or stop memory managers complaining about leaks if they report them before the global StringEd package object calls it's own dtor. but here they are for completeness's sake I guess...

Source from the content-addressed store, hash-verified

1177// but here they are for completeness's sake I guess...
1178//
1179void SE_Init(void)
1180{
1181 TheStringPackage.Clear( SE_FALSE );
1182
1183#ifdef _DEBUG
1184// int iNumLanguages = SE_GetNumLanguages();
1185#endif
1186
1187 se_language = Cvar_Get("se_language", "english", CVAR_ARCHIVE | CVAR_NORESTART);
1188 se_debug = Cvar_Get("se_debug", "0", 0);
1189 sp_leet = Cvar_Get("sp_leet", "0", CVAR_ROM );
1190
1191 // if doing a buildscript, load all languages...
1192 //
1193 extern cvar_t *com_buildScript;
1194 if (com_buildScript->integer == 2)
1195 {
1196 int iLanguages = SE_GetNumLanguages();
1197 for (int iLang = 0; iLang < iLanguages; iLang++)
1198 {
1199 const char *psLanguage = SE_GetLanguageName( iLang ); // eg "german"
1200 Com_Printf( "com_buildScript(2): Loading language \"%s\"...\n", psLanguage );
1201 SE_LoadLanguage( psLanguage );
1202 }
1203 }
1204
1205 const char *psErrorMessage = SE_LoadLanguage( se_language->string );
1206 if (psErrorMessage)
1207 {
1208 Com_Error( ERR_DROP, "SE_Init() Unable to load language: \"%s\"!\nError: \"%s\"\n", se_language->string,psErrorMessage );
1209 }
1210}
1211
1212void SE_ShutDown(void)
1213{

Callers 1

Com_InitFunction · 0.70

Calls 7

Cvar_GetFunction · 0.70
SE_GetNumLanguagesFunction · 0.70
SE_GetLanguageNameFunction · 0.70
Com_PrintfFunction · 0.70
SE_LoadLanguageFunction · 0.70
Com_ErrorFunction · 0.70
ClearMethod · 0.45

Tested by

no test coverage detected