mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-23 00:28:51 -05:00
Merge branch 'develop' into zelda64
This commit is contained in:
commit
d0ce76e5c6
@ -195,7 +195,6 @@ namespace Ship {
|
||||
SDL_GameControllerGetSensorData(Cont, SDL_SENSOR_GYRO, gyroData, 3);
|
||||
|
||||
const char* contName = SDL_GameControllerName(Cont);
|
||||
const int isSpecialController = !strcmp("PS5 Controller", contName);
|
||||
float gyro_drift_x = CVar_GetFloat(StringHelper::Sprintf("gCont%i_GyroDriftX", contNumber).c_str(), 0.0f);
|
||||
float gyro_drift_y = CVar_GetFloat(StringHelper::Sprintf("gCont%i_GyroDriftY", contNumber).c_str(), 0.0f);
|
||||
const float gyro_sensitivity = CVar_GetFloat(StringHelper::Sprintf("gCont%i_GyroSensitivity", contNumber).c_str(), 1.0f);
|
||||
@ -205,25 +204,14 @@ namespace Ship {
|
||||
}
|
||||
|
||||
if (gyro_drift_y == 0) {
|
||||
if (isSpecialController == 1) {
|
||||
gyro_drift_y = gyroData[2];
|
||||
}
|
||||
else {
|
||||
gyro_drift_y = gyroData[1];
|
||||
}
|
||||
gyro_drift_y = gyroData[1];
|
||||
}
|
||||
|
||||
CVar_SetFloat(StringHelper::Sprintf("gCont%i_GyroDriftX", contNumber).c_str(), gyro_drift_x);
|
||||
CVar_SetFloat(StringHelper::Sprintf("gCont%i_GyroDriftY", contNumber).c_str(), gyro_drift_y);
|
||||
|
||||
if (isSpecialController == 1) {
|
||||
wGyroX = gyroData[0] - gyro_drift_x;
|
||||
wGyroY = -gyroData[2] - gyro_drift_y;
|
||||
}
|
||||
else {
|
||||
wGyroX = gyroData[0] - gyro_drift_x;
|
||||
wGyroY = gyroData[1] - gyro_drift_y;
|
||||
}
|
||||
wGyroX = gyroData[0] - gyro_drift_x;
|
||||
wGyroY = gyroData[1] - gyro_drift_y;
|
||||
|
||||
wGyroX *= gyro_sensitivity;
|
||||
wGyroY *= gyro_sensitivity;
|
||||
|
@ -63,7 +63,6 @@ namespace SohImGui {
|
||||
GameOverlay* overlay = new GameOverlay;
|
||||
bool p_open = false;
|
||||
bool needs_save = false;
|
||||
std::vector<const char*> CustomTexts;
|
||||
ImVec4 hearts_colors;
|
||||
ImVec4 hearts_dd_colors;
|
||||
ImVec4 a_btn_colors;
|
||||
@ -880,13 +879,13 @@ namespace SohImGui {
|
||||
{
|
||||
if (ImGui::BeginMenu("Animated Link in Pause Menu")) {
|
||||
ImGui::Text("Rotation");
|
||||
EnhancementRadioButton("Disabled", "gPauseLiveRotation", 0);
|
||||
EnhancementRadioButton("Rotate Link with D-pad", "gPauseLiveRotation", 1);
|
||||
EnhancementRadioButton("Disabled", "gPauseLiveLinkRotation", 0);
|
||||
EnhancementRadioButton("Rotate Link with D-pad", "gPauseLiveLinkRotation", 1);
|
||||
Tooltip("Allow you to rotate Link on the Equipment menu with the DPAD\nUse DPAD-Up or DPAD-Down to reset Link's rotation");
|
||||
EnhancementRadioButton("Rotate Link with C-buttons", "gPauseLiveRotation", 2);
|
||||
EnhancementRadioButton("Rotate Link with C-buttons", "gPauseLiveLinkRotation", 2);
|
||||
Tooltip("Allow you to rotate Link on the Equipment menu with the C-buttons\nUse C-Up or C-Down to reset Link's rotation");
|
||||
|
||||
if (CVar_GetS32("gPauseLiveRotation", 0) != 0) {
|
||||
if (CVar_GetS32("gPauseLiveLinkRotation", 0) != 0) {
|
||||
EnhancementSliderInt("Rotation Speed: %d", "##MinRotationSpeed", "gPauseLiveLinkRotationSpeed", 1, 20, "");
|
||||
}
|
||||
ImGui::Separator();
|
||||
@ -911,7 +910,7 @@ namespace SohImGui {
|
||||
EnhancementRadioButton("Random", "gPauseLiveLink", 15);
|
||||
Tooltip("Randomize the animation played each time you open the menu");
|
||||
EnhancementRadioButton("Random cycle", "gPauseLiveLink", 16);
|
||||
Tooltip("andomize the animation played on hte menu after a certain time");
|
||||
Tooltip("Randomize the animation played on the menu after a certain time");
|
||||
if (CVar_GetS32("gPauseLiveLink", 0) >= 16) {
|
||||
EnhancementSliderInt("Frame to wait: %d", "##MinFrameCount", "gMinFrameCount", 1, 1000, "");
|
||||
}
|
||||
@ -1005,7 +1004,9 @@ namespace SohImGui {
|
||||
Tooltip("Turns off the level of detail setting, making models always use their higher poly variants");
|
||||
EnhancementCheckbox("Disable Draw Distance", "gDisableDrawDistance");
|
||||
Tooltip("Turns off the objects draw distance, making objects being visible from a longer range");
|
||||
if (CVar_GetS32("gDisableDrawDistance", 0) == 1) {
|
||||
if (CVar_GetS32("gDisableDrawDistance", 0) == 0) {
|
||||
CVar_SetS32("gDisableKokiriDrawDistance", 0);
|
||||
} else if (CVar_GetS32("gDisableDrawDistance", 0) == 1) {
|
||||
EnhancementCheckbox("Kokiri Draw Distance", "gDisableKokiriDrawDistance");
|
||||
Tooltip("Kokiris are mystical being that appear from a certain distance\nEnable this will remove their draw distance\nNeeds to reload the map to take effect");
|
||||
}
|
||||
|
@ -98,8 +98,8 @@ void KaleidoScope_DrawPlayerWork(GlobalContext* globalCtx) {
|
||||
f32 scale;
|
||||
Input* input = &globalCtx->state.input[0];
|
||||
s16 RotationSpeed = 150 * CVar_GetS32("gPauseLiveLinkRotationSpeed", 0);
|
||||
bool AllowCRotation = (CVar_GetS32("gPauseLiveLinkRotation", 0) == 2) ? true : false;
|
||||
bool AllowDPadRotation = (CVar_GetS32("gPauseLiveLinkRotation", 0) == 1) ? true : false;
|
||||
u8 AllowCRotation = (CVar_GetS32("gPauseLiveLinkRotation", 0) == 2) ? true : false;
|
||||
u8 AllowDPadRotation = (CVar_GetS32("gPauseLiveLinkRotation", 0) == 1) ? true : false;
|
||||
|
||||
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
|
||||
pos.x = 2.0f;
|
||||
@ -120,19 +120,19 @@ void KaleidoScope_DrawPlayerWork(GlobalContext* globalCtx) {
|
||||
|
||||
link_kaleido_rot.x = link_kaleido_rot.z = 0;
|
||||
|
||||
if (AllowDPadRotation && CHECK_BTN_ALL(input->cur.button, BTN_DLEFT) ||
|
||||
AllowCRotation && CHECK_BTN_ALL(input->cur.button, BTN_CLEFT)) {
|
||||
if ((AllowDPadRotation && CHECK_BTN_ALL(input->cur.button, BTN_DLEFT)) ||
|
||||
(AllowCRotation && CHECK_BTN_ALL(input->cur.button, BTN_CLEFT))) {
|
||||
link_kaleido_rot.y = link_kaleido_rot.y - RotationSpeed;
|
||||
} else if (AllowDPadRotation && CHECK_BTN_ALL(input->cur.button, BTN_DRIGHT) ||
|
||||
AllowCRotation && CHECK_BTN_ALL(input->cur.button, BTN_CRIGHT)) {
|
||||
} else if ((AllowDPadRotation && CHECK_BTN_ALL(input->cur.button, BTN_DRIGHT)) ||
|
||||
(AllowCRotation && CHECK_BTN_ALL(input->cur.button, BTN_CRIGHT))) {
|
||||
link_kaleido_rot.y = link_kaleido_rot.y + RotationSpeed;
|
||||
}
|
||||
|
||||
if (AllowDPadRotation && CHECK_BTN_ALL(input->press.button, BTN_DUP) ||
|
||||
AllowDPadRotation && CHECK_BTN_ALL(input->press.button, BTN_DDOWN)) {
|
||||
if ((AllowDPadRotation && CHECK_BTN_ALL(input->press.button, BTN_DUP)) ||
|
||||
(AllowDPadRotation && CHECK_BTN_ALL(input->press.button, BTN_DDOWN))) {
|
||||
link_kaleido_rot.y = 32300;
|
||||
} else if (AllowCRotation && CHECK_BTN_ALL(input->press.button, BTN_CUP) ||
|
||||
AllowCRotation && CHECK_BTN_ALL(input->press.button, BTN_CDOWN)) {
|
||||
} else if ((AllowCRotation && CHECK_BTN_ALL(input->press.button, BTN_CUP)) ||
|
||||
(AllowCRotation && CHECK_BTN_ALL(input->press.button, BTN_CDOWN))) {
|
||||
link_kaleido_rot.y = 32300;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user