From 536a00138ea315814709cfda942dad9c2a3e31d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sun, 26 Dec 2021 14:33:41 +0100 Subject: ksys/phys: Start adding ContactMgr Also renames ContactInfoTable to ContactMgr because the contact info table is a separate data structure that's managed by ContactMgr; the manager itself handles more than just the table data --- src/KingSystem/Physics/System/physSystemData.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/KingSystem/Physics/System/physSystemData.cpp') diff --git a/src/KingSystem/Physics/System/physSystemData.cpp b/src/KingSystem/Physics/System/physSystemData.cpp index 319bb98e..d21af924 100644 --- a/src/KingSystem/Physics/System/physSystemData.cpp +++ b/src/KingSystem/Physics/System/physSystemData.cpp @@ -1,5 +1,5 @@ #include "KingSystem/Physics/System/physSystemData.h" -#include "KingSystem/Physics/System/physContactInfoTable.h" +#include "KingSystem/Physics/System/physContactMgr.h" #include "KingSystem/Physics/System/physGroupFilter.h" #include "KingSystem/Physics/System/physMaterialTable.h" #include "KingSystem/Physics/System/physRagdollControllerKeyList.h" @@ -39,7 +39,7 @@ SystemData::~SystemData() { void SystemData::load(sead::Heap* heap, GroupFilter* entity_group_filter, GroupFilter* sensor_group_filter, MaterialTable* material_table, - ContactInfoTable* contact_info_table) { + ContactMgr* contact_info_table) { loadLayerTable(heap, entity_group_filter, ContactLayerType::Entity); loadLayerTable(heap, sensor_group_filter, ContactLayerType::Sensor); loadMaterialTable(heap, material_table); @@ -90,11 +90,10 @@ void SystemData::loadSubMaterialTable(sead::Heap* heap, MaterialTable* table) { table->loadSubMaterialTable(heap, res); } -void SystemData::loadContactInfoTable(sead::Heap* heap, ContactInfoTable* table, - ContactLayerType type) { +void SystemData::loadContactInfoTable(sead::Heap* heap, ContactMgr* table, ContactLayerType type) { mContactInfoTableHandles[int(type)] = new (heap) res::Handle; const auto res = loadContactInfoTableRes(type); - table->load(heap, res, type); + table->loadContactInfoTable(heap, res, type); } void SystemData::loadCharacterCtrlTable(sead::Heap* heap) { -- cgit v1.2.3