MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / LoadMapLocalizeData

Function LoadMapLocalizeData

neo/framework/Common.cpp:1876–1908  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1874
1875typedef idHashTable<idStrList> ListHash;
1876void LoadMapLocalizeData(ListHash& listHash) {
1877
1878 idStr fileName = "map_localize.cfg";
1879 const char *buffer = NULL;
1880 idLexer src( LEXFL_NOFATALERRORS | LEXFL_NOSTRINGCONCAT | LEXFL_ALLOWMULTICHARLITERALS | LEXFL_ALLOWBACKSLASHSTRINGCONCAT );
1881
1882 if ( fileSystem->ReadFile( fileName, (void**)&buffer ) > 0 ) {
1883 src.LoadMemory( buffer, strlen(buffer), fileName );
1884 if ( src.IsLoaded() ) {
1885 idStr classname;
1886 idToken token;
1887
1888
1889
1890 while ( src.ReadToken( &token ) ) {
1891 classname = token;
1892 src.ExpectTokenString( "{" );
1893
1894 idStrList list;
1895 while ( src.ReadToken( &token) ) {
1896 if ( token == "}" ) {
1897 break;
1898 }
1899 list.Append(token);
1900 }
1901
1902 listHash.Set(classname, list);
1903 }
1904 }
1905 fileSystem->FreeFile( (void*)buffer );
1906 }
1907
1908}
1909
1910void LoadGuiParmExcludeList(idStrList& list) {
1911

Callers 2

Com_LocalizeMaps_fFunction · 0.85
Com_LocalizeMapsTest_fFunction · 0.85

Calls 8

ReadFileMethod · 0.80
FreeFileMethod · 0.80
LoadMemoryMethod · 0.45
IsLoadedMethod · 0.45
ReadTokenMethod · 0.45
ExpectTokenStringMethod · 0.45
AppendMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected