From e9184e2e4106dbdfa74497ae50f645c9ae0bb80a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sat, 10 Apr 2021 22:43:43 +0200 Subject: ksys/res: Implement BoneParams::getBoneWeight --- src/KingSystem/Resource/resResourceASSetting.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/KingSystem/Resource/resResourceASSetting.cpp') diff --git a/src/KingSystem/Resource/resResourceASSetting.cpp b/src/KingSystem/Resource/resResourceASSetting.cpp index cab069d7..b465900a 100644 --- a/src/KingSystem/Resource/resResourceASSetting.cpp +++ b/src/KingSystem/Resource/resResourceASSetting.cpp @@ -103,4 +103,12 @@ bool ASSetting::BoneParams::parse(const ASParamParser::ParseArgs& args) { return true; } +f32 ASSetting::BoneParams::getBoneWeight(const sead::SafeString& name) const { + for (const auto& param : mBuffer) { + if (name == *param.mBone) + return *param.mWeight; + } + return 1.0; +} + } // namespace ksys::res -- cgit v1.2.3