ksys/phys: Fix a bool flag being defined as u32 in RigidBodyFactory

This commit is contained in:
Léo Lam
2022-01-30 11:40:11 +01:00
parent 682897091a
commit 891b95efff
6 changed files with 10 additions and 10 deletions
@@ -10,7 +10,7 @@ class BoxParam;
struct BoxShape {
virtual ~BoxShape();
RigidBody* createBody(u32 flag, const RigidBodyInstanceParam& params, sead::Heap* heap);
RigidBody* createBody(bool flag, const RigidBodyInstanceParam& params, sead::Heap* heap);
};
struct BoxShapeParam {
@@ -43,7 +43,7 @@ struct CapsuleShape {
virtual void updateChanges();
virtual void scaleVerts(f32 scale);
RigidBody* createBody(u32 flag, const RigidBodyInstanceParam& params, sead::Heap* heap);
RigidBody* createBody(bool flag, const RigidBodyInstanceParam& params, sead::Heap* heap);
CapsuleShape* clone(sead::Heap* heap);
f32 getRadius() const;
void getVertices(sead::Vector3f* va, sead::Vector3f* vb) const;
@@ -10,7 +10,7 @@ class CylinderParam;
struct CylinderShape {
virtual ~CylinderShape();
RigidBody* createBody(u32 flag, const RigidBodyInstanceParam& params, sead::Heap* heap);
RigidBody* createBody(bool flag, const RigidBodyInstanceParam& params, sead::Heap* heap);
};
struct CylinderShapeParam {
@@ -10,7 +10,7 @@ class SphereParam;
struct SphereShape {
virtual ~SphereShape();
RigidBody* createBody(u32 flag, const RigidBodyInstanceParam& params, sead::Heap* heap);
RigidBody* createBody(bool flag, const RigidBodyInstanceParam& params, sead::Heap* heap);
};
struct SphereShapeParam {
@@ -10,7 +10,7 @@ class WaterCylinderParam;
struct WaterCylinderShape {
virtual ~WaterCylinderShape();
RigidBody* createBody(u32 flag, const RigidBodyInstanceParam& params, sead::Heap* heap);
RigidBody* createBody(bool flag, const RigidBodyInstanceParam& params, sead::Heap* heap);
};
struct WaterCylinderShapeParam {
@@ -14,7 +14,7 @@ RigidBody* RigidBodyFactory::createSphere(RigidBodyInstanceParam* params, sead::
auto* v = sead::DynamicCast<SphereParam>(params);
auto* shape = v->shape.createShape(heap);
return shape->createBody(1, *params, heap);
return shape->createBody(true, *params, heap);
}
RigidBody* RigidBodyFactory::createCapsule(RigidBodyInstanceParam* params, sead::Heap* heap) {
@@ -23,7 +23,7 @@ RigidBody* RigidBodyFactory::createCapsule(RigidBodyInstanceParam* params, sead:
auto* v = sead::DynamicCast<CapsuleParam>(params);
auto* shape = v->shape.createShape(heap);
return shape->createBody(1, *params, heap);
return shape->createBody(true, *params, heap);
}
RigidBody* RigidBodyFactory::createCylinder(RigidBodyInstanceParam* params, sead::Heap* heap) {
@@ -32,7 +32,7 @@ RigidBody* RigidBodyFactory::createCylinder(RigidBodyInstanceParam* params, sead
auto* v = sead::DynamicCast<CylinderParam>(params);
auto* shape = v->shape.createShape(heap);
return shape->createBody(1, *params, heap);
return shape->createBody(true, *params, heap);
}
RigidBody* RigidBodyFactory::createWaterCylinder(RigidBodyInstanceParam* params, sead::Heap* heap) {
@@ -41,7 +41,7 @@ RigidBody* RigidBodyFactory::createWaterCylinder(RigidBodyInstanceParam* params,
auto* v = sead::DynamicCast<WaterCylinderParam>(params);
auto* shape = v->shape.createShape(heap);
return shape->createBody(1, *params, heap);
return shape->createBody(true, *params, heap);
}
RigidBody* RigidBodyFactory::createBox(RigidBodyInstanceParam* params, sead::Heap* heap) {
@@ -50,7 +50,7 @@ RigidBody* RigidBodyFactory::createBox(RigidBodyInstanceParam* params, sead::Hea
auto* v = sead::DynamicCast<BoxParam>(params);
auto* shape = v->shape.createShape(heap);
return shape->createBody(1, *params, heap);
return shape->createBody(true, *params, heap);
}
} // namespace ksys::phys