mirror of
https://github.com/zeldaret/botw
synced 2026-06-04 18:58:37 -04:00
ksys/phys: Add RigidBodyParam
This commit is contained in:
@@ -26,6 +26,18 @@ Material materialFromText(const sead::SafeString& text) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char* groundHitToText(GroundHit hit) {
|
||||
return hit.text();
|
||||
}
|
||||
|
||||
GroundHit groundHitFromText(const sead::SafeString& text) {
|
||||
for (auto hit : GroundHit()) {
|
||||
if (text == hit.text())
|
||||
return hit;
|
||||
}
|
||||
return GroundHit::HitAll;
|
||||
}
|
||||
|
||||
const char* floorCodeToText(FloorCode code) {
|
||||
return code.text();
|
||||
}
|
||||
@@ -50,4 +62,15 @@ WallCode wallCodeFromText(const sead::SafeString& text) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// NON_MATCHING: duplicated branches?
|
||||
MotionType motionTypeFromText(const sead::SafeString& text) {
|
||||
if (text == "Dynamic")
|
||||
return MotionType::Dynamic;
|
||||
if (text == "Fixed")
|
||||
return MotionType::Fixed;
|
||||
if (text == "Keyframed")
|
||||
return MotionType::Keyframed;
|
||||
return MotionType::Unknown;
|
||||
}
|
||||
|
||||
} // namespace ksys::phys
|
||||
|
||||
Reference in New Issue
Block a user