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.
This commit is contained in:
Léo Lam
2022-01-21 12:39:01 +01:00
parent 98c69ebaef
commit c292675646
11 changed files with 50 additions and 50 deletions
@@ -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) {
@@ -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) {
@@ -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
@@ -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) {
@@ -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)
@@ -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;
}
@@ -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);
}
@@ -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