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
This commit is contained in:
Léo Lam
2021-12-26 14:33:41 +01:00
parent c716c3eec8
commit 536a00138e
14 changed files with 253 additions and 55 deletions
@@ -16,15 +16,13 @@ class Handle;
namespace ksys::phys {
class ContactInfoTable;
class ContactMgr;
class GroupFilter;
class MaterialTable;
class RagdollControllerKeyList;
constexpr int NumLayers = 32;
struct LayerTable : agl::utl::IParameterObj {
sead::SafeArray<agl::utl::Parameter<int>, NumLayers> layer_values;
sead::SafeArray<agl::utl::Parameter<int>, MaxNumLayersPerType> layer_values;
GroupFilter* filter;
ContactLayer layer;
int num_layers;
@@ -64,15 +62,15 @@ public:
virtual ~SystemData();
void load(sead::Heap* heap, GroupFilter* entity_group_filter, GroupFilter* sensor_group_filter,
MaterialTable* material_table, ContactInfoTable* contact_info_table);
MaterialTable* material_table, ContactMgr* contact_info_table);
private:
using LayerMatrix = Tables<LayerTable, NumLayers>;
using LayerMatrix = Tables<LayerTable, MaxNumLayersPerType>;
void loadLayerTable(sead::Heap* heap, GroupFilter* filter, ContactLayerType type);
void loadMaterialTable(sead::Heap* heap, MaterialTable* table);
void loadSubMaterialTable(sead::Heap* heap, MaterialTable* table);
void loadContactInfoTable(sead::Heap* heap, ContactInfoTable* table, ContactLayerType type);
void loadContactInfoTable(sead::Heap* heap, ContactMgr* table, ContactLayerType type);
void loadCharacterCtrlTable(sead::Heap* heap);
void loadRagdollCtrlKeyList(sead::Heap* heap);