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

Function ilSaveDds

DevIL/src-IL/src/il_dds-save.cpp:22–46  ·  view source on GitHub ↗

Writes a Dds file

Source from the content-addressed store, hash-verified

20
21//! Writes a Dds file
22ILboolean ilSaveDds(const ILstring FileName)
23{
24 ILHANDLE DdsFile;
25 ILuint DdsSize;
26
27 if (ilGetBoolean(IL_FILE_MODE) == IL_FALSE) {
28 if (iFileExists(FileName)) {
29 ilSetError(IL_FILE_ALREADY_EXISTS);
30 return IL_FALSE;
31 }
32 }
33
34 DdsFile = iopenw(FileName);
35 if (DdsFile == NULL) {
36 ilSetError(IL_COULD_NOT_OPEN_FILE);
37 return IL_FALSE;
38 }
39
40 DdsSize = ilSaveDdsF(DdsFile);
41 iclosew(DdsFile);
42
43 if (DdsSize == 0)
44 return IL_FALSE;
45 return IL_TRUE;
46}
47
48
49//! Writes a Dds to an already-opened file

Callers 2

ILAPIENTRY ilSaveFunction · 0.85
ILAPIENTRY ilSaveImageFunction · 0.85

Calls 3

iFileExistsFunction · 0.85
ilSetErrorFunction · 0.85
ilSaveDdsFFunction · 0.85

Tested by

no test coverage detected