MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / LoadLanguageArchive

Function LoadLanguageArchive

Source/init.cpp:263–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261}
262
263void LoadLanguageArchive()
264{
265#ifdef UNPACKED_MPQS
266 lang_data_path = std::nullopt;
267#else
268 lang_mpq = std::nullopt;
269#endif
270
271 string_view code = GetLanguageCode();
272 if (code != "en") {
273 std::string langMpqName { code };
274#ifdef UNPACKED_MPQS
275 lang_data_path = FindUnpackedMpqData(GetMPQSearchPaths(), langMpqName);
276#else
277 langMpqName.append(".mpq");
278 lang_mpq = LoadMPQ(GetMPQSearchPaths(), langMpqName);
279#endif
280 }
281}
282
283void LoadGameArchives()
284{

Callers 2

DiabloMainFunction · 0.85

Calls 4

GetLanguageCodeFunction · 0.85
FindUnpackedMpqDataFunction · 0.85
GetMPQSearchPathsFunction · 0.85
LoadMPQFunction · 0.85

Tested by

no test coverage detected