mirror of
https://github.com/zeldaret/botw
synced 2026-08-02 00:14:36 -04:00
ksys: Rename RigidContactPoints to match param files
This commit is contained in:
@@ -108,6 +108,10 @@ target_sources(uking PRIVATE
|
||||
System/physContactListener.h
|
||||
System/physContactMgr.cpp
|
||||
System/physContactMgr.h
|
||||
System/physContactPointInfo.cpp
|
||||
System/physContactPointInfo.h
|
||||
System/physContactPointInfoEx.cpp
|
||||
System/physContactPointInfoEx.h
|
||||
System/physEntityGroupFilter.cpp
|
||||
System/physEntityGroupFilter.h
|
||||
System/physGroupFilter.cpp
|
||||
@@ -118,10 +122,6 @@ target_sources(uking PRIVATE
|
||||
System/physMaterialTable.h
|
||||
System/physParamSet.cpp
|
||||
System/physParamSet.h
|
||||
System/physRigidContactPoints.cpp
|
||||
System/physRigidContactPoints.h
|
||||
System/physRigidContactPointsEx.cpp
|
||||
System/physRigidContactPointsEx.h
|
||||
System/physSensorGroupFilter.cpp
|
||||
System/physSensorGroupFilter.h
|
||||
System/physSystem.cpp
|
||||
|
||||
@@ -473,10 +473,10 @@ void RigidBody::x_10() {
|
||||
x_8(nullptr);
|
||||
}
|
||||
|
||||
void RigidBody::setContactPoints(RigidContactPoints* points) {
|
||||
mContactPoints = points;
|
||||
if (isFlag8Set() && mContactPoints && !mContactPoints->isLinked())
|
||||
System::instance()->registerContactPoints(points);
|
||||
void RigidBody::setContactPointInfo(ContactPointInfo* info) {
|
||||
mContactPointInfo = info;
|
||||
if (isFlag8Set() && mContactPointInfo && !mContactPointInfo->isLinked())
|
||||
System::instance()->registerContactPointInfo(info);
|
||||
}
|
||||
|
||||
void RigidBody::freeze(bool should_freeze, bool preserve_velocities, bool preserve_max_impulse) {
|
||||
|
||||
@@ -28,7 +28,7 @@ class MotionAccessor;
|
||||
struct RigidBodyInstanceParam;
|
||||
class RigidBodyMotionEntity;
|
||||
class RigidBodyMotionSensor;
|
||||
class RigidContactPoints;
|
||||
class ContactPointInfo;
|
||||
class SystemGroupHandler;
|
||||
class UserTag;
|
||||
|
||||
@@ -191,8 +191,8 @@ public:
|
||||
void* get90() const { return _90; }
|
||||
// 0x0000007100f8e72c
|
||||
void x_12_setField90(void* field_90);
|
||||
RigidContactPoints* getContactPoints() const { return mContactPoints; }
|
||||
void setContactPoints(RigidContactPoints* points);
|
||||
ContactPointInfo* getContactPointInfo() const { return mContactPointInfo; }
|
||||
void setContactPointInfo(ContactPointInfo* info);
|
||||
|
||||
void freeze(bool should_freeze, bool preserve_velocities, bool preserve_max_impulse);
|
||||
void setFixedAndPreserveImpulse(bool fixed, bool mark_linear_vel_as_dirty);
|
||||
@@ -583,7 +583,7 @@ protected:
|
||||
sead::BitFlag32 mContactMask{};
|
||||
hkpRigidBody* mHkBody;
|
||||
UserTag* mUserTag = nullptr;
|
||||
RigidContactPoints* mContactPoints = nullptr;
|
||||
ContactPointInfo* mContactPointInfo = nullptr;
|
||||
void* _90 = nullptr;
|
||||
u16 _98 = 0;
|
||||
RigidBodyAccessor mRigidBodyAccessor;
|
||||
|
||||
@@ -27,7 +27,7 @@ RigidBodyRequestMgr::~RigidBodyRequestMgr() {
|
||||
mMotionAccessors.freeBuffer();
|
||||
|
||||
if (mContactPoints) {
|
||||
ksys::phys::RigidContactPointsEx::free(mContactPoints);
|
||||
ksys::phys::ContactPointInfoEx::free(mContactPoints);
|
||||
mContactPoints = nullptr;
|
||||
}
|
||||
}
|
||||
@@ -62,7 +62,7 @@ void RigidBodyRequestMgr::init(sead::Heap* heap) {
|
||||
mNumEntitiesInWorld = 0;
|
||||
|
||||
mContactPoints =
|
||||
RigidContactPointsEx::make(heap, 0x1000, 11, "RigidBodyRequestMgr::Water", 0, 0, 0);
|
||||
ContactPointInfoEx::make(heap, 0x1000, 11, "RigidBodyRequestMgr::Water", 0, 0, 0);
|
||||
|
||||
mContactPoints->setCallback(&mCallback);
|
||||
mContactPoints->set30(1);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <prim/seadDelegate.h>
|
||||
#include <thread/seadAtomic.h>
|
||||
#include <thread/seadCriticalSection.h>
|
||||
#include "KingSystem/Physics/System/physRigidContactPointsEx.h"
|
||||
#include "KingSystem/Physics/System/physContactPointInfoEx.h"
|
||||
#include "KingSystem/Physics/physDefines.h"
|
||||
#include "KingSystem/Utils/Container/LockFreeQueue.h"
|
||||
#include "KingSystem/Utils/Types.h"
|
||||
@@ -84,7 +84,7 @@ private:
|
||||
};
|
||||
KSYS_CHECK_SIZE_NX150(Unk6, 0x48);
|
||||
|
||||
struct PointCallback : RigidContactPointsEx::Callback {
|
||||
struct PointCallback : ContactPointInfoEx::Callback {
|
||||
explicit PointCallback(RigidBodyRequestMgr* mgr_) : mgr(mgr_) {}
|
||||
void invoke(void* arg) override { mgr->someFunction2(arg); }
|
||||
|
||||
@@ -112,7 +112,7 @@ private:
|
||||
sead::Atomic<u32> _130;
|
||||
sead::Buffer<Unk4> _138;
|
||||
u32 mNumEntitiesInWorld{};
|
||||
RigidContactPointsEx* mContactPoints{};
|
||||
ContactPointInfoEx* mContactPoints{};
|
||||
sead::SafeArray<sead::CriticalSection, NumRigidBodyBuffers> mCriticalSections;
|
||||
sead::CriticalSection mCS;
|
||||
float _218 = 1.0;
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
#include "KingSystem/Physics/System/physContactMgr.h"
|
||||
#include <prim/seadScopedLock.h>
|
||||
#include "KingSystem/Physics/System/physContactPointInfo.h"
|
||||
#include "KingSystem/Physics/System/physContactPointInfoEx.h"
|
||||
#include "KingSystem/Physics/System/physEntityGroupFilter.h"
|
||||
#include "KingSystem/Physics/System/physGroupFilter.h"
|
||||
#include "KingSystem/Physics/System/physRigidContactPoints.h"
|
||||
#include "KingSystem/Physics/System/physRigidContactPointsEx.h"
|
||||
#include "KingSystem/Physics/System/physSystem.h"
|
||||
|
||||
namespace ksys::phys {
|
||||
|
||||
ContactMgr::ContactMgr() {
|
||||
mRigidContactPoints.initOffset(RigidContactPoints::getListNodeOffset());
|
||||
mRigidContactPoints.initOffset(ContactPointInfo::getListNodeOffset());
|
||||
// FIXME: figure out what these offsets are
|
||||
mList2.initOffset(0x78);
|
||||
mList3.initOffset(0x40);
|
||||
@@ -76,40 +76,40 @@ void ContactMgr::doLoadContactInfoTable(agl::utl::ResParameterArchive archive,
|
||||
table.param_io.applyResParameterArchive(archive);
|
||||
}
|
||||
|
||||
RigidContactPoints* ContactMgr::allocContactPoints(sead::Heap* heap, int num,
|
||||
const sead::SafeString& name, int a, int b,
|
||||
int c) {
|
||||
auto* points = new (heap) RigidContactPoints(name, a, b, c);
|
||||
ContactPointInfo* ContactMgr::allocContactPoints(sead::Heap* heap, int num,
|
||||
const sead::SafeString& name, int a, int b,
|
||||
int c) {
|
||||
auto* points = new (heap) ContactPointInfo(name, a, b, c);
|
||||
points->allocPoints(heap, num);
|
||||
return points;
|
||||
}
|
||||
|
||||
RigidContactPointsEx* ContactMgr::allocContactPointsEx(sead::Heap* heap, int num, int num2,
|
||||
const sead::SafeString& name, int a, int b,
|
||||
int c) {
|
||||
auto* points = new (heap) RigidContactPointsEx(name, a, b, c);
|
||||
ContactPointInfoEx* ContactMgr::allocContactPointsEx(sead::Heap* heap, int num, int num2,
|
||||
const sead::SafeString& name, int a, int b,
|
||||
int c) {
|
||||
auto* points = new (heap) ContactPointInfoEx(name, a, b, c);
|
||||
points->allocPoints(heap, num, num2);
|
||||
registerContactPoints(points);
|
||||
registerContactPointInfo(points);
|
||||
return points;
|
||||
}
|
||||
|
||||
void ContactMgr::registerContactPoints(IRigidContactPoints* points) {
|
||||
void ContactMgr::registerContactPointInfo(ContactPointInfoBase* info) {
|
||||
auto lock = sead::makeScopedLock(mMutex1);
|
||||
if (!points->isLinked())
|
||||
mRigidContactPoints.pushBack(points);
|
||||
if (!info->isLinked())
|
||||
mRigidContactPoints.pushBack(info);
|
||||
}
|
||||
|
||||
void ContactMgr::freeContactPoints(IRigidContactPoints* points) {
|
||||
if (!points)
|
||||
void ContactMgr::freeContactPointInfo(ContactPointInfoBase* info) {
|
||||
if (!info)
|
||||
return;
|
||||
|
||||
{
|
||||
auto lock = sead::makeScopedLock(mMutex1);
|
||||
if (points->isLinked())
|
||||
mRigidContactPoints.erase(points);
|
||||
if (info->isLinked())
|
||||
mRigidContactPoints.erase(info);
|
||||
}
|
||||
points->freePoints();
|
||||
delete points;
|
||||
info->freePoints();
|
||||
delete info;
|
||||
}
|
||||
|
||||
bool ContactMgr::getSensorLayerMask(SensorCollisionMask* mask,
|
||||
|
||||
@@ -24,10 +24,10 @@ namespace ksys::phys {
|
||||
|
||||
struct ContactUnk1;
|
||||
enum class IsIndoorStage;
|
||||
class IRigidContactPoints;
|
||||
class ContactPointInfoBase;
|
||||
class RigidBody;
|
||||
class RigidContactPoints;
|
||||
class RigidContactPointsEx;
|
||||
class ContactPointInfo;
|
||||
class ContactPointInfoEx;
|
||||
|
||||
struct ContactInfoTable {
|
||||
struct Receiver : agl::utl::ParameterObj {
|
||||
@@ -81,12 +81,12 @@ public:
|
||||
|
||||
bool getSensorLayerMask(SensorCollisionMask* mask, const sead::SafeString& receiver_type) const;
|
||||
|
||||
RigidContactPoints* allocContactPoints(sead::Heap* heap, int num, const sead::SafeString& name,
|
||||
int a, int b, int c);
|
||||
RigidContactPointsEx* allocContactPointsEx(sead::Heap* heap, int num, int num2,
|
||||
const sead::SafeString& name, int a, int b, int c);
|
||||
void registerContactPoints(IRigidContactPoints* points);
|
||||
void freeContactPoints(IRigidContactPoints* points);
|
||||
ContactPointInfo* allocContactPoints(sead::Heap* heap, int num, const sead::SafeString& name,
|
||||
int a, int b, int c);
|
||||
ContactPointInfoEx* allocContactPointsEx(sead::Heap* heap, int num, int num2,
|
||||
const sead::SafeString& name, int a, int b, int c);
|
||||
void registerContactPointInfo(ContactPointInfoBase* info);
|
||||
void freeContactPointInfo(ContactPointInfoBase* info);
|
||||
|
||||
// 0x0000007100fb3744
|
||||
void x_17(void* unk, RigidBody* body_a, RigidBody* body_b);
|
||||
@@ -106,7 +106,7 @@ private:
|
||||
sead::OffsetList<void*> mList0;
|
||||
int mList0Size = 0;
|
||||
sead::Atomic<int> _34 = 0;
|
||||
sead::OffsetList<IRigidContactPoints> mRigidContactPoints;
|
||||
sead::OffsetList<ContactPointInfoBase> mRigidContactPoints;
|
||||
sead::OffsetList<void*> mList2;
|
||||
sead::OffsetList<void*> mList3;
|
||||
sead::OffsetList<void*> mList4;
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
#include "KingSystem/Physics/System/physContactPointInfo.h"
|
||||
#include "KingSystem/Physics/System/physSystem.h"
|
||||
|
||||
namespace ksys::phys {
|
||||
|
||||
ContactPointInfo* ContactPointInfo::make(sead::Heap* heap, int num, const sead::SafeString& name,
|
||||
int a, int b, int c) {
|
||||
return System::instance()->allocContactPointInfo(heap, num, name, a, b, c);
|
||||
}
|
||||
|
||||
void ContactPointInfo::free(ContactPointInfo* instance) {
|
||||
System::instance()->freeContactPointInfo(instance);
|
||||
}
|
||||
|
||||
ContactPointInfo::ContactPointInfo(const sead::SafeString& name, int a, int b, int c)
|
||||
: ContactPointInfoBase(name, a, b, c) {}
|
||||
|
||||
ContactPointInfo::~ContactPointInfo() = default;
|
||||
|
||||
void ContactPointInfo::allocPoints(sead::Heap* heap, int num) {
|
||||
mPoints.allocBufferAssert(num, heap);
|
||||
}
|
||||
|
||||
void ContactPointInfo::freePoints() {
|
||||
mPoints.freeBuffer();
|
||||
}
|
||||
|
||||
} // namespace ksys::phys
|
||||
+13
-11
@@ -13,18 +13,20 @@
|
||||
|
||||
namespace ksys::phys {
|
||||
|
||||
class IRigidContactPoints : public sead::INamable {
|
||||
class ContactPointInfoBase : public sead::INamable {
|
||||
public:
|
||||
// FIXME: parameter names
|
||||
IRigidContactPoints(const sead::SafeString& name, int a, int b, int c)
|
||||
ContactPointInfoBase(const sead::SafeString& name, int a, int b, int c)
|
||||
: sead::INamable(name), _2c(a), _30(b), _34(c) {}
|
||||
virtual ~IRigidContactPoints() = default;
|
||||
virtual ~ContactPointInfoBase() = default;
|
||||
virtual void freePoints() = 0;
|
||||
|
||||
void set30(u32 value) { _30 = value; }
|
||||
|
||||
bool isLinked() const { return mListNode.isLinked(); }
|
||||
static constexpr size_t getListNodeOffset() { return offsetof(IRigidContactPoints, mListNode); }
|
||||
static constexpr size_t getListNodeOffset() {
|
||||
return offsetof(ContactPointInfoBase, mListNode);
|
||||
}
|
||||
|
||||
protected:
|
||||
sead::Atomic<int> _18;
|
||||
@@ -36,14 +38,14 @@ protected:
|
||||
sead::ListNode mListNode{};
|
||||
};
|
||||
|
||||
class RigidContactPoints : public IRigidContactPoints {
|
||||
class ContactPointInfo : public ContactPointInfoBase {
|
||||
public:
|
||||
static RigidContactPoints* make(sead::Heap* heap, int num, const sead::SafeString& name, int a,
|
||||
int b, int c);
|
||||
static void free(RigidContactPoints* instance);
|
||||
static ContactPointInfo* make(sead::Heap* heap, int num, const sead::SafeString& name, int a,
|
||||
int b, int c);
|
||||
static void free(ContactPointInfo* instance);
|
||||
|
||||
RigidContactPoints(const sead::SafeString& name, int a, int b, int c);
|
||||
~RigidContactPoints() override;
|
||||
ContactPointInfo(const sead::SafeString& name, int a, int b, int c);
|
||||
~ContactPointInfo() override;
|
||||
void freePoints() override;
|
||||
virtual void allocPoints(sead::Heap* heap, int num);
|
||||
|
||||
@@ -51,6 +53,6 @@ private:
|
||||
sead::Buffer<void*> mPoints{};
|
||||
void* _58{};
|
||||
};
|
||||
KSYS_CHECK_SIZE_NX150(RigidContactPoints, 0x60);
|
||||
KSYS_CHECK_SIZE_NX150(ContactPointInfo, 0x60);
|
||||
|
||||
} // namespace ksys::phys
|
||||
+17
-20
@@ -1,21 +1,19 @@
|
||||
#include "KingSystem/Physics/System/physRigidContactPointsEx.h"
|
||||
#include "KingSystem/Physics/System/physContactPointInfoEx.h"
|
||||
#include "KingSystem/Physics/System/physContactMgr.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) {
|
||||
ContactPointInfoEx* ContactPointInfoEx::make(sead::Heap* heap, int num, int num2,
|
||||
const sead::SafeString& name, int a, int b, int c) {
|
||||
return System::instance()->allocContactPointsEx(heap, num, num2, name, a, b, c);
|
||||
}
|
||||
|
||||
void RigidContactPointsEx::free(RigidContactPointsEx* instance) {
|
||||
System::instance()->freeContactPointsEx(instance);
|
||||
void ContactPointInfoEx::free(ContactPointInfoEx* instance) {
|
||||
System::instance()->freeContactPointInfoEx(instance);
|
||||
}
|
||||
|
||||
bool RigidContactPointsEx::registerLayerPair(ContactLayer layer1, ContactLayer layer2,
|
||||
bool enabled) {
|
||||
bool ContactPointInfoEx::registerLayerPair(ContactLayer layer1, ContactLayer layer2, bool enabled) {
|
||||
if (mLayerType == ContactLayerType::Invalid)
|
||||
mLayerType = getContactLayerType(layer1);
|
||||
|
||||
@@ -34,7 +32,7 @@ bool RigidContactPointsEx::registerLayerPair(ContactLayer layer1, ContactLayer l
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RigidContactPointsEx::isPairUnknown(ContactLayer layer1, ContactLayer layer2) const {
|
||||
bool ContactPointInfoEx::isPairUnknown(ContactLayer layer1, ContactLayer layer2) const {
|
||||
for (int i = 0; i < mLayerEntries.size(); ++i) {
|
||||
const auto* entry = mLayerEntries[i];
|
||||
if (int(layer1) == entry->layer1 && int(layer2) == entry->layer2)
|
||||
@@ -45,23 +43,23 @@ bool RigidContactPointsEx::isPairUnknown(ContactLayer layer1, ContactLayer layer
|
||||
return true;
|
||||
}
|
||||
|
||||
RigidContactPointsEx::RigidContactPointsEx(const sead::SafeString& name, int a, int b, int c)
|
||||
: IRigidContactPoints(name, a, b, c) {}
|
||||
ContactPointInfoEx::ContactPointInfoEx(const sead::SafeString& name, int a, int b, int c)
|
||||
: ContactPointInfoBase(name, a, b, c) {}
|
||||
|
||||
RigidContactPointsEx::~RigidContactPointsEx() = default;
|
||||
ContactPointInfoEx::~ContactPointInfoEx() = default;
|
||||
|
||||
void RigidContactPointsEx::allocPoints(sead::Heap* heap, int num, int num2) {
|
||||
void ContactPointInfoEx::allocPoints(sead::Heap* heap, int num, int num2) {
|
||||
mPoints.allocBufferAssert(num, heap);
|
||||
mLayerEntries.allocBuffer(num2, heap);
|
||||
}
|
||||
|
||||
void RigidContactPointsEx::freePoints() {
|
||||
void ContactPointInfoEx::freePoints() {
|
||||
mPoints.freeBuffer();
|
||||
mLayerEntries.freeBuffer();
|
||||
}
|
||||
|
||||
void RigidContactPointsEx::Iterator::getData(sead::Vector3f* out,
|
||||
RigidContactPointsEx::Iterator::Mode mode) const {
|
||||
void ContactPointInfoEx::Iterator::getData(sead::Vector3f* out,
|
||||
ContactPointInfoEx::Iterator::Mode mode) const {
|
||||
const float scale = getPoint()->scale;
|
||||
out->e = getPoint()->_10.e;
|
||||
|
||||
@@ -89,13 +87,13 @@ void RigidContactPointsEx::Iterator::getData(sead::Vector3f* out,
|
||||
}
|
||||
|
||||
sead::Vector3f
|
||||
RigidContactPointsEx::Iterator::getData(RigidContactPointsEx::Iterator::Mode mode) const {
|
||||
ContactPointInfoEx::Iterator::getData(ContactPointInfoEx::Iterator::Mode mode) const {
|
||||
sead::Vector3f out;
|
||||
getData(&out, mode);
|
||||
return out;
|
||||
}
|
||||
|
||||
RigidContactPointsEx::Iterator::Iterator(const RigidContactPointsEx::Points& points, int count)
|
||||
ContactPointInfoEx::Iterator::Iterator(const ContactPointInfoEx::Points& points, int count)
|
||||
: mPoints(points.getBufferPtr()), mPointsNum(count), mPointsStart(points.getBufferPtr()) {
|
||||
for (int i = 0; i != count; ++i) {
|
||||
if (!mPoints[i]->flags.isOn(ContactPoint::Flag::_1))
|
||||
@@ -104,8 +102,7 @@ RigidContactPointsEx::Iterator::Iterator(const RigidContactPointsEx::Points& poi
|
||||
}
|
||||
}
|
||||
|
||||
RigidContactPointsEx::IteratorEnd::IteratorEnd(const RigidContactPointsEx::Points& points,
|
||||
int count)
|
||||
ContactPointInfoEx::IteratorEnd::IteratorEnd(const ContactPointInfoEx::Points& points, int count)
|
||||
: mIdx(count), mPoints(points.getBufferPtr()), mPointsNum(count),
|
||||
mPointsStart(points.getBufferPtr()) {}
|
||||
|
||||
+8
-9
@@ -4,7 +4,7 @@
|
||||
#include <math/seadVector.h>
|
||||
#include <prim/seadDelegate.h>
|
||||
#include <prim/seadTypedBitFlag.h>
|
||||
#include "KingSystem/Physics/System/physRigidContactPoints.h"
|
||||
#include "KingSystem/Physics/System/physContactPointInfo.h"
|
||||
#include "KingSystem/Physics/physDefines.h"
|
||||
#include "KingSystem/Utils/Types.h"
|
||||
|
||||
@@ -12,8 +12,7 @@ namespace ksys::phys {
|
||||
|
||||
struct ContactPoint;
|
||||
|
||||
// FIXME: rename. This should be below SensorGroupFilter and StaticCompound stuff
|
||||
class RigidContactPointsEx : public IRigidContactPoints {
|
||||
class ContactPointInfoEx : public ContactPointInfoBase {
|
||||
public:
|
||||
using Points = sead::Buffer<ContactPoint*>;
|
||||
|
||||
@@ -84,12 +83,12 @@ public:
|
||||
// FIXME: figure out the types
|
||||
using Callback = sead::IDelegate1<void*>;
|
||||
|
||||
static RigidContactPointsEx* make(sead::Heap* heap, int num, int num2,
|
||||
const sead::SafeString& name, int a, int b, int c);
|
||||
static void free(RigidContactPointsEx* instance);
|
||||
static ContactPointInfoEx* make(sead::Heap* heap, int num, int num2,
|
||||
const sead::SafeString& name, int a, int b, int c);
|
||||
static void free(ContactPointInfoEx* instance);
|
||||
|
||||
RigidContactPointsEx(const sead::SafeString& name, int a, int b, int c);
|
||||
~RigidContactPointsEx() override;
|
||||
ContactPointInfoEx(const sead::SafeString& name, int a, int b, int c);
|
||||
~ContactPointInfoEx() override;
|
||||
void freePoints() override;
|
||||
virtual void allocPoints(sead::Heap* heap, int num, int num2);
|
||||
|
||||
@@ -113,6 +112,6 @@ private:
|
||||
ContactLayerType mLayerType = ContactLayerType::Invalid;
|
||||
Callback* mCallback = nullptr;
|
||||
};
|
||||
KSYS_CHECK_SIZE_NX150(RigidContactPointsEx, 0x88);
|
||||
KSYS_CHECK_SIZE_NX150(ContactPointInfoEx, 0x88);
|
||||
|
||||
} // namespace ksys::phys
|
||||
@@ -1,28 +0,0 @@
|
||||
#include "KingSystem/Physics/System/physRigidContactPoints.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 System::instance()->allocContactPoints(heap, num, name, a, b, c);
|
||||
}
|
||||
|
||||
void RigidContactPoints::free(RigidContactPoints* instance) {
|
||||
System::instance()->freeContactPoints(instance);
|
||||
}
|
||||
|
||||
RigidContactPoints::RigidContactPoints(const sead::SafeString& name, int a, int b, int c)
|
||||
: IRigidContactPoints(name, a, b, c) {}
|
||||
|
||||
RigidContactPoints::~RigidContactPoints() = default;
|
||||
|
||||
void RigidContactPoints::allocPoints(sead::Heap* heap, int num) {
|
||||
mPoints.allocBufferAssert(num, heap);
|
||||
}
|
||||
|
||||
void RigidContactPoints::freePoints() {
|
||||
mPoints.freeBuffer();
|
||||
}
|
||||
|
||||
} // namespace ksys::phys
|
||||
@@ -7,9 +7,9 @@
|
||||
#include "KingSystem/Physics/StaticCompound/physStaticCompound.h"
|
||||
#include "KingSystem/Physics/SupportBone/physSupportBoneResource.h"
|
||||
#include "KingSystem/Physics/System/physContactMgr.h"
|
||||
#include "KingSystem/Physics/System/physContactPointInfo.h"
|
||||
#include "KingSystem/Physics/System/physEntityGroupFilter.h"
|
||||
#include "KingSystem/Physics/System/physMaterialTable.h"
|
||||
#include "KingSystem/Physics/System/physRigidContactPoints.h"
|
||||
#include "KingSystem/Physics/System/physSensorGroupFilter.h"
|
||||
#include "KingSystem/Physics/System/physSystemData.h"
|
||||
#include "KingSystem/Resource/resEntryFactory.h"
|
||||
@@ -47,24 +47,24 @@ void System::initSystemData(sead::Heap* heap) {
|
||||
mContactMgr);
|
||||
}
|
||||
|
||||
RigidContactPoints* System::allocContactPoints(sead::Heap* heap, int num,
|
||||
const sead::SafeString& name, int a, int b,
|
||||
int c) const {
|
||||
ContactPointInfo* System::allocContactPointInfo(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 System::freeContactPoints(RigidContactPoints* points) const {
|
||||
mContactMgr->freeContactPoints(points);
|
||||
void System::freeContactPointInfo(ContactPointInfo* info) const {
|
||||
mContactMgr->freeContactPointInfo(info);
|
||||
}
|
||||
|
||||
RigidContactPointsEx* System::allocContactPointsEx(sead::Heap* heap, int num, int num2,
|
||||
const sead::SafeString& name, int a, int b,
|
||||
int c) const {
|
||||
ContactPointInfoEx* 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 System::registerContactPoints(RigidContactPoints* points) const {
|
||||
mContactMgr->registerContactPoints(points);
|
||||
void System::registerContactPointInfo(ContactPointInfo* info) const {
|
||||
mContactMgr->registerContactPointInfo(info);
|
||||
}
|
||||
|
||||
} // namespace ksys::phys
|
||||
|
||||
@@ -14,8 +14,8 @@ class GroupFilter;
|
||||
class MaterialTable;
|
||||
class RigidBody;
|
||||
class RigidBodyRequestMgr;
|
||||
class RigidContactPoints;
|
||||
class RigidContactPointsEx;
|
||||
class ContactPointInfo;
|
||||
class ContactPointInfoEx;
|
||||
class SystemData;
|
||||
class SystemGroupHandler;
|
||||
|
||||
@@ -42,15 +42,17 @@ public:
|
||||
|
||||
void initSystemData(sead::Heap* heap);
|
||||
|
||||
RigidContactPoints* allocContactPoints(sead::Heap* heap, int num, const sead::SafeString& name,
|
||||
int a, int b, int c) const;
|
||||
void freeContactPoints(RigidContactPoints* points) const;
|
||||
RigidContactPointsEx* allocContactPointsEx(sead::Heap* heap, int num, int num2,
|
||||
const sead::SafeString& name, int a, int b,
|
||||
int c) const;
|
||||
void freeContactPointsEx(RigidContactPointsEx* points) const;
|
||||
void registerContactPoints(RigidContactPoints* points) const;
|
||||
void registerContactPointLayerPair(RigidContactPointsEx* points, ContactLayer layer1,
|
||||
ContactPointInfo* allocContactPointInfo(sead::Heap* heap, int num, const sead::SafeString& name,
|
||||
int a, int b, int c) const;
|
||||
void freeContactPointInfo(ContactPointInfo* info) const;
|
||||
|
||||
ContactPointInfoEx* allocContactPointsEx(sead::Heap* heap, int num, int num2,
|
||||
const sead::SafeString& name, int a, int b,
|
||||
int c) const;
|
||||
void freeContactPointInfoEx(ContactPointInfoEx* info) const;
|
||||
|
||||
void registerContactPointInfo(ContactPointInfo* info) const;
|
||||
void registerContactPointLayerPair(ContactPointInfoEx* info, ContactLayer layer1,
|
||||
ContactLayer layer2, bool enabled);
|
||||
|
||||
// 0x0000007101216a20
|
||||
|
||||
Reference in New Issue
Block a user