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
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
6 changed files with 10 additions and 10 deletions

View File

@ -10,7 +10,7 @@ class BoxParam;
struct BoxShape { struct BoxShape {
virtual ~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 { struct BoxShapeParam {

View File

@ -43,7 +43,7 @@ struct CapsuleShape {
virtual void updateChanges(); virtual void updateChanges();
virtual void scaleVerts(f32 scale); 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); CapsuleShape* clone(sead::Heap* heap);
f32 getRadius() const; f32 getRadius() const;
void getVertices(sead::Vector3f* va, sead::Vector3f* vb) const; void getVertices(sead::Vector3f* va, sead::Vector3f* vb) const;

View File

@ -10,7 +10,7 @@ class CylinderParam;
struct CylinderShape { struct CylinderShape {
virtual ~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 { struct CylinderShapeParam {

View File

@ -10,7 +10,7 @@ class SphereParam;
struct SphereShape { struct SphereShape {
virtual ~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 { struct SphereShapeParam {

View File

@ -10,7 +10,7 @@ class WaterCylinderParam;
struct WaterCylinderShape { struct WaterCylinderShape {
virtual ~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 { struct WaterCylinderShapeParam {

View File

@ -14,7 +14,7 @@ RigidBody* RigidBodyFactory::createSphere(RigidBodyInstanceParam* params, sead::
auto* v = sead::DynamicCast<SphereParam>(params); auto* v = sead::DynamicCast<SphereParam>(params);
auto* shape = v->shape.createShape(heap); 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) { 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* v = sead::DynamicCast<CapsuleParam>(params);
auto* shape = v->shape.createShape(heap); 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) { 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* v = sead::DynamicCast<CylinderParam>(params);
auto* shape = v->shape.createShape(heap); 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) { RigidBody* RigidBodyFactory::createWaterCylinder(RigidBodyInstanceParam* params, sead::Heap* heap) {
@ -41,7 +41,7 @@ RigidBody* RigidBodyFactory::createWaterCylinder(RigidBodyInstanceParam* params,
auto* v = sead::DynamicCast<WaterCylinderParam>(params); auto* v = sead::DynamicCast<WaterCylinderParam>(params);
auto* shape = v->shape.createShape(heap); 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) { 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* v = sead::DynamicCast<BoxParam>(params);
auto* shape = v->shape.createShape(heap); auto* shape = v->shape.createShape(heap);
return shape->createBody(1, *params, heap); return shape->createBody(true, *params, heap);
} }
} // namespace ksys::phys } // namespace ksys::phys