summaryrefslogtreecommitdiff
path: root/src/KingSystem/Physics/System/physInstanceSet.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2022-01-23 01:07:28 +0100
committerLéo Lam <leo@leolam.fr>2022-01-25 00:15:29 +0100
commitb728917ef4753bcf7d54070947cc71785523130c (patch)
tree915792fd7ab4108bab7de51976e1afcded5e722b /src/KingSystem/Physics/System/physInstanceSet.cpp
parent4531c033a38af5db1e7ef2c7a1acd663a643b4b9 (diff)
ksys/phys: Add RigidBody collision filter info functions
Including a bunch of BitFields additions so we can get the desired codegen without sacrificing readability or flexibility. (The alternative would be building masks and masking manually.) getCollisionFilterInfo was changed to return a u32 instead of EntityCollisionFilterInfo because a collision filter info mask can be either an EntityCollisionFilterInfo or a ReceiverMask. (Also at some point we'll probably want to rename EntityCollisionFilterInfo because that is also used for sensor rigid bodies and not just for entities.)
Diffstat (limited to 'src/KingSystem/Physics/System/physInstanceSet.cpp')
-rw-r--r--src/KingSystem/Physics/System/physInstanceSet.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/KingSystem/Physics/System/physInstanceSet.cpp b/src/KingSystem/Physics/System/physInstanceSet.cpp
index 01e568c7..33d3f741 100644
--- a/src/KingSystem/Physics/System/physInstanceSet.cpp
+++ b/src/KingSystem/Physics/System/physInstanceSet.cpp
@@ -129,16 +129,16 @@ void InstanceSet::sub_7100FBB00C(phys::RigidBody* body, phys::RigidBodyParam* pa
phys::RigidBodyInstanceParam instance_params;
param->makeInstanceParam(&instance_params);
if (instance_params.contact_layer == phys::ContactLayer::SensorCustomReceiver) {
- body->sub_7100F8F9E8(&instance_params.receiver_mask, _188[body->isSensor()]);
+ body->setSensorCustomReceiver(instance_params.receiver_mask, _188[body->isSensor()]);
} else if (instance_params.groundhit_mask) {
- body->sub_7100F8FA44(instance_params.contact_layer, instance_params.groundhit_mask);
+ body->setGroundHitMask(instance_params.contact_layer, instance_params.groundhit_mask);
} else {
- body->sub_7100F8F8CC(instance_params.contact_layer, instance_params.groundhit,
- _188[body->isSensor()]);
+ body->setContactLayerAndGroundHitAndHandler(
+ instance_params.contact_layer, instance_params.groundhit, _188[body->isSensor()]);
}
body->enableGroundCollision(instance_params.no_hit_ground == 0);
body->enableWaterCollision(instance_params.no_hit_water == 0);
- body->sub_7100F8F51C();
+ body->clearSensorReceiverLayer2();
}
void* InstanceSet::sub_7100FBBC28(const sead::SafeString& name) const {