summaryrefslogtreecommitdiff
path: root/src/KingSystem
diff options
context:
space:
mode:
authornotyourav <65437533+notyourav@users.noreply.github.com>2022-10-17 23:27:57 -0700
committerGitHub <noreply@github.com>2022-10-18 08:27:57 +0200
commit2f62d26424fbef67733b452073c606062e2368f6 (patch)
tree5b6dc75968647ce89a42fe2bd6d205567c2505b9 /src/KingSystem
parentbc6fe73df15b2e31131df68164ea7c8b26017d2b (diff)
Decompile some Action classes (#104)
* various action classes * rename instanceset fns * rename isFork -> isChangeable
Diffstat (limited to 'src/KingSystem')
-rw-r--r--src/KingSystem/ActorSystem/CMakeLists.txt241
-rw-r--r--src/KingSystem/ActorSystem/actActor.h14
-rw-r--r--src/KingSystem/ActorSystem/actAiActionBase.h12
-rw-r--r--src/KingSystem/ActorSystem/actAiAi.cpp6
-rw-r--r--src/KingSystem/ActorSystem/actAiAi.h2
-rw-r--r--src/KingSystem/ActorSystem/actAiRoot.h2
-rw-r--r--src/KingSystem/ActorSystem/actCCAccessor.h26
-rw-r--r--src/KingSystem/ActorSystem/actionDummyAction.cpp2
-rw-r--r--src/KingSystem/ActorSystem/aiDummyAi.h2
-rw-r--r--src/KingSystem/Physics/CMakeLists.txt364
-rw-r--r--src/KingSystem/Physics/CharacterController/physCharacterController.h13
-rw-r--r--src/KingSystem/Physics/RigidBody/physRigidBody.h2
-rw-r--r--src/KingSystem/Physics/System/physInstanceSet.cpp9
-rw-r--r--src/KingSystem/Physics/System/physInstanceSet.h14
-rw-r--r--src/KingSystem/System/CMakeLists.txt124
-rw-r--r--src/KingSystem/System/UIGlue.h2
16 files changed, 445 insertions, 390 deletions
diff --git a/src/KingSystem/ActorSystem/CMakeLists.txt b/src/KingSystem/ActorSystem/CMakeLists.txt
index 57acd6df..79574c50 100644
--- a/src/KingSystem/ActorSystem/CMakeLists.txt
+++ b/src/KingSystem/ActorSystem/CMakeLists.txt
@@ -1,126 +1,127 @@
target_sources(uking PRIVATE
- Attention/actAttention.cpp
- Attention/actAttention.h
+ Attention/actAttention.cpp
+ Attention/actAttention.h
- Awareness/actAwareness.cpp
- Awareness/actAwareness.h
- Awareness/actAwarenessDefs.cpp
- Awareness/actAwarenessDefs.h
- Awareness/actAwarenessInstance.cpp
- Awareness/actAwarenessInstance.h
+ Awareness/actAwareness.cpp
+ Awareness/actAwareness.h
+ Awareness/actAwarenessDefs.cpp
+ Awareness/actAwarenessDefs.h
+ Awareness/actAwarenessInstance.cpp
+ Awareness/actAwarenessInstance.h
- LOD/actLodState.cpp
- LOD/actLodState.h
+ LOD/actLodState.cpp
+ LOD/actLodState.h
- Profiles/actPlayerBase.cpp
- Profiles/actPlayerBase.h
- Profiles/actRopeBase.cpp
- Profiles/actRopeBase.h
+ Profiles/actPlayerBase.cpp
+ Profiles/actPlayerBase.h
+ Profiles/actRopeBase.cpp
+ Profiles/actRopeBase.h
- actActor.cpp
- actActor.h
- actActorCaptureMgr.cpp
- actActorCaptureMgr.h
- actActorConstDataAccess.cpp
- actActorConstDataAccess.h
- actActorCreator.cpp
- actActorCreator.h
- actActorEditorNode.cpp
- actActorEditorNode.h
- actActorFactory.cpp
- actActorFactory.h
- actActorHeapUtil.cpp
- actActorHeapUtil.h
- actActorLimiter.cpp
- actActorLimiter.h
- actActorLinkConstDataAccess.cpp
- actActorLinkConstDataAccess.h
- actActorParam.cpp
- actActorParam.h
- actActorParamMgr.cpp
- actActorParamMgr.h
- actActorSystem.cpp
- actActorSystem.h
- actActorTemplate.cpp
- actActorTemplate.h
- actActorUtil.cpp
- actActorUtil.h
- actAiAction.cpp
- actAiAction.h
- actAiActionBase.cpp
- actAiActionBase.h
- actAiAi.cpp
- actAiAi.h
- actAiBehavior.cpp
- actAiBehavior.h
- actAiClassDef.cpp
- actAiClassDef.h
- actAiInlineParam.h
- actAiParam.cpp
- actAiParam.h
- actAiQuery.cpp
- actAiQuery.h
- actAiQueries.cpp
- actAiQueries.h
- actAiRoot.cpp
- actAiRoot.h
- actASSetting.cpp
- actASSetting.h
- actBaseProc.cpp
- actBaseProc.h
- actBaseProcCreateTask.cpp
- actBaseProcCreateTask.h
- actBaseProcCreateTaskSelector.cpp
- actBaseProcCreateTaskSelector.h
- actBaseProcDeleter.cpp
- actBaseProcDeleter.h
- actBaseProcHandle.cpp
- actBaseProcHandle.h
- actBaseProcHeapMgr.cpp
- actBaseProcHeapMgr.h
- actBaseProcInitializer.cpp
- actBaseProcInitializer.h
- actBaseProcJob.cpp
- actBaseProcJob.h
- actBaseProcJobHandler.cpp
- actBaseProcJobHandler.h
- actBaseProcJobQue.cpp
- actBaseProcJobQue.h
- actBaseProcLink.cpp
- actBaseProcLink.h
- actBaseProcMap.cpp
- actBaseProcMap.h
- actBaseProcMgr.cpp
- actBaseProcMgr.h
- actBaseProcUnit.cpp
- actBaseProcUnit.h
- actClusteredRenderer.cpp
- actClusteredRenderer.h
- actDebug.cpp
- actDebug.h
- actGlobalParameter.cpp
- actGlobalParameter.h
- actInfoCommon.cpp
- actInfoCommon.h
- actInfoData.cpp
- actInfoData.h
- actInstParamPack.cpp
- actInstParamPack.h
- actLifeRecoveryInfo.h
- actPhysicsConstraints.cpp
- actPhysicsConstraints.h
- actPhysicsUserTag.cpp
- actPhysicsUserTag.h
- actPlayerInfo.cpp
- actPlayerInfo.h
- actTag.h
+ actActor.cpp
+ actActor.h
+ actActorCaptureMgr.cpp
+ actActorCaptureMgr.h
+ actActorConstDataAccess.cpp
+ actActorConstDataAccess.h
+ actActorCreator.cpp
+ actActorCreator.h
+ actActorEditorNode.cpp
+ actActorEditorNode.h
+ actActorFactory.cpp
+ actActorFactory.h
+ actActorHeapUtil.cpp
+ actActorHeapUtil.h
+ actActorLimiter.cpp
+ actActorLimiter.h
+ actActorLinkConstDataAccess.cpp
+ actActorLinkConstDataAccess.h
+ actActorParam.cpp
+ actActorParam.h
+ actActorParamMgr.cpp
+ actActorParamMgr.h
+ actActorSystem.cpp
+ actActorSystem.h
+ actActorTemplate.cpp
+ actActorTemplate.h
+ actActorUtil.cpp
+ actActorUtil.h
+ actAiAction.cpp
+ actAiAction.h
+ actAiActionBase.cpp
+ actAiActionBase.h
+ actAiAi.cpp
+ actAiAi.h
+ actAiBehavior.cpp
+ actAiBehavior.h
+ actAiClassDef.cpp
+ actAiClassDef.h
+ actAiInlineParam.h
+ actAiParam.cpp
+ actAiParam.h
+ actAiQuery.cpp
+ actAiQuery.h
+ actAiQueries.cpp
+ actAiQueries.h
+ actAiRoot.cpp
+ actAiRoot.h
+ actASSetting.cpp
+ actASSetting.h
+ actBaseProc.cpp
+ actBaseProc.h
+ actBaseProcCreateTask.cpp
+ actBaseProcCreateTask.h
+ actBaseProcCreateTaskSelector.cpp
+ actBaseProcCreateTaskSelector.h
+ actBaseProcDeleter.cpp
+ actBaseProcDeleter.h
+ actBaseProcHandle.cpp
+ actBaseProcHandle.h
+ actBaseProcHeapMgr.cpp
+ actBaseProcHeapMgr.h
+ actBaseProcInitializer.cpp
+ actBaseProcInitializer.h
+ actBaseProcJob.cpp
+ actBaseProcJob.h
+ actBaseProcJobHandler.cpp
+ actBaseProcJobHandler.h
+ actBaseProcJobQue.cpp
+ actBaseProcJobQue.h
+ actBaseProcLink.cpp
+ actBaseProcLink.h
+ actBaseProcMap.cpp
+ actBaseProcMap.h
+ actBaseProcMgr.cpp
+ actBaseProcMgr.h
+ actBaseProcUnit.cpp
+ actBaseProcUnit.h
+ actCCAccessor.h
+ actClusteredRenderer.cpp
+ actClusteredRenderer.h
+ actDebug.cpp
+ actDebug.h
+ actGlobalParameter.cpp
+ actGlobalParameter.h
+ actInfoCommon.cpp
+ actInfoCommon.h
+ actInfoData.cpp
+ actInfoData.h
+ actInstParamPack.cpp
+ actInstParamPack.h
+ actLifeRecoveryInfo.h
+ actPhysicsConstraints.cpp
+ actPhysicsConstraints.h
+ actPhysicsUserTag.cpp
+ actPhysicsUserTag.h
+ actPlayerInfo.cpp
+ actPlayerInfo.h
+ actTag.h
- actionDummyAction.cpp
- actionDummyAction.h
- aiDummyAi.cpp
- aiDummyAi.h
- behaviorDummyBehavior.cpp
- behaviorDummyBehavior.h
- queryDummyQuery.cpp
- queryDummyQuery.h
-)
+ actionDummyAction.cpp
+ actionDummyAction.h
+ aiDummyAi.cpp
+ aiDummyAi.h
+ behaviorDummyBehavior.cpp
+ behaviorDummyBehavior.h
+ queryDummyQuery.cpp
+ queryDummyQuery.h
+ )
diff --git a/src/KingSystem/ActorSystem/actActor.h b/src/KingSystem/ActorSystem/actActor.h
index 4868e101..7a3d2093 100644
--- a/src/KingSystem/ActorSystem/actActor.h
+++ b/src/KingSystem/ActorSystem/actActor.h
@@ -40,9 +40,10 @@ class UMii;
namespace phys {
class StaticCompoundRigidBodyGroup;
-class Physics;
+class InstanceSet;
class Reaction;
class RigidBody;
+class CharacterController;
} // namespace phys
namespace res {
@@ -112,6 +113,7 @@ public:
enum class ActorFlag2 {
InstEvent = 0x8,
+ _20 = 0x20,
NoDistanceCheck = 0x80,
Alive = 0x4000000,
};
@@ -140,12 +142,19 @@ public:
const sead::Vector3f& getVelocity() const { return mVelocity; }
const sead::Vector3f& getAngVelocity() const { return mAngVelocity; }
const sead::Vector3f& getScale() const { return mScale; }
+ phys::RigidBody* getMainBody() const { return mMainBody; }
+ phys::RigidBody* getTgtBody() const { return mTgtBody; }
+
+ const MesTransceiverId* getMesTransceiverId() const { return mMsgTransceiver.getId(); }
+
f32 getDeleteDistance() const {
return sead::Mathf::sqrt(sead::Mathf::clampMin(mDeleteDistanceSq, 0.0f));
}
void setDeleteDistance(f32 distance) { mDeleteDistanceSq = sead::Mathf::square(distance); }
+ phys::CharacterController* getCharacterController();
+
void clearFlag(ActorFlag flag);
bool checkFlag(ActorFlag flag) const;
void setFlag(ActorFlag flag);
@@ -278,6 +287,7 @@ public:
void emitBasicSigOn();
void emitBasicSigOff();
+ bool checkBasicSig() const;
void nullsub_4649(); // Some kind of logging which has been excluded from the build?
@@ -386,7 +396,7 @@ protected:
/* 0x560 */ as::ASList* mASList = nullptr;
/* 0x568 */ xlink::XLink* mXLink = nullptr;
/* 0x570 */ ActorParam* mActorParam = nullptr;
- /* 0x578 */ phys::Physics* mPhysics = nullptr;
+ /* 0x578 */ phys::InstanceSet* mPhysics = nullptr;
/* 0x580 */ PhysicsConstraints mConstraints;
/* 0x598 */ void* _598 = nullptr;
/* 0x5a0 */ BoneControl* mBoneControl = nullptr;
diff --git a/src/KingSystem/ActorSystem/actAiActionBase.h b/src/KingSystem/ActorSystem/actAiActionBase.h
index 9aa2db19..db47be42 100644
--- a/src/KingSystem/ActorSystem/actAiActionBase.h
+++ b/src/KingSystem/ActorSystem/actAiActionBase.h
@@ -13,6 +13,7 @@ struct AIDefSet;
class Message;
class MessageAck;
struct MesTransceiverId;
+struct MessageType;
} // namespace ksys
namespace ksys::res {
@@ -69,6 +70,8 @@ public:
void leave();
bool oneShot(InlineParamPack* params);
+ bool sendMessage(const MesTransceiverId& dest, const MessageType& type, void* user_data);
+
Action* getCurrentAction();
bool handleMessage(const Message& message);
bool handleAck(const MessageAck& message);
@@ -78,9 +81,12 @@ public:
const char* getClassName() const;
const char* getName() const;
+ void playAS(const char* name, bool repeat, u32 slot, u32 seq_bank, f32 t);
+ bool isFinishedAS(u32 slot, u32 seq_bank);
+
virtual bool isFailed() const { return mFlags.isOn(Flag::Failed); }
virtual bool isFinished() const { return mFlags.isOn(Flag::Finished); }
- virtual bool isFlag4Set() const { return mFlags.isOn(Flag::_4); }
+ virtual bool isChangeable() const { return mFlags.isOn(Flag::Changeable); }
virtual bool hasPreDeleteCb() { return false; }
virtual bool hasUpdateForPreDeleteCb() { return false; }
@@ -123,7 +129,7 @@ protected:
enum class Flag : u8 {
Finished = 1,
Failed = 2,
- _4 = 4,
+ Changeable = 4,
TriggerAction = 8,
DynamicParamChild = 0x10,
_20 = 0x20,
@@ -154,7 +160,7 @@ protected:
void resetFlags() {
mFlags.reset(Flag::Failed);
mFlags.reset(Flag::Finished);
- mFlags.reset(Flag::_4);
+ mFlags.reset(Flag::Changeable);
}
res::AIProgram* getAIProg() const;
diff --git a/src/KingSystem/ActorSystem/actAiAi.cpp b/src/KingSystem/ActorSystem/actAiAi.cpp
index c96bea6e..632e3873 100644
--- a/src/KingSystem/ActorSystem/actAiAi.cpp
+++ b/src/KingSystem/ActorSystem/actAiAi.cpp
@@ -186,12 +186,12 @@ bool Ai::reenter(ActionBase* other, const sead::SafeString& context) {
return child->takeOver(other_child, getName());
}
-bool Ai::isFlag4Set() const {
+bool Ai::isChangeable() const {
auto* child = getCurrentChild();
if (child)
- return child->isFlag4Set();
+ return child->isChangeable();
- return mFlags.isOn(Flag::_4);
+ return mFlags.isOn(Flag::Changeable);
}
ActionBase* Ai::getCurrentChild() const {
diff --git a/src/KingSystem/ActorSystem/actAiAi.h b/src/KingSystem/ActorSystem/actAiAi.h
index 518c8b7a..af1ad8a5 100644
--- a/src/KingSystem/ActorSystem/actAiAi.h
+++ b/src/KingSystem/ActorSystem/actAiAi.h
@@ -11,7 +11,7 @@ public:
explicit Ai(const InitArg& arg);
~Ai() override;
- bool isFlag4Set() const override;
+ bool isChangeable() const override;
void calc() override;
ActionBase* changeChildLater(const sead::SafeString& name) override;
void getParams(ParamNameTypePairs* pairs, bool update_use_count) const override;
diff --git a/src/KingSystem/ActorSystem/actAiRoot.h b/src/KingSystem/ActorSystem/actAiRoot.h
index 20f7e285..1365b8c2 100644
--- a/src/KingSystem/ActorSystem/actAiRoot.h
+++ b/src/KingSystem/ActorSystem/actAiRoot.h
@@ -30,7 +30,7 @@ public:
explicit RootAi(const InitArg& arg);
~RootAi() override;
- bool isFlag4Set() const override { return true; }
+ bool isChangeable() const override { return true; }
bool init_(sead::Heap* heap) override;
void enter_(InlineParamPack* params) override;
void leave_() override;
diff --git a/src/KingSystem/ActorSystem/actCCAccessor.h b/src/KingSystem/ActorSystem/actCCAccessor.h
new file mode 100644
index 00000000..cfe0b829
--- /dev/null
+++ b/src/KingSystem/ActorSystem/actCCAccessor.h
@@ -0,0 +1,26 @@
+#pragma once
+
+namespace ksys::phys {
+class CharacterController;
+};
+
+namespace ksys::act {
+
+class Actor;
+
+// todo: move?
+enum class MotionType {
+ Hover = 3,
+};
+
+class CCAccessor {
+public:
+ CCAccessor();
+ ~CCAccessor();
+
+ void changeMotionType(phys::CharacterController* cc, MotionType motion_type);
+ void resetRigidBodyMotion(Actor* actor);
+ void resetMotionType(phys::CharacterController* cc);
+};
+
+} // namespace ksys::act
diff --git a/src/KingSystem/ActorSystem/actionDummyAction.cpp b/src/KingSystem/ActorSystem/actionDummyAction.cpp
index 48544236..8d5637ce 100644
--- a/src/KingSystem/ActorSystem/actionDummyAction.cpp
+++ b/src/KingSystem/ActorSystem/actionDummyAction.cpp
@@ -5,7 +5,7 @@ namespace ksys::act::ai {
DummyAction::DummyAction(const InitArg& arg) : Action(arg) {}
void DummyAction::enter_(InlineParamPack* params) {
- mFlags.set(ActionBase::Flag::_4);
+ mFlags.set(ActionBase::Flag::Changeable);
}
void DummyAction::calc_() {}
diff --git a/src/KingSystem/ActorSystem/aiDummyAi.h b/src/KingSystem/ActorSystem/aiDummyAi.h
index 340a13e1..c7bdc7e2 100644
--- a/src/KingSystem/ActorSystem/aiDummyAi.h
+++ b/src/KingSystem/ActorSystem/aiDummyAi.h
@@ -9,7 +9,7 @@ class DummyAi : public Ai {
public:
explicit DummyAi(const InitArg& arg);
- bool isFlag4Set() const override { return true; }
+ bool isChangeable() const override { return true; }
void enter_(InlineParamPack* params) override;
protected:
diff --git a/src/KingSystem/Physics/CMakeLists.txt b/src/KingSystem/Physics/CMakeLists.txt
index 6a7506ec..d33780f4 100644
--- a/src/KingSystem/Physics/CMakeLists.txt
+++ b/src/KingSystem/Physics/CMakeLists.txt
@@ -1,193 +1,195 @@
target_sources(uking PRIVATE
- Cloth/physClothParam.cpp
- Cloth/physClothParam.h
- Cloth/physClothResource.cpp
- Cloth/physClothResource.h
+ CharacterController/physCharacterController.h
- Constraint/physConstraint.cpp
- Constraint/physConstraint.h
+ Cloth/physClothParam.cpp
+ Cloth/physClothParam.h
+ Cloth/physClothResource.cpp
+ Cloth/physClothResource.h
- Ragdoll/physRagdollConfig.cpp
- Ragdoll/physRagdollConfig.h
- Ragdoll/physRagdollControllerKeyList.h
- Ragdoll/physRagdollControllerKeyList.cpp
- Ragdoll/physRagdollController.cpp
- Ragdoll/physRagdollController.h
- Ragdoll/physRagdollControllerMgr.cpp
- Ragdoll/physRagdollControllerMgr.h
- Ragdoll/physRagdollParam.cpp
- Ragdoll/physRagdollParam.h
- Ragdoll/physRagdollResource.cpp
- Ragdoll/physRagdollResource.h
- Ragdoll/physRagdollRigidBody.cpp
- Ragdoll/physRagdollRigidBody.h
+ Constraint/physConstraint.cpp
+ Constraint/physConstraint.h
- Rig/physBoneAccessor.cpp
- Rig/physBoneAccessor.h
- Rig/physModelBoneAccessor.cpp
- Rig/physModelBoneAccessor.h
- Rig/physSkeletonMapper.cpp
- Rig/physSkeletonMapper.h
+ Ragdoll/physRagdollConfig.cpp
+ Ragdoll/physRagdollConfig.h
+ Ragdoll/physRagdollControllerKeyList.h
+ Ragdoll/physRagdollControllerKeyList.cpp
+ Ragdoll/physRagdollController.cpp
+ Ragdoll/physRagdollController.h
+ Ragdoll/physRagdollControllerMgr.cpp
+ Ragdoll/physRagdollControllerMgr.h
+ Ragdoll/physRagdollParam.cpp
+ Ragdoll/physRagdollParam.h
+ Ragdoll/physRagdollResource.cpp
+ Ragdoll/physRagdollResource.h
+ Ragdoll/physRagdollRigidBody.cpp
+ Ragdoll/physRagdollRigidBody.h
- RigidBody/physEdgeRigidBodyParam.cpp
- RigidBody/physEdgeRigidBodyParam.h
- RigidBody/physMotionAccessor.cpp
- RigidBody/physMotionAccessor.h
- RigidBody/physRigidBody.cpp
- RigidBody/physRigidBody.h
- RigidBody/physRigidBodyAccessor.cpp
- RigidBody/physRigidBodyAccessor.h
- RigidBody/physRigidBodyContactEvent.h
- RigidBody/physRigidBodyFromResource.cpp
- RigidBody/physRigidBodyFromResource.h
- RigidBody/physRigidBodyFromShape.cpp
- RigidBody/physRigidBodyFromShape.h
- RigidBody/physRigidBodyMotionEntity.cpp
- RigidBody/physRigidBodyMotionEntity.h
- RigidBody/physRigidBodyMotionSensor.cpp
- RigidBody/physRigidBodyMotionSensor.h
- RigidBody/physRigidBodyParam.cpp
- RigidBody/physRigidBodyParam.h
- RigidBody/physRigidBodyRequestMgr.cpp
- RigidBody/physRigidBodyRequestMgr.h
- RigidBody/physRigidBodyResource.cpp
- RigidBody/physRigidBodyResource.h
- RigidBody/physRigidBodySet.cpp
- RigidBody/physRigidBodySet.h
- RigidBody/physRigidBodySetParam.cpp
- RigidBody/physRigidBodySetParam.h
+ Rig/physBoneAccessor.cpp
+ Rig/physBoneAccessor.h
+ Rig/physModelBoneAccessor.cpp
+ Rig/physModelBoneAccessor.h
+ Rig/physSkeletonMapper.cpp
+ Rig/physSkeletonMapper.h
- RigidBody/Shape/Box/physBoxRigidBody.cpp
- RigidBody/Shape/Box/physBoxRigidBody.h
- RigidBody/Shape/Box/physBoxShape.cpp
- RigidBody/Shape/Box/physBoxShape.h
- RigidBody/Shape/BoxWater/physBoxWaterRigidBody.cpp
- RigidBody/Shape/BoxWater/physBoxWaterRigidBody.h
- RigidBody/Shape/BoxWater/physBoxWaterShape.cpp
- RigidBody/Shape/BoxWater/physBoxWaterShape.h
- RigidBody/Shape/Capsule/physCapsuleRigidBody.cpp
- RigidBody/Shape/Capsule/physCapsuleRigidBody.h
- RigidBody/Shape/Capsule/physCapsuleShape.cpp
- RigidBody/Shape/Capsule/physCapsuleShape.h
- RigidBody/Shape/CharacterPrism/physCharacterPrismShape.cpp
- RigidBody/Shape/CharacterPrism/physCharacterPrismShape.h
- RigidBody/Shape/Cylinder/physCylinderRigidBody.cpp
- RigidBody/Shape/Cylinder/physCylinderRigidBody.h
- RigidBody/Shape/Cylinder/physCylinderShape.cpp
- RigidBody/Shape/Cylinder/physCylinderShape.h
- RigidBody/Shape/CylinderWater/physCylinderWaterRigidBody.cpp
- RigidBody/Shape/CylinderWater/physCylinderWaterRigidBody.h
- RigidBody/Shape/CylinderWater/physCylinderWaterShape.cpp
- RigidBody/Shape/CylinderWater/physCylinderWaterShape.h
- RigidBody/Shape/List/physListShape.cpp
- RigidBody/Shape/List/physListShape.h
- RigidBody/Shape/List/physListShapeRigidBody.cpp
- RigidBody/Shape/List/physListShapeRigidBody.h
- RigidBody/Shape/Polytope/physPolytopeRigidBody.cpp
- RigidBody/Shape/Polytope/physPolytopeRigidBody.h
- RigidBody/Shape/Polytope/physPolytopeShape.cpp
- RigidBody/Shape/Polytope/physPolytopeShape.h
- RigidBody/Shape/Sphere/physSphereRigidBody.cpp
- RigidBody/Shape/Sphere/physSphereRigidBody.h
- RigidBody/Shape/Sphere/physSphereShape.cpp
- RigidBody/Shape/Sphere/physSphereShape.h
- RigidBody/Shape/physShape.h
- RigidBody/Shape/physShapeParamObj.cpp
- RigidBody/Shape/physShapeParamObj.h
+ RigidBody/physEdgeRigidBodyParam.cpp
+ RigidBody/physEdgeRigidBodyParam.h
+ RigidBody/physMotionAccessor.cpp
+ RigidBody/physMotionAccessor.h
+ RigidBody/physRigidBody.cpp
+ RigidBody/physRigidBody.h
+ RigidBody/physRigidBodyAccessor.cpp
+ RigidBody/physRigidBodyAccessor.h
+ RigidBody/physRigidBodyContactEvent.h
+ RigidBody/physRigidBodyFromResource.cpp
+ RigidBody/physRigidBodyFromResource.h
+ RigidBody/physRigidBodyFromShape.cpp
+ RigidBody/physRigidBodyFromShape.h
+ RigidBody/physRigidBodyMotionEntity.cpp
+ RigidBody/physRigidBodyMotionEntity.h
+ RigidBody/physRigidBodyMotionSensor.cpp
+ RigidBody/physRigidBodyMotionSensor.h
+ RigidBody/physRigidBodyParam.cpp
+ RigidBody/physRigidBodyParam.h
+ RigidBody/physRigidBodyRequestMgr.cpp
+ RigidBody/physRigidBodyRequestMgr.h
+ RigidBody/physRigidBodyResource.cpp
+ RigidBody/physRigidBodyResource.h
+ RigidBody/physRigidBodySet.cpp
+ RigidBody/physRigidBodySet.h
+ RigidBody/physRigidBodySetParam.cpp
+ RigidBody/physRigidBodySetParam.h
- RigidBody/TeraMesh/physTeraMeshRigidBody.cpp
- RigidBody/TeraMesh/physTeraMeshRigidBody.h
- RigidBody/TeraMesh/physTeraMeshRigidBodyResource.cpp
- RigidBody/TeraMesh/physTeraMeshRigidBodyResource.h
+ RigidBody/Shape/Box/physBoxRigidBody.cpp
+ RigidBody/Shape/Box/physBoxRigidBody.h
+ RigidBody/Shape/Box/physBoxShape.cpp
+ RigidBody/Shape/Box/physBoxShape.h
+ RigidBody/Shape/BoxWater/physBoxWaterRigidBody.cpp
+ RigidBody/Shape/BoxWater/physBoxWaterRigidBody.h
+ RigidBody/Shape/BoxWater/physBoxWaterShape.cpp
+ RigidBody/Shape/BoxWater/physBoxWaterShape.h
+ RigidBody/Shape/Capsule/physCapsuleRigidBody.cpp
+ RigidBody/Shape/Capsule/physCapsuleRigidBody.h
+ RigidBody/Shape/Capsule/physCapsuleShape.cpp
+ RigidBody/Shape/Capsule/physCapsuleShape.h
+ RigidBody/Shape/CharacterPrism/physCharacterPrismShape.cpp
+ RigidBody/Shape/CharacterPrism/physCharacterPrismShape.h
+ RigidBody/Shape/Cylinder/physCylinderRigidBody.cpp
+ RigidBody/Shape/Cylinder/physCylinderRigidBody.h
+ RigidBody/Shape/Cylinder/physCylinderShape.cpp
+ RigidBody/Shape/Cylinder/physCylinderShape.h
+ RigidBody/Shape/CylinderWater/physCylinderWaterRigidBody.cpp
+ RigidBody/Shape/CylinderWater/physCylinderWaterRigidBody.h
+ RigidBody/Shape/CylinderWater/physCylinderWaterShape.cpp
+ RigidBody/Shape/CylinderWater/physCylinderWaterShape.h
+ RigidBody/Shape/List/physListShape.cpp
+ RigidBody/Shape/List/physListShape.h
+ RigidBody/Shape/List/physListShapeRigidBody.cpp
+ RigidBody/Shape/List/physListShapeRigidBody.h
+ RigidBody/Shape/Polytope/physPolytopeRigidBody.cpp
+ RigidBody/Shape/Polytope/physPolytopeRigidBody.h
+ RigidBody/Shape/Polytope/physPolytopeShape.cpp
+ RigidBody/Shape/Polytope/physPolytopeShape.h
+ RigidBody/Shape/Sphere/physSphereRigidBody.cpp
+ RigidBody/Shape/Sphere/physSphereRigidBody.h
+ RigidBody/Shape/Sphere/physSphereShape.cpp
+ RigidBody/Shape/Sphere/physSphereShape.h
+ RigidBody/Shape/physShape.h
+ RigidBody/Shape/physShapeParamObj.cpp
+ RigidBody/Shape/physShapeParamObj.h
- RigidBody/TerrainHeightField/physTerrainHeightFieldRigidBody.h
+ RigidBody/TeraMesh/physTeraMeshRigidBody.cpp
+ RigidBody/TeraMesh/physTeraMeshRigidBody.h
+ RigidBody/TeraMesh/physTeraMeshRigidBodyResource.cpp
+ RigidBody/TeraMesh/physTeraMeshRigidBodyResource.h
- StaticCompound/physStaticCompound.cpp
- StaticCompound/physStaticCompound.h
- StaticCompound/physStaticCompoundAutogen.cpp
- StaticCompound/physStaticCompoundInfo.cpp
- StaticCompound/physStaticCompoundInfo.h
- StaticCompound/physStaticCompoundMgr.cpp
- StaticCompound/physStaticCompoundMgr.h
- StaticCompound/physStaticCompoundRigidBodyGroup.cpp
- StaticCompound/physStaticCompoundRigidBodyGroup.h
- StaticCompound/physStaticCompoundUtil.cpp
- StaticCompound/physStaticCompoundUtil.h
+ RigidBody/TerrainHeightField/physTerrainHeightFieldRigidBody.h
- SupportBone/physSupportBoneParam.cpp
- SupportBone/physSupportBoneParam.h
- SupportBone/physSupportBoneResource.cpp
- SupportBone/physSupportBoneResource.h
- SupportBone/physSupportBoneResourceMainBone.cpp
+ StaticCompound/physStaticCompound.cpp
+ StaticCompound/physStaticCompound.h
+ StaticCompound/physStaticCompoundAutogen.cpp
+ StaticCompound/physStaticCompoundInfo.cpp
+ StaticCompound/physStaticCompoundInfo.h
+ StaticCompound/physStaticCompoundMgr.cpp
+ StaticCompound/physStaticCompoundMgr.h
+ StaticCompound/physStaticCompoundRigidBodyGroup.cpp
+ StaticCompound/physStaticCompoundRigidBodyGroup.h
+ StaticCompound/physStaticCompoundUtil.cpp
+ StaticCompound/physStaticCompoundUtil.h
- System/physCharacterControllerParam.cpp
- System/physCharacterControllerParam.h
- System/physClosestPointQuery.cpp
- System/physClosestPointQuery.h
- System/physClosestPointQueryWithInfo.cpp
- System/physClosestPointQueryWithInfo.h
- System/physCollisionInfo.cpp
- System/physCollisionInfo.h
- System/physContactInfoParam.cpp
- System/physContactInfoParam.h
- System/physContactLayerCollisionInfo.cpp
- System/physContactLayerCollisionInfo.h
- System/physContactLayerCollisionInfoGroup.cpp
- System/physContactLayerCollisionInfoGroup.h
- System/physContactListener.cpp
- System/physContactListener.h
- System/physContactMgr.cpp
- System/physContactMgr.h
- System/physContactPointInfo.cpp
- System/physContactPointInfo.h
- System/physLayerContactPointInfo.cpp
- System/physLayerContactPointInfo.h
- System/physEntityContactListener.cpp
- System/physEntityContactListener.h
- System/physEntityGroupFilter.cpp
- System/physEntityGroupFilter.h
- System/physGroupFilter.cpp
- System/physGroupFilter.h
- System/physInstanceSet.cpp
- System/physInstanceSet.h
- System/physMaterialTable.cpp
- System/physMaterialTable.h
- System/physParamSet.cpp
- System/physParamSet.h
- System/physPhantom.cpp
- System/physPhantom.h
- System/physQueryContactPointInfo.cpp
- System/physQueryContactPointInfo.h
- System/physRayCast.cpp
- System/physRayCast.h
- System/physRayCastBodyQuery.cpp
- System/physRayCastBodyQuery.h
- System/physRayCastForRequest.cpp
- System/physRayCastForRequest.h
- System/physRayCastRequestMgr.cpp
- System/physRayCastRequestMgr.h
- System/physSensorContactListener.cpp
- System/physSensorContactListener.h
- System/physSensorGroupFilter.cpp
- System/physSensorGroupFilter.h
- System/physShapeCast.cpp
- System/physShapeCast.h
- System/physShapeCastWithInfo.cpp
- System/physShapeCastWithInfo.h
- System/physSystem.cpp
- System/physSystem.h
- System/physSystemData.cpp
- System/physSystemData.h
- System/physUserTag.cpp
- System/physUserTag.h
+ SupportBone/physSupportBoneParam.cpp
+ SupportBone/physSupportBoneParam.h
+ SupportBone/physSupportBoneResource.cpp
+ SupportBone/physSupportBoneResource.h
+ SupportBone/physSupportBoneResourceMainBone.cpp
- physConversions.h
- physDefines.cpp
- physDefines.h
- physHavokMemoryAllocator.cpp
- physHavokMemoryAllocator.h
- physHeapUtil.h
- physLayerMaskBuilder.h
- physMaterialMask.cpp
- physMaterialMask.h
-)
+ System/physCharacterControllerParam.cpp
+ System/physCharacterControllerParam.h
+ System/physClosestPointQuery.cpp
+ System/physClosestPointQuery.h
+ System/physClosestPointQueryWithInfo.cpp
+ System/physClosestPointQueryWithInfo.h
+ System/physCollisionInfo.cpp
+ System/physCollisionInfo.h
+ System/physContactInfoParam.cpp
+ System/physContactInfoParam.h
+ System/physContactLayerCollisionInfo.cpp
+ System/physContactLayerCollisionInfo.h
+ System/physContactLayerCollisionInfoGroup.cpp
+ System/physContactLayerCollisionInfoGroup.h
+ System/physContactListener.cpp
+ System/physContactListener.h
+ System/physContactMgr.cpp
+ System/physContactMgr.h
+ System/physContactPointInfo.cpp
+ System/physContactPointInfo.h
+ System/physLayerContactPointInfo.cpp
+ System/physLayerContactPointInfo.h
+ System/physEntityContactListener.cpp
+ System/physEntityContactListener.h
+ System/physEntityGroupFilter.cpp
+ System/physEntityGroupFilter.h
+ System/physGroupFilter.cpp
+ System/physGroupFilter.h
+ System/physInstanceSet.cpp
+ System/physInstanceSet.h
+ System/physMaterialTable.cpp
+ System/physMaterialTable.h
+ System/physParamSet.cpp
+ System/physParamSet.h
+ System/physPhantom.cpp
+ System/physPhantom.h
+ System/physQueryContactPointInfo.cpp
+ System/physQueryContactPointInfo.h
+ System/physRayCast.cpp
+ System/physRayCast.h
+ System/physRayCastBodyQuery.cpp
+ System/physRayCastBodyQuery.h
+ System/physRayCastForRequest.cpp
+ System/physRayCastForRequest.h
+ System/physRayCastRequestMgr.cpp
+ System/physRayCastRequestMgr.h
+ System/physSensorContactListener.cpp
+ System/physSensorContactListener.h
+ System/physSensorGroupFilter.cpp
+ System/physSensorGroupFilter.h
+ System/physShapeCast.cpp
+ System/physShapeCast.h
+ System/physShapeCastWithInfo.cpp
+ System/physShapeCastWithInfo.h
+ System/physSystem.cpp
+ System/physSystem.h
+ System/physSystemData.cpp
+ System/physSystemData.h
+ System/physUserTag.cpp
+ System/physUserTag.h
+
+ physConversions.h
+ physDefines.cpp
+ physDefines.h
+ physHavokMemoryAllocator.cpp
+ physHavokMemoryAllocator.h
+ physHeapUtil.h
+ physLayerMaskBuilder.h
+ physMaterialMask.cpp
+ physMaterialMask.h
+ )
diff --git a/src/KingSystem/Physics/CharacterController/physCharacterController.h b/src/KingSystem/Physics/CharacterController/physCharacterController.h
new file mode 100644
index 00000000..94ddb424
--- /dev/null
+++ b/src/KingSystem/Physics/CharacterController/physCharacterController.h
@@ -0,0 +1,13 @@
+#pragma once
+#include "KingSystem/Physics/physDefines.h"
+
+namespace ksys::phys {
+
+class CharacterController {
+public:
+ void sub_7100F5EC30();
+ void sub_7100F60604();
+ void enableCollisionMaybe_0(ContactLayer);
+};
+
+} // namespace ksys::phys
diff --git a/src/KingSystem/Physics/RigidBody/physRigidBody.h b/src/KingSystem/Physics/RigidBody/physRigidBody.h
index b2d5d398..9838da10 100644
--- a/src/KingSystem/Physics/RigidBody/physRigidBody.h
+++ b/src/KingSystem/Physics/RigidBody/physRigidBody.h
@@ -479,6 +479,8 @@ public:
const auto& getMotionFlags() const { return mMotionFlags; }
void resetMotionFlagDirect(const MotionFlag flag) { mMotionFlags.reset(flag); }
void setMotionFlag(MotionFlag flag);
+ void setFlag200() { mFlags.set(Flag::_200); }
+ void resetFlag200() { mFlags.reset(Flag::_200); }
hkpRigidBody* getHkBody() const { return mHkBody; }
diff --git a/src/KingSystem/Physics/System/physInstanceSet.cpp b/src/KingSystem/Physics/System/physInstanceSet.cpp
index d51f9a94..df7bcfa4 100644
--- a/src/KingSystem/Physics/System/physInstanceSet.cpp
+++ b/src/KingSystem/Physics/System/physInstanceSet.cpp
@@ -1,4 +1,5 @@
#include "KingSystem/Physics/System/physInstanceSet.h"
+#include "KingSystem/Physics/CharacterController/physCharacterController.h"
#include "KingSystem/Physics/Ragdoll/physRagdollController.h"
#include "KingSystem/Physics/RigidBody/physRigidBodySet.h"
#include "KingSystem/Physics/System/physCollisionInfo.h"
@@ -146,16 +147,16 @@ void InstanceSet::sub_7100FBB00C(phys::RigidBody* body, phys::RigidBodyParam* pa
body->clearSensorReceiverIgnoredLayer();
}
-void* InstanceSet::sub_7100FBBC28(const sead::SafeString& name) const {
+RigidBody* InstanceSet::findRigidBody(const sead::SafeString& name) const {
for (auto& rb : mRigidBodySets) {
- void* p = rb.findBodyByHavokName(name);
+ RigidBody* p = rb.findBodyByHavokName(name);
if (p != nullptr)
return p;
}
return nullptr;
}
-s32 InstanceSet::sub_7100FBBC78(const sead::SafeString& name) const {
+s32 InstanceSet::findContactPointInfo(const sead::SafeString& name) const {
s32 idx = 0;
for (auto& info : mContactPointInfo) {
if (name == info.getName())
@@ -165,7 +166,7 @@ s32 InstanceSet::sub_7100FBBC78(const sead::SafeString& name) const {
return -1;
}
-s32 InstanceSet::sub_7100FBBD9C(const sead::SafeString& name) const {
+s32 InstanceSet::findCollisionInfo(const sead::SafeString& name) const {
s32 idx = 0;
for (auto& info : mCollisionInfo) {
if (name == info.getName())
diff --git a/src/KingSystem/Physics/System/physInstanceSet.h b/src/KingSystem/Physics/System/physInstanceSet.h
index 66eeac61..877e14b6 100644
--- a/src/KingSystem/Physics/System/physInstanceSet.h
+++ b/src/KingSystem/Physics/System/physInstanceSet.h
@@ -37,14 +37,6 @@ class RigidBodySet;
class SystemGroupHandler;
class UserTag;
-// TODO: move to a separate header
-class CharacterController {
-public:
- void sub_7100F5EC30();
- void sub_7100F60604();
- void enableCollisionMaybe_0(ContactLayer);
-};
-
class InstanceSet : public sead::hostio::Node {
public:
enum class Flag : u32 {
@@ -82,9 +74,9 @@ public:
void setMtxAndScale(const sead::Matrix34f& mtx, bool a2, bool a3, f32 scale);
void sub_7100FBB4B4();
void* findX(const sead::SafeString& a1, const sead::SafeString& a2) const;
- void* sub_7100FBBC28(const sead::SafeString& name) const;
- s32 sub_7100FBBC78(const sead::SafeString& name) const;
- s32 sub_7100FBBD9C(const sead::SafeString& name) const;
+ RigidBody* findRigidBody(const sead::SafeString& name) const;
+ s32 findContactPointInfo(const sead::SafeString& name) const;
+ s32 findCollisionInfo(const sead::SafeString& name) const;
void sub_7100FBD284(const sead::Matrix34f& mtx);
void sub_7100FBC890(const sead::Matrix34f& mtx, bool a2, bool a3);
s32 sub_7100FBDA2C(const sead::SafeString& name) const;
diff --git a/src/KingSystem/System/CMakeLists.txt b/src/KingSystem/System/CMakeLists.txt
index 5bf0cbc4..644a2875 100644
--- a/src/KingSystem/System/CMakeLists.txt
+++ b/src/KingSystem/System/CMakeLists.txt
@@ -1,63 +1,63 @@
target_sources(uking PRIVATE
- Account.cpp
- Account.h
- AutoDim.cpp
- AutoDim.h
- BasicProfiler.cpp
- BasicProfiler.h
- CameraEditor.cpp
- CameraEditor.h
- CameraMgr.cpp
- CameraMgr.h
- CoreInfo.h
- DebugFinder.cpp
- DebugFinder.h
- DebugMessage.h
- HavokWorkerMgr.cpp
- HavokWorkerMgr.h
- Hio.cpp
- Hio.h
- KingEditor.cpp
- KingEditor.h
- MemoryProfiler.cpp
- MemoryProfiler.h
- MessageCapture.cpp
- MessageCapture.h
- OcclusionQueryCylinder.cpp
- OcclusionQueryCylinder.h
- OverlayArena.cpp
- OverlayArena.h
- OverlayArenaSystem.cpp
- OverlayArenaSystem.h
- OverlayArenaSystemS1.h
- OverlayArenaSystemS2.h
- Patrol.cpp
- Patrol.h
- PlayReportMgr.cpp
- PlayReportMgr.h
- ProductReporter.cpp
- ProductReporter.h
- Revision.cpp
- Revision.h
- StageInfo.cpp
- StageInfo.h
- StarterPackMgr.cpp
- StarterPackMgr.h
- StringBoard.h
- SystemPauseMgr.cpp
- SystemPauseMgr.h
- SystemTimers.cpp
- SystemTimers.h
- Terminal.cpp
- Terminal.h
- Timer.cpp
- Timer.h
- UIGlue.cpp
- UIGlue.h
- VideoRecorder.cpp
- VideoRecorder.h
- VFR.cpp
- VFR.h
- VFRValue.cpp
- VFRValue.h
-)
+ Account.cpp
+ Account.h
+ AutoDim.cpp
+ AutoDim.h
+ BasicProfiler.cpp
+ BasicProfiler.h
+ CameraEditor.cpp
+ CameraEditor.h
+ CameraMgr.cpp
+ CameraMgr.h
+ CoreInfo.h
+ DebugFinder.cpp
+ DebugFinder.h
+ DebugMessage.h
+ HavokWorkerMgr.cpp
+ HavokWorkerMgr.h
+ Hio.cpp
+ Hio.h
+ KingEditor.cpp
+ KingEditor.h
+ MemoryProfiler.cpp
+ MemoryProfiler.h
+ MessageCapture.cpp
+ MessageCapture.h
+ OcclusionQueryCylinder.cpp
+ OcclusionQueryCylinder.h
+ OverlayArena.cpp
+ OverlayArena.h
+ OverlayArenaSystem.cpp
+ OverlayArenaSystem.h
+ OverlayArenaSystemS1.h
+ OverlayArenaSystemS2.h
+ Patrol.cpp
+ Patrol.h
+ PlayReportMgr.cpp
+ PlayReportMgr.h
+ ProductReporter.cpp
+ ProductReporter.h
+ Revision.cpp
+ Revision.h
+ StageInfo.cpp
+ StageInfo.h
+ StarterPackMgr.cpp
+ StarterPackMgr.h
+ StringBoard.h
+ SystemPauseMgr.cpp
+ SystemPauseMgr.h
+ SystemTimers.cpp
+ SystemTimers.h
+ Terminal.cpp
+ Terminal.h
+ Timer.cpp
+ Timer.h
+ UIGlue.cpp
+ UIGlue.h
+ VideoRecorder.cpp
+ VideoRecorder.h
+ VFR.cpp
+ VFR.h
+ VFRValue.cpp
+ VFRValue.h
+ )
diff --git a/src/KingSystem/System/UIGlue.h b/src/KingSystem/System/UIGlue.h
index 019019f1..d07da634 100644
--- a/src/KingSystem/System/UIGlue.h
+++ b/src/KingSystem/System/UIGlue.h
@@ -5,5 +5,7 @@
namespace ksys::ui {
int getPorchNum(const sead::SafeString& name);
+void initRupeeCounter();
+bool isRupeeCounterActive();
} // namespace ksys::ui