MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / load

Method load

ogsr_engine/xr_3da/SkeletonMotions.cpp:24–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24void 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
53u16 find_bone_id(vecBones* bones, shared_str nm)
54{

Callers 2

dockMethod · 0.45
dumpMethod · 0.45

Calls 15

_strlwrFunction · 0.85
find_bone_idFunction · 0.85
LL_UserDataMethod · 0.80
section_existMethod · 0.80
LL_BoneIDMethod · 0.80
emplaceMethod · 0.80
r_chunk_safeMethod · 0.80
find_chunkMethod · 0.80
atMethod · 0.80
pointerMethod · 0.80
xr_strlwrFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected