| 22 | } |
| 23 | |
| 24 | void CPartition::load(IKinematics* V, LPCSTR model_name) |
| 25 | { |
| 26 | CInifile* ini = V->LL_UserData(); |
| 27 | if (!ini) |
| 28 | return; |
| 29 | |
| 30 | if (!ini->section_exist("part_0")) |
| 31 | return; |
| 32 | |
| 33 | static const shared_str part_name = "partition_name"; |
| 34 | for (u32 i = 0; i < MAX_PARTS; ++i) |
| 35 | { |
| 36 | string64 buff; |
| 37 | xr_sprintf(buff, sizeof(buff), "part_%d", i); |
| 38 | |
| 39 | const auto& S = ini->r_section(buff); |
| 40 | if (!S.Data.empty()) |
| 41 | P[i].bones.clear(); |
| 42 | |
| 43 | for (const auto& [k, v] : S.Data) |
| 44 | { |
| 45 | if (k == part_name) |
| 46 | P[i].Name = v; |
| 47 | else |
| 48 | P[i].bones.push_back(V->LL_BoneID(k)); |
| 49 | } |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | u16 find_bone_id(vecBones* bones, shared_str nm) |
| 54 | { |
no test coverage detected