ksys/phys: Rename WaterCylinder to CylinderWater for consistency

"Water" is used as a suffix (e.g. a box of water is called "BoxWater",
not "WaterBox").

This naming convention has the benefit of keeping related shape types
next to each other in the source file list.
This commit is contained in:
Léo Lam
2022-01-30 18:22:15 +01:00
parent a6428425a5
commit 716916d863
6 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -83275,7 +83275,7 @@ Address,Quality,Size,Name
0x0000007100f99180,O,000188,_ZN4ksys4phys16RigidBodyFactory12createSphereEPNS0_22RigidBodyInstanceParamEPN4sead4HeapE
0x0000007100f9923c,O,000188,_ZN4ksys4phys16RigidBodyFactory13createCapsuleEPNS0_22RigidBodyInstanceParamEPN4sead4HeapE
0x0000007100f992f8,O,000188,_ZN4ksys4phys16RigidBodyFactory14createCylinderEPNS0_22RigidBodyInstanceParamEPN4sead4HeapE
0x0000007100f993b4,O,000188,_ZN4ksys4phys16RigidBodyFactory19createWaterCylinderEPNS0_22RigidBodyInstanceParamEPN4sead4HeapE
0x0000007100f993b4,O,000188,_ZN4ksys4phys16RigidBodyFactory19createCylinderWaterEPNS0_22RigidBodyInstanceParamEPN4sead4HeapE
0x0000007100f99470,O,000188,_ZN4ksys4phys16RigidBodyFactory9createBoxEPNS0_22RigidBodyInstanceParamEPN4sead4HeapE
0x0000007100f9952c,U,000188,
0x0000007100f995e8,U,000188,
Can't render this file because it is too large.
+2 -2
View File
@@ -48,6 +48,8 @@ target_sources(uking PRIVATE
RigidBody/Shape/physCharacterPrismShape.h
RigidBody/Shape/physCylinderShape.cpp
RigidBody/Shape/physCylinderShape.h
RigidBody/Shape/physCylinderWaterShape.cpp
RigidBody/Shape/physCylinderWaterShape.h
RigidBody/Shape/physPolytopeShape.cpp
RigidBody/Shape/physPolytopeShape.h
RigidBody/Shape/physShape.h
@@ -55,8 +57,6 @@ target_sources(uking PRIVATE
RigidBody/Shape/physShapeParamObj.h
RigidBody/Shape/physSphereShape.cpp
RigidBody/Shape/physSphereShape.h
RigidBody/Shape/physWaterCylinderShape.cpp
RigidBody/Shape/physWaterCylinderShape.h
RigidBody/TeraMesh/physTeraMeshRigidBody.cpp
RigidBody/TeraMesh/physTeraMeshRigidBody.h
@@ -5,20 +5,20 @@
namespace ksys::phys {
class WaterCylinderParam;
class CylinderWaterParam;
struct WaterCylinderShape {
virtual ~WaterCylinderShape();
struct CylinderWaterShape {
virtual ~CylinderWaterShape();
RigidBody* createBody(bool flag, const RigidBodyInstanceParam& params, sead::Heap* heap);
};
struct WaterCylinderShapeParam {
WaterCylinderShape* createShape(sead::Heap* heap);
CylinderWaterShape* createShape(sead::Heap* heap);
};
class WaterCylinderParam : public RigidBodyInstanceParam {
SEAD_RTTI_OVERRIDE(WaterCylinderParam, RigidBodyInstanceParam)
class CylinderWaterParam : public RigidBodyInstanceParam {
SEAD_RTTI_OVERRIDE(CylinderWaterParam, RigidBodyInstanceParam)
public:
u8 _90;
float _94;
@@ -3,8 +3,8 @@
#include "KingSystem/Physics/RigidBody/Shape/physBoxShape.h"
#include "KingSystem/Physics/RigidBody/Shape/physCapsuleShape.h"
#include "KingSystem/Physics/RigidBody/Shape/physCylinderShape.h"
#include "KingSystem/Physics/RigidBody/Shape/physCylinderWaterShape.h"
#include "KingSystem/Physics/RigidBody/Shape/physSphereShape.h"
#include "KingSystem/Physics/RigidBody/Shape/physWaterCylinderShape.h"
namespace ksys::phys {
@@ -35,11 +35,11 @@ RigidBody* RigidBodyFactory::createCylinder(RigidBodyInstanceParam* params, sead
return shape->createBody(true, *params, heap);
}
RigidBody* RigidBodyFactory::createWaterCylinder(RigidBodyInstanceParam* params, sead::Heap* heap) {
RigidBody* RigidBodyFactory::createCylinderWater(RigidBodyInstanceParam* params, sead::Heap* heap) {
if (params->isDynamicSensor())
params->motion_type = MotionType::Keyframed;
auto* v = sead::DynamicCast<WaterCylinderParam>(params);
auto* v = sead::DynamicCast<CylinderWaterParam>(params);
auto* shape = v->shape.createShape(heap);
return shape->createBody(true, *params, heap);
}
@@ -16,7 +16,7 @@ public:
static RigidBody* createSphere(RigidBodyInstanceParam* params, sead::Heap* heap);
static RigidBody* createCapsule(RigidBodyInstanceParam* params, sead::Heap* heap);
static RigidBody* createCylinder(RigidBodyInstanceParam* params, sead::Heap* heap);
static RigidBody* createWaterCylinder(RigidBodyInstanceParam* params, sead::Heap* heap);
static RigidBody* createCylinderWater(RigidBodyInstanceParam* params, sead::Heap* heap);
static RigidBody* createBox(RigidBodyInstanceParam* params, sead::Heap* heap);
static RigidBody* createWaterBox(RigidBodyInstanceParam* params, sead::Heap* heap);
static RigidBody* createPolytope(RigidBodyInstanceParam* params, sead::Heap* heap);