| 203 | } |
| 204 | |
| 205 | static 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. |