----------------------------------------------------- //
| 285 | |
| 286 | // ----------------------------------------------------- // |
| 287 | void bFile::swap(char *head, bChunkInd &dataChunk, bool ignoreEndianFlag) |
| 288 | { |
| 289 | char *data = head; |
| 290 | short *strc = mFileDNA->getStruct(dataChunk.dna_nr); |
| 291 | |
| 292 | const char s[] = "SoftBodyMaterialData"; |
| 293 | int szs = sizeof(s); |
| 294 | if (strncmp((char *)&dataChunk.code, "ARAY", 4) == 0) |
| 295 | { |
| 296 | short *oldStruct = mFileDNA->getStruct(dataChunk.dna_nr); |
| 297 | char *oldType = mFileDNA->getType(oldStruct[0]); |
| 298 | if (strncmp(oldType, s, szs) == 0) |
| 299 | { |
| 300 | return; |
| 301 | } |
| 302 | } |
| 303 | |
| 304 | int len = mFileDNA->getLength(strc[0]); |
| 305 | |
| 306 | for (int i = 0; i < dataChunk.nr; i++) |
| 307 | { |
| 308 | swapStruct(dataChunk.dna_nr, data, ignoreEndianFlag); |
| 309 | data += len; |
| 310 | } |
| 311 | } |
| 312 | |
| 313 | void bFile::swapLen(char *dataPtr) |
| 314 | { |
no test coverage detected