MCPcopy Create free account
hub / github.com/DentonW/DevIL / ilIsValidMdl

Function ilIsValidMdl

DevIL/src-IL/src/il_mdl.cpp:23–43  ·  view source on GitHub ↗

Checks if the file specified in FileName is a valid MDL file.

Source from the content-addressed store, hash-verified

21
22//! Checks if the file specified in FileName is a valid MDL file.
23ILboolean ilIsValidMdl(ILconst_string FileName)
24{
25 ILHANDLE MdlFile;
26 ILboolean bMdl = IL_FALSE;
27
28 if (!iCheckExtension(FileName, IL_TEXT("mdl"))) {
29 ilSetError(IL_INVALID_EXTENSION);
30 return bMdl;
31 }
32
33 MdlFile = iopenr(FileName);
34 if (MdlFile == NULL) {
35 ilSetError(IL_COULD_NOT_OPEN_FILE);
36 return bMdl;
37 }
38
39 bMdl = ilIsValidMdlF(MdlFile);
40 icloser(MdlFile);
41
42 return bMdl;
43}
44
45
46//! Checks if the ILHANDLE contains a valid MDL file at the current position.

Callers 1

ILAPIENTRY ilIsValidFunction · 0.85

Calls 3

iCheckExtensionFunction · 0.85
ilSetErrorFunction · 0.85
ilIsValidMdlFFunction · 0.85

Tested by

no test coverage detected