Internal function used to check if the HEADER is a valid TPL header.
| 127 | |
| 128 | // Internal function used to check if the HEADER is a valid TPL header. |
| 129 | ILboolean 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 |
no outgoing calls
no test coverage detected