----------------------------------------------------- //
| 306 | |
| 307 | // ----------------------------------------------------- // |
| 308 | void bFile::swap(char *head, bChunkInd &dataChunk, bool ignoreEndianFlag) |
| 309 | { |
| 310 | char *data = head; |
| 311 | short *strc = mFileDNA->getStruct(dataChunk.dna_nr); |
| 312 | |
| 313 | const char s[] = "SoftBodyMaterialData"; |
| 314 | int szs = sizeof(s); |
| 315 | if (strncmp((char *)&dataChunk.code, "ARAY", 4) == 0) |
| 316 | { |
| 317 | short *oldStruct = mFileDNA->getStruct(dataChunk.dna_nr); |
| 318 | char *oldType = mFileDNA->getType(oldStruct[0]); |
| 319 | if (strncmp(oldType, s, szs) == 0) |
| 320 | { |
| 321 | return; |
| 322 | } |
| 323 | } |
| 324 | |
| 325 | int len = mFileDNA->getLength(strc[0]); |
| 326 | |
| 327 | for (int i = 0; i < dataChunk.nr; i++) |
| 328 | { |
| 329 | swapStruct(dataChunk.dna_nr, data, ignoreEndianFlag); |
| 330 | data += len; |
| 331 | } |
| 332 | } |
| 333 | |
| 334 | void bFile::swapLen(char *dataPtr) |
| 335 | { |