blob: 0faa34260344a757ce7c75df5c66f8132c357a41 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
#pragma once
#include <container/seadSafeArray.h>
#include <hostio/seadHostIONode.h>
#include <math/seadVector.h>
#include <prim/seadSafeString.h>
#include <utility/aglParameter.h>
#include <utility/aglParameterIO.h>
#include <utility/aglParameterObj.h>
namespace ksys::phys {
class RagdollConfig : public agl::utl::IParameterIO, public sead::hostio::Node {
public:
class PartImpulseInfo : public agl::utl::ParameterList, public sead::hostio::Node {
public:
class ReceiveObj : public agl::utl::ParameterObj {
public:
ReceiveObj();
const auto& getTypeName() const { return *mTypeName; }
const auto& getDivideFlag() const { return *mDivideFlag; }
const auto& getImpulseRate() const { return *mImpulseRate; }
const auto& getDivideRate() const { return *mDivideRate; }
bool is100() const { return _100; }
private:
agl::utl::Parameter<sead::FixedSafeString<64>> mTypeName;
agl::utl::Parameter<bool> mDivideFlag;
agl::utl::Parameter<float> mImpulseRate;
agl::utl::Parameter<float> mDivideRate;
bool _100 = true;
};
class ImpulseObj : public agl::utl::ParameterObj {
public:
ImpulseObj();
const auto& getTypeName() const { return *mTypeName; }
const auto& getUseFlag() const { return *mUseFlag; }
const auto& getAttackVector() const { return *mAttackVector; }
const auto& getAttackPoint() const { return *mAttackPoint; }
const auto& getImpulsePower() const { return *mImpulsePower; }
bool is130() const { return _130; }
private:
agl::utl::Parameter<sead::FixedSafeString<64>> mTypeName;
agl::utl::Parameter<bool> mUseFlag;
agl::utl::Parameter<sead::Vector3f> mAttackVector;
agl::utl::Parameter<sead::Vector3f> mAttackPoint;
agl::utl::Parameter<float> mImpulsePower;
bool _130 = false;
};
PartImpulseInfo();
const auto& getReceiveObjs() const { return mReceiveObjs; }
const auto& getImpulseObjs() const { return mImpulseObjs; }
const bool& isUseReceiveImpulse() const { return *mIsUseReceiveImpulse; }
const bool& isUseFixedImpulse() const { return *mIsUseFixedImpulse; }
private:
sead::SafeArray<ReceiveObj, 3> mReceiveObjs;
sead::SafeArray<ImpulseObj, 5> mImpulseObjs;
agl::utl::IParameterObj mObj;
agl::utl::Parameter<bool> mIsUseReceiveImpulse;
agl::utl::Parameter<bool> mIsUseFixedImpulse;
};
class ImpactImpulseInfo : public agl::utl::ParameterList, public sead::hostio::Node {
public:
ImpactImpulseInfo();
const auto& getPartImpulseInfo() const { return mPartImpulseInfo; }
bool isUsed(int idx) const { return *mUseFlags[idx]; }
private:
static constexpr int NumParts = 3;
sead::SafeArray<PartImpulseInfo, NumParts> mPartImpulseInfo;
agl::utl::IParameterObj mObj;
sead::SafeArray<agl::utl::Parameter<bool>, NumParts> mUseFlags;
};
RagdollConfig();
~RagdollConfig() override;
const auto& getImpactImpulseInfo() const { return mImpactImpulseInfo; }
const float& getImpulseUseRate() const { return *mImpulseUseRate; }
const float& getImpulsePower() const { return *mImpulsePower; }
const float& getLargeAttackRate() const { return *mLargeAttackRate; }
const float& getBlastOffAttackRateSmall() const { return *mBlastOffAttackRateSmall; }
const float& getBlastOffAttackRateLarge() const { return *mBlastOffAttackRateLarge; }
const float& getSpecialAttackRate() const { return *mSpecialAttackRate; }
const PartImpulseInfo& getImpulseInfo(u32 impact_idx, int part_idx) const;
float getImpulsePower(int attack_rate_type, bool is_blast_off) const;
private:
sead::SafeArray<ImpactImpulseInfo, 2> mImpactImpulseInfo;
agl::utl::IParameterObj mObj;
agl::utl::Parameter<float> mImpulseUseRate;
agl::utl::Parameter<float> mImpulsePower;
agl::utl::Parameter<float> mLargeAttackRate;
agl::utl::Parameter<float> mBlastOffAttackRateSmall;
agl::utl::Parameter<float> mBlastOffAttackRateLarge;
agl::utl::Parameter<float> mSpecialAttackRate;
};
} // namespace ksys::phys
|