MCPcopy Create free account
hub / github.com/codestation/qcma / IsValid

Function IsValid

common/dds.cpp:205–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205static bool IsValid( const DDSHeader & header )
206{
207 if( header.size != 124 ) {
208 return false;
209 }
210 const uint required = (DDSD_WIDTH|DDSD_HEIGHT|DDSD_PIXELFORMAT);
211 if( (header.flags & required) != required ) {
212 return false;
213 }
214 if( header.pf.size != 32 ) {
215 return false;
216 }
217 if( !(header.caps.caps1 & DDSCAPS_TEXTURE) ) {
218 return false;
219 }
220 return true;
221}
222
223
224// Get supported type. We currently support 10 different types.

Callers 1

loadDDSFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected