Given a filename, returns the type of primitive it is
| 1897 | } |
| 1898 | // Given a filename, returns the type of primitive it is |
| 1899 | int 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 |
no outgoing calls
no test coverage detected