diff options
Diffstat (limited to 'src/KingSystem/Physics/System/physSystem.cpp')
| -rw-r--r-- | src/KingSystem/Physics/System/physSystem.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/KingSystem/Physics/System/physSystem.cpp b/src/KingSystem/Physics/System/physSystem.cpp index 0428a92a..e9a1ffb5 100644 --- a/src/KingSystem/Physics/System/physSystem.cpp +++ b/src/KingSystem/Physics/System/physSystem.cpp @@ -9,7 +9,9 @@ #include "KingSystem/Physics/System/physContactMgr.h" #include "KingSystem/Physics/System/physContactPointInfo.h" #include "KingSystem/Physics/System/physEntityGroupFilter.h" +#include "KingSystem/Physics/System/physGroupFilter.h" #include "KingSystem/Physics/System/physMaterialTable.h" +#include "KingSystem/Physics/System/physRayCastRequestMgr.h" #include "KingSystem/Physics/System/physSensorGroupFilter.h" #include "KingSystem/Physics/System/physSystemData.h" #include "KingSystem/Resource/resEntryFactory.h" @@ -19,6 +21,10 @@ namespace ksys::phys { SEAD_SINGLETON_DISPOSER_IMPL(System) +bool System::isPaused() const { + return mPaused; +} + 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"); @@ -57,6 +63,37 @@ void System::freeContactPointInfo(ContactPointInfo* info) const { mContactMgr->freeContactPointInfo(info); } +CollisionInfo* System::allocCollisionInfo(sead::Heap* heap, const sead::SafeString& name) const { + return mContactMgr->makeCollisionInfo(heap, name); +} + +void System::freeCollisionInfo(CollisionInfo* info) const { + mContactMgr->freeCollisionInfo(info); +} + +ContactLayerCollisionInfoGroup* +System::makeContactLayerCollisionInfoGroup(sead::Heap* heap, ContactLayer layer, int capacity, + const sead::SafeString& name) { + return mContactMgr->makeContactLayerCollisionInfoGroup(heap, layer, capacity, name); +} + +void System::freeContactLayerCollisionInfoGroup(ContactLayerCollisionInfoGroup* group) { + mContactMgr->freeContactLayerCollisionInfoGroup(group); +} + +GroupFilter* System::getGroupFilter(ContactLayerType type) const { + return mGroupFilters[static_cast<s32>(type)]; +} + +RayCastForRequest* System::allocRayCastRequest(SystemGroupHandler* group_handler, + GroundHit ground_hit) { + return mRayCastRequestMgr->allocRequest(group_handler, ground_hit); +} + +SystemGroupHandler* System::addSystemGroupHandler(ContactLayerType layer_type, int free_list_idx) { + return getGroupFilter(layer_type)->addSystemGroupHandler(free_list_idx); +} + LayerContactPointInfo* System::allocLayerContactPointInfo(sead::Heap* heap, int num, int num2, const sead::SafeString& name, int a, int b, int c) const { |
