summaryrefslogtreecommitdiff
path: root/src/KingSystem/Physics/System
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2022-01-21 12:39:01 +0100
committerLéo Lam <leo@leolam.fr>2022-01-21 12:43:24 +0100
commitc29267564614d1421bbb2e4aab52743f2d71de98 (patch)
treecfe754db629bbe654818205dc22283410651fe97 /src/KingSystem/Physics/System
parent98c69ebaef70dd81d8479f227c33559e0100ff58 (diff)
ksys/phys: Rename MemSystem to System
It was called MemSystem in the IDB because of a string in ksys::InitializeApp that referred to MemSystem initialisation as "Physics Memory System"; however that string actually referred to an initialisation step for the physics system, not to the name of the subsystem itself.
Diffstat (limited to 'src/KingSystem/Physics/System')
-rw-r--r--src/KingSystem/Physics/System/physContactMgr.cpp4
-rw-r--r--src/KingSystem/Physics/System/physEntityGroupFilter.cpp4
-rw-r--r--src/KingSystem/Physics/System/physGroupFilter.cpp4
-rw-r--r--src/KingSystem/Physics/System/physMaterialMask.cpp8
-rw-r--r--src/KingSystem/Physics/System/physRigidContactPoints.cpp6
-rw-r--r--src/KingSystem/Physics/System/physRigidContactPointsEx.cpp8
-rw-r--r--src/KingSystem/Physics/System/physSystem.cpp (renamed from src/KingSystem/Physics/System/physMemSystem.cpp)22
-rw-r--r--src/KingSystem/Physics/System/physSystem.h (renamed from src/KingSystem/Physics/System/physMemSystem.h)10
8 files changed, 33 insertions, 33 deletions
diff --git a/src/KingSystem/Physics/System/physContactMgr.cpp b/src/KingSystem/Physics/System/physContactMgr.cpp
index 7af57a4f..51f6949f 100644
--- a/src/KingSystem/Physics/System/physContactMgr.cpp
+++ b/src/KingSystem/Physics/System/physContactMgr.cpp
@@ -2,9 +2,9 @@
#include <prim/seadScopedLock.h>
#include "KingSystem/Physics/System/physEntityGroupFilter.h"
#include "KingSystem/Physics/System/physGroupFilter.h"
-#include "KingSystem/Physics/System/physMemSystem.h"
#include "KingSystem/Physics/System/physRigidContactPoints.h"
#include "KingSystem/Physics/System/physRigidContactPointsEx.h"
+#include "KingSystem/Physics/System/physSystem.h"
namespace ksys::phys {
@@ -53,7 +53,7 @@ void ContactMgr::doLoadContactInfoTable(agl::utl::ResParameterArchive archive,
const auto root = archive.getRootList();
const auto names = root.getResParameterObj(0);
- const auto* filter = MemSystem::instance()->getGroupFilter(type);
+ const auto* filter = System::instance()->getGroupFilter(type);
const auto layer_base = static_cast<int>(getContactLayerBase(type));
for (int i = 0; i < table.receivers.size(); ++i) {
diff --git a/src/KingSystem/Physics/System/physEntityGroupFilter.cpp b/src/KingSystem/Physics/System/physEntityGroupFilter.cpp
index 63e65733..e6879ca0 100644
--- a/src/KingSystem/Physics/System/physEntityGroupFilter.cpp
+++ b/src/KingSystem/Physics/System/physEntityGroupFilter.cpp
@@ -8,7 +8,7 @@
#include <Havok/Physics2012/Dynamics/World/hkpWorldObject.h>
#include <heap/seadHeap.h>
#include "KingSystem/Physics/System/physContactMgr.h"
-#include "KingSystem/Physics/System/physMemSystem.h"
+#include "KingSystem/Physics/System/physSystem.h"
#include "KingSystem/Utils/BitField.h"
#include "KingSystem/Utils/HeapUtil.h"
@@ -59,7 +59,7 @@ void receiverMaskEnableLayer(ReceiverMask* mask, ContactLayer layer) {
bool receiverMaskGetSensorLayerMaskForType(ReceiverMask* mask,
const sead::SafeString& receiver_type) {
- return MemSystem::instance()->getContactMgr()->getSensorLayerMask(mask, receiver_type);
+ return System::instance()->getContactMgr()->getSensorLayerMask(mask, receiver_type);
}
void receiverMaskSetSensorLayerMask(ReceiverMask* mask, u32 layer_mask) {
diff --git a/src/KingSystem/Physics/System/physGroupFilter.cpp b/src/KingSystem/Physics/System/physGroupFilter.cpp
index c8f0df8d..9bb8c3c8 100644
--- a/src/KingSystem/Physics/System/physGroupFilter.cpp
+++ b/src/KingSystem/Physics/System/physGroupFilter.cpp
@@ -1,6 +1,6 @@
#include "KingSystem/Physics/System/physGroupFilter.h"
#include <prim/seadScopedLock.h>
-#include "KingSystem/Physics/System/physMemSystem.h"
+#include "KingSystem/Physics/System/physSystem.h"
namespace ksys::phys {
@@ -55,7 +55,7 @@ u32 SystemGroupHandler::m7() {
}
void SystemGroupHandler::removeThis() {
- MemSystem::instance()->removeSystemGroupHandler(this);
+ System::instance()->removeSystemGroupHandler(this);
}
} // namespace ksys::phys
diff --git a/src/KingSystem/Physics/System/physMaterialMask.cpp b/src/KingSystem/Physics/System/physMaterialMask.cpp
index 9a2072a6..c468c76d 100644
--- a/src/KingSystem/Physics/System/physMaterialMask.cpp
+++ b/src/KingSystem/Physics/System/physMaterialMask.cpp
@@ -1,6 +1,6 @@
#include "KingSystem/Physics/System/physMaterialMask.h"
#include "KingSystem/Physics/System/physMaterialTable.h"
-#include "KingSystem/Physics/System/physMemSystem.h"
+#include "KingSystem/Physics/System/physSystem.h"
namespace ksys::phys {
@@ -57,15 +57,15 @@ const char* MaterialMask::getSubMaterialName() const {
}
int MaterialMask::getSubMaterialIdx(Material mat, const sead::SafeString& submat_name) {
- return MemSystem::instance()->getMaterialTable()->getSubMaterialIdx(mat, submat_name);
+ return System::instance()->getMaterialTable()->getSubMaterialIdx(mat, submat_name);
}
const sead::SafeString& MaterialMask::getSubMaterialName(Material mat, int submat_idx) {
- return MemSystem::instance()->getMaterialTable()->getSubMaterial(mat, submat_idx);
+ return System::instance()->getMaterialTable()->getSubMaterial(mat, submat_idx);
}
int MaterialMask::getNumSubMaterials(Material mat) {
- return MemSystem::instance()->getMaterialTable()->getNumSubMaterials(mat);
+ return System::instance()->getMaterialTable()->getNumSubMaterials(mat);
}
const sead::SafeString& MaterialMask::getSubMaterialName(int mat, int submat_idx) {
diff --git a/src/KingSystem/Physics/System/physRigidContactPoints.cpp b/src/KingSystem/Physics/System/physRigidContactPoints.cpp
index 9170491a..5bc63b34 100644
--- a/src/KingSystem/Physics/System/physRigidContactPoints.cpp
+++ b/src/KingSystem/Physics/System/physRigidContactPoints.cpp
@@ -1,15 +1,15 @@
#include "KingSystem/Physics/System/physRigidContactPoints.h"
-#include "KingSystem/Physics/System/physMemSystem.h"
+#include "KingSystem/Physics/System/physSystem.h"
namespace ksys::phys {
RigidContactPoints* RigidContactPoints::make(sead::Heap* heap, int num,
const sead::SafeString& name, int a, int b, int c) {
- return MemSystem::instance()->allocContactPoints(heap, num, name, a, b, c);
+ return System::instance()->allocContactPoints(heap, num, name, a, b, c);
}
void RigidContactPoints::free(RigidContactPoints* instance) {
- MemSystem::instance()->freeContactPoints(instance);
+ System::instance()->freeContactPoints(instance);
}
RigidContactPoints::RigidContactPoints(const sead::SafeString& name, int a, int b, int c)
diff --git a/src/KingSystem/Physics/System/physRigidContactPointsEx.cpp b/src/KingSystem/Physics/System/physRigidContactPointsEx.cpp
index 58a6a925..ed868ec9 100644
--- a/src/KingSystem/Physics/System/physRigidContactPointsEx.cpp
+++ b/src/KingSystem/Physics/System/physRigidContactPointsEx.cpp
@@ -1,17 +1,17 @@
#include "KingSystem/Physics/System/physRigidContactPointsEx.h"
#include "KingSystem/Physics/System/physContactMgr.h"
-#include "KingSystem/Physics/System/physMemSystem.h"
+#include "KingSystem/Physics/System/physSystem.h"
namespace ksys::phys {
RigidContactPointsEx* RigidContactPointsEx::make(sead::Heap* heap, int num, int num2,
const sead::SafeString& name, int a, int b,
int c) {
- return MemSystem::instance()->allocContactPointsEx(heap, num, num2, name, a, b, c);
+ return System::instance()->allocContactPointsEx(heap, num, num2, name, a, b, c);
}
void RigidContactPointsEx::free(RigidContactPointsEx* instance) {
- MemSystem::instance()->freeContactPointsEx(instance);
+ System::instance()->freeContactPointsEx(instance);
}
bool RigidContactPointsEx::registerLayerPair(ContactLayer layer1, ContactLayer layer2,
@@ -30,7 +30,7 @@ bool RigidContactPointsEx::registerLayerPair(ContactLayer layer1, ContactLayer l
entry->layer1 = layer1;
entry->layer2 = layer2;
entry->enabled = enabled;
- [&] { MemSystem::instance()->registerContactPointLayerPair(this, layer1, layer2, enabled); }();
+ [&] { System::instance()->registerContactPointLayerPair(this, layer1, layer2, enabled); }();
return true;
}
diff --git a/src/KingSystem/Physics/System/physMemSystem.cpp b/src/KingSystem/Physics/System/physSystem.cpp
index 9bf4af62..df841497 100644
--- a/src/KingSystem/Physics/System/physMemSystem.cpp
+++ b/src/KingSystem/Physics/System/physSystem.cpp
@@ -1,4 +1,4 @@
-#include "KingSystem/Physics/System/physMemSystem.h"
+#include "KingSystem/Physics/System/physSystem.h"
#include "KingSystem/Physics/Cloth/physClothResource.h"
#include "KingSystem/Physics/Ragdoll/physRagdollControllerKeyList.h"
#include "KingSystem/Physics/Ragdoll/physRagdollResource.h"
@@ -17,9 +17,9 @@
namespace ksys::phys {
-SEAD_SINGLETON_DISPOSER_IMPL(MemSystem)
+SEAD_SINGLETON_DISPOSER_IMPL(System)
-void MemSystem::initSystemData(sead::Heap* heap) {
+void System::initSystemData(sead::Heap* heap) {
res::registerEntryFactory(new (heap) res::EntryFactory<RigidBodyResource>(1.0, 0x400), "hkrb");
res::registerEntryFactory(new (heap) res::EntryFactory<RagdollResource>(1.0, 0x400), "hkrg");
res::registerEntryFactory(new (heap) res::EntryFactory<SupportBoneResource>(1.0, 0x100000),
@@ -48,23 +48,23 @@ void MemSystem::initSystemData(sead::Heap* heap) {
mContactMgr);
}
-RigidContactPoints* MemSystem::allocContactPoints(sead::Heap* heap, int num,
- const sead::SafeString& name, int a, int b,
- int c) const {
+RigidContactPoints* System::allocContactPoints(sead::Heap* heap, int num,
+ const sead::SafeString& name, int a, int b,
+ int c) const {
return mContactMgr->allocContactPoints(heap, num, name, a, b, c);
}
-void MemSystem::freeContactPoints(RigidContactPoints* points) const {
+void System::freeContactPoints(RigidContactPoints* points) const {
mContactMgr->freeContactPoints(points);
}
-RigidContactPointsEx* MemSystem::allocContactPointsEx(sead::Heap* heap, int num, int num2,
- const sead::SafeString& name, int a, int b,
- int c) const {
+RigidContactPointsEx* System::allocContactPointsEx(sead::Heap* heap, int num, int num2,
+ const sead::SafeString& name, int a, int b,
+ int c) const {
return mContactMgr->allocContactPointsEx(heap, num, num2, name, a, b, c);
}
-void MemSystem::registerContactPoints(RigidContactPoints* points) const {
+void System::registerContactPoints(RigidContactPoints* points) const {
mContactMgr->registerContactPoints(points);
}
diff --git a/src/KingSystem/Physics/System/physMemSystem.h b/src/KingSystem/Physics/System/physSystem.h
index 218f915e..dcd2e556 100644
--- a/src/KingSystem/Physics/System/physMemSystem.h
+++ b/src/KingSystem/Physics/System/physSystem.h
@@ -24,10 +24,10 @@ enum class IsIndoorStage {
Yes,
};
-class MemSystem {
- SEAD_SINGLETON_DISPOSER(MemSystem)
- MemSystem();
- virtual ~MemSystem();
+class System {
+ SEAD_SINGLETON_DISPOSER(System)
+ System();
+ virtual ~System();
public:
float getTimeFactor() const { return mTimeFactor; }
@@ -90,6 +90,6 @@ private:
sead::Heap* mPhysicsTempLowHeap{};
u8 _1c8[0x480 - 0x1c8];
};
-KSYS_CHECK_SIZE_NX150(MemSystem, 0x480);
+KSYS_CHECK_SIZE_NX150(System, 0x480);
} // namespace ksys::phys