Skip to content

Commit

Permalink
Merge pull request #141 from chinosk6/main
Browse files Browse the repository at this point in the history
更新 config schema
  • Loading branch information
chinosk6 authored Jun 20, 2023
2 parents 44717e5 + ff4b603 commit e47f81e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion resources/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
"type": "boolean"
},
"enableLiveDofController": {
"description": "启用景深控制(点击 LIVE 设置按钮开启)",
"description": "启用 Live 参数控制台(点击 LIVE 设置按钮开启)",
"type": "boolean",
"default": false
},
Expand Down
2 changes: 1 addition & 1 deletion resources/config_en.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
"type": "number"
},
"enableLiveDofController": {
"description": "Enable DOF control (click LIVE setting button)",
"description": "Enable Live control pannel (click LIVE setting button)",
"type": "boolean",
"default": false
},
Expand Down
16 changes: 8 additions & 8 deletions resources/config_zh_tw.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"minimum": -1
},
"better60FPS": {
"description": "開啟60幀優化",
"description": "開啟60幀最佳化",
"type": "boolean",
"default": false
},
Expand All @@ -30,15 +30,15 @@
"type": "boolean"
},
"enableVSync": {
"description": "開啟垂直同步 (開啟後 maxFps 設定將會失效)",
"description": "開啟垂直同步 (開啟後 maxFps[幀率限制] 設定將會失效)",
"type": "boolean"
},
"unlockSize": {
"description": "允許遊戲使用`1080p`以上的解析度",
"description": "允許遊戲使用`1080P`以上的解析度",
"type": "boolean"
},
"aspect_ratio_new": {
"description": "設定UI比例,默認16:9\n若將值設為-1,遊戲UI比例將會自我調整您的螢幕比例\n若UI顯示不全,可以在下麵設定\"自定義UI縮放\"\n修改後需要重啓遊戲",
"description": "設定UI比例,默認16:9\n若將值設為-1,遊戲UI比例將會自我調整您的螢幕比例\n若UI顯示不全,可以在下面設定\"自定義UI縮放\"\n修改後需要重啓遊戲",
"type": "object",
"properties": {
"w": {
Expand Down Expand Up @@ -132,7 +132,7 @@
"type": "number"
},
"enableLiveDofController": {
"description": "啟用景深控制(點擊LIVE設定按鈕開啟)",
"description": "啟用 Live 參數控制台 (點擊Live設定按鈕開啟)",
"type": "boolean",
"default": false
},
Expand Down Expand Up @@ -193,7 +193,7 @@
"type": "number"
},
"defaultFOV": {
"description": "默認FOV",
"description": "預設FOV",
"type": "number"
},
"freecam_lookat_target": {
Expand Down Expand Up @@ -289,7 +289,7 @@
"type": "object",
"properties": {
"source": {
"description": "自動更新的倉庫源",
"description": "自動更新的專案來源",
"type": "string"
},
"path": {
Expand Down Expand Up @@ -393,7 +393,7 @@
}
},
"loadDll": {
"description": "加載其它DLL挿件",
"description": "加載其他DLL插件",
"type": "array",
"items": {
"type": "string"
Expand Down
32 changes: 16 additions & 16 deletions src/hook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2254,28 +2254,28 @@ namespace

printf("%ls: orig stiffnessForce=%f, dragForce=%f, gravity=%f, childCount=%d\n", boneName.data(), stiffnessForce, dragForce, gravity, getListCount(childElements));

il2cpp_symbols::iterate_list(childElements, [&](size_t index, void* chaildElement) {
auto boneNameStr = il2cpp_symbols::read_field<Il2CppString*>(chaildElement, CySpringParamDataChildElement_boneName);
il2cpp_symbols::iterate_list(childElements, [&](size_t index, void* childElement) {
auto boneNameStr = il2cpp_symbols::read_field<Il2CppString*>(childElement, CySpringParamDataChildElement_boneName);
std::wstring boneName = boneNameStr->start_char;
if (boost::regex_search(boneName, expr)) {
/*
auto stiffnessForce = il2cpp_symbols::read_field<float>(chaildElement, CySpringParamDataChildElement_stiffnessForce);
auto dragForce = il2cpp_symbols::read_field<float>(chaildElement, CySpringParamDataChildElement_dragForce);
auto gravity = il2cpp_symbols::read_field<float>(chaildElement, CySpringParamDataChildElement_gravity);
auto stiffnessForce = il2cpp_symbols::read_field<float>(childElement, CySpringParamDataChildElement_stiffnessForce);
auto dragForce = il2cpp_symbols::read_field<float>(childElement, CySpringParamDataChildElement_dragForce);
auto gravity = il2cpp_symbols::read_field<float>(childElement, CySpringParamDataChildElement_gravity);
printf("child - %ls: orig stiffnessForce=%f, dragForce=%f, gravity=%f\n", boneName.data(), stiffnessForce, dragForce, gravity);
*/

if (i.replace_stiffnessForce) il2cpp_symbols::write_field(chaildElement, CySpringParamDataChildElement_stiffnessForce, i.stiffnessForce);
if (i.replace_dragForce) il2cpp_symbols::write_field(chaildElement, CySpringParamDataChildElement_dragForce, i.dragForce);
if (i.replace_gravity) il2cpp_symbols::write_field(chaildElement, CySpringParamDataChildElement_gravity, i.gravity);
if (i.replace_verticalWindRateSlow) il2cpp_symbols::write_field(chaildElement, CySpringParamDataChildElement_verticalWindRateSlow, i.verticalWindRateSlow);
if (i.replace_collisionRadius) il2cpp_symbols::write_field(chaildElement, CySpringParamDataChildElement_collisionRadius, i.collisionRadius);
if (i.replace_needEnvCollision) il2cpp_symbols::write_field(chaildElement, CySpringParamDataChildElement_needEnvCollision, i.needEnvCollision);
if (i.replace_horizontalWindRateSlow) il2cpp_symbols::write_field(chaildElement, CySpringParamDataChildElement_horizontalWindRateSlow, i.horizontalWindRateSlow);
if (i.replace_verticalWindRateFast) il2cpp_symbols::write_field(chaildElement, CySpringParamDataChildElement_verticalWindRateFast, i.verticalWindRateFast);
if (i.replace_horizontalWindRateFast) il2cpp_symbols::write_field(chaildElement, CySpringParamDataChildElement_horizontalWindRateFast, i.horizontalWindRateFast);
if (i.replace_isLimit) il2cpp_symbols::write_field(chaildElement, CySpringParamDataChildElement_isLimit, i.isLimit);
if (i.replace_MoveSpringApplyRate) il2cpp_symbols::write_field(chaildElement, CySpringParamDataChildElement_MoveSpringApplyRate, i.MoveSpringApplyRate);
if (i.replace_stiffnessForce) il2cpp_symbols::write_field(childElement, CySpringParamDataChildElement_stiffnessForce, i.stiffnessForce);
if (i.replace_dragForce) il2cpp_symbols::write_field(childElement, CySpringParamDataChildElement_dragForce, i.dragForce);
if (i.replace_gravity) il2cpp_symbols::write_field(childElement, CySpringParamDataChildElement_gravity, i.gravity);
if (i.replace_verticalWindRateSlow) il2cpp_symbols::write_field(childElement, CySpringParamDataChildElement_verticalWindRateSlow, i.verticalWindRateSlow);
if (i.replace_collisionRadius) il2cpp_symbols::write_field(childElement, CySpringParamDataChildElement_collisionRadius, i.collisionRadius);
if (i.replace_needEnvCollision) il2cpp_symbols::write_field(childElement, CySpringParamDataChildElement_needEnvCollision, i.needEnvCollision);
if (i.replace_horizontalWindRateSlow) il2cpp_symbols::write_field(childElement, CySpringParamDataChildElement_horizontalWindRateSlow, i.horizontalWindRateSlow);
if (i.replace_verticalWindRateFast) il2cpp_symbols::write_field(childElement, CySpringParamDataChildElement_verticalWindRateFast, i.verticalWindRateFast);
if (i.replace_horizontalWindRateFast) il2cpp_symbols::write_field(childElement, CySpringParamDataChildElement_horizontalWindRateFast, i.horizontalWindRateFast);
if (i.replace_isLimit) il2cpp_symbols::write_field(childElement, CySpringParamDataChildElement_isLimit, i.isLimit);
if (i.replace_MoveSpringApplyRate) il2cpp_symbols::write_field(childElement, CySpringParamDataChildElement_MoveSpringApplyRate, i.MoveSpringApplyRate);
}
});
}
Expand Down

0 comments on commit e47f81e

Please sign in to comment.