Correct default value of gInvertYAxis and change default trials required to vanilla (#1610)

This commit is contained in:
Garrett Cox 2022-09-26 19:09:01 -05:00 committed by GitHub
parent c21b2e8f00
commit 6265613bc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 11 deletions

View File

@ -3613,8 +3613,8 @@ void GenerateRandomizerImgui() {
cvarSettings[RSK_RAINBOW_BRIDGE_REWARD_COUNT] = CVar_GetS32("gRandomizeRewardCount", 9); cvarSettings[RSK_RAINBOW_BRIDGE_REWARD_COUNT] = CVar_GetS32("gRandomizeRewardCount", 9);
cvarSettings[RSK_RAINBOW_BRIDGE_DUNGEON_COUNT] = CVar_GetS32("gRandomizeDungeonCount", 8); cvarSettings[RSK_RAINBOW_BRIDGE_DUNGEON_COUNT] = CVar_GetS32("gRandomizeDungeonCount", 8);
cvarSettings[RSK_RAINBOW_BRIDGE_TOKEN_COUNT] = CVar_GetS32("gRandomizeTokenCount", 100); cvarSettings[RSK_RAINBOW_BRIDGE_TOKEN_COUNT] = CVar_GetS32("gRandomizeTokenCount", 100);
cvarSettings[RSK_RANDOM_TRIALS] = CVar_GetS32("gRandomizeGanonTrial", 0); cvarSettings[RSK_RANDOM_TRIALS] = CVar_GetS32("gRandomizeGanonTrial", 1);
cvarSettings[RSK_TRIAL_COUNT] = CVar_GetS32("gRandomizeGanonTrialCount", 0); cvarSettings[RSK_TRIAL_COUNT] = CVar_GetS32("gRandomizeGanonTrialCount", 6);
cvarSettings[RSK_STARTING_OCARINA] = CVar_GetS32("gRandomizeStartingOcarina", 0); cvarSettings[RSK_STARTING_OCARINA] = CVar_GetS32("gRandomizeStartingOcarina", 0);
cvarSettings[RSK_SHUFFLE_OCARINA] = CVar_GetS32("gRandomizeShuffleOcarinas", 0) || cvarSettings[RSK_SHUFFLE_OCARINA] = CVar_GetS32("gRandomizeShuffleOcarinas", 0) ||
CVar_GetS32("gRandomizeStartingOcarina", 0); CVar_GetS32("gRandomizeStartingOcarina", 0);
@ -3974,9 +3974,9 @@ void DrawRandoEditor(bool& open) {
"\n" "\n"
"Random Number - A Random number and set of trials will be required." "Random Number - A Random number and set of trials will be required."
); );
UIWidgets::EnhancementCombobox("gRandomizeGanonTrial", randoGanonsTrial, 3, 0); UIWidgets::EnhancementCombobox("gRandomizeGanonTrial", randoGanonsTrial, 3, 1);
ImGui::PopItemWidth(); ImGui::PopItemWidth();
if (CVar_GetS32("gRandomizeGanonTrial", 0) == 1) { if (CVar_GetS32("gRandomizeGanonTrial", 1) == 1) {
ImGui::Dummy(ImVec2(0.0f, 0.0f)); ImGui::Dummy(ImVec2(0.0f, 0.0f));
UIWidgets::EnhancementSliderInt("Ganon's Trial Count: %d", "##RandoTrialCount", UIWidgets::EnhancementSliderInt("Ganon's Trial Count: %d", "##RandoTrialCount",
"gRandomizeGanonTrialCount", 1, 6, "", 6, true); "gRandomizeGanonTrialCount", 1, 6, "", 6, true);

View File

@ -114,7 +114,7 @@ namespace GameMenuBar {
// Invert Camera X Axis // Invert Camera X Axis
CVar_SetS32("gInvertXAxis", 0); CVar_SetS32("gInvertXAxis", 0);
// Invert Camera Y Axis // Invert Camera Y Axis
CVar_SetS32("gInvertYAxis", 0); CVar_SetS32("gInvertYAxis", 1);
// Right Stick Aiming // Right Stick Aiming
CVar_SetS32("gRightStickAiming", 0); CVar_SetS32("gRightStickAiming", 0);
// Auto-Center First Person View // Auto-Center First Person View

View File

@ -1489,7 +1489,7 @@ s32 Camera_Free(Camera* camera) {
f32 newCamY = D_8015BD7C->state.input[0].cur.right_stick_y * 10.0f; f32 newCamY = D_8015BD7C->state.input[0].cur.right_stick_y * 10.0f;
camera->globalCtx->camX += newCamX * (CVar_GetS32("gInvertXAxis", 0) ? -1 : 1); camera->globalCtx->camX += newCamX * (CVar_GetS32("gInvertXAxis", 0) ? -1 : 1);
camera->globalCtx->camY += newCamY * (CVar_GetS32("gInvertYAxis", 0) ? 1 : -1); camera->globalCtx->camY += newCamY * (CVar_GetS32("gInvertYAxis", 1) ? 1 : -1);
if (camera->globalCtx->camY > 0x32A4) { if (camera->globalCtx->camY > 0x32A4) {
camera->globalCtx->camY = 0x32A4; camera->globalCtx->camY = 0x32A4;

View File

@ -11123,7 +11123,7 @@ s16 func_8084ABD8(GlobalContext* globalCtx, Player* this, s32 arg2, s16 arg3) {
if (!func_8002DD78(this) && !func_808334B4(this) && (arg2 == 0)) { if (!func_8002DD78(this) && !func_808334B4(this) && (arg2 == 0)) {
if (CVar_GetS32("gAutoCenterView", 0) != 0) { if (CVar_GetS32("gAutoCenterView", 0) != 0) {
temp2 = sControlInput->rel.stick_y * 240.0f * (CVar_GetS32("gInvertYAxis", 0) ? -1 : 1); temp2 = sControlInput->rel.stick_y * 240.0f * (CVar_GetS32("gInvertYAxis", 1) ? -1 : 1);
Math_SmoothStepToS(&this->actor.focus.rot.x, temp2, 14, 4000, 30); Math_SmoothStepToS(&this->actor.focus.rot.x, temp2, 14, 4000, 30);
temp2 = sControlInput->rel.stick_x * -16.0f * (CVar_GetS32("gInvertXAxis", 0) ? -1 : 1); temp2 = sControlInput->rel.stick_x * -16.0f * (CVar_GetS32("gInvertXAxis", 0) ? -1 : 1);
@ -11133,7 +11133,7 @@ s16 func_8084ABD8(GlobalContext* globalCtx, Player* this, s32 arg2, s16 arg3) {
temp1 = (this->stateFlags1 & PLAYER_STATE1_23) ? 3500 : 14000; temp1 = (this->stateFlags1 & PLAYER_STATE1_23) ? 3500 : 14000;
temp3 = ((sControlInput->rel.stick_y >= 0) ? 1 : -1) * temp3 = ((sControlInput->rel.stick_y >= 0) ? 1 : -1) *
(s32)((1.0f - Math_CosS(sControlInput->rel.stick_y * 200)) * 1500.0f * (s32)((1.0f - Math_CosS(sControlInput->rel.stick_y * 200)) * 1500.0f *
(CVar_GetS32("gInvertYAxis", 0) ? 1 : -1)); (CVar_GetS32("gInvertYAxis", 1) ? 1 : -1));
this->actor.focus.rot.x += temp3; this->actor.focus.rot.x += temp3;
if (fabsf(sControlInput->cur.gyro_x) > 0.01f) { if (fabsf(sControlInput->cur.gyro_x) > 0.01f) {
@ -11142,7 +11142,7 @@ s16 func_8084ABD8(GlobalContext* globalCtx, Player* this, s32 arg2, s16 arg3) {
if (fabsf(sControlInput->cur.right_stick_y) > 15.0f && CVar_GetS32("gRightStickAiming", 0) != 0) { if (fabsf(sControlInput->cur.right_stick_y) > 15.0f && CVar_GetS32("gRightStickAiming", 0) != 0) {
this->actor.focus.rot.x -= this->actor.focus.rot.x -=
(sControlInput->cur.right_stick_y) * 10.0f * (CVar_GetS32("gInvertYAxis", 0) ? -1 : 1); (sControlInput->cur.right_stick_y) * 10.0f * (CVar_GetS32("gInvertYAxis", 1) ? -1 : 1);
} }
this->actor.focus.rot.x = CLAMP(this->actor.focus.rot.x, -temp1, temp1); this->actor.focus.rot.x = CLAMP(this->actor.focus.rot.x, -temp1, temp1);
@ -11169,7 +11169,7 @@ s16 func_8084ABD8(GlobalContext* globalCtx, Player* this, s32 arg2, s16 arg3) {
temp1 = (this->stateFlags1 & PLAYER_STATE1_23) ? 3500 : 14000; temp1 = (this->stateFlags1 & PLAYER_STATE1_23) ? 3500 : 14000;
temp3 = temp3 =
((sControlInput->rel.stick_y >= 0) ? 1 : -1) * (s32)((1.0f - Math_CosS(sControlInput->rel.stick_y * 200)) * ((sControlInput->rel.stick_y >= 0) ? 1 : -1) * (s32)((1.0f - Math_CosS(sControlInput->rel.stick_y * 200)) *
1500.0f * (CVar_GetS32("gInvertYAxis", 0) ? 1 : -1)); 1500.0f * (CVar_GetS32("gInvertYAxis", 1) ? 1 : -1));
this->actor.focus.rot.x += temp3; this->actor.focus.rot.x += temp3;
if (fabsf(sControlInput->cur.gyro_x) > 0.01f) { if (fabsf(sControlInput->cur.gyro_x) > 0.01f) {
@ -11178,7 +11178,7 @@ s16 func_8084ABD8(GlobalContext* globalCtx, Player* this, s32 arg2, s16 arg3) {
if (fabsf(sControlInput->cur.right_stick_y) > 15.0f && CVar_GetS32("gRightStickAiming", 0) != 0) { if (fabsf(sControlInput->cur.right_stick_y) > 15.0f && CVar_GetS32("gRightStickAiming", 0) != 0) {
this->actor.focus.rot.x -= this->actor.focus.rot.x -=
(sControlInput->cur.right_stick_y) * 10.0f * (CVar_GetS32("gInvertYAxis", 0) ? -1 : 1); (sControlInput->cur.right_stick_y) * 10.0f * (CVar_GetS32("gInvertYAxis", 1) ? -1 : 1);
} }
this->actor.focus.rot.x = CLAMP(this->actor.focus.rot.x, -temp1, temp1); this->actor.focus.rot.x = CLAMP(this->actor.focus.rot.x, -temp1, temp1);