mirror of
https://git.chinosk6.cn/chinosk/gkms-local.git
synced 2026-02-05 01:14:05 +00:00
Pre releases 0.0.1 (#20)
* update submodule, breast limit multiplier * add type, add limit axis config * update layout * update submodule * update workflow
This commit is contained in:
@@ -740,6 +740,9 @@ namespace GakumasLocal::HookMain {
|
||||
static auto limitInfo_field = ActorSwingBreastBone_klass->Get<UnityResolve::Field>("limitInfo");
|
||||
|
||||
static auto limitInfo_useLimit_field = LimitInfo_klass->Get<UnityResolve::Field>("useLimit");
|
||||
static auto limitInfo_axisX_field = LimitInfo_klass->Get<UnityResolve::Field>("axisX");
|
||||
static auto limitInfo_axisY_field = LimitInfo_klass->Get<UnityResolve::Field>("axisY");
|
||||
static auto limitInfo_axisZ_field = LimitInfo_klass->Get<UnityResolve::Field>("axisZ");
|
||||
|
||||
auto swingBreastBones = Il2cppUtils::ClassGetFieldValue
|
||||
<UnityResolve::UnityType::List<UnityResolve::UnityType::MonoBehaviour*>*>(initializeData, Data_swingBreastBones_field);
|
||||
@@ -778,8 +781,26 @@ namespace GakumasLocal::HookMain {
|
||||
Log::DebugFmt("orig bone: damping: %f, stiffness: %f, spring: %f, pendulum: %f, "
|
||||
"pendulumRange: %f, average: %f, rootWeight: %f, useLimit: %d, useArmCorrection: %d, isDirty: %d",
|
||||
damping, stiffness, spring, pendulum, pendulumRange, average, rootWeight, useLimit, useArmCorrection, isDirty);
|
||||
if (!Config::bUseLimit) {
|
||||
Il2cppUtils::ClassSetFieldValue(limitInfo, limitInfo_useLimit_field, 0);
|
||||
}
|
||||
else {
|
||||
Il2cppUtils::ClassSetFieldValue(limitInfo, limitInfo_useLimit_field, 1);
|
||||
auto axisX = Il2cppUtils::ClassGetFieldValue<UnityResolve::UnityType::Vector2Int>(limitInfo, limitInfo_axisX_field);
|
||||
auto axisY = Il2cppUtils::ClassGetFieldValue<UnityResolve::UnityType::Vector2Int>(limitInfo, limitInfo_axisY_field);
|
||||
auto axisZ = Il2cppUtils::ClassGetFieldValue<UnityResolve::UnityType::Vector2Int>(limitInfo, limitInfo_axisZ_field);
|
||||
axisX.m_X *= Config::bLimitXx;
|
||||
axisX.m_Y *= Config::bLimitXy;
|
||||
axisY.m_X *= Config::bLimitYx;
|
||||
axisY.m_Y *= Config::bLimitYy;
|
||||
axisZ.m_X *= Config::bLimitZx;
|
||||
axisZ.m_Y *= Config::bLimitZy;
|
||||
Il2cppUtils::ClassSetFieldValue(limitInfo, limitInfo_axisX_field, axisX);
|
||||
Il2cppUtils::ClassSetFieldValue(limitInfo, limitInfo_axisY_field, axisY);
|
||||
Il2cppUtils::ClassSetFieldValue(limitInfo, limitInfo_axisZ_field, axisZ);
|
||||
|
||||
}
|
||||
|
||||
Il2cppUtils::ClassSetFieldValue(limitInfo, limitInfo_useLimit_field, Config::bUseLimit);
|
||||
Il2cppUtils::ClassSetFieldValue(bone, damping_field, Config::bDamping);
|
||||
Il2cppUtils::ClassSetFieldValue(bone, stiffness_field, Config::bStiffness);
|
||||
Il2cppUtils::ClassSetFieldValue(bone, spring_field, Config::bSpring);
|
||||
|
||||
@@ -29,7 +29,6 @@ namespace GakumasLocal::Config {
|
||||
int lodQualityLevel = 4;
|
||||
|
||||
bool enableBreastParam = false;
|
||||
int bUseLimit = 1;
|
||||
float bDamping = 0.33f;
|
||||
float bStiffness = 0.08f;
|
||||
float bSpring = 1.0f;
|
||||
@@ -40,6 +39,13 @@ namespace GakumasLocal::Config {
|
||||
bool bUseArmCorrection = true;
|
||||
bool bUseScale = false;
|
||||
float bScale = 1.0f;
|
||||
bool bUseLimit = true;
|
||||
float bLimitXx = 1.0f;
|
||||
float bLimitXy = 1.0f;
|
||||
float bLimitYx = 1.0f;
|
||||
float bLimitYy = 1.0f;
|
||||
float bLimitZx = 1.0f;
|
||||
float bLimitZy = 1.0f;
|
||||
|
||||
void LoadConfig(const std::string& configStr) {
|
||||
try {
|
||||
@@ -68,7 +74,6 @@ namespace GakumasLocal::Config {
|
||||
GetConfigItem(reflectionQualityLevel);
|
||||
GetConfigItem(lodQualityLevel);
|
||||
GetConfigItem(enableBreastParam);
|
||||
GetConfigItem(bUseLimit);
|
||||
GetConfigItem(bDamping);
|
||||
GetConfigItem(bStiffness);
|
||||
GetConfigItem(bSpring);
|
||||
@@ -79,6 +84,13 @@ namespace GakumasLocal::Config {
|
||||
GetConfigItem(bUseArmCorrection);
|
||||
GetConfigItem(bUseScale);
|
||||
GetConfigItem(bScale);
|
||||
GetConfigItem(bUseLimit);
|
||||
GetConfigItem(bLimitXx);
|
||||
GetConfigItem(bLimitXy);
|
||||
GetConfigItem(bLimitYx);
|
||||
GetConfigItem(bLimitYy);
|
||||
GetConfigItem(bLimitZx);
|
||||
GetConfigItem(bLimitZy);
|
||||
|
||||
}
|
||||
catch (std::exception& e) {
|
||||
|
||||
@@ -28,7 +28,6 @@ namespace GakumasLocal::Config {
|
||||
extern int lodQualityLevel;
|
||||
|
||||
extern bool enableBreastParam;
|
||||
extern int bUseLimit;
|
||||
extern float bDamping;
|
||||
extern float bStiffness;
|
||||
extern float bSpring;
|
||||
@@ -39,6 +38,13 @@ namespace GakumasLocal::Config {
|
||||
extern bool bUseArmCorrection;
|
||||
extern bool bUseScale;
|
||||
extern float bScale;
|
||||
extern bool bUseLimit;
|
||||
extern float bLimitXx;
|
||||
extern float bLimitXy;
|
||||
extern float bLimitYx;
|
||||
extern float bLimitYy;
|
||||
extern float bLimitZx;
|
||||
extern float bLimitZy;
|
||||
|
||||
void LoadConfig(const std::string& configStr);
|
||||
}
|
||||
|
||||
@@ -983,7 +983,75 @@ public:
|
||||
auto operator ==(const Vector2 x) const -> bool { return this->x == x.x && this->y == x.y; }
|
||||
};
|
||||
|
||||
struct Vector4 {
|
||||
struct Vector2Int {
|
||||
int m_X, m_Y;
|
||||
|
||||
Vector2Int() { m_X = m_Y = 0; }
|
||||
|
||||
Vector2Int(const int f1, const int f2) {
|
||||
m_X = f1;
|
||||
m_Y = f2;
|
||||
}
|
||||
|
||||
[[nodiscard]] auto Distance(const Vector2Int& event) const -> float {
|
||||
const auto dx = this->m_X - event.m_X;
|
||||
const auto dy = this->m_Y - event.m_Y;
|
||||
return std::sqrt(dx * dx + dy * dy);
|
||||
}
|
||||
|
||||
auto operator*(const int x) -> Vector2Int {
|
||||
this->m_X *= x;
|
||||
this->m_Y *= x;
|
||||
return *this;
|
||||
}
|
||||
|
||||
auto operator/(const int x) -> Vector2Int {
|
||||
this->m_X /= x;
|
||||
this->m_Y /= x;
|
||||
return *this;
|
||||
}
|
||||
|
||||
auto operator+(const int x) -> Vector2Int {
|
||||
this->m_X += x;
|
||||
this->m_Y += x;
|
||||
return *this;
|
||||
}
|
||||
|
||||
auto operator-(const int x) -> Vector2Int {
|
||||
this->m_X -= x;
|
||||
this->m_Y -= x;
|
||||
return *this;
|
||||
}
|
||||
|
||||
auto operator*(const Vector2Int x) -> Vector2Int {
|
||||
this->m_X *= x.m_X;
|
||||
this->m_Y *= x.m_Y;
|
||||
return *this;
|
||||
}
|
||||
|
||||
auto operator-(const Vector2Int x) -> Vector2Int {
|
||||
this->m_X -= x.m_X;
|
||||
this->m_Y -= x.m_Y;
|
||||
return *this;
|
||||
}
|
||||
|
||||
auto operator+(const Vector2Int x) -> Vector2Int {
|
||||
this->m_X += x.m_X;
|
||||
this->m_Y += x.m_Y;
|
||||
return *this;
|
||||
}
|
||||
|
||||
auto operator/(const Vector2Int x) -> Vector2Int {
|
||||
this->m_X /= x.m_X;
|
||||
this->m_Y /= x.m_Y;
|
||||
return *this;
|
||||
}
|
||||
|
||||
auto operator ==(const Vector2Int x) const -> bool { return this->m_X == x.m_X && this->m_Y == x.m_Y; }
|
||||
};
|
||||
|
||||
|
||||
struct Vector4 {
|
||||
float x, y, z, w;
|
||||
|
||||
Vector4() { x = y = z = w = 0.F; }
|
||||
|
||||
Reference in New Issue
Block a user