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

Function iCheckTpl

DevIL/src-IL/src/il_tpl.cpp:129–142  ·  view source on GitHub ↗

Internal function used to check if the HEADER is a valid TPL header.

Source from the content-addressed store, hash-verified

127
128// Internal function used to check if the HEADER is a valid TPL header.
129ILboolean iCheckTpl(TPLHEAD *Header)
130{
131 // The file signature is 0x0020AF30.
132 if (Header->Magic != 0x0020AF30)
133 return IL_FALSE;
134 // Only valid header size is 0x0C.
135 if (Header->HeaderSize != 0x0C)
136 return IL_FALSE;
137 // We have to have at least 1 texture.
138 if (Header->nTextures == 0)
139 return IL_FALSE;
140
141 return IL_TRUE;
142}
143
144
145//! Reads a TPL file

Callers 2

iIsValidTplFunction · 0.85
iLoadTplInternalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected