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:
parent
f5a88a9127
commit
1855ae79cc
14
.github/workflows/build.yml
vendored
14
.github/workflows/build.yml
vendored
@ -11,6 +11,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: set up android development environment
|
- name: set up android development environment
|
||||||
uses: android-actions/setup-android@v2
|
uses: android-actions/setup-android@v2
|
||||||
|
|
||||||
@ -18,6 +19,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sdkmanager --install "cmake;3.22.1"
|
sdkmanager --install "cmake;3.22.1"
|
||||||
echo "cmake.dir=/usr/local/lib/android/sdk/cmake/3.22.1" > local.properties
|
echo "cmake.dir=/usr/local/lib/android/sdk/cmake/3.22.1" > local.properties
|
||||||
|
npm install -g pnpm
|
||||||
|
|
||||||
- name: Setup Java JDK
|
- name: Setup Java JDK
|
||||||
uses: actions/setup-java@v4.2.1
|
uses: actions/setup-java@v4.2.1
|
||||||
@ -25,6 +27,18 @@ jobs:
|
|||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: '21'
|
java-version: '21'
|
||||||
|
|
||||||
|
- name: Update Assets
|
||||||
|
run: |
|
||||||
|
git submodule foreach --recursive git pull origin main
|
||||||
|
git clone https://${{ secrets.ACCESS_TOKEN_GITHUB }}@github.com/imas-tools/gakumas-raw-txts.git app/src/main/assets/gakumas-local/gakumas-raw-txts
|
||||||
|
mv app/src/main/assets/gakumas-local/gakumas-raw-txts/Resource app/src/main/assets/gakumas-local/raw
|
||||||
|
rm -rf app/src/main/assets/gakumas-local/gakumas-raw-txts
|
||||||
|
|
||||||
|
- name: Build Assets
|
||||||
|
run: |
|
||||||
|
mv app/src/main/assets/gakumas-local/GakumasPreTranslation/.env.sample app/src/main/assets/gakumas-local/GakumasPreTranslation/.env
|
||||||
|
cd app/src/main/assets/gakumas-local && make build-resource
|
||||||
|
|
||||||
- name: Write branch and commit info
|
- name: Write branch and commit info
|
||||||
run: |
|
run: |
|
||||||
branch=$(git rev-parse --abbrev-ref HEAD)
|
branch=$(git rev-parse --abbrev-ref HEAD)
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit e97c861d73668fdaa00c4aded70b18ead28fee02
|
Subproject commit 56c568e32a84ee1351f2efcc70971b7f23d85186
|
@ -740,6 +740,9 @@ namespace GakumasLocal::HookMain {
|
|||||||
static auto limitInfo_field = ActorSwingBreastBone_klass->Get<UnityResolve::Field>("limitInfo");
|
static auto limitInfo_field = ActorSwingBreastBone_klass->Get<UnityResolve::Field>("limitInfo");
|
||||||
|
|
||||||
static auto limitInfo_useLimit_field = LimitInfo_klass->Get<UnityResolve::Field>("useLimit");
|
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
|
auto swingBreastBones = Il2cppUtils::ClassGetFieldValue
|
||||||
<UnityResolve::UnityType::List<UnityResolve::UnityType::MonoBehaviour*>*>(initializeData, Data_swingBreastBones_field);
|
<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, "
|
Log::DebugFmt("orig bone: damping: %f, stiffness: %f, spring: %f, pendulum: %f, "
|
||||||
"pendulumRange: %f, average: %f, rootWeight: %f, useLimit: %d, useArmCorrection: %d, isDirty: %d",
|
"pendulumRange: %f, average: %f, rootWeight: %f, useLimit: %d, useArmCorrection: %d, isDirty: %d",
|
||||||
damping, stiffness, spring, pendulum, pendulumRange, average, rootWeight, useLimit, useArmCorrection, isDirty);
|
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, damping_field, Config::bDamping);
|
||||||
Il2cppUtils::ClassSetFieldValue(bone, stiffness_field, Config::bStiffness);
|
Il2cppUtils::ClassSetFieldValue(bone, stiffness_field, Config::bStiffness);
|
||||||
Il2cppUtils::ClassSetFieldValue(bone, spring_field, Config::bSpring);
|
Il2cppUtils::ClassSetFieldValue(bone, spring_field, Config::bSpring);
|
||||||
|
@ -29,7 +29,6 @@ namespace GakumasLocal::Config {
|
|||||||
int lodQualityLevel = 4;
|
int lodQualityLevel = 4;
|
||||||
|
|
||||||
bool enableBreastParam = false;
|
bool enableBreastParam = false;
|
||||||
int bUseLimit = 1;
|
|
||||||
float bDamping = 0.33f;
|
float bDamping = 0.33f;
|
||||||
float bStiffness = 0.08f;
|
float bStiffness = 0.08f;
|
||||||
float bSpring = 1.0f;
|
float bSpring = 1.0f;
|
||||||
@ -40,6 +39,13 @@ namespace GakumasLocal::Config {
|
|||||||
bool bUseArmCorrection = true;
|
bool bUseArmCorrection = true;
|
||||||
bool bUseScale = false;
|
bool bUseScale = false;
|
||||||
float bScale = 1.0f;
|
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) {
|
void LoadConfig(const std::string& configStr) {
|
||||||
try {
|
try {
|
||||||
@ -68,7 +74,6 @@ namespace GakumasLocal::Config {
|
|||||||
GetConfigItem(reflectionQualityLevel);
|
GetConfigItem(reflectionQualityLevel);
|
||||||
GetConfigItem(lodQualityLevel);
|
GetConfigItem(lodQualityLevel);
|
||||||
GetConfigItem(enableBreastParam);
|
GetConfigItem(enableBreastParam);
|
||||||
GetConfigItem(bUseLimit);
|
|
||||||
GetConfigItem(bDamping);
|
GetConfigItem(bDamping);
|
||||||
GetConfigItem(bStiffness);
|
GetConfigItem(bStiffness);
|
||||||
GetConfigItem(bSpring);
|
GetConfigItem(bSpring);
|
||||||
@ -79,6 +84,13 @@ namespace GakumasLocal::Config {
|
|||||||
GetConfigItem(bUseArmCorrection);
|
GetConfigItem(bUseArmCorrection);
|
||||||
GetConfigItem(bUseScale);
|
GetConfigItem(bUseScale);
|
||||||
GetConfigItem(bScale);
|
GetConfigItem(bScale);
|
||||||
|
GetConfigItem(bUseLimit);
|
||||||
|
GetConfigItem(bLimitXx);
|
||||||
|
GetConfigItem(bLimitXy);
|
||||||
|
GetConfigItem(bLimitYx);
|
||||||
|
GetConfigItem(bLimitYy);
|
||||||
|
GetConfigItem(bLimitZx);
|
||||||
|
GetConfigItem(bLimitZy);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (std::exception& e) {
|
catch (std::exception& e) {
|
||||||
|
@ -28,7 +28,6 @@ namespace GakumasLocal::Config {
|
|||||||
extern int lodQualityLevel;
|
extern int lodQualityLevel;
|
||||||
|
|
||||||
extern bool enableBreastParam;
|
extern bool enableBreastParam;
|
||||||
extern int bUseLimit;
|
|
||||||
extern float bDamping;
|
extern float bDamping;
|
||||||
extern float bStiffness;
|
extern float bStiffness;
|
||||||
extern float bSpring;
|
extern float bSpring;
|
||||||
@ -39,6 +38,13 @@ namespace GakumasLocal::Config {
|
|||||||
extern bool bUseArmCorrection;
|
extern bool bUseArmCorrection;
|
||||||
extern bool bUseScale;
|
extern bool bUseScale;
|
||||||
extern float bScale;
|
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);
|
void LoadConfig(const std::string& configStr);
|
||||||
}
|
}
|
||||||
|
@ -983,6 +983,74 @@ public:
|
|||||||
auto operator ==(const Vector2 x) const -> bool { return this->x == x.x && this->y == x.y; }
|
auto operator ==(const Vector2 x) const -> bool { return this->x == x.x && this->y == x.y; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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 {
|
struct Vector4 {
|
||||||
float x, y, z, w;
|
float x, y, z, w;
|
||||||
|
|
||||||
|
@ -35,7 +35,13 @@ interface ConfigListener {
|
|||||||
fun onBPendulumRangeChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
fun onBPendulumRangeChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||||
fun onBAverageChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
fun onBAverageChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||||
fun onBRootWeightChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
fun onBRootWeightChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||||
fun onBUseLimitChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
fun onBUseLimitChanged(value: Boolean)
|
||||||
|
fun onBLimitXxChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||||
|
fun onBLimitXyChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||||
|
fun onBLimitYxChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||||
|
fun onBLimitYyChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||||
|
fun onBLimitZxChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||||
|
fun onBLimitZyChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||||
fun onBScaleChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
fun onBScaleChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||||
fun onBUseArmCorrectionChanged(value: Boolean)
|
fun onBUseArmCorrectionChanged(value: Boolean)
|
||||||
fun onBUseScaleChanged(value: Boolean)
|
fun onBUseScaleChanged(value: Boolean)
|
||||||
@ -332,17 +338,74 @@ interface ConfigUpdateListener: ConfigListener {
|
|||||||
saveConfig()
|
saveConfig()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBUseLimitChanged(s: CharSequence, start: Int, before: Int, count: Int){
|
override fun onBUseLimitChanged(value: Boolean){
|
||||||
binding.config!!.bUseLimit = try {
|
binding.config!!.bUseLimit = value
|
||||||
s.toString().toInt()
|
saveConfig()
|
||||||
|
checkConfigAndUpdateView()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onBLimitXxChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||||
|
binding.config!!.bLimitXx = try {
|
||||||
|
s.toString().toFloat()
|
||||||
}
|
}
|
||||||
catch (e: Exception) {
|
catch (e: Exception) {
|
||||||
0
|
0f
|
||||||
}
|
}
|
||||||
saveConfig()
|
saveConfig()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBScaleChanged(s: CharSequence, start: Int, before: Int, count: Int){
|
override fun onBLimitXyChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||||
|
binding.config!!.bLimitXy = try {
|
||||||
|
s.toString().toFloat()
|
||||||
|
}
|
||||||
|
catch (e: Exception) {
|
||||||
|
0f
|
||||||
|
}
|
||||||
|
saveConfig()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onBLimitYxChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||||
|
binding.config!!.bLimitYx = try {
|
||||||
|
s.toString().toFloat()
|
||||||
|
}
|
||||||
|
catch (e: Exception) {
|
||||||
|
0f
|
||||||
|
}
|
||||||
|
saveConfig()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onBLimitYyChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||||
|
binding.config!!.bLimitYy = try {
|
||||||
|
s.toString().toFloat()
|
||||||
|
}
|
||||||
|
catch (e: Exception) {
|
||||||
|
0f
|
||||||
|
}
|
||||||
|
saveConfig()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onBLimitZxChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||||
|
binding.config!!.bLimitZx = try {
|
||||||
|
s.toString().toFloat()
|
||||||
|
}
|
||||||
|
catch (e: Exception) {
|
||||||
|
0f
|
||||||
|
}
|
||||||
|
saveConfig()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onBLimitZyChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||||
|
binding.config!!.bLimitZy = try {
|
||||||
|
s.toString().toFloat()
|
||||||
|
}
|
||||||
|
catch (e: Exception) {
|
||||||
|
0f
|
||||||
|
}
|
||||||
|
saveConfig()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
override fun onBScaleChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||||
binding.config!!.bScale = try {
|
binding.config!!.bScale = try {
|
||||||
s.toString().toFloat()
|
s.toString().toFloat()
|
||||||
}
|
}
|
||||||
@ -351,18 +414,26 @@ interface ConfigUpdateListener: ConfigListener {
|
|||||||
}
|
}
|
||||||
saveConfig()
|
saveConfig()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBClickPresetChanged(index: Int) {
|
override fun onBClickPresetChanged(index: Int) {
|
||||||
val setData: FloatArray = when (index) {
|
val setData: FloatArray = when (index) {
|
||||||
// 0.33, 0.08, 0.7, 0.12, 0.25, 0.2, 0.8, 0, noUseArm 啥玩意
|
// 0.33, 0.08, 0.7, 0.12, 0.25, 0.2, 0.8, 0, noUseArm 啥玩意
|
||||||
0 -> floatArrayOf(0.33f, 0.07f, 0.7f, 0.06f, 0.25f, 0.2f, 0.5f, 1f)
|
0 -> floatArrayOf(0.33f, 0.07f, 0.7f, 0.06f, 0.25f, 0.2f, 0.5f,
|
||||||
1 -> floatArrayOf(0.365f, 0.06f, 0.62f, 0.07f, 0.25f, 0.2f, 0.5f, 1f)
|
1f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f)
|
||||||
2 -> floatArrayOf(0.4f, 0.065f, 0.55f, 0.075f, 0.25f, 0.2f, 0.5f, 1f)
|
1 -> floatArrayOf(0.365f, 0.06f, 0.62f, 0.07f, 0.25f, 0.2f, 0.5f,
|
||||||
3 -> floatArrayOf(0.4f, 0.065f, 0.55f, 0.075f, 0.25f, 0.2f, 0.5f, 0f)
|
1f, 1.5f, 1.5f, 1.5f, 1.5f, 1.5f, 1.5f)
|
||||||
4 -> floatArrayOf(0.4f, 0.06f, 0.4f, 0.075f, 0.55f, 0.2f, 0.8f, 0f)
|
2 -> floatArrayOf(0.4f, 0.065f, 0.55f, 0.075f, 0.25f, 0.2f, 0.5f,
|
||||||
|
1f, 2.0f, 2.0f, 2.0f, 2.0f, 2.0f, 2.0f)
|
||||||
|
3 -> floatArrayOf(0.4f, 0.065f, 0.55f, 0.075f, 0.25f, 0.2f, 0.5f,
|
||||||
|
1f, 4.0f, 4.0f, 4.0f, 4.0f, 4.0f, 3.0f)
|
||||||
|
4 -> floatArrayOf(0.4f, 0.06f, 0.4f, 0.075f, 0.55f, 0.2f, 0.8f,
|
||||||
|
1f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 3.5f)
|
||||||
|
|
||||||
5 -> floatArrayOf(0.33f, 0.08f, 0.8f, 0.12f, 0.55f, 0.2f, 1.0f, 0f)
|
5 -> floatArrayOf(0.33f, 0.08f, 0.8f, 0.12f, 0.55f, 0.2f, 1.0f,
|
||||||
|
0f)
|
||||||
|
|
||||||
else -> floatArrayOf(0.33f, 0.08f, 1.0f, 0.055f, 0.15f, 0.2f, 0.5f, 1f)
|
else -> floatArrayOf(0.33f, 0.08f, 1.0f, 0.055f, 0.15f, 0.2f, 0.5f,
|
||||||
|
1f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.config!!.bDamping = setData[0]
|
binding.config!!.bDamping = setData[0]
|
||||||
@ -372,7 +443,19 @@ interface ConfigUpdateListener: ConfigListener {
|
|||||||
binding.config!!.bPendulumRange = setData[4]
|
binding.config!!.bPendulumRange = setData[4]
|
||||||
binding.config!!.bAverage = setData[5]
|
binding.config!!.bAverage = setData[5]
|
||||||
binding.config!!.bRootWeight = setData[6]
|
binding.config!!.bRootWeight = setData[6]
|
||||||
binding.config!!.bUseLimit = setData[7].toInt()
|
binding.config!!.bUseLimit = if (setData[7] == 0f) {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
binding.config!!.bLimitXx = setData[8]
|
||||||
|
binding.config!!.bLimitXy = setData[9]
|
||||||
|
binding.config!!.bLimitYx = setData[10]
|
||||||
|
binding.config!!.bLimitYy = setData[11]
|
||||||
|
binding.config!!.bLimitZx = setData[12]
|
||||||
|
binding.config!!.bLimitZy = setData[13]
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
binding.config!!.bUseArmCorrection = true
|
binding.config!!.bUseArmCorrection = true
|
||||||
|
|
||||||
checkConfigAndUpdateView()
|
checkConfigAndUpdateView()
|
||||||
|
@ -25,7 +25,6 @@ data class GakumasConfig (
|
|||||||
var lodQualityLevel: Int = 4, // 0~5
|
var lodQualityLevel: Int = 4, // 0~5
|
||||||
|
|
||||||
var enableBreastParam: Boolean = false,
|
var enableBreastParam: Boolean = false,
|
||||||
var bUseLimit: Int = 1,
|
|
||||||
var bDamping: Float = 0.33f,
|
var bDamping: Float = 0.33f,
|
||||||
var bStiffness: Float = 0.08f,
|
var bStiffness: Float = 0.08f,
|
||||||
var bSpring: Float = 1.0f,
|
var bSpring: Float = 1.0f,
|
||||||
@ -35,5 +34,12 @@ data class GakumasConfig (
|
|||||||
var bRootWeight: Float = 0.5f,
|
var bRootWeight: Float = 0.5f,
|
||||||
var bUseArmCorrection: Boolean = true,
|
var bUseArmCorrection: Boolean = true,
|
||||||
var bUseScale: Boolean = false,
|
var bUseScale: Boolean = false,
|
||||||
var bScale: Float = 1.0f
|
var bScale: Float = 1.0f,
|
||||||
|
var bUseLimit: Boolean = true,
|
||||||
|
var bLimitXx: Float = 1.0f,
|
||||||
|
var bLimitXy: Float = 1.0f,
|
||||||
|
var bLimitYx: Float = 1.0f,
|
||||||
|
var bLimitYy: Float = 1.0f,
|
||||||
|
var bLimitZx: Float = 1.0f,
|
||||||
|
var bLimitZy: Float = 1.0f,
|
||||||
)
|
)
|
||||||
|
@ -861,7 +861,7 @@
|
|||||||
<TableRow
|
<TableRow
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:weightSum="2">
|
android:weightSum="1">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -883,29 +883,6 @@
|
|||||||
android:text="@={`` + config.bRootWeight}" />
|
android:text="@={`` + config.bRootWeight}" />
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@android:color/transparent"
|
|
||||||
android:hint="@string/uselimit_0_1"
|
|
||||||
app:boxBackgroundColor="@android:color/transparent">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:ems="10"
|
|
||||||
android:inputType="number"
|
|
||||||
android:onTextChanged="@{(s, st, b, a) -> listener.onBUseLimitChanged(s, st, b, a)}"
|
|
||||||
android:paddingStart="0dp"
|
|
||||||
android:paddingEnd="0dp"
|
|
||||||
android:paddingBottom="0dp"
|
|
||||||
android:text="@={`` + config.bUseLimit}" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
|
||||||
</TableLayout>
|
</TableLayout>
|
||||||
@ -975,6 +952,189 @@
|
|||||||
|
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
|
||||||
|
<TableRow
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@drawable/table_row_border"
|
||||||
|
android:visibility="@{config.enableBreastParam ? android.view.View.VISIBLE : android.view.View.GONE}">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingLeft="10sp"
|
||||||
|
android:paddingRight="10sp"
|
||||||
|
android:paddingBottom="10sp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:checked="@={config.bUseLimit}"
|
||||||
|
android:onCheckedChanged="@{(view, value) -> listener.onBUseLimitChanged(value)}"
|
||||||
|
android:text="@string/uselimitmultiplier" />
|
||||||
|
|
||||||
|
<TableRow
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:visibility="@{config.bUseLimit ? android.view.View.VISIBLE : android.view.View.GONE}">
|
||||||
|
|
||||||
|
<TableLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TableRow
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:weightSum="3">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:hint="@string/axisx_x"
|
||||||
|
app:boxBackgroundColor="@android:color/transparent">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:ems="10"
|
||||||
|
android:inputType="numberDecimal|numberSigned"
|
||||||
|
android:onTextChanged="@{(s, st, b, a) -> listener.onBLimitXxChanged(s, st, b, a)}"
|
||||||
|
android:paddingStart="0dp"
|
||||||
|
android:paddingEnd="0dp"
|
||||||
|
android:paddingBottom="0dp"
|
||||||
|
android:text="@={`` + config.bLimitXx}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:hint="@string/axisy_x"
|
||||||
|
app:boxBackgroundColor="@android:color/transparent">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:ems="10"
|
||||||
|
android:inputType="numberDecimal|numberSigned"
|
||||||
|
android:onTextChanged="@{(s, st, b, a) -> listener.onBLimitYxChanged(s, st, b, a)}"
|
||||||
|
android:paddingStart="0dp"
|
||||||
|
android:paddingEnd="0dp"
|
||||||
|
android:paddingBottom="0dp"
|
||||||
|
android:text="@={`` + config.bLimitYx}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:hint="@string/axisz_x"
|
||||||
|
app:boxBackgroundColor="@android:color/transparent">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:ems="10"
|
||||||
|
android:inputType="numberDecimal|numberSigned"
|
||||||
|
android:onTextChanged="@{(s, st, b, a) -> listener.onBLimitZxChanged(s, st, b, a)}"
|
||||||
|
android:paddingStart="0dp"
|
||||||
|
android:paddingEnd="0dp"
|
||||||
|
android:paddingBottom="0dp"
|
||||||
|
android:text="@={`` + config.bLimitZx}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</TableRow>
|
||||||
|
|
||||||
|
<TableRow
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:weightSum="3">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:hint="@string/axisx_y"
|
||||||
|
app:boxBackgroundColor="@android:color/transparent">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:ems="10"
|
||||||
|
android:inputType="numberDecimal|numberSigned"
|
||||||
|
android:onTextChanged="@{(s, st, b, a) -> listener.onBLimitXyChanged(s, st, b, a)}"
|
||||||
|
android:paddingStart="0dp"
|
||||||
|
android:paddingEnd="0dp"
|
||||||
|
android:paddingBottom="0dp"
|
||||||
|
android:text="@={`` + config.bLimitXy}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:hint="@string/axisy_y"
|
||||||
|
app:boxBackgroundColor="@android:color/transparent">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:ems="10"
|
||||||
|
android:inputType="numberDecimal|numberSigned"
|
||||||
|
android:onTextChanged="@{(s, st, b, a) -> listener.onBLimitYyChanged(s, st, b, a)}"
|
||||||
|
android:paddingStart="0dp"
|
||||||
|
android:paddingEnd="0dp"
|
||||||
|
android:paddingBottom="0dp"
|
||||||
|
android:text="@={`` + config.bLimitYy}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:hint="@string/axisz_y"
|
||||||
|
app:boxBackgroundColor="@android:color/transparent">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:ems="10"
|
||||||
|
android:inputType="numberDecimal|numberSigned"
|
||||||
|
android:onTextChanged="@{(s, st, b, a) -> listener.onBLimitZyChanged(s, st, b, a)}"
|
||||||
|
android:paddingStart="0dp"
|
||||||
|
android:paddingEnd="0dp"
|
||||||
|
android:paddingBottom="0dp"
|
||||||
|
android:text="@={`` + config.bLimitZy}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</TableRow>
|
||||||
|
|
||||||
|
</TableLayout>
|
||||||
|
</TableRow>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</TableRow>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</TableLayout>
|
</TableLayout>
|
||||||
|
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
@ -32,9 +32,16 @@
|
|||||||
<string name="pendulumrange">钟摆范围 (PendulumRange)</string>
|
<string name="pendulumrange">钟摆范围 (PendulumRange)</string>
|
||||||
<string name="average">Average</string>
|
<string name="average">Average</string>
|
||||||
<string name="rootweight">RootWeight</string>
|
<string name="rootweight">RootWeight</string>
|
||||||
<string name="uselimit_0_1">限制范围 (0/1)</string>
|
<string name="uselimit_0_1">范围限制倍率 (0 为不限制, 1 为原版)</string>
|
||||||
<string name="usearmcorrection">使用手臂矫正</string>
|
<string name="usearmcorrection">使用手臂矫正</string>
|
||||||
<string name="isdirty">IsDirty</string>
|
<string name="isdirty">IsDirty</string>
|
||||||
<string name="usescale">应用缩放</string>
|
<string name="usescale">应用缩放</string>
|
||||||
<string name="breast_scale">胸部缩放倍率</string>
|
<string name="breast_scale">胸部缩放倍率</string>
|
||||||
|
<string name="uselimitmultiplier">启用范围限制倍率</string>
|
||||||
|
<string name="axisx_x">axisX.x</string>
|
||||||
|
<string name="axisy_x">axisY.x</string>
|
||||||
|
<string name="axisz_x">axisZ.x</string>
|
||||||
|
<string name="axisx_y">axisX.y</string>
|
||||||
|
<string name="axisy_y">axisY.y</string>
|
||||||
|
<string name="axisz_y">axisZ.y</string>
|
||||||
</resources>
|
</resources>
|
@ -32,10 +32,17 @@
|
|||||||
<string name="pendulumrange">Pendulum Range</string>
|
<string name="pendulumrange">Pendulum Range</string>
|
||||||
<string name="average">Average</string>
|
<string name="average">Average</string>
|
||||||
<string name="rootweight">Root Weight</string>
|
<string name="rootweight">Root Weight</string>
|
||||||
<string name="uselimit_0_1">Use Limit (0/1)</string>
|
<string name="uselimit_0_1">Limit Range Multiplier (0 is Unlimited)</string>
|
||||||
<string name="usearmcorrection">Use Arm Correction</string>
|
<string name="usearmcorrection">Use Arm Correction</string>
|
||||||
<string name="isdirty">IsDirty</string>
|
<string name="isdirty">IsDirty</string>
|
||||||
<string name="usescale">Use Breast Scale</string>
|
<string name="usescale">Use Breast Scale</string>
|
||||||
<string name="breast_scale">Breast Scale</string>
|
<string name="breast_scale">Breast Scale</string>
|
||||||
|
<string name="uselimitmultiplier">Use Limit Multiplier</string>
|
||||||
|
<string name="axisx_x">axisX.x</string>
|
||||||
|
<string name="axisy_x">axisY.x</string>
|
||||||
|
<string name="axisz_x">axisZ.x</string>
|
||||||
|
<string name="axisx_y">axisX.y</string>
|
||||||
|
<string name="axisy_y">axisY.y</string>
|
||||||
|
<string name="axisz_y">axisZ.y</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
Loading…
x
Reference in New Issue
Block a user