summaryrefslogtreecommitdiff
path: root/src/KingSystem/Resource/resResourceASSetting.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2021-04-10 22:43:43 +0200
committerLéo Lam <leo@leolam.fr>2021-04-10 22:45:51 +0200
commite9184e2e4106dbdfa74497ae50f645c9ae0bb80a (patch)
tree384b5178114bb7fbe98be587a8f844a842341e01 /src/KingSystem/Resource/resResourceASSetting.cpp
parentd36e28b6829abb100762434ab9113fbf2fd0c6f2 (diff)
ksys/res: Implement BoneParams::getBoneWeight
Diffstat (limited to 'src/KingSystem/Resource/resResourceASSetting.cpp')
-rw-r--r--src/KingSystem/Resource/resResourceASSetting.cpp8
1 files changed, 8 insertions, 0 deletions
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