----------------------------------------------------- //
| 1022 | |
| 1023 | // ----------------------------------------------------- // |
| 1024 | char *bFile::getFileElement(short *firstStruct, char *lookupName, char *lookupType, char *data, short **foundPos) |
| 1025 | { |
| 1026 | short *old = firstStruct; //mFileDNA->getStruct(old_nr); |
| 1027 | int elementLength = old[1]; |
| 1028 | old += 2; |
| 1029 | |
| 1030 | for (int i = 0; i < elementLength; i++, old += 2) |
| 1031 | { |
| 1032 | char *type = mFileDNA->getType(old[0]); |
| 1033 | char *name = mFileDNA->getName(old[1]); |
| 1034 | int len = mFileDNA->getElementSize(old[0], old[1]); |
| 1035 | |
| 1036 | if (strcmp(lookupName, name) == 0) |
| 1037 | { |
| 1038 | if (strcmp(type, lookupType) == 0) |
| 1039 | { |
| 1040 | if (foundPos) |
| 1041 | *foundPos = old; |
| 1042 | return data; |
| 1043 | } |
| 1044 | return 0; |
| 1045 | } |
| 1046 | data += len; |
| 1047 | } |
| 1048 | return 0; |
| 1049 | } |
| 1050 | |
| 1051 | // ----------------------------------------------------- // |
| 1052 | void bFile::swapStruct(int dna_nr, char *data, bool ignoreEndianFlag) |
nothing calls this directly
no test coverage detected