MCPcopy Create free account
hub / github.com/ZDoom/Raze / LoadStrings

Method LoadStrings

source/common/engine/stringtable.cpp:50–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48//==========================================================================
49
50void FStringTable::LoadStrings (FileSys::FileSystem& fileSystem, const char *language)
51{
52 int lastlump, lump;
53
54 allStrings.Clear();
55 lastlump = 0;
56 while ((lump = fileSystem.FindLump("LMACROS", &lastlump)) != -1)
57 {
58 auto lumpdata = fileSystem.ReadFile(lump);
59 readMacros(lumpdata.string(), lumpdata.size());
60 }
61
62 lastlump = 0;
63 while ((lump = fileSystem.FindLump ("LANGUAGE", &lastlump)) != -1)
64 {
65 auto lumpdata = fileSystem.ReadFile(lump);
66 auto filenum = fileSystem.GetFileContainer(lump);
67
68 if (!ParseLanguageCSV(filenum, lumpdata.string(), lumpdata.size()))
69 LoadLanguage (filenum, lumpdata.string(), lumpdata.size());
70 }
71 UpdateLanguage(language);
72 allMacros.Clear();
73}
74
75
76//==========================================================================

Callers 1

RunGameFunction · 0.80

Calls 6

FindLumpMethod · 0.80
stringMethod · 0.80
GetFileContainerMethod · 0.80
ClearMethod · 0.45
ReadFileMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected