mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 22:33:43 -07:00
ADDED/ Choice to use C-Button or D-pad
This commit is contained in:
parent
920aa7a2f5
commit
d97ecd125b
2 changed files with 20 additions and 9 deletions
|
@ -686,9 +686,14 @@ namespace SohImGui {
|
||||||
if (ImGui::BeginMenu("Graphics"))
|
if (ImGui::BeginMenu("Graphics"))
|
||||||
{
|
{
|
||||||
if (ImGui::BeginMenu("Animated Link in Pause Menu")) {
|
if (ImGui::BeginMenu("Animated Link in Pause Menu")) {
|
||||||
EnhancementCheckbox("Rotate Link with D-pad", "gPauseLiveLinkRotation");
|
ImGui::Text("Rotation");
|
||||||
|
EnhancementRadioButton("Disabled", "gPauseLiveRotation", 0);
|
||||||
|
EnhancementRadioButton("Rotate Link with D-pad", "gPauseLiveRotation", 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");
|
Tooltip("Allow you to rotate Link on the Equipment menu with the DPAD\nUse DPAD-Up or DPAD-Down to reset Link's rotation");
|
||||||
if (CVar_GetS32("gPauseLiveLinkRotation", 0) == 1) {
|
EnhancementRadioButton("Rotate Link with C-buttons", "gPauseLiveRotation", 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) {
|
||||||
EnhancementSliderInt("Rotation Speed: %d", "##MinRotationSpeed", "gPauseLiveLinkRotationSpeed", 1, 20, "");
|
EnhancementSliderInt("Rotation Speed: %d", "##MinRotationSpeed", "gPauseLiveLinkRotationSpeed", 1, 20, "");
|
||||||
}
|
}
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
|
@ -98,6 +98,8 @@ void KaleidoScope_DrawPlayerWork(GlobalContext* globalCtx) {
|
||||||
f32 scale;
|
f32 scale;
|
||||||
Input* input = &globalCtx->state.input[0];
|
Input* input = &globalCtx->state.input[0];
|
||||||
s16 RotationSpeed = 150 * CVar_GetS32("gPauseLiveLinkRotationSpeed", 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;
|
||||||
|
|
||||||
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
|
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
|
||||||
pos.x = 2.0f;
|
pos.x = 2.0f;
|
||||||
|
@ -118,20 +120,24 @@ void KaleidoScope_DrawPlayerWork(GlobalContext* globalCtx) {
|
||||||
|
|
||||||
link_kaleido_rot.x = link_kaleido_rot.z = 0;
|
link_kaleido_rot.x = link_kaleido_rot.z = 0;
|
||||||
|
|
||||||
if (CHECK_BTN_ALL(input->cur.button, BTN_DLEFT) && CVar_GetS32("gPauseLiveLink", 1) >= 1) {
|
if (AllowDPadRotation && CHECK_BTN_ALL(input->cur.button, BTN_DLEFT) ||
|
||||||
//printf("Rotation (L)Desired:[%d]\n", link_kaleido_rot.x);
|
AllowCRotation && CHECK_BTN_ALL(input->cur.button, BTN_CLEFT)) {
|
||||||
link_kaleido_rot.y = link_kaleido_rot.y - RotationSpeed;
|
link_kaleido_rot.y = link_kaleido_rot.y - RotationSpeed;
|
||||||
link_kaleido_rot.x = 0;
|
} else if (AllowDPadRotation && CHECK_BTN_ALL(input->cur.button, BTN_DRIGHT) ||
|
||||||
} else if (CHECK_BTN_ALL(input->cur.button, BTN_DRIGHT) && CVar_GetS32("gPauseLiveLink", 1) >= 1) {
|
AllowCRotation && CHECK_BTN_ALL(input->cur.button, BTN_CRIGHT)) {
|
||||||
//printf("Rotation (R)Desired:[%d]\n", link_kaleido_rot.x);
|
|
||||||
link_kaleido_rot.y = link_kaleido_rot.y + RotationSpeed;
|
link_kaleido_rot.y = link_kaleido_rot.y + RotationSpeed;
|
||||||
link_kaleido_rot.x = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CHECK_BTN_ALL(input->press.button, BTN_DUP) || CHECK_BTN_ALL(input->press.button, BTN_DDOWN) && CVar_GetS32("gPauseLiveLink", 1) >= 1) {
|
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)) {
|
||||||
link_kaleido_rot.y = 32300;
|
link_kaleido_rot.y = 32300;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
link_kaleido_rot.x = 0;
|
||||||
|
|
||||||
extern int fbTest;
|
extern int fbTest;
|
||||||
gsSPSetFB(globalCtx->state.gfxCtx->polyOpa.p++, fbTest);
|
gsSPSetFB(globalCtx->state.gfxCtx->polyOpa.p++, fbTest);
|
||||||
func_8009214C(globalCtx, pauseCtx->playerSegment, &pauseCtx->playerSkelAnime, &pos, &link_kaleido_rot, scale,
|
func_8009214C(globalCtx, pauseCtx->playerSegment, &pauseCtx->playerSkelAnime, &pos, &link_kaleido_rot, scale,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue