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

Function iCheckSgi

DevIL/src-IL/src/il_sgi.cpp:112–124  ·  view source on GitHub ↗

Internal function used to check if the HEADER is a valid .sgi header. */

Source from the content-addressed store, hash-verified

110
111/* Internal function used to check if the HEADER is a valid .sgi header. */
112ILboolean iCheckSgi(iSgiHeader *Header)
113{
114 if (Header->MagicNum != SGI_MAGICNUM)
115 return IL_FALSE;
116 if (Header->Storage != SGI_RLE && Header->Storage != SGI_VERBATIM)
117 return IL_FALSE;
118 if (Header->Bpc == 0 || Header->Dim == 0)
119 return IL_FALSE;
120 if (Header->XSize == 0 || Header->YSize == 0 || Header->ZSize == 0)
121 return IL_FALSE;
122
123 return IL_TRUE;
124}
125
126/*----------------------------------------------------------------------------*/
127

Callers 2

iIsValidSgiFunction · 0.85
iLoadSgiInternalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected