------------------------------------------------------------------------------------------------
| 116 | |
| 117 | // ------------------------------------------------------------------------------------------------ |
| 118 | static bool isValidASCIIHeader(const char *head) { |
| 119 | ai_assert(head != nullptr); |
| 120 | |
| 121 | if (strncmp(head, "Caligari ", 9) != 0) { |
| 122 | COBImporter::ThrowException("Could not found magic id: `Caligari`"); |
| 123 | } |
| 124 | |
| 125 | if (strncmp(&head[9], "V00.", 4) != 0) { |
| 126 | COBImporter::ThrowException("Could not found Version tag: `V00.`"); |
| 127 | } |
| 128 | ASSIMP_LOG_INFO("File format tag: ", std::string(head + 9, 6)); |
| 129 | if (head[16] != 'L') { |
| 130 | COBImporter::ThrowException("File is big-endian, which is not supported"); |
| 131 | } |
| 132 | |
| 133 | return true; |
| 134 | } |
| 135 | |
| 136 | // ------------------------------------------------------------------------------------------------ |
| 137 | // Imports the given file into the given scene structure. |