MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / GetPrimType

Function GetPrimType

manage/manage.cpp:1899–1913  ·  view source on GitHub ↗

Given a filename, returns the type of primitive it is

Source from the content-addressed store, hash-verified

1897}
1898// Given a filename, returns the type of primitive it is
1899int GetPrimType(const std::filesystem::path &name) {
1900 int primtype;
1901 std::filesystem::path ext = name.extension();
1902 if (!stricmp(".oof", ext.u8string().c_str()))
1903 primtype = PRIMTYPE_OOF;
1904 else if (!stricmp(".ogf", ext.u8string().c_str()))
1905 primtype = PRIMTYPE_OGF;
1906 else if (!stricmp(".oaf", ext.u8string().c_str()))
1907 primtype = PRIMTYPE_OAF;
1908 else if (!stricmp(".wav", ext.u8string().c_str()))
1909 primtype = PRIMTYPE_WAV;
1910 else
1911 primtype = PRIMTYPE_FILE;
1912 return primtype;
1913}
1914
1915#if defined(WIN32)
1916// Builds a list of old files in a path

Callers 2

IsPrimitiveOldFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected