MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / LoadLevelScreen_FilterFiles

Function LoadLevelScreen_FilterFiles

src/Menus.c:1828–1838  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1826}
1827
1828static void LoadLevelScreen_FilterFiles(const cc_string* path, void* obj, int isDirectory) {
1829 struct MapImporter* imp = MapImporter_Find(path);
1830 cc_string relPath = *path;
1831
1832 if (isDirectory) {
1833 Directory_Enum(path, obj, LoadLevelScreen_FilterFiles);
1834 } else if (imp) {
1835 Utils_UNSAFE_TrimFirstDirectory(&relPath);
1836 StringsBuffer_Add((struct StringsBuffer*)obj, &relPath);
1837 }
1838}
1839
1840static void LoadLevelScreen_LoadEntries(struct ListScreen* s) {
1841 static const cc_string path = String_FromConst("maps");

Callers

nothing calls this directly

Calls 4

MapImporter_FindFunction · 0.85
StringsBuffer_AddFunction · 0.85
Directory_EnumFunction · 0.70

Tested by

no test coverage detected